[wp-trac] [WordPress Trac] #21170: JavaScript actions and filters
WordPress Trac
noreply at wordpress.org
Wed Mar 22 13:14:47 UTC 2017
#21170: JavaScript actions and filters
--------------------------------------+------------------------------
Reporter: koopersmith | Owner: adamsilverstein
Type: feature request | Status: assigned
Priority: normal | Milestone: Future Release
Component: General | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: javascript
--------------------------------------+------------------------------
Changes (by adamsilverstein):
* keywords: has-patch dev-feedback => has-patch has-unit-tests
Comment:
In [attachment:21170.6.diff] :
* Builds on last patch from @aduth
* Add wp.hooks.doingAction, didAction and hasAction as @azaozz's suggested
* new functions match behavior of php functions - note that `didAction`
returns a run count or 0 for un-run, not a boolean. After removing a hook,
the count resets to 0.
* Tracks the current (last) action/filter running
* Adds tests for these new helpers
* Ensure hooks completely removed by removeAction/removeFilter
Working on some use case examples next.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21170#comment:117>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list