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. git-svn-id: https://develop.svn.wordpress.org/trunk@45277 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f33df7cde4
commit
ff53498be8
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue