[wp-trac] [WordPress Trac] #32656: Add hooks to allow hijacking cron implementation
WordPress Trac
noreply at wordpress.org
Fri Jul 27 02:22:52 UTC 2018
#32656: Add hooks to allow hijacking cron implementation
--------------------------------------+----------------------------
Reporter: rmccue | Owner: peterwilsoncc
Type: feature request | Status: closed
Priority: normal | Milestone: 5.0
Component: Cron API | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+----------------------------
Changes (by peterwilsoncc):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"43540" 43540]:
{{{
#!CommitTicketReference repository="" revision="43540"
Cron: Add hooks and a function to allow hijacking cron implementation.
This allows sites with a large cron option or a custom cron implementation
to hijack the cron option to store cron data using custom functionality.
`wp_get_scheduled_event()` is new function to retrieve the event object
for a given event based on the hook name, arguments and timestamp. If no
timestamp is specified the next occurence is returned.
Preflight filters are added to all functions that read from or modify the
cron option: `pre_schedule_event`, `pre_reschedule_event`,
`pre_unschedule_event`, `pre_clear_scheduled_hook`, `pre_unschedule_hook`,
`pre_get_scheduled_event` and `pre_next_scheduled`.
Additionally, the post scheduling hooks `next_scheduled` and
`get_schedule` to allow plugins to modify an event after retrieving it
from WordPress.
Props rmccue, DavidAnderson, ethitter, peterwilsoncc.
Fixes #32656.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32656#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list