Ticket #42758: ajami.42758.diff
File ajami.42758.diff, 1.2 KB (added by , 8 years ago) |
---|
-
src/wp-includes/cron.php
function wp_cron() { 389 389 390 390 if ( false === $crons = _get_cron_array() ) 391 391 return; 392 392 393 393 $gmt_time = microtime( true ); 394 394 $keys = array_keys( $crons ); 395 395 if ( isset($keys[0]) && $keys[0] > $gmt_time ) 396 396 return; 397 397 398 398 $schedules = wp_get_schedules(); 399 399 foreach ( $crons as $timestamp => $cronhooks ) { 400 400 if ( $timestamp > $gmt_time ) break; 401 401 foreach ( (array) $cronhooks as $hook => $args ) { 402 402 if ( isset($schedules[$hook]['callback']) && !call_user_func( $schedules[$hook]['callback'] ) ) 403 403 continue; 404 apply_action( $hook, $args ); 404 405 spawn_cron( $gmt_time ); 405 406 break 2; 406 407 } 407 408 } 408 409 } 409 410 410 411 /** 411 412 * Retrieve supported event recurrence schedules. 412 413 * 413 414 * The default supported recurrences are 'hourly', 'twicedaily', and 'daily'. A plugin may 414 415 * add more by hooking into the {@see 'cron_schedules'} filter. The filter accepts an array 415 416 * of arrays. The outer array has a key that is the name of the schedule or for 416 417 * example 'weekly'. The value is an array with two keys, one is 'interval' and 417 418 * the other is 'display'. 418 419 *