Privacy: filter the email subject in `_wp_privacy_send_request_confirmation_notification()`.

Props garrett-eclipse, birgire, desrosj.
Fixes #44382.
Built from https://develop.svn.wordpress.org/trunk@43373


git-svn-id: http://core.svn.wordpress.org/trunk@43201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2018-06-28 02:41:13 +00:00
parent cefaaa0b51
commit ac269e570e
2 changed files with 31 additions and 7 deletions

View File

@ -2973,12 +2973,6 @@ function _wp_privacy_send_request_confirmation_notification( $request_id ) {
return;
}
$subject = sprintf(
/* translators: %s Site name. */
__( '[%s] Action Confirmed' ),
wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES )
);
$manage_url = add_query_arg( 'page', $request_data->action_name, admin_url( 'tools.php' ) );
/**
@ -3049,6 +3043,7 @@ All at ###SITENAME###
* @type string $manage_url The link to click manage privacy requests of this type.
* @type string $sitename The site name sending the mail.
* @type string $siteurl The site URL sending the mail.
* @type string $admin_email The administrator email receiving the mail.
* }
*/
$content = apply_filters( 'user_confirmed_action_email_content', $email_text, $email_data );
@ -3059,6 +3054,35 @@ All at ###SITENAME###
$content = str_replace( '###MANAGE_URL###', esc_url_raw( $email_data['manage_url'] ), $content );
$content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
$subject = sprintf(
/* translators: %s Site name. */
__( '[%s] Action Confirmed' ),
$blogname
);
/**
* Filters the subject of the user request confirmation email.
*
* @since 4.9.7
*
* @param string $subject The email subject.
* @param string $blogname The name of the site.
* @param array $email_data {
* Data relating to the account action email.
*
* @type WP_User_Request $request User request object.
* @type string $user_email The email address confirming a request
* @type string $description Description of the action being performed so the user knows what the email is for.
* @type string $manage_url The link to click manage privacy requests of this type.
* @type string $sitename The site name sending the mail.
* @type string $siteurl The site URL sending the mail.
* @type string $admin_email The administrator email receiving the mail.
* }
*/
$subject = apply_filters( 'user_request_confirmed_email_subject', $subject, $blogname, $email_data );
$email_sent = wp_mail( $email_data['admin_email'], $subject, $content );
if ( $email_sent ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43371';
$wp_version = '5.0-alpha-43373';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.