Make WordPress Core


Ignore:
Timestamp:
01/06/2016 06:11:46 AM (9 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.