Changeset 15837 for trunk/wp-includes/cron.php
- Timestamp:
- 10/18/2010 08:50:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cron.php
r15355 r15837 27 27 28 28 $crons = _get_cron_array(); 29 $key = md5(serialize($args)); 30 $crons[$timestamp][$hook][$key] = array( 'schedule' => false, 'args' => $args ); 29 $event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => false, 'args' => $args ); 30 $event = apply_filters('schedule_event', $event); 31 32 // A plugin disallowed this event 33 if ( ! $event ) 34 return false; 35 36 $key = md5(serialize($event->args)); 37 38 $crons[$event->timestamp][$event->hook][$key] = array( 'schedule' => $event->schedule, 'args' => $event->args ); 31 39 uksort( $crons, "strnatcasecmp" ); 32 40 _set_cron_array( $crons ); … … 54 62 $crons = _get_cron_array(); 55 63 $schedules = wp_get_schedules(); 56 $key = md5(serialize($args)); 64 57 65 if ( !isset( $schedules[$recurrence] ) ) 58 66 return false; 59 $crons[$timestamp][$hook][$key] = array( 'schedule' => $recurrence, 'args' => $args, 'interval' => $schedules[$recurrence]['interval'] ); 67 68 $event = (object) array( 'hook' => $hook, 'timestamp' => $timestamp, 'schedule' => $recurrence, 'args' => $args, 'interval' => $schedules[$recurrence]['interval'] ); 69 $event = apply_filters('schedule_event', $event); 70 71 // A plugin disallowed this event 72 if ( ! $event ) 73 return false; 74 75 $key = md5(serialize($event->args)); 76 77 $crons[$event->timestamp][$event->hook][$key] = array( 'schedule' => $event->schedule, 'args' => $event->args, 'interval' => $event->interval ); 60 78 uksort( $crons, "strnatcasecmp" ); 61 79 _set_cron_array( $crons );
Note: See TracChangeset
for help on using the changeset viewer.