diff options
Diffstat (limited to 'wp-cron.php')
-rw-r--r-- | wp-cron.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/wp-cron.php b/wp-cron.php index f60ac56..e8ac0d3 100644 --- a/wp-cron.php +++ b/wp-cron.php @@ -1,7 +1,24 @@ <?php +/** + * WordPress Cron Implementation for hosts, which do not offer CRON or for which + * the user has not setup a CRON job pointing to this file. + * + * The HTTP request to this file will not slow down the visitor who happens to + * visit when the cron job is needed to run. + * + * @package WordPress + */ + ignore_user_abort(true); -define('DOING_CRON', TRUE); -require_once('./wp-config.php'); + +/** + * Tell WordPress we are doing the CRON task. + * + * @var bool + */ +define('DOING_CRON', true); +/** Setup WordPress environment */ +require_once('./wp-load.php'); if ( $_GET['check'] != wp_hash('187425') ) exit; @@ -15,6 +32,7 @@ $crons = _get_cron_array(); $keys = array_keys($crons); if (!is_array($crons) || $keys[0] > time()) return; + foreach ($crons as $timestamp => $cronhooks) { if ($timestamp > time()) break; foreach ($cronhooks as $hook => $keys) { |