[wp-trac] [WordPress Trac] #21170: JavaScript actions and filters
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 12 21:34:12 UTC 2012
#21170: JavaScript actions and filters
----------------------------+--------------------------
Reporter: koopersmith | Owner: koopersmith
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.5
Component: General | Version: 3.4
Severity: normal | Resolution:
Keywords: |
----------------------------+--------------------------
Comment (by azaozz):
Replying to [comment:24 CaptainN]:
> Hmm, one thing I just noticed about SignalLite, and a lot of the other
JavaScript callback systems, is they don't really provide a way to do
WordPress style filters...
The JS way to do something similar is to pass around simple objects. As
they are always passed by reference changing a value in a callback
function would change it "everywhere".
Was planning to add "filters" and handle that automatically in the above
example but passing object(s) is doable with the "actions" too, so not
sure if it's needed. The only reason is that it would make this API more
familiar to developers that are used to the PHP API.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21170#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list