[wp-trac] [WordPress Trac] #19417: has_filter() can return 0, and remove_filter() doesn't use $accepted_args

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 20 13:44:33 UTC 2012


#19417: has_filter() can return 0, and remove_filter() doesn't use $accepted_args
------------------------------------+------------------
 Reporter:  nacin                   |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  3.5
Component:  Plugins                 |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch commit early  |
------------------------------------+------------------

Comment (by nacin):

 So, has_filter() and has_action() only returns the priority when
 $function_to_check is also passed. Otherwise, if you're just checking the
 hook, it returns a boolean.

 In core, we never use the second argument. So, there's no need for us to
 be careful about its use. This is nothing more than a documentation issue.

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


More information about the wp-trac mailing list