mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
I18N: Always pass $locale to load_textdomain().
In [53874] the optional `$locale` parameter was added to `load_textdomain()`. While most `load_textdomain()` calls in core were were updated, some were missed. Passing the original locale avoids the need to call `determine_locale()` by `load_textdomain()` which is used as a fallback. Props ocean90, swissspidy, desrosj. See #57060. git-svn-id: https://develop.svn.wordpress.org/trunk@54797 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -336,7 +336,7 @@ class WP_REST_Site_Health_Controller extends WP_REST_Controller {
|
||||
// Accounts for inner REST API requests in the admin.
|
||||
if ( ! is_admin() ) {
|
||||
$locale = determine_locale();
|
||||
load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" );
|
||||
load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo", $locale );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user