[wp-trac] [WordPress Trac] #21170: JavaScript actions and filters
WordPress Trac
noreply at wordpress.org
Fri Aug 11 18:07:49 UTC 2017
#21170: JavaScript actions and filters
--------------------------------------+------------------------------
Reporter: koopersmith | Owner: adamsilverstein
Type: feature request | Status: assigned
Priority: normal | Milestone: 4.9
Component: General | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: javascript
--------------------------------------+------------------------------
Changes (by adamsilverstein):
* keywords: has-patch => has-patch has-unit-tests
Comment:
In [attachment:21170.13.diff]:
Bring the plugin code (and tests) up to date with the latest development
work from https://github.com/WordPress/packages/pull/13, notably:
* Add a new, required `namespace` parameter to `addHook` and `removeHook`
functions.
* Note, the [https://github.com/adamsilverstein/packages/blob/add-wp-
hooks/packages/hooks/README.md readme is updated] with the new function
signatures.
* `removeHook` functions now take a `hookName` and a `nameapace`, not a
callback.
* Consistent validation of `hookName` and `namespace` parameters.
* Better support for recursion and generally calling and removing hooks
inside other hooked callbacks (additional tests added for this
[https://github.com/adamsilverstein/packages/blob/add-wp-
hooks/packages/hooks/src/test/index.test.js#L469-L512 in the package
build]).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21170#comment:144>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list