WordPress.org

Make WordPress Core

Ticket #14553: 14553.2.diff

File 14553.2.diff, 1.4 KB (added by nacin, 8 years ago)

Addresses faulty logic.

  • wp-includes/update.php

     
    3333                $current->version_checked = $wp_version;
    3434        }
    3535
    36         $locale = apply_filters( 'core_version_check_locale', get_locale() );
     36        $locale = apply_filters( 'core_version_check_locale', get_locale( true ) );
    3737
    3838        // Update last_checked for current to prevent multiple blocking requests if request hangs
    3939        $current->last_checked = time();
  • wp-includes/l10n.php

     
    2323 * @uses apply_filters() Calls 'locale' hook on locale value.
    2424 * @uses $locale Gets the locale stored in the global.
    2525 *
     26 * @param bool $network Whether to retrieve the network wide setting when running
     27 *      multisite. Optional, default false.
    2628 * @return string The locale of the blog or from the 'locale' hook.
    2729 */
    28 function get_locale() {
     30function get_locale( $network = false ) {
    2931        global $locale;
    3032
    3133        if ( isset( $locale ) )
     
    3840        // If multisite, check options.
    3941        if ( is_multisite() && !defined('WP_INSTALLING') ) {
    4042                $ms_locale = get_option('WPLANG');
    41                 if ( $ms_locale === false )
     43                if ( $network || false === $ms_locale )
    4244                        $ms_locale = get_site_option('WPLANG');
    4345
    4446                if ( $ms_locale !== false )