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.8 branch. Built from https://develop.svn.wordpress.org/branches/4.8@42262 git-svn-id: http://core.svn.wordpress.org/branches/4.8@42091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9eb5084390
commit
8101b2aa4d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue