mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-29 15:44:27 +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:
@@ -1392,9 +1392,9 @@ function wp_load_translations_early() {
|
||||
foreach ( $locales as $locale ) {
|
||||
foreach ( $locations as $location ) {
|
||||
if ( file_exists( $location . '/' . $locale . '.mo' ) ) {
|
||||
load_textdomain( 'default', $location . '/' . $locale . '.mo' );
|
||||
load_textdomain( 'default', $location . '/' . $locale . '.mo', $locale );
|
||||
if ( defined( 'WP_SETUP_CONFIG' ) && file_exists( $location . '/admin-' . $locale . '.mo' ) ) {
|
||||
load_textdomain( 'default', $location . '/admin-' . $locale . '.mo' );
|
||||
load_textdomain( 'default', $location . '/admin-' . $locale . '.mo', $locale );
|
||||
}
|
||||
break 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user