new_user_email_content
Filters the text of the email sent when a change of user email address is attempted.
The following strings have a special meaning and will get replaced dynamically:
-
USERNAME### The current user's username.
-
ADMIN_URL### The link to click on to confirm the email change.
-
EMAIL### The new email.
-
SITENAME### The name of the site.
-
SITEURL### The URL to the site.
Usage
add_filter( 'new_user_email_content', 'wp_kama_new_user_email_content_filter', 10, 2 ); /** * Function for `new_user_email_content` filter-hook. * * @param string $email_text Text in the email. * @param array $new_user_email Data relating to the new user email address. * * @return string */ function wp_kama_new_user_email_content_filter( $email_text, $new_user_email ){ // filter... return $email_text; }
- $email_text(string)
- Text in the email.
- $new_user_email(array)
Data relating to the new user email address.
-
hash(string)
The secure hash used in the confirmation link URL. - newemail(string)
The proposed new email address.
-
Changelog
Since 3.0.0 | Introduced. |
Since 4.9.0 | This filter is no longer Multisite specific. |
Where the hook is called
new_user_email_content
wp-includes/user.php 3774
$content = apply_filters( 'new_user_email_content', $email_text, $new_user_email );