I18N: Allow numbers in locales during installation.
The current regex was a bit to strict for locales like `pt_PT_ao90` which were already supported by `wp_get_installed_translations()`. Fixes #41794. git-svn-id: https://develop.svn.wordpress.org/trunk@41335 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
399db7ac03
commit
5f06aaca1c
|
@ -281,7 +281,7 @@ if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
|||
*/
|
||||
$language = '';
|
||||
if ( ! empty( $_REQUEST['language'] ) ) {
|
||||
$language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
|
||||
$language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] );
|
||||
} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
|
||||
$language = $GLOBALS['wp_local_package'];
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ function setup_config_display_header( $body_classes = array() ) {
|
|||
|
||||
$language = '';
|
||||
if ( ! empty( $_REQUEST['language'] ) ) {
|
||||
$language = preg_replace( '/[^a-zA-Z_]/', '', $_REQUEST['language'] );
|
||||
$language = preg_replace( '/[^a-zA-Z0-9_]/', '', $_REQUEST['language'] );
|
||||
} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
|
||||
$language = $GLOBALS['wp_local_package'];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue