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:
Dominik Schilling
2022-11-10 19:38:20 +00:00
parent e180b742ce
commit 1ab43acf4b
4 changed files with 7 additions and 5 deletions

View File

@@ -6351,7 +6351,7 @@ function wp_timezone_choice( $selected_zone, $locale = null ) {
$locale_loaded = $locale ? $locale : get_locale();
$mofile = WP_LANG_DIR . '/continents-cities-' . $locale_loaded . '.mo';
unload_textdomain( 'continents-cities' );
load_textdomain( 'continents-cities', $mofile );
load_textdomain( 'continents-cities', $mofile, $locale_loaded );
$mo_loaded = true;
}