Make WordPress Core

Changeset 36180


Ignore:
Timestamp:
01/06/2016 06:11:46 AM (8 years ago)
Author:
dd32
Message:

Background Updates: Remove the 7am/7pm background update check. This check was made redundant by [28129] as background updates are now run after a version check takes place.

See #27772, #35323.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r35966 r36180  
    549549    if ( $wp_current_db_version < 35700 )
    550550        upgrade_440();
     551
     552    if ( $wp_current_db_version < 36180 )
     553        upgrade_450();
    551554
    552555    maybe_disable_link_manager();
     
    16611664
    16621665/**
     1666 * Execute changes made in WordPress 4.5.0
     1667 *
     1668 * @ignore
     1669 * @since 4.5.0
     1670 *
     1671 * @global int $wp_current_db_version
     1672 */
     1673function upgrade_450() {
     1674    global $wp_current_db_version;
     1675    if ( $wp_current_db_version < 36180 )
     1676        wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
     1677}
     1678
     1679/**
    16631680 * Executes network-level upgrade routines.
    16641681 *
  • trunk/src/wp-includes/update.php

    r36074 r36180  
    170170    }
    171171
    172     // Trigger a background updates check if running non-interactively, and we weren't called from the update handler.
     172    // Trigger background updates if running non-interactively, and we weren't called from the update handler.
    173173    if ( defined( 'DOING_CRON' ) && DOING_CRON && ! doing_action( 'wp_maybe_auto_update' ) ) {
    174174        do_action( 'wp_maybe_auto_update' );
     
    648648    if ( ! wp_next_scheduled( 'wp_update_themes' ) && ! wp_installing() )
    649649        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    650 
    651     if ( ! wp_next_scheduled( 'wp_maybe_auto_update' ) && ! wp_installing() ) {
    652         // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
    653         $next = strtotime( 'today 7am' );
    654         $now = time();
    655         // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
    656         while ( ( $now + 3 * HOUR_IN_SECONDS ) > $next ) {
    657             $next += 12 * HOUR_IN_SECONDS;
    658         }
    659         $next = $next - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
    660         // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
    661         $next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS;
    662         wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' );
    663     }
    664650}
    665651
  • trunk/src/wp-includes/version.php

    r35776 r36180  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 35700;
     14$wp_db_version = 36180;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.