Changeset 28129
- Timestamp:
- 04/15/2014 02:22:07 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/update.php
r27928 r28129 154 154 $updates->translations = $body['translations']; 155 155 156 set_site_transient( 'update_core', $updates); 156 set_site_transient( 'update_core', $updates ); 157 158 if ( ! empty( $body['ttl'] ) ) { 159 $ttl = (int) $body['ttl']; 160 if ( $ttl && ( time() + $ttl < wp_next_scheduled( 'wp_version_check' ) ) ) { 161 // Queue an event to re-run the update check in $ttl seconds. 162 wp_schedule_single_event( time() + $ttl, 'wp_version_check' ); 163 } 164 } 165 166 // Trigger a background updates check if running non-interactively, and we weren't called from the update handler. 167 if ( defined( 'DOING_CRON' ) && DOING_CRON && ! doing_action( 'wp_maybe_auto_update' ) ) { 168 do_action( 'wp_maybe_auto_update' ); 169 } 157 170 } 158 171 … … 204 217 break; 205 218 default : 206 $timeout = 12 * HOUR_IN_SECONDS; 219 if ( defined( 'DOING_CRON' ) && DOING_CRON ) { 220 $timeout = 0; 221 } else { 222 $timeout = 12 * HOUR_IN_SECONDS; 223 } 207 224 } 208 225 … … 350 367 break; 351 368 default : 352 $timeout = 12 * HOUR_IN_SECONDS; 369 if ( defined( 'DOING_CRON' ) && DOING_CRON ) { 370 $timeout = 0; 371 } else { 372 $timeout = 12 * HOUR_IN_SECONDS; 373 } 353 374 } 354 375
Note: See TracChangeset
for help on using the changeset viewer.