Changeset 25825 for trunk/src/wp-includes/update.php
- Timestamp:
- 10/17/2013 04:01:06 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/update.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r25823 r25825 567 567 wp_schedule_event(time(), 'twicedaily', 'wp_update_themes'); 568 568 569 if ( !wp_next_scheduled( 'wp_maybe_auto_update' ) && ! defined( 'WP_INSTALLING' ) ) 570 wp_schedule_event( time(), 'twicedaily', 'wp_maybe_auto_update' ); 569 if ( ! wp_next_scheduled( 'wp_maybe_auto_update' ) && ! defined( 'WP_INSTALLING' ) ) { 570 // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site. 571 $next = strtotime( 'today 7am' ); 572 $now = time(); 573 // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now. 574 while ( ( $now + 3 * HOUR_IN_SECONDS ) > $next ) { 575 $next += 12 * HOUR_IN_SECONDS; 576 } 577 $next = $next - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS; 578 wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' ); 579 } 571 580 } 572 581
Note: See TracChangeset
for help on using the changeset viewer.