l10n: Ensure JavaScript language packages are loaded for the user locale.
`load_script_textdomain()` had a reversed check to decide if the user locale should be loaded. This check is now replaced with `determine_local()`. Props ocean90. Merges [43959] into trunk. Fixes #45465. git-svn-id: https://develop.svn.wordpress.org/trunk@44278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
15fa394a01
commit
0faee1f72a
@ -913,7 +913,7 @@ function load_script_textdomain( $handle, $domain, $path = null ) {
|
||||
global $wp_scripts;
|
||||
|
||||
$path = untrailingslashit( $path );
|
||||
$locale = is_admin() ? get_locale() : get_user_locale();
|
||||
$locale = determine_locale();
|
||||
|
||||
// If a path was given and the handle file exists simply return it.
|
||||
$file_base = $domain === 'default' ? $locale : $domain . '-' . $locale;
|
||||
|
Loading…
Reference in New Issue
Block a user