Make WordPress Core

Changeset 42262 for branches/4.8


Ignore:
Timestamp:
11/29/2017 04:04:19 PM (7 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

See #42242

Merges [42220] to the 4.8 branch.

Location:
branches/4.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

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

    r40837 r42262  
    716716            $output = __( 'html_lang_attribute' );
    717717            if ( 'html_lang_attribute' === $output || preg_match( '/[^a-zA-Z0-9-]/', $output ) ) {
    718                 $output = get_locale();
     718                $output = is_admin() ? get_user_locale() : get_locale();
    719719                $output = str_replace( '_', '-', $output );
    720720            }
Note: See TracChangeset for help on using the changeset viewer.