apply_filters( 'new_network_admin_email_content', string $email_text, array $new_admin_email )
- Since
- 4.9.0
Filters the text of the email sent when a change of network 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 network admin email address.###SITENAME###The name of the network.###SITEURL###The URL to the network.
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 network admin email address.
@type string $hash The secure hash used in the confirmation link URL.
@type string $newemail The proposed new network admin email address.
}$hashstringThe secure hash used in the confirmation link URL.$newemailstringThe proposed new network admin email address.
Where this hook fires · 1
wp-includes/ms-functions.php:2836update_network_option_new_admin_email()
Source code
* Data relating to the new network admin email address. * * @type string $hash The secure hash used in the confirmation link URL. * @type string $newemail The proposed new network admin email address. * } */ $content = apply_filters( 'new_network_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( network_admin_url( 'settings.php?network_admin_hash=' . $hash ) ), $content ); $content = str_replace( '###EMAIL###', $value, $content ); $content = str_replace( '###SITENAME###', wp_specialchars_decode( get_site_option( 'site_name' ), 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.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 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.