Integrate mu_locale() into get_locale(). see #11644

git-svn-id: http://svn.automattic.com/wordpress/trunk@12900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-29 19:03:51 +00:00
parent 4e9de8d231
commit 1de8e037c8
3 changed files with 10 additions and 15 deletions

View File

@ -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';

View File

@ -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' );

View File

@ -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 "<input type='hidden' name='signup_form_id' value='{$id}' />";