From ba9b3cf6a6959855b7c366dbf4e5446f0dfd7004 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Sun, 30 Oct 2016 22:26:31 +0000 Subject: [PATCH] I18N: Don't use `get_user_option()` for retrieving user's language. `get_user_option()` checks for both option types, site and network. Since `locale` is only a network option we can directly access the field via `WP_User`s magic getter. Props johnjamesjacoby. Fixes #38578. Built from https://develop.svn.wordpress.org/trunk@39040 git-svn-id: http://core.svn.wordpress.org/trunk@38982 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/user-edit.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index 595f50d3f9..a85de3b241 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -281,9 +281,9 @@ if ( $languages ) : ?> ID ); + $user_locale = $profileuser->locale; - if ( 'en_US' === $user_locale ) { // en_US + if ( 'en_US' === $user_locale ) { $user_locale = false; } elseif ( ! in_array( $user_locale, $languages, true ) ) { $user_locale = get_locale(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 533063ae44..123719229d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta1-39039'; +$wp_version = '4.7-beta1-39040'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.