apply_filters( 'new_admin_email_content', string $email_text, array $new_admin_email )
- Since
- MU (3.0.0), 4.9.0
Filters the text of the email sent when a change of site admin 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 proposed new site admin email address.
-
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_admin_emailarray- { Data relating to the new site admin email address.
@type string $hash The secure hash used in the confirmation link URL.
@type string $newemail The proposed new site admin email address.
}$hashstringThe secure hash used in the confirmation link URL.$newemailstringThe proposed new site admin email address.
Where this hook fires · 1
wp-admin/includes/misc.php:1503update_option_new_admin_email()
Source code
* Data relating to the new site admin email address. * * @type string $hash The secure hash used in the confirmation link URL. * @type string $newemail The proposed new site admin email address. * } */ $content = apply_filters( 'new_admin_email_content', $email_text, $new_admin_email ); $current_user = wp_get_current_user(); $content = str_replace( '###USERNAME###', $current_user->user_login, $content ); $content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'options.php?adminhash=' . $hash ) ), $content ); $content = str_replace( '###EMAIL###', $value, $content ); $content = str_replace( '###SITENAME###', wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ), $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.