WordPress.org

Make WordPress Core

Changeset 43197


Ignore:
Timestamp:
05/09/2018 05:50:56 PM (2 years ago)
Author:
azaozz
Message:

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

Props desrosj, azaozz.
See #43968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r43189 r43197  
    31423142    $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
    31433143
     3144    $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     3145
     3146    /* translators: Privacy data request subject. 1: Site name, 2: Name of the action */
     3147    $subject = sprintf( __( '[%1$s] Confirm Action: %2$s' ), $blogname, $email_data['description'] );
     3148
     3149    /**
     3150     * Filters the subject of the email sent when an account action is attempted.
     3151     *
     3152     * @since 4.9.6
     3153     *
     3154     * @param string $subject    The email subject.
     3155     * @param string $blogname   The name of the site.
     3156     * @param array  $email_data {
     3157     *     Data relating to the account action email.
     3158     *
     3159     *     @type WP_User_Request $request User request object.
     3160     *     @type string          $email       The email address this is being sent to.
     3161     *     @type string          $description Description of the action being performed so the user knows what the email is for.
     3162     *     @type string          $confirm_url The link to click on to confirm the account action.
     3163     *     @type string          $sitename    The site name sending the mail.
     3164     *     @type string          $siteurl     The site URL sending the mail.
     3165     * }
     3166     */
     3167    $subject = apply_filters( 'user_request_action_email_subject', $subject, $blogname, $email_data );
     3168
    31443169    /* translators: %s Site name. */
    3145     return wp_mail( $email_data['email'], sprintf( __( '[%s] Confirm Action' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ), $content );
     3170    return wp_mail( $email_data['email'], $subject, $content );
    31463171}
    31473172
Note: See TracChangeset for help on using the changeset viewer.