From e99b7b5ed380b655e34d79fb2b31acb449a0913a Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Tue, 4 Dec 2018 01:13:47 +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. 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 --- 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 d1afbe4832..def655b414 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 3ad000a1bd..df99baa9d5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.