mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-27 16:04:31 +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:
@@ -13,7 +13,9 @@ if ( ! defined( 'WP_ADMIN' ) ) {
|
||||
* some setup was skipped. Make sure the admin message catalog is loaded since
|
||||
* load_default_textdomain() will not have done so in this context.
|
||||
*/
|
||||
load_textdomain( 'default', WP_LANG_DIR . '/admin-' . get_locale() . '.mo' );
|
||||
$admin_locale = get_locale();
|
||||
load_textdomain( 'default', WP_LANG_DIR . '/admin-' . $admin_locale . '.mo', $admin_locale );
|
||||
unset( $admin_locale );
|
||||
}
|
||||
|
||||
/** WordPress Administration Hooks */
|
||||
|
||||
Reference in New Issue
Block a user