[wp-trac] [WordPress Trac] #4710: A small patch to fix future
posting
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 7 12:26:22 GMT 2007
#4710: A small patch to fix future posting
----------------------------+-----------------------------------------------
Reporter: donncha | Owner: anonymous
Type: defect | Status: new
Priority: high | Milestone:
Component: Administration | Version:
Severity: critical | Keywords: futureposting
----------------------------+-----------------------------------------------
Barry figured out that the cron entry the scheduler created was simply
appended to the blog cron option. He suggested clearing the schedule
before making a new one.
I verified this, and attached is a small patch that calls
wp_clear_scheduled_hook() before creating the new schedule entry.
I tried adding wp_clear_scheduled_hook( $hook, $args ) to
wp_schedule_single_event() but it didn't work. When $args is an array it
doesn't seem to work.
You'll see from the patch I pass $post->ID directly as an int to the clear
function. I'm not sure why that didn't work as an array.
--
Ticket URL: <http://trac.wordpress.org/ticket/4710>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list