Ticket #29077: 29077.2.patch
File 29077.2.patch, 1007 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/cron.php
107 107 $interval = 0; 108 108 109 109 // First we try to get it from the schedule 110 if ( 0 == $interval )110 if ( isset( $schedules[ $recurrence ] ) ) { 111 111 $interval = $schedules[$recurrence]['interval']; 112 } 113 112 114 // Now we try to get it from the saved interval in case the schedule disappears 113 if ( 0 == $interval ) 115 if ( 0 == $interval ) { 114 116 $interval = $crons[$timestamp][$hook][$key]['interval']; 117 } 118 115 119 // Now we assume something is wrong and fail to schedule 116 if ( 0 == $interval ) 120 if ( 0 == $interval ) { 117 121 return false; 122 } 118 123 119 124 $now = time(); 120 125 121 if ( $timestamp >= $now ) 126 if ( $timestamp >= $now ) { 122 127 $timestamp = $now + $interval; 123 else128 } else { 124 129 $timestamp = $now + ($interval - (($now - $timestamp) % $interval)); 130 } 125 131 126 132 wp_schedule_event( $timestamp, $recurrence, $hook, $args ); 127 133 }