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.
Built from https://develop.svn.wordpress.org/trunk@45277


git-svn-id: http://core.svn.wordpress.org/trunk@45086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-05-02 10:53:52 +00:00
parent d53659ed71
commit d48b709071
2 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,10 @@ class WP_Fatal_Error_Handler {
return;
}
if ( ! isset( $GLOBALS['wp_locale'] ) ) {
load_default_textdomain();
}
if ( ! is_multisite() && wp_recovery_mode()->is_initialized() ) {
wp_recovery_mode()->handle_error( $error );
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-RC1-45276';
$wp_version = '5.2-RC1-45277';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.