diff --git a/src/wp-admin/options-general.php b/src/wp-admin/options-general.php index 4ad97a531b..7011885553 100644 --- a/src/wp-admin/options-general.php +++ b/src/wp-admin/options-general.php @@ -305,7 +305,10 @@ endfor; diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 3828c6abc2..f307a54330 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -3361,8 +3361,12 @@ function sanitize_option($option, $value) { case 'WPLANG': $allowed = get_available_languages(); - if ( ! in_array( $value, $allowed ) && ! empty( $value ) ) + if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG ) { + $allowed[] = WPLANG; + } + if ( ! in_array( $value, $allowed ) && ! empty( $value ) ) { $value = get_option( $option ); + } break; case 'illegal_names':