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

See [38976].
See #29783.

git-svn-id: https://develop.svn.wordpress.org/trunk@38978 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2016-10-27 06:39:16 +00:00
parent 968148ec51
commit 7d09b0bb0d
1 changed files with 3 additions and 2 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.