WordPress.org

Make WordPress Core

Changeset 4362


Ignore:
Timestamp:
10/08/06 17:50:21 (8 years ago)
Author:
ryan
Message:

Change cron arg passing. Props masquerade. fixes #3169.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upgrade-functions.php

    r4286 r4362  
    504504        if ( !empty($posts) ) 
    505505            foreach ( $posts as $post ) 
    506                 wp_schedule_single_event(mysql2date('U', $post->post_date), 'publish_future_post', $post->ID); 
     506                wp_schedule_single_event(mysql2date('U', $post->post_date), 'publish_future_post', array($post->ID)); 
    507507    } 
    508508    if ( $wp_current_db_version < 3570 ) { 
  • trunk/wp-cron.php

    r4190 r4362  
    1818            $schedule = $args['schedule']; 
    1919            if ($schedule != false) { 
    20                 $new_args = array_merge( array($timestamp, $schedule, $hook), $args['args']); 
     20                $new_args = array($timestamp, $schedule, $hook, $args['args']); 
    2121                call_user_func_array('wp_reschedule_event', $new_args); 
    2222            } 
  • trunk/wp-includes/cron.php

    r4289 r4362  
    11<?php 
    22 
    3 function wp_schedule_single_event( $timestamp, $hook ) { 
    4     $args = array_slice( func_get_args(), 2 ); 
     3function wp_schedule_single_event( $timestamp, $hook, $args = array()) { 
    54    $crons = _get_cron_array(); 
    65    $key = md5(serialize($args)); 
     
    109} 
    1110 
    12 function wp_schedule_event( $timestamp, $recurrence, $hook ) { 
    13     $args = array_slice( func_get_args(), 3 ); 
     11function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) { 
    1412    $crons = _get_cron_array(); 
    1513    $schedules = wp_get_schedules(); 
     
    2220} 
    2321 
    24 function wp_reschedule_event( $timestamp, $recurrence, $hook ) { 
    25     $args = array_slice( func_get_args(), 3 ); 
     22function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array()) { 
    2623    $crons = _get_cron_array(); 
    2724    $schedules = wp_get_schedules(); 
  • trunk/wp-includes/post.php

    r4199 r4362  
    699699    // Schedule publication. 
    700700    if ( 'future' == $post_status ) 
    701         wp_schedule_single_event(strtotime($post_date_gmt. ' GMT'), 'publish_future_post', $post_ID); 
     701        wp_schedule_single_event(strtotime($post_date_gmt. ' GMT'), 'publish_future_post', array($post_ID)); 
    702702         
    703703    do_action('save_post', $post_ID); 
Note: See TracChangeset for help on using the changeset viewer.