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
This commit is contained in:
John Blackbourn 2017-11-23 19:03:44 +00:00
parent da9953aa47
commit a687253cce
1 changed files with 1 additions and 1 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;