From d92ccd83a0a83504dd712efafb852cf96da320f4 Mon Sep 17 00:00:00 2001 From: desrosj Date: Mon, 17 Dec 2018 19:36:52 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@44278 git-svn-id: http://core.svn.wordpress.org/trunk@44108 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 229c3bbb25..ab19f0cd0e 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 848e7b94e2..61a3daf73a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44277'; +$wp_version = '5.1-alpha-44278'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.