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.
See #45465.


Built from https://develop.svn.wordpress.org/branches/5.0@43959


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2018-12-04 01:13:47 +00:00
parent a2ca9a4d84
commit e99b7b5ed3
2 changed files with 2 additions and 2 deletions

View File

@ -889,7 +889,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;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-RC2-43958';
$wp_version = '5.0-RC2-43959';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.