Ticket #46056: 46056.diff
File 46056.diff, 1.1 KB (added by , 6 years ago) |
---|
-
src/wp-admin/includes/file.php
2197 2197 return new WP_Error( 'invalid_request', __( 'Invalid request ID when sending personal data export email.' ) ); 2198 2198 } 2199 2199 2200 // Localize message content for user; fallback to site default for visitors. 2201 if ( ! empty( $request->user_id ) ) { 2202 $locale = get_user_locale( $request->user_id ); 2203 } else { 2204 $locale = get_locale(); 2205 } 2206 2207 $switched_locale = switch_to_locale( $locale ); 2208 2200 2209 /** This filter is documented in wp-includes/functions.php */ 2201 2210 $expiration = apply_filters( 'wp_privacy_export_expiration', 3 * DAY_IN_SECONDS ); 2202 2211 $expiration_date = date_i18n( get_option( 'date_format' ), time() + $expiration ); … … 2253 2262 $content 2254 2263 ); 2255 2264 2265 if ( $switched_locale ) { 2266 restore_previous_locale(); 2267 } 2268 2256 2269 if ( ! $mail_success ) { 2257 2270 return new WP_Error( 'privacy_email_error', __( 'Unable to send personal data export email.' ) ); 2258 2271 }