[wp-trac] [WordPress Trac] #11386: New _deprecated_argument() function

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 24 18:23:17 UTC 2009


#11386: New _deprecated_argument() function
-------------------------+--------------------------------------------------
 Reporter:  nacin        |       Owner:  westi   
     Type:  enhancement  |      Status:  accepted
 Priority:  normal       |   Milestone:  3.0     
Component:  Inline Docs  |     Version:          
 Severity:  normal       |    Keywords:  commit  
-------------------------+--------------------------------------------------

Comment(by nacin):

 Well, we call it multiple times very rarely -- only twice. Once is easy,
 but in the_author()'s case, one of them passes a special message. I
 suppose we could conditionally pass the message as well, such as:
 {{{
 if ( !empty( $deprecated ) || $deprecated_echo !== true )
     _deprecated_argument( __FUNCTION__, '1.5', $_deprecated_echo !== true
 ? __('Use get_the_author() instead if you do not want the value echoed.')
 : null );
 }}}

 Perhaps we should consider renaming deprecated arguments to
 $deprecated_{old_name} in lieu of this, and provide better feedback?

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


More information about the wp-trac mailing list