WordPress.org

Make WordPress Core

Ticket #30355: 30355.2.diff

File 30355.2.diff, 1.9 KB (added by wonderboymusic, 4 years ago)
  • src/wp-includes/author-template.php

     
    223223}
    224224
    225225/**
    226  * Display an HTML link to the author page of the author of the current post.
     226 * Get an HTML link to the author page of the author of the current post.
    227227 *
    228  * Does just echo get_author_posts_url() function, like the others do. The
    229  * reason for this, is that another function is used to help in printing the
    230  * link to the author's posts.
     228 * Returns an HTML-formatted link using get_author_posts_url().
    231229 *
    232  * @link https://codex.wordpress.org/Template_Tags/the_author_posts_link
    233  * @since 1.2.0
     230 * @since 4.4.0
    234231 *
    235232 * @global object $authordata The current author's DB object.
    236233 *
    237  * @param string $deprecated Deprecated.
     234 * @return string An HTML link to the author page.
    238235 */
    239 function the_author_posts_link($deprecated = '') {
    240         if ( !empty( $deprecated ) )
    241                 _deprecated_argument( __FUNCTION__, '2.1' );
    242 
     236function get_the_author_posts_link() {
    243237        global $authordata;
    244238        if ( ! is_object( $authordata ) ) {
    245239                return;
     
    259253         *
    260254         * @param string $link HTML link.
    261255         */
    262         echo apply_filters( 'the_author_posts_link', $link );
     256        return apply_filters( 'the_author_posts_link', $link );
    263257}
    264258
    265259/**
     260 * Display an HTML link to the author page of the author of the current post.
     261 *
     262 * Echoes get_author_posts_link() function.
     263 *
     264 * @link https://codex.wordpress.org/Template_Tags/the_author_posts_link
     265 * @since 1.2.0
     266 *
     267 * @param string $deprecated Deprecated.
     268 */
     269function the_author_posts_link($deprecated = '') {
     270        if ( ! empty( $deprecated ) ) {
     271                _deprecated_argument( __FUNCTION__, '2.1' );
     272        }
     273        echo get_the_author_posts_link();
     274}
     275
     276/**
    266277 * Retrieve the URL to the author page for the user with the ID provided.
    267278 *
    268279 * @since 2.1.0