WordPress.org

Make WordPress Core

Ticket #30355: 30355.diff

File 30355.diff, 2.0 KB (added by zrothauser, 5 years ago)

Updated functions

  • src/wp-includes/author-template.php

    diff --git src/wp-includes/author-template.php src/wp-includes/author-template.php
    index 2280487..880ba3e 100644
    function the_author_posts() { 
    211211}
    212212
    213213/**
    214  * Display an HTML link to the author page of the author of the current post.
     214 * Get an HTML link to the author page of the author of the current post.
    215215 *
    216  * Does just echo get_author_posts_url() function, like the others do. The
    217  * reason for this, is that another function is used to help in printing the
    218  * link to the author's posts.
     216 * Returns an HTML-formatted link using get_author_posts_url().
    219217 *
    220  * @link http://codex.wordpress.org/Template_Tags/the_author_posts_link
    221  * @since 1.2.0
    222  * @param string $deprecated Deprecated.
     218 * @link http://codex.wordpress.org/Template_Tags/get_author_posts_link
     219 * @since 4.1.0
     220 * @return string An HTML link to the author page.
    223221 */
    224 function the_author_posts_link($deprecated = '') {
    225         if ( !empty( $deprecated ) )
    226                 _deprecated_argument( __FUNCTION__, '2.1' );
    227 
     222function get_the_author_posts_link() {
    228223        global $authordata;
    229         if ( !is_object( $authordata ) )
     224        if ( ! is_object( $authordata ) )
    230225                return false;
    231226        $link = sprintf(
    232227                '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
    function the_author_posts_link($deprecated = '') { 
    242237         *
    243238         * @param string $link HTML link.
    244239         */
    245         echo apply_filters( 'the_author_posts_link', $link );
     240        return apply_filters( 'the_author_posts_link', $link );
     241}
     242
     243/**
     244 * Display an HTML link to the author page of the author of the current post.
     245 *
     246 * Echoes get_author_posts_link() function.
     247 *
     248 * @link http://codex.wordpress.org/Template_Tags/the_author_posts_link
     249 * @since 1.2.0
     250 * @param string $deprecated Deprecated.
     251 */
     252function the_author_posts_link($deprecated = '') {
     253        if ( !empty( $deprecated ) )
     254                _deprecated_argument( __FUNCTION__, '2.1' );
     255
     256        echo get_the_author_posts_link();
    246257}
    247258
    248259/**