apply_filters( ‘get_comment_author_link’, string $comment_author_link, string $comment_author, string $comment_id )

Filters the comment author’s link for display.

Parameters

$comment_author_linkstring
The HTML-formatted comment author link.
Empty for an invalid URL.
$comment_authorstring
The comment author’s username.
$comment_idstring
The comment ID as a numeric string.

More Information

Both get_comment_author_url() and get_comment_author() rely on get_comment(), which falls back to the global comment variable if the $comment_ID argument is empty.

Source

return apply_filters( 'get_comment_author_link', $comment_author_link, $comment_author, $comment_id ); 

Changelog

VersionDescription
4.1.0The $comment_author and $comment_id parameters were added.
1.5.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    Link to author posts archive page:

    /** * To link to bbPress/BuddyPress profile or also link * avatar, see http://blog.samelh.com/?s=comment+author */ add_filter('get_comment_author_link', 'se_link_comment_to_archives'); function se_link_comment_to_archives( $link ) { global $comment; if ( !empty( $comment->user_id ) && !empty( get_userdata( $comment->user_id )->ID ) ) {	$link = sprintf(	'<a href="%s" rel="external nofollow" class="url">%s</a>',	get_author_posts_url( $comment->user_id ),	strip_tags( $link )	); } return $link; }

    It should work as long as the comment was submitted by a verified and logged-in user on your blog.

You must log in before being able to contribute a note or feedback.