Changeset 4077 for trunk/wp-includes/cron.php
- Timestamp:
- 08/07/2006 03:50:55 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cron.php
r3931 r4077 51 51 52 52 function wp_clear_scheduled_hook( $hook ) { 53 while ( $timestamp = wp_next_scheduled( $hook ) ) 53 $args = array_slice( func_get_args(), 1 ); 54 55 while ( $timestamp = wp_next_scheduled( $hook, $args ) ) 54 56 wp_unschedule_event( $timestamp, $hook ); 55 57 } 56 58 57 function wp_next_scheduled( $hook ) {59 function wp_next_scheduled( $hook, $args = '' ) { 58 60 $crons = get_option( 'cron' ); 59 61 if ( empty($crons) ) 60 62 return false; 61 63 foreach ( $crons as $timestamp => $cron ) 62 if ( isset( $cron[$hook] ) ) 63 return $timestamp; 64 if ( isset( $cron[$hook] ) ) { 65 if ( empty($args) ) 66 return $timestamp; 67 if ( $args == $cron[$hook]['args'] ) 68 return $timestamp; 69 } 64 70 return false; 65 71 } … … 93 99 94 100 $keys = array_keys( $crons ); 95 if ( array_shift( $keys )> time() )101 if ( $keys[0] > time() ) 96 102 return; 97 103
Note: See TracChangeset
for help on using the changeset viewer.