Make WordPress Core

Changeset 45277


Ignore:
Timestamp:
05/02/2019 10:52:10 AM (5 years ago)
Author:
desrosj
Message:

Bootstrap/Load: Ensure recovery link email and related notices are properly translated.

When recovery mode is triggered before the site’s locale has been initialized, the message displayed to the user and the email sent to the site administrator with the recovery mode link are always rendered in en_US. This change ensures the site’s locale is used even when an error happens early in the loading process.

Reviewed by swissspidy, SergeyBiryukov, and desrosj.

Props wolly, TimothyBlynJacobs, fierevere.
Fixes #47093.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-fatal-error-handler.php

    r45263 r45277  
    3838            }
    3939
     40            if ( ! isset( $GLOBALS['wp_locale'] ) ) {
     41                load_default_textdomain();
     42            }
     43
    4044            if ( ! is_multisite() && wp_recovery_mode()->is_initialized() ) {
    4145                wp_recovery_mode()->handle_error( $error );
Note: See TracChangeset for help on using the changeset viewer.