invited_user_email WordPress Filter Hook

The WordPress hook 'invited_user_email' allows you to modify the email that is sent to a user when they are invited to join a site. This hook gives you the ability to customize the email message and subject, as well as the from address.

apply_filters( 'invited_user_email', array $new_user_email, int $user_id, array $role, string $newuser_key ) #

Filters the contents of the email sent when an existing user is invited to join the site.


Parameters

$new_user_email

(array)Used to build wp_mail().

  • 'to'
    (string) The email address of the invited user.
  • 'subject'
    (string) The subject of the email.
  • 'message'
    (string) The content of the email.
  • 'headers'
    (string) Headers.

$user_id

(int)The invited user's ID.

$role

(array)Array containing role information for the invited user.

$newuser_key

(string)The key of the invitation.


Top ↑

Source

File: wp-admin/user-new.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
5.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.