Privacy: add request type and filter to the subject of request confirmation emails for GDPR.

Props desrosj, azaozz.
Merges [43197] to the 4.9 branch.
Fixes #43968.
Built from https://develop.svn.wordpress.org/branches/4.9@43198


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2018-05-09 17:54:24 +00:00
parent 0827e54cc0
commit 1d477066e4
2 changed files with 27 additions and 2 deletions

View File

@ -3063,8 +3063,33 @@ All at ###SITENAME###
$content = str_replace( '###SITENAME###', wp_specialchars_decode( $email_data['sitename'], ENT_QUOTES ), $content );
$content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
$blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
/* translators: Privacy data request subject. 1: Site name, 2: Name of the action */
$subject = sprintf( __( '[%1$s] Confirm Action: %2$s' ), $blogname, $email_data['description'] );
/**
* Filters the subject of the email sent when an account action is attempted.
*
* @since 4.9.6
*
* @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 $email The email address this is being sent to.
* @type string $description Description of the action being performed so the user knows what the email is for.
* @type string $confirm_url The link to click on to confirm the account action.
* @type string $sitename The site name sending the mail.
* @type string $siteurl The site URL sending the mail.
* }
*/
$subject = apply_filters( 'user_request_action_email_subject', $subject, $blogname, $email_data );
/* translators: %s Site name. */
return wp_mail( $email_data['email'], sprintf( __( '[%s] Confirm Action' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ), $content );
return wp_mail( $email_data['email'], $subject, $content );
}
/**

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9.6-beta1-43196';
$wp_version = '4.9.6-beta1-43198';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.