Make WordPress Core

Ticket #25467: 25467-4.diff

File 25467-4.diff, 2.6 KB (added by ShinichiN, 12 years ago)

Converted tab to space to make it more readable.

  • src/wp-includes/update.php

     
    4242        if ( $time_not_changed )
    4343                return false;
    4444
    45         $locale = apply_filters( 'core_version_check_locale', get_locale() );
     45        $locale = get_locale();
     46        /**
     47         * Filter the locale requested for WordPress core translations.
     48         *
     49         * @since 2.8.0
     50         *
     51         * @param string $locale Defaults to the current locale of the site.
     52         */
     53        $locale = apply_filters( 'core_version_check_locale', $locale );
    4654
    4755        // Update last_checked for current to prevent multiple blocking requests if request hangs
    4856        $current->last_checked = time();
     
    212220
    213221        $to_send = compact( 'plugins', 'active' );
    214222
     223        $locales = array( get_locale() );
    215224        /**
    216225         * Filter the locales requested for plugin translations.
    217226         *
     
    219228         *
    220229         * @param array $locales Defaults to the current locale of the site.
    221230         */
    222         $locales = apply_filters( 'plugins_update_check_locales', array( get_locale() ) );
     231        $locales = apply_filters( 'plugins_update_check_locales', $locales );
    223232
    224233        $options = array(
    225234                'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
     
    347356
    348357        $request['themes'] = $themes;
    349358
     359        $locales = array( get_locale() );
    350360        /**
    351361         * Filter the locales requested for theme translations.
    352362         *
     
    354364         *
    355365         * @param array $locales Defaults to the current locale of the site.
    356366         */
    357         $locales = apply_filters( 'themes_update_check_locales', array( get_locale() ) );
     367        $locales = apply_filters( 'themes_update_check_locales', $locales );
    358368
    359369        $options = array(
    360370                'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
     
    443453
    444454        $update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : '';
    445455
    446         return apply_filters( 'wp_get_update_data', array( 'counts' => $counts, 'title' => $update_title ), $titles );
     456        $updates_counts_title = array( 'counts' => $counts, 'title' => $update_title );
     457        /**
     458         * Filter the array of counts and titles of update data of plugins, themes and WordPress core.
     459         *
     460         * @since 3.5.0
     461         *
     462         * @param array $updates_counts_title {
     463         *      Fetched update data.
     464         *             
     465         *      @type array   $counts       How many updates are available for plugins, themes and WordPress.
     466         *      @type string  $update_title Titles of available updates.
     467         * }
     468         * @param array $titles Array of the titles of available updates.
     469         */     
     470        return apply_filters( 'wp_get_update_data', $updates_counts_title, $titles );
    447471}
    448472
    449473function _maybe_update_core() {