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

Built from https://develop.svn.wordpress.org/trunk@42220


git-svn-id: http://core.svn.wordpress.org/trunk@42049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2017-11-23 19:04:46 +00:00
parent 871c6d2b45
commit 8c7bb9009c
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42218';
$wp_version = '5.0-alpha-42220';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.