WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #32656, comment 4


Ignore:
Timestamp:
06/19/2015 03:05:32 PM (4 years ago)
Author:
johnbillion
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32656, comment 4

    initial v1  
    11These filters make sense, but we need to have a think about return values.
    22
    3 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()`.
     3If 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 unexpected value from `wp_schedule_single_event()`.
    44
    55Should we think about always returning a more sane value to indicate success, for example `true` instead of the current `null`? What might this break?