[wp-trac] [WordPress Trac] #5232: Get the current action and current filter name

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 18 23:54:21 GMT 2007


#5232: Get the current action and current filter name
-------------------------+--------------------------------------------------
 Reporter:  tellyworth   |       Owner:  anonymous
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  2.5      
Component:  General      |     Version:           
 Severity:  normal       |    Keywords:  has-patch
-------------------------+--------------------------------------------------
 Currently there's no easy way for a filter to know the name of the current
 filter.  Likewise for actions.  That's not a problem if you're only
 filtering on a single tag, but it could be useful to know if you're
 applying a function to multiple actions/filters, or using the 'all'
 filter.

 The enclosed patch sets a global $wp_current_action or $wp_current_filter
 with the tag name of the current action/filter.  Using a global seems a
 little rough, but it could be improved if the concept is sound.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5232>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list