[wp-trac] [WordPress Trac] #35491: Add a function to check whether a hook is scheduled
WordPress Trac
noreply at wordpress.org
Sun Jan 17 10:49:26 UTC 2016
#35491: Add a function to check whether a hook is scheduled
--------------------------------------+------------------
Reporter: dlh | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.5
Component: Cron API | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------
Comment (by swissspidy):
It doesn't hurt if `wp_is_scheduled_hook` returns the timestamp instead of
`true`, right?
In that case, the function would be quite similar to `wp_next_scheduled()`
in that it's probably just easier to extend it. For example, by just
allowing to pass `$args = false` to `wp_next_scheduled()` in order to get
this information.
[attachment:wp_next_scheduled.diff] implements this in a backwards-
compatible manner.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35491#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list