WordPress.org

Make WordPress Core

Changeset 12900


Ignore:
Timestamp:
01/29/2010 07:03:51 PM (11 years ago)
Author:
ryan
Message:

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

Location:
trunk/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r12840 r12900  
    3535    if ( defined( 'WPLANG' ) )
    3636        $locale = WPLANG;
     37
     38    // If multisite, check options.
     39    if ( is_multisite() && !defined('WP_INSTALLING') ) {
     40        $ms_locale = get_option('WPLANG');
     41        if ( $ms_locale === false )
     42            $ms_locale = get_site_option('WPLANG');
     43
     44        if ( $ms_locale !== false )
     45            $locale = $ms_locale;
     46    }
    3747
    3848    if ( empty( $locale ) )
  • trunk/wp-includes/ms-default-filters.php

    r12879 r12900  
    1414// Register Nonce
    1515add_action ( 'signup_hidden_fields', 'signup_nonce_fields' );
    16 
    17 // Locale
    18 add_filter ( 'locale', 'mu_locale' );
    1916
    2017// Template
  • trunk/wp-includes/ms-functions.php

    r12880 r12900  
    17531753}
    17541754
    1755 function mu_locale( $locale ) {
    1756     if ( defined('WP_INSTALLING') == false ) {
    1757         $mu_locale = get_option('WPLANG');
    1758         if ( $mu_locale === false )
    1759             $mu_locale = get_site_option('WPLANG');
    1760 
    1761         if ( $mu_locale !== false )
    1762             return $mu_locale;
    1763     }
    1764     return $locale;
    1765 }
    1766 
    17671755function signup_nonce_fields() {
    17681756    $id = mt_rand();
Note: See TracChangeset for help on using the changeset viewer.