Make WordPress Core

Changeset 43198


Ignore:
Timestamp:
05/09/2018 05:53:40 PM (8 years ago)
Author:
azaozz
Message:

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.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/user.php

    r43190 r43198  
    30643064        $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
    30653065
     3066        $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     3067
     3068        /* translators: Privacy data request subject. 1: Site name, 2: Name of the action */
     3069        $subject = sprintf( __( '[%1$s] Confirm Action: %2$s' ), $blogname, $email_data['description'] );
     3070
     3071        /**
     3072         * Filters the subject of the email sent when an account action is attempted.
     3073         *
     3074         * @since 4.9.6
     3075         *
     3076         * @param string $subject    The email subject.
     3077         * @param string $blogname   The name of the site.
     3078         * @param array  $email_data {
     3079         *     Data relating to the account action email.
     3080         *
     3081         *     @type WP_User_Request $request User request object.
     3082         *     @type string          $email       The email address this is being sent to.
     3083         *     @type string          $description Description of the action being performed so the user knows what the email is for.
     3084         *     @type string          $confirm_url The link to click on to confirm the account action.
     3085         *     @type string          $sitename    The site name sending the mail.
     3086         *     @type string          $siteurl     The site URL sending the mail.
     3087         * }
     3088         */
     3089        $subject = apply_filters( 'user_request_action_email_subject', $subject, $blogname, $email_data );
     3090
    30663091        /* translators: %s Site name. */
    3067         return wp_mail( $email_data['email'], sprintf( __( '[%s] Confirm Action' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ), $content );
     3092        return wp_mail( $email_data['email'], $subject, $content );
    30683093}
    30693094
Note: See TracChangeset for help on using the changeset viewer.