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

WordPress Trac noreply at wordpress.org
Tue Jul 25 09:18:35 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        |     Focuses:  javascript
-----------------------------+------------------------------

Comment (by azaozz):

 Replying to [comment:137 jnylen0]:
 > Then we are back to this point, again for ease of use/clarity:
 >
 > > if we do make [the namespace] mandatory, then it should be a separate
 argument (at that point there's no reason to include it in the "hook name"
 argument and then have to split apart that string).

 Hm, think there is some misunderstanding here :) I don't have strong
 preferences to either way (see [#comment:131 comment 131]).

 The facts are that:
 1. In the current implementation (PHP) all hooks are removable.
 2. There are some comments on this ticket suggesting to make some of the
 hooks non-removable in JS.
 3. I'm against that and think all hooks should also be removable in the JS
 implementation.

 > I have to say that none of these really feel right to me.  I will keep
 thinking about it; other suggestions welcome.

 Yeah, I tend to agree. IMHO best of the four options so far is adopting
 the jQuery-style namespaces as they are the most widely used/known. If
 there is a better way, I'm all for it.

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


More information about the wp-trac mailing list