WordPress.org

Make WordPress Core

Ticket #46303: 46303.patch

File 46303.patch, 1.1 KB (added by thakkarhardik, 5 months ago)

Filter added for the Export Complete email subject

  • includes/file.php

     
    22442244        $content = str_replace( '###SITENAME###', $site_name, $content );
    22452245        $content = str_replace( '###SITEURL###', esc_url_raw( $site_url ), $content );
    22462246
    2247         $mail_success = wp_mail(
    2248                 $email_address,
    2249                 sprintf(
    2250                         __( '[%s] Personal Data Export' ),
    2251                         $site_name
    2252                 ),
    2253                 $content
     2247        $subject = sprintf(
     2248                __( '[%s] Personal Data Export' ),
     2249                $site_name
    22542250        );
    22552251
     2252        /**
     2253         * Filters the subject of the email sent with a personal data export file.
     2254         *
     2255         * @param string $subject        Subject in the email.
     2256         * @param int    $request_id     The request ID for this personal data export.
     2257         */
     2258        $subject = apply_filters( 'wp_privacy_personal_data_email_subject', $subject, $request_id );
     2259
     2260        $mail_success = wp_mail( $email_address, $subject, $content );
     2261
    22562262        if ( ! $mail_success ) {
    22572263                return new WP_Error( 'privacy_email_error', __( 'Unable to send personal data export email.' ) );
    22582264        }