Changeset 26782 for trunk/src/wp-includes/cron.php
- Timestamp:
- 12/07/2013 09:12:51 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/cron.php
r26365 r26782 169 169 } 170 170 171 while ( $timestamp = wp_next_scheduled( $hook, $args ) ) 172 wp_unschedule_event( $timestamp, $hook, $args ); 171 // This logic duplicates wp_next_scheduled() 172 // It's required due to a scenario where wp_unschedule_event() fails due to update_option() failing, 173 // and, wp_next_scheduled() returns the same schedule in an infinite loop. 174 $crons = _get_cron_array(); 175 if ( empty( $crons ) ) 176 return; 177 178 $key = md5( serialize( $args ) ); 179 foreach ( $crons as $timestamp => $cron ) { 180 if ( isset( $cron[ $hook ][ $key ] ) ) { 181 wp_unschedule_event( $timestamp, $hook, $args ); 182 } 183 } 173 184 } 174 185
Note: See TracChangeset
for help on using the changeset viewer.