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

See #42242

Merges [42220] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@42263 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2017-11-29 16:05:10 +00:00
parent eeb633b797
commit 2844aa499e
1 changed files with 1 additions and 1 deletions

View File

@ -715,7 +715,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;