[wp-trac] [WordPress Trac] #21170: JavaScript actions and filters

WordPress Trac noreply at wordpress.org
Thu Jul 20 20:05:22 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:  commit has-patch  |     Focuses:  javascript
------------------------------+------------------------------

Comment (by adamsilverstein):

 [attachment:21170.12.diff] is a webpack build of the wp.hooks module, from
 ongoing work in https://github.com/WordPress/packages/pull/13

 Changes:

 * To remove all callbacks hooked on a name, call removeAllFilters/Actions(
 'name' ) - removeFilter/Action( 'name' ) no longer does that and now
 expects a callback to match against.
 * Docs cleanup
 * hooked items sorted by priority as they are added, eliminating the need
 to sort the hooks.
 * tests are rewritten in jest and future development will happen in the
 packages github.
 * we should be able to release this as an npm module.

 Thanks to nylen for all his work improving this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21170#comment:128>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list