WordPress.org

Make WordPress Core

Ticket #52605: 52605.diff

File 52605.diff, 1.1 KB (added by davidbaumwald, 7 months ago)

Quick first pass

  • src/wp-includes/user.php

    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index 5c6db55afb..0ea54f1a52 100644
    a b function retrieve_password( $user_login = null ) { 
    27592759                $site_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    27602760        }
    27612761
     2762        // Localize password reset message content for user.
     2763        $locale = get_user_locale( $user_data );
     2764
     2765        $switched_locale = switch_to_locale( $locale );
     2766
    27622767        $message = __( 'Someone has requested a password reset for the following account:' ) . "\r\n\r\n";
    27632768        /* translators: %s: Site name. */
    27642769        $message .= sprintf( __( 'Site Name: %s' ), $site_name ) . "\r\n\r\n";
    function retrieve_password( $user_login = null ) { 
    28072812         */
    28082813        $message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data );
    28092814
     2815        if ( $switched_locale ) {
     2816                restore_previous_locale();
     2817        }
     2818
    28102819        if ( $message && ! wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) ) {
    28112820                $errors->add(
    28122821                        'retrieve_password_email_failure',