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. Built from https://develop.svn.wordpress.org/trunk@41335 git-svn-id: http://core.svn.wordpress.org/trunk@41166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user