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()`.

Merge of [41335] to the 4.8 branch.

See #41794.
Built from https://develop.svn.wordpress.org/branches/4.8@41336


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2017-09-04 19:38:33 +00:00
parent 795af804ba
commit 93ba8ea6fb
3 changed files with 3 additions and 3 deletions

View File

@ -279,7 +279,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'];
}

View File

@ -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'];
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8.2-alpha-41295';
$wp_version = '4.8.2-alpha-41336';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.