[wp-trac] [WordPress Trac] #23259: Allow filtering the $function parameter of add_filter(), has_filter() and remove_filter()

WordPress Trac noreply at wordpress.org
Tue Jan 22 04:34:23 UTC 2013


#23259: Allow filtering the $function parameter of add_filter(), has_filter() and
remove_filter()
------------------------------------+------------------------------
 Reporter:  MikeSchinkel            |       Owner:
     Type:  feature request         |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Plugins                 |     Version:  3.5
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by nacin):

 This sounds clever, but:

  * It proposes a solution at the onset, rather than the problem.

  * If the plugin author would need to do something special to support it,
 what is the benefit to this, over better education of developers to ensure
 they expose object references (when not just using static methods  , which
 is even easier)?

  * This masks the simple callback nature of the second argument,
 potentially making it more difficult to read a plugin, especially if one
 is less familiar with WP.

  * How would you avoid obvious recursion issues in core? And in the
 plugins themselves?

  * This would potentially slow down an API that needs to be very fast
 because it is called so often. Worse, performance would degrade further as
 more plugins opt into these filters.

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


More information about the wp-trac mailing list