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:
parent
da9953aa47
commit
a687253cce
|
@ -703,7 +703,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
|
||||||
*/
|
*/
|
||||||
$output = __( 'html_lang_attribute' );
|
$output = __( 'html_lang_attribute' );
|
||||||
if ( 'html_lang_attribute' === $output || preg_match( '/[^a-zA-Z0-9-]/', $output ) ) {
|
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 );
|
$output = str_replace( '_', '-', $output );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue