WordPress.org

Make WordPress Core

Changeset 11209


Ignore:
Timestamp:
05/05/2009 09:51:48 PM (11 years ago)
Author:
ryan
Message:

Don't do core version check from front page loads. Props Denis-de-Bernardy. fixes #8590

File:
1 edited

Legend:

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

    r11204 r11209  
    2828
    2929    $current = get_transient( 'update_core' );
    30     if ( ! is_object($current) )
     30    if ( ! is_object($current) ) {
    3131        $current = new stdClass;
     32        $current->updates = array();
     33        $current->version_checked = $wp_version;
     34    }
    3235
    3336    $locale = apply_filters( 'core_version_check_locale', get_locale() );
     
    284287}
    285288
    286 add_action( 'init', '_maybe_update_core' );
     289add_action( 'admin_init', '_maybe_update_core' );
     290add_action( 'wp_version_check', 'wp_version_check' );
    287291
    288292add_action( 'load-plugins.php', 'wp_update_plugins' );
     
    296300add_action( 'wp_update_themes', 'wp_update_themes' );
    297301
     302if ( !wp_next_scheduled('wp_version_check') && !defined('WP_INSTALLING') )
     303    wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
     304
    298305if ( !wp_next_scheduled('wp_update_plugins') && !defined('WP_INSTALLING') )
    299306    wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    300307
    301 
    302308if ( !wp_next_scheduled('wp_update_themes') && !defined('WP_INSTALLING') )
    303309    wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
Note: See TracChangeset for help on using the changeset viewer.