Make WordPress Core

Changeset 4189 for trunk/wp-cron.php


Ignore:
Timestamp:
09/13/2006 11:54:15 PM (19 years ago)
Author:
ryan
Message:

cron and future post publishing fixes. fixes #3058

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-cron.php

    r4077 r4189  
    77    exit;
    88
    9 $crons = get_option('cron');
     9$crons = _get_cron_array();
    1010$keys = array_keys($crons);
    1111if (!is_array($crons) || $keys[0] > time())
     
    1313foreach ($crons as $timestamp => $cronhooks) {
    1414    if ($timestamp > time()) break;
    15     foreach($cronhooks as $hook => $args) {
    16         do_action($hook, $args['args']);
    17         $schedule = $args['schedule'];
    18         if($schedule != false) {
    19             $args = array_merge( array($timestamp, $schedule, $hook), $args['args']);
    20             call_user_func_array('wp_reschedule_event', $args);
     15    foreach ($cronhooks as $hook => $keys) {
     16        foreach ($keys as $key => $args) {
     17            do_action_ref_array($hook, $args['args']);
     18            $schedule = $args['schedule'];
     19            if ($schedule != false) {
     20                $args = array_merge( array($timestamp, $schedule, $hook), $args['args']);
     21                call_user_func_array('wp_reschedule_event', $args);
     22            }
     23            wp_unschedule_event($timestamp, $hook);
    2124        }
    22         wp_unschedule_event($timestamp, $hook);
     25        wp_unschedule_event($timestamp, $hook, $args);
    2326    }
    2427}
Note: See TracChangeset for help on using the changeset viewer.