From 401808ea96942657760746c6ef34380f28c6b18b Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Mon, 4 Sep 2017 19:30:43 +0000 Subject: [PATCH] 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 --- wp-admin/install.php | 2 +- wp-admin/setup-config.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/install.php b/wp-admin/install.php index a24baff3b6..0021421007 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -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']; } diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index db10e25be2..c1fe1eb808 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -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']; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 37489ed342..2edf761cb1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41334'; +$wp_version = '4.9-alpha-41335'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.