Changeset 36180
- Timestamp:
- 01/06/2016 06:11:46 AM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r35966 r36180 549 549 if ( $wp_current_db_version < 35700 ) 550 550 upgrade_440(); 551 552 if ( $wp_current_db_version < 36180 ) 553 upgrade_450(); 551 554 552 555 maybe_disable_link_manager(); … … 1661 1664 1662 1665 /** 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 */ 1673 function 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 /** 1663 1680 * Executes network-level upgrade routines. 1664 1681 * -
trunk/src/wp-includes/update.php
r36074 r36180 170 170 } 171 171 172 // Trigger a background updates checkif 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. 173 173 if ( defined( 'DOING_CRON' ) && DOING_CRON && ! doing_action( 'wp_maybe_auto_update' ) ) { 174 174 do_action( 'wp_maybe_auto_update' ); … … 648 648 if ( ! wp_next_scheduled( 'wp_update_themes' ) && ! wp_installing() ) 649 649 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 hour661 $next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS;662 wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' );663 }664 650 } 665 651 -
trunk/src/wp-includes/version.php
r35776 r36180 12 12 * @global int $wp_db_version 13 13 */ 14 $wp_db_version = 3 5700;14 $wp_db_version = 36180; 15 15 16 16 /**
Note: See TracChangeset
for help on using the changeset viewer.