From 4cb8d10856a8a1266d9b0e81a139d1f35ce756e0 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 23 Nov 2017 19:06:42 +0000 Subject: [PATCH] Users: Correct the value of the `lang` attribute in the admin area. This corrects the value when the user's language is set to `English (United States)` but the site language is not. Props ocean90, afercia Fixes #42242 Merges [42220] to the 4.9 branch. Built from https://develop.svn.wordpress.org/branches/4.9@42221 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42050 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 915aea540e..e694e2cb30 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -703,7 +703,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) { */ $output = __( 'html_lang_attribute' ); if ( 'html_lang_attribute' === $output || preg_match( '/[^a-zA-Z0-9-]/', $output ) ) { - $output = get_locale(); + $output = is_admin() ? get_user_locale() : get_locale(); $output = str_replace( '_', '-', $output ); } break; diff --git a/wp-includes/version.php b/wp-includes/version.php index ee3420a06d..cf66a3e7f9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9.1-alpha-42219'; +$wp_version = '4.9.1-alpha-42221'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.