Changes in trunk/wp-cron.php [8927:10521]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-cron.php
r8927 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 23 if ( $_GET['check'] != wp_hash('187425') ) 24 exit; 24 if ( !defined('ABSPATH') ) { 25 /** Setup WordPress environment */ 26 require_once('./wp-load.php'); 27 } 25 28 29 if ( false === $crons = _get_cron_array() ) 30 die(); 31 32 $keys = array_keys( $crons ); 26 33 $local_time = time(); 27 34 28 $crons = _get_cron_array(); 29 $keys = array_keys( $crons ); 30 31 if (!is_array($crons) || $keys[0] > $local_time) { 32 update_option('doing_cron', 0); 33 return; 34 } 35 if ( isset($keys[0]) && $keys[0] > $local_time ) 36 die(); 35 37 36 38 foreach ($crons as $timestamp => $cronhooks) { 37 38 39 if ( $timestamp > $local_time ) 39 40 break; … … 57 58 } 58 59 59 update_option('doing_cron', 0);60 61 60 die(); 62 63 ?>
Note: See TracChangeset
for help on using the changeset viewer.