mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
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:
parent
4e9de8d231
commit
1de8e037c8
@ -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';
|
||||
|
||||
|
@ -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' );
|
||||
|
@ -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}' />";
|
||||
|
Loading…
Reference in New Issue
Block a user