[wp-trac] [WordPress Trac] #22218: Extra add_action() parameter (was: Extra add_action() Parameter)

WordPress Trac noreply at wordpress.org
Thu Oct 18 15:10:49 UTC 2012


#22218: Extra add_action() parameter
-------------------------+------------------------------
 Reporter:  dgwyer       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  3.4.2
 Severity:  normal       |  Resolution:
 Keywords:  2nd-opinion  |
-------------------------+------------------------------

Comment (by dgwyer):

 That's a pretty cool workaround. Works well.

 I would still like to see a simpler implementation route, but I guess it's
 more important to keep a critical function such as add_action() as lean
 and mean as possible!

 Looking at your code the only thing I am not sure of is the line:

 {{{$args = func_get_args();}}}

 I assume the hook parameters specified in {{{do_action()}}} get placed
 into {{{$args}}}? If that's correct I'm unclear how this works. Any
 pointers would be appreciated. :)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22218#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list