WordPress.org

Make WordPress Core

Ticket #11592: 11592.2.diff

File 11592.2.diff, 1.5 KB (added by nacin, 8 years ago)

Refreshed against changes in #11386.

  • wp-includes/author-template.php

     
    4145 * @link http://codex.wordpress.org/Template_Tags/the_author
    4246 *
    4347 * @param string $deprecated Deprecated.
    44  * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
    45  * @return string The author's display name, from get_the_author().
     48 * @param string $deprecated_echo Deprecated. Use get_the_author() to return a value. Echo the string or return it.
     49 * @return string Deprecated. Used get_the_author() to return a value. 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();
    54         return get_the_author();
     56        else
     57                return get_the_author();
    5558}
    5659
    5760/**