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

WordPress Trac noreply at wordpress.org
Wed Sep 13 18:37:19 UTC 2017


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

Comment (by dd32):

 To get right to the point, I have to mostly agree with @pento here - I
 don't think it's quite the right moment in time for this.

 5 years ago, I think this would've been a great addition to the state of
 Javascript in WordPress - taking a concept WordPress developers were
 familiar with and providing a similar mechanism for the jumbled random
 pieces of Javascript inserted by all sorts of things, and actually getting
 it to all work together cohesively.
 But it's not 5 years ago, it's now 2017 and WordPress is behind the curve
 on modern Javascript adoption, we're playing catch up and we need to be
 looking at what will be useful over the coming ten years, and not just
 what has proved reliable in the past.

 The good news is that I don't think this patch/approach is incorrect or
 bad at all - Hooks & filters have certainly proved to be reliable in PHP,
 I just don't want us to run forward into adopting something which is based
 on historical JS usage in WordPress rather than future JS usage.
 I'd want to see something using a modern library (Be that React, Vue,
 Angular, Whatever) using this pattern before we add it as-is to WordPress,
 if it proves to be useful in that context then I'd be all for this, but
 only after a reasonably complex application had tried it.
 Gutenberg is the current obvious choice and if using it in Gutenberg
 didn't show up some shortcomings of the API as-is I'd be extremely
 surprised.

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


More information about the wp-trac mailing list