Privacy: filter the email subject in _wp_privacy_send_request_confirmation_notification()
.
Props garrett-eclipse, birgire, desrosj. Fixes #44382. git-svn-id: https://develop.svn.wordpress.org/trunk@43373 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
acbbd28d0e
commit
5168c31084
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user