From a687253cce384f6f2e1d921ca6be639431a52e93 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 23 Nov 2017 19:03:44 +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 git-svn-id: https://develop.svn.wordpress.org/trunk@42220 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/general-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 915aea540e..e694e2cb30 100644 --- a/src/wp-includes/general-template.php +++ b/src/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;