From e8af4e510d9bcc005453e3e77930f141858d2d36 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 27 Oct 2016 06:40:33 +0000 Subject: [PATCH] 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 --- wp-includes/l10n.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 30cacf4a67..2c227bc1da 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -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. diff --git a/wp-includes/version.php b/wp-includes/version.php index f28e9397e6..211eff38d3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.