Users: In `edit_user()` fall back to site's locale instead of `en_US` for invalid user locales.
See #38632, #29783. Fixes #38798. Built from https://develop.svn.wordpress.org/trunk@39269 git-svn-id: http://core.svn.wordpress.org/trunk@39209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7db38b916a
commit
e4a83d2e6f
|
@ -100,8 +100,10 @@ function edit_user( $user_id = 0 ) {
|
|||
$locale = sanitize_text_field( $_POST['locale'] );
|
||||
if ( 'site-default' === $locale ) {
|
||||
$locale = '';
|
||||
} elseif ( ! in_array( $locale, get_available_languages(), true ) ) {
|
||||
} elseif ( '' === $locale ) {
|
||||
$locale = 'en_US';
|
||||
} elseif ( ! in_array( $locale, get_available_languages(), true ) ) {
|
||||
$locale = '';
|
||||
}
|
||||
|
||||
$user->locale = $locale;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta4-39268';
|
||||
$wp_version = '4.7-beta4-39269';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue