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);
}