Make WordPress Core

Changeset 43373 for trunk


Ignore:
Timestamp:
06/18/2018 04:23:37 PM (8 years ago)
Author:
azaozz
Message:

Privacy: filter the email subject in _wp_privacy_send_request_confirmation_notification().

Props garrett-eclipse, birgire, desrosj.
Fixes #44382.

File:
1 edited

Legend:

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

    r43367 r43373  
    29742974        }
    29752975
    2976         $subject = sprintf(
    2977                 /* translators: %s Site name. */
    2978                 __( '[%s] Action Confirmed' ),
    2979                 wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES )
    2980         );
    2981 
    29822976        $manage_url = add_query_arg( 'page', $request_data->action_name, admin_url( 'tools.php' ) );
    29832977
     
    30503044         *     @type string          $sitename    The site name sending the mail.
    30513045         *     @type string          $siteurl     The site URL sending the mail.
     3046         *     @type string          $admin_email The administrator email receiving the mail.
    30523047         * }
    30533048         */
     
    30593054        $content = str_replace( '###MANAGE_URL###', esc_url_raw( $email_data['manage_url'] ), $content );
    30603055        $content = str_replace( '###SITEURL###', esc_url_raw( $email_data['siteurl'] ), $content );
     3056
     3057        $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     3058
     3059        $subject = sprintf(
     3060                /* translators: %s Site name. */
     3061                __( '[%s] Action Confirmed' ),
     3062                $blogname
     3063        );
     3064
     3065        /**
     3066         * Filters the subject of the user request confirmation email.
     3067         *
     3068         * @since 4.9.7
     3069         *
     3070         * @param string $subject    The email subject.
     3071         * @param string $blogname   The name of the site.
     3072         * @param array  $email_data {
     3073         *     Data relating to the account action email.
     3074         *
     3075         *     @type WP_User_Request $request     User request object.
     3076         *     @type string          $user_email  The email address confirming a request
     3077         *     @type string          $description Description of the action being performed so the user knows what the email is for.
     3078         *     @type string          $manage_url  The link to click manage privacy requests of this type.
     3079         *     @type string          $sitename    The site name sending the mail.
     3080         *     @type string          $siteurl     The site URL sending the mail.
     3081         *     @type string          $admin_email The administrator email receiving the mail.
     3082         * }
     3083         */
     3084        $subject = apply_filters( 'user_request_confirmed_email_subject', $subject, $blogname, $email_data );
    30613085
    30623086        $email_sent = wp_mail( $email_data['admin_email'], $subject, $content );
Note: See TracChangeset for help on using the changeset viewer.