apply_filters( 'new_user_email_content', string $email_text, array $new_user_email )
- Since
- MU (3.0.0), 4.9.0
Filters the text of the email sent when a change of user email address is attempted.
Description
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.
Compatibility
- WordPress
- since 4.9.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$email_textstring- Text in the email.
$new_user_emailarray- { Data relating to the new user email address.
@type string $hash The secure hash used in the confirmation link URL.
@type string $newemail The proposed new email address.
}$hashstringThe secure hash used in the confirmation link URL.$newemailstringThe proposed new email address.
Where this hook fires · 1
wp-includes/user.php:3869send_confirmation_on_profile_email()
Source code
* Data relating to the new user email address. * * @type string $hash The secure hash used in the confirmation link URL. * @type string $newemail The proposed new email address. * } */ $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email ); $content = str_replace( '###USERNAME###', $current_user->user_login, $content ); $content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'profile.php?newuseremail=' . $hash ) ), $content ); $content = str_replace( '###EMAIL###', $_POST['email'], $content ); $content = str_replace( '###SITENAME###', $sitename, $content ); $content = str_replace( '###SITEURL###', home_url(), $content );Changelog
Introduced in 4.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
4.9.0
This filter is no longer Multisite specific.from the docblock
MU (3.0.0)
MU (3.0.0)from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.