Integrate mu_locale() into get_locale(). see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12900 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c180f69c52
commit
954968abef
@ -35,6 +35,16 @@ function get_locale() {
|
|||||||
if ( defined( 'WPLANG' ) )
|
if ( defined( 'WPLANG' ) )
|
||||||
$locale = 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 ) )
|
if ( empty( $locale ) )
|
||||||
$locale = 'en_US';
|
$locale = 'en_US';
|
||||||
|
|
||||||
|
@ -14,9 +14,6 @@ add_action ( 'wpmu_new_blog', 'newblog_notify_siteadmin', 10, 2 );
|
|||||||
// Register Nonce
|
// Register Nonce
|
||||||
add_action ( 'signup_hidden_fields', 'signup_nonce_fields' );
|
add_action ( 'signup_hidden_fields', 'signup_nonce_fields' );
|
||||||
|
|
||||||
// Locale
|
|
||||||
add_filter ( 'locale', 'mu_locale' );
|
|
||||||
|
|
||||||
// Template
|
// Template
|
||||||
add_action ( 'template_redirect', 'maybe_redirect_404' );
|
add_action ( 'template_redirect', 'maybe_redirect_404' );
|
||||||
add_filter ( 'allowed_redirect_hosts', 'redirect_this_site' );
|
add_filter ( 'allowed_redirect_hosts', 'redirect_this_site' );
|
||||||
|
@ -1752,18 +1752,6 @@ function wordpressmu_wp_mail_from( $email ) {
|
|||||||
return $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() {
|
function signup_nonce_fields() {
|
||||||
$id = mt_rand();
|
$id = mt_rand();
|
||||||
echo "<input type='hidden' name='signup_form_id' value='{$id}' />";
|
echo "<input type='hidden' name='signup_form_id' value='{$id}' />";
|
||||||
|
Loading…
Reference in New Issue
Block a user