[wp-trac] [WordPress Trac] #32656: Add hooks to allow hijacking cron implementation

WordPress Trac noreply at wordpress.org
Fri Jun 19 15:04:58 UTC 2015


#32656: Add hooks to allow hijacking cron implementation
-----------------------------------+------------------------------
 Reporter:  rmccue                 |       Owner:  rmccue
     Type:  feature request        |      Status:  assigned
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Cron API               |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------------
Changes (by johnbillion):

 * keywords:  has-patch => has-patch 2nd-opinion


Comment:

 These filters make sense, but we need to have a think about return values.

 If a plugin hooks into, for example, `pre_schedule_event` and schedules
 its own cron event, what should its return value be? If it returns `null`
 then core's scheduler will still schedule the event. If it returns
 something other than `null` then you're returning an expected value from
 `wp_schedule_single_event()`.

 Should we think about always returning a more sane value to indicate
 success, for example `true` instead of the current `null`? What might this
 break?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32656#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list