[wp-trac] [WordPress Trac] #11386: Remove $deprecated = '' arguments that don't affect argument order

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 14 03:02:32 UTC 2009


#11386: Remove $deprecated = '' arguments that don't affect argument order
--------------------------+-------------------------------------------------
 Reporter:  nacin         |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  3.0            
Component:  Inline Docs   |     Version:                 
 Severity:  normal        |    Keywords:  has-patch close
--------------------------+-------------------------------------------------

Comment(by filosofo):

 Replying to [comment:1 strider72]:
 > A potential problem with this is if a new argument is later added to the
 function.  Then you could have old plugins passing data to the missing
 parameter, but the new version of the function accepting it as the new
 parameter.  Might mess things up.

 Actually, in many cases this is something we want to happen.

 Take one of the functions in the patch, get_the_author().  Its argument,
 "$idnode," was deprecated in WordPress 2.0.5 ($idnode let you specify what
 you wanted as a return value, such as "nickname" or the like).

 2.0.5 was released over ''3 years ago''.  The soonest get_the_author()
 could get a new argument would be in 3.0, which will probably happen
 summer 2010.  Is anyone seriously going to argue that we should coddle
 plugins and themes calling get_the_author() with an argument that's been
 deprecated for 3 and a half years?

 But get_the_author() (and like functions) ''do'' need an argument, and
 that--logically and consistent with other WP functions--is the author's
 ID.

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


More information about the wp-trac mailing list