the_author_posts_link

The timeline below displays how wordpress function the_author_posts_link has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Displays an HTML link to the author page of the current post's author.
 *
 * @since 1.2.0
 * @since 4.4.0 Converted into a wrapper for get_the_author_posts_link()
 *
 * @param string $deprecated Unused.
 */
function the_author_posts_link($deprecated = '')
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1.0');
    }
    echo get_the_author_posts_link();
}

WordPress Version: 4.4

/**
 * Displays an HTML link to the author page of the current post's author.
 *
 * @since 1.2.0
 * @since 4.4.0 Converted into a wrapper for get_the_author_posts_link()
 *
 * @param string $deprecated Unused.
 */
function the_author_posts_link($deprecated = '')
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    echo get_the_author_posts_link();
}

WordPress Version: 4.3

/**
 * Display an HTML link to the author page of the author of the current post.
 *
 * Does just echo get_author_posts_url() function, like the others do. The
 * reason for this, is that another function is used to help in printing the
 * link to the author's posts.
 *
 * @link https://codex.wordpress.org/Template_Tags/the_author_posts_link
 * @since 1.2.0
 *
 * @global object $authordata The current author's DB object.
 *
 * @param string $deprecated Deprecated.
 */
function the_author_posts_link($deprecated = '')
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    global $authordata;
    if (!is_object($authordata)) {
        return;
    }
    $link = sprintf('<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url(get_author_posts_url($authordata->ID, $authordata->user_nicename)), esc_attr(sprintf(__('Posts by %s'), get_the_author())), get_the_author());
    /**
     * Filter the link to the author page of the author of the current post.
     *
     * @since 2.9.0
     *
     * @param string $link HTML link.
     */
    echo apply_filters('the_author_posts_link', $link);
}

WordPress Version: 4.2

/**
 * Display an HTML link to the author page of the author of the current post.
 *
 * Does just echo get_author_posts_url() function, like the others do. The
 * reason for this, is that another function is used to help in printing the
 * link to the author's posts.
 *
 * @link https://codex.wordpress.org/Template_Tags/the_author_posts_link
 * @since 1.2.0
 * @param string $deprecated Deprecated.
 */
function the_author_posts_link($deprecated = '')
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    global $authordata;
    if (!is_object($authordata)) {
        return false;
    }
    $link = sprintf('<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url(get_author_posts_url($authordata->ID, $authordata->user_nicename)), esc_attr(sprintf(__('Posts by %s'), get_the_author())), get_the_author());
    /**
     * Filter the link to the author page of the author of the current post.
     *
     * @since 2.9.0
     *
     * @param string $link HTML link.
     */
    echo apply_filters('the_author_posts_link', $link);
}

WordPress Version: 4.1

/**
 * Display an HTML link to the author page of the author of the current post.
 *
 * Does just echo get_author_posts_url() function, like the others do. The
 * reason for this, is that another function is used to help in printing the
 * link to the author's posts.
 *
 * @link http://codex.wordpress.org/Template_Tags/the_author_posts_link
 * @since 1.2.0
 * @param string $deprecated Deprecated.
 */
function the_author_posts_link($deprecated = '')
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    global $authordata;
    if (!is_object($authordata)) {
        return false;
    }
    $link = sprintf('<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url(get_author_posts_url($authordata->ID, $authordata->user_nicename)), esc_attr(sprintf(__('Posts by %s'), get_the_author())), get_the_author());
    /**
     * Filter the link to the author page of the author of the current post.
     *
     * @since 2.9.0
     *
     * @param string $link HTML link.
     */
    echo apply_filters('the_author_posts_link', $link);
}

WordPress Version: 3.7

/**
 * Display an HTML link to the author page of the author of the current post.
 *
 * Does just echo get_author_posts_url() function, like the others do. The
 * reason for this, is that another function is used to help in printing the
 * link to the author's posts.
 *
 * @link http://codex.wordpress.org/Template_Tags/the_author_posts_link
 * @since 1.2.0
 * @uses $authordata The current author's DB object.
 * @uses get_author_posts_url()
 * @uses get_the_author()
 * @param string $deprecated Deprecated.
 */
function the_author_posts_link($deprecated = '')
{
    if (!empty($deprecated)) {
        _deprecated_argument(__FUNCTION__, '2.1');
    }
    global $authordata;
    if (!is_object($authordata)) {
        return false;
    }
    $link = sprintf('<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url(get_author_posts_url($authordata->ID, $authordata->user_nicename)), esc_attr(sprintf(__('Posts by %s'), get_the_author())), get_the_author());
    /**
     * Filter the link to the author page of the author of the current post.
     *
     * @since 2.9.0
     *
     * @param string $link HTML link.
     */
    echo apply_filters('the_author_posts_link', $link);
}