I18N: Don't use get_user_option()
for retrieving user's language.
`get_user_option()` checks for both option types, site and network. Since `locale` is only a network option we can directly access the field via `WP_User`s magic getter. Props johnjamesjacoby. Fixes #38578. git-svn-id: https://develop.svn.wordpress.org/trunk@39040 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7d378f82d0
commit
f4b61df0e4
@ -281,9 +281,9 @@ if ( $languages ) : ?>
|
|||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$user_locale = get_user_option( 'locale', $profileuser->ID );
|
$user_locale = $profileuser->locale;
|
||||||
|
|
||||||
if ( 'en_US' === $user_locale ) { // en_US
|
if ( 'en_US' === $user_locale ) {
|
||||||
$user_locale = false;
|
$user_locale = false;
|
||||||
} elseif ( ! in_array( $user_locale, $languages, true ) ) {
|
} elseif ( ! in_array( $user_locale, $languages, true ) ) {
|
||||||
$user_locale = get_locale();
|
$user_locale = get_locale();
|
||||||
|
Loading…
Reference in New Issue
Block a user