From 954968abef7eb29fc79c0927a4112c934332283a Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 29 Jan 2010 19:03:51 +0000 Subject: [PATCH] Integrate mu_locale() into get_locale(). see #11644 git-svn-id: https://develop.svn.wordpress.org/trunk@12900 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/l10n.php | 10 ++++++++++ wp-includes/ms-default-filters.php | 3 --- wp-includes/ms-functions.php | 12 ------------ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 4c8da78eda..efb9ad5ac6 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -35,6 +35,16 @@ function get_locale() { if ( defined( 'WPLANG' ) ) $locale = WPLANG; + // If multisite, check options. + if ( is_multisite() && !defined('WP_INSTALLING') ) { + $ms_locale = get_option('WPLANG'); + if ( $ms_locale === false ) + $ms_locale = get_site_option('WPLANG'); + + if ( $ms_locale !== false ) + $locale = $ms_locale; + } + if ( empty( $locale ) ) $locale = 'en_US'; diff --git a/wp-includes/ms-default-filters.php b/wp-includes/ms-default-filters.php index c05ed88092..560e831e7d 100644 --- a/wp-includes/ms-default-filters.php +++ b/wp-includes/ms-default-filters.php @@ -14,9 +14,6 @@ add_action ( 'wpmu_new_blog', 'newblog_notify_siteadmin', 10, 2 ); // Register Nonce add_action ( 'signup_hidden_fields', 'signup_nonce_fields' ); -// Locale -add_filter ( 'locale', 'mu_locale' ); - // Template add_action ( 'template_redirect', 'maybe_redirect_404' ); add_filter ( 'allowed_redirect_hosts', 'redirect_this_site' ); diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index a5dcce8b19..690da26b42 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1752,18 +1752,6 @@ function wordpressmu_wp_mail_from( $email ) { return $email; } -function mu_locale( $locale ) { - if ( defined('WP_INSTALLING') == false ) { - $mu_locale = get_option('WPLANG'); - if ( $mu_locale === false ) - $mu_locale = get_site_option('WPLANG'); - - if ( $mu_locale !== false ) - return $mu_locale; - } - return $locale; -} - function signup_nonce_fields() { $id = mt_rand(); echo "";