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

WordPress Trac noreply at wordpress.org
Thu Sep 14 14:11:48 UTC 2017


#21170: JavaScript actions and filters
-----------------------------+-------------------------
 Reporter:  koopersmith      |       Owner:
     Type:  feature request  |      Status:  assigned
 Priority:  normal           |   Milestone:  4.9
Component:  General          |     Version:  3.4
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  javascript
-----------------------------+-------------------------

Comment (by mgibbs189):

 This revert is unsettling on so many levels.

 > 5 years ago, I think this would've been a great addition to the state of
 Javascript in WordPress

 The patch was polished and merge-ready for '''3.7'''... as in 2013. Lots
 of great contributors like @adamsilverstein @mikeschinkel and @carldanley
 poured their expertise into this. `wp.hooks` is just as relevant today as
 it was 5 years ago.

 > I'm more concerned with having building blocks for the future that feel
 native, rather than potentially forced to fit in.

 `wp.hooks` is just a helper library (like lodash) -- only w/ methods to
 prioritize JS execution. The simple inclusion of this library will NOT
 interfere with whatever framework WP chooses.

 Also, what exactly about `wp.hooks` is "legacy"? Just the fact that it's
 been around a while? The notion that "there ''may'' be a better approach
 in the future" is NOT a good reason to keep kicking the can, especially
 since (A) there's no specifics about an alternative, and (B) there's been
 a need for this utility for years.

 > Using this approach on our current JS in no way precludes using a
 different approach in the future

 Exactly!

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


More information about the wp-trac mailing list