Changeset 10521 for trunk/wp-cron.php
- Timestamp:
- 02/07/2009 01:32:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-cron.php
r10519 r10521 12 12 ignore_user_abort(true); 13 13 14 if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') ) 15 die(); 16 14 17 /** 15 18 * Tell WordPress we are doing the CRON task. … … 18 21 */ 19 22 define('DOING_CRON', true); 20 /** Setup WordPress environment */21 require_once('./wp-load.php');22 23 24 if ( !defined('ABSPATH') ) { 25 /** Setup WordPress environment */ 26 require_once('./wp-load.php'); 27 } 28 29 if ( false === $crons = _get_cron_array() ) 30 die(); 31 32 $keys = array_keys( $crons ); 23 33 $local_time = time(); 24 34 25 $crons = _get_cron_array(); 26 $keys = array_keys( $crons ); 27 28 if (!is_array($crons) || $keys[0] > $local_time) { 29 set_transient('doing_cron', 0); 30 return; 31 } 35 if ( isset($keys[0]) && $keys[0] > $local_time ) 36 die(); 32 37 33 38 foreach ($crons as $timestamp => $cronhooks) { 34 35 39 if ( $timestamp > $local_time ) 36 40 break; … … 54 58 } 55 59 56 set_transient('doing_cron', 0);57 58 60 die(); 59 60 ?>
Note: See TracChangeset
for help on using the changeset viewer.