Allow language specified by the WPLANG constant (but not installed) to be chosen.
fixes #29456. git-svn-id: https://develop.svn.wordpress.org/trunk@29691 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
acbd7696ee
commit
de3b2ccf19
@ -305,7 +305,10 @@ endfor;
|
||||
|
||||
<?php
|
||||
$languages = get_available_languages();
|
||||
if ( ! empty( $languages ) ) {
|
||||
if ( ! is_multisite() && defined( 'WPLANG' ) && '' !== WPLANG && 'en_US' !== WPLANG && ! in_array( WPLANG, $languages ) ) {
|
||||
$languages[] = WPLANG;
|
||||
}
|
||||
if ( $languages ) {
|
||||
?>
|
||||
<tr>
|
||||
<th width="33%" scope="row"><label for="WPLANG"><?php _e( 'Site Language' ); ?></label></th>
|
||||
|
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user