mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-08 14:44:37 +00:00
Administration: Introduce new_admin_email_subject filter.
This changeset introduces the `new_admin_email_subject` hook which allow developers to filter the subject of the email sent when a change of site admin email address is attempted. Props MadtownLems, johnbillion, alexanderkoledov, shooper, Marc_J, nikmeyer, xlthlx, devmuhib, nuhel, audrasjb. Fixes #59250. git-svn-id: https://develop.svn.wordpress.org/trunk@57283 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1531,16 +1531,23 @@ All at ###SITENAME###
|
||||
$site_title = parse_url( home_url(), PHP_URL_HOST );
|
||||
}
|
||||
|
||||
wp_mail(
|
||||
$value,
|
||||
sprintf(
|
||||
/* translators: New admin email address notification email subject. %s: Site title. */
|
||||
__( '[%s] New Admin Email Address' ),
|
||||
$site_title
|
||||
),
|
||||
$content
|
||||
$subject = sprintf(
|
||||
/* translators: New admin email address notification email subject. %s: Site title. */
|
||||
__( '[%s] New Admin Email Address' ),
|
||||
$site_title
|
||||
);
|
||||
|
||||
/**
|
||||
* Filters the subject of the email sent when a change of site admin email address is attempted.
|
||||
*
|
||||
* @since 6.5.0
|
||||
*
|
||||
* @param string $subject Subject of the email.
|
||||
*/
|
||||
$subject = apply_filters( 'new_admin_email_subject', $subject );
|
||||
|
||||
wp_mail( $value, $subject, $content );
|
||||
|
||||
if ( $switched_locale ) {
|
||||
restore_previous_locale();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user