mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
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:
parent
ba0970ab28
commit
401808ea96
@ -281,7 +281,7 @@ if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
|||||||
*/
|
*/
|
||||||
$language = '';
|
$language = '';
|
||||||
if ( ! empty( $_REQUEST['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'] ) ) {
|
} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
|
||||||
$language = $GLOBALS['wp_local_package'];
|
$language = $GLOBALS['wp_local_package'];
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ function setup_config_display_header( $body_classes = array() ) {
|
|||||||
|
|
||||||
$language = '';
|
$language = '';
|
||||||
if ( ! empty( $_REQUEST['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'] ) ) {
|
} elseif ( isset( $GLOBALS['wp_local_package'] ) ) {
|
||||||
$language = $GLOBALS['wp_local_package'];
|
$language = $GLOBALS['wp_local_package'];
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user