Make WordPress Core


Ignore:
Timestamp:
12/30/2009 04:23:39 PM (14 years ago)
Author:
westi
Message:

Updates and improvements to _depreceated_argument. See #11386 props nacin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/author-template.php

    r12537 r12584  
    2323function get_the_author($deprecated = '') {
    2424    global $authordata;
     25
     26    if ( !empty( $deprecated ) )
     27        _deprecated_argument( __FUNCTION__, '0.0' );
     28
    2529    return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null);
    2630}
     
    4549 * @return string The author's display name, from get_the_author().
    4650 */
    47 function the_author($deprecated = '', $deprecated_echo = true) {
    48     if ( !empty($deprecated) )
    49         _deprecated_argument(__FUNCTION__, 'deprecated', '1.5');
    50     if ( $deprecated_echo !== true )
    51         _deprecated_argument(__FUNCTION__, 'deprecated_echo', '1.5', __('Use get_the_author() instead if you do not want the value echoed.'));
     51function the_author( $deprecated = '', $deprecated_echo = true ) {
     52    if ( !empty( $deprecated ) || $deprecated_echo !== true )
     53        _deprecated_argument( __FUNCTION__, '1.5', $deprecated_echo !== true ? __('Use get_the_author() instead if you do not want the value echoed.') : null );
    5254    if ( $deprecated_echo )
    5355        echo get_the_author();
     
    183185function the_author_posts_link($deprecated = '') {
    184186    if ( !empty( $deprecated ) )
    185         _deprecated_argument(__FUNCTION__, 'deprecated', '0.0');
     187        _deprecated_argument( __FUNCTION__, '0.0' );
    186188
    187189    global $authordata;
Note: See TracChangeset for help on using the changeset viewer.