Changeset 27886 for branches/3.7/src/wp-includes/cron.php
- Timestamp:
- 04/01/2014 03:39:35 AM (11 years ago)
- Location:
- branches/3.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
-
branches/3.7/src/wp-includes/cron.php
r23591 r27886 161 161 } 162 162 163 while ( $timestamp = wp_next_scheduled( $hook, $args ) ) 164 wp_unschedule_event( $timestamp, $hook, $args ); 163 // This logic duplicates wp_next_scheduled() 164 // It's required due to a scenario where wp_unschedule_event() fails due to update_option() failing, 165 // and, wp_next_scheduled() returns the same schedule in an infinite loop. 166 $crons = _get_cron_array(); 167 if ( empty( $crons ) ) 168 return; 169 170 $key = md5( serialize( $args ) ); 171 foreach ( $crons as $timestamp => $cron ) { 172 if ( isset( $cron[ $hook ][ $key ] ) ) { 173 wp_unschedule_event( $timestamp, $hook, $args ); 174 } 175 } 165 176 } 166 177
Note: See TracChangeset
for help on using the changeset viewer.