[wp-trac] [WordPress Trac] #14671: Deprecate the "accepted args" argument in add_filter() and add_action()

WordPress Trac wp-trac at lists.automattic.com
Mon Aug 23 07:47:39 UTC 2010


#14671: Deprecate the "accepted args" argument in add_filter() and add_action()
-------------------------+--------------------------------------------------
 Reporter:  markjaquith  |       Owner:     
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.1
Component:  Plugins      |     Version:     
 Severity:  normal       |    Keywords:     
-------------------------+--------------------------------------------------

Comment(by jacobsantos):

 I guess I need to explain. The backwards compatibility I was describing
 had nothing to with passing more parameters than the function definition
 supports, but really had to do with passing less parameters than the
 function supports.

  Function A accepts 3 parameters with 3rd being optional.

  The programmer wishes to use this same function for two or more filters,
 but wants to specify different behavior when the 3rd parameter is set.

 Your patch, as it is now, will not allow for this specific use case.
 Believe me, I have seen people do this and had legitimate reasons for
 doing so.

 Now that I have answered your request, how about answering the rest of
 mine.

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


More information about the wp-trac mailing list