Make WordPress Core

Changeset 42221 for branches/4.9


Ignore:
Timestamp:
11/23/2017 07:05:42 PM (4 years ago)
Author:
johnbillion
Message:

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

Merges [42220] to the 4.9 branch.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/general-template.php

    r41992 r42221  
    704704            $output = __( 'html_lang_attribute' );
    705705            if ( 'html_lang_attribute' === $output || preg_match( '/[^a-zA-Z0-9-]/', $output ) ) {
    706                 $output = get_locale();
     706                $output = is_admin() ? get_user_locale() : get_locale();
    707707                $output = str_replace( '_', '-', $output );
    708708            }
Note: See TracChangeset for help on using the changeset viewer.