I18N: Apply the locale filter when returning early in get_locale().

See [38976].
See #29783.
Built from https://develop.svn.wordpress.org/trunk@38978


git-svn-id: http://core.svn.wordpress.org/trunk@38921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2016-10-27 06:40:33 +00:00
parent 62445cd41b
commit e8af4e510d
2 changed files with 4 additions and 3 deletions

View File

@ -53,10 +53,11 @@ function get_locale() {
// If $wpdb hasn't been initialised yet, we can only return what we have.
if ( ! $wpdb ) {
if ( ! $locale ) {
return 'en_US';
$locale = 'en_US';
}
return $locale;
/** This filter is documented in wp-includes/l10n.php */
return apply_filters( 'locale', $locale );
}
// If multisite, check options.

View File

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