[wp-trac] [WordPress Trac] #21170: JavaScript actions and filters
WordPress Trac
noreply at wordpress.org
Fri Mar 10 23:28:31 UTC 2017
#21170: JavaScript actions and filters
------------------------------------+------------------------------
Reporter: koopersmith | Owner: adamsilverstein
Type: feature request | Status: assigned
Priority: normal | Milestone: Future Release
Component: General | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses: javascript
------------------------------------+------------------------------
Comment (by azaozz):
Replying to [comment:112 aduth]:
21170.5.2.diff looks good. Couple more things to consider:
- Do we want to do "jQuery style namespacing" or something similar? The
problem is removing particular callback from a filter in PHP is very easy
as the "identifier" is usually a string (even when it is a method). This
is not the case in JS where a callback cannot be removed if there is no
reference to it. If not, should we add some easy way to remove specific
callbacks?
- In PHP there are `doing_action()`, `did_action()`, and `has_action()`.
They are somewhat useful in some cases. Do we need equivalents in JS?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21170#comment:115>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list