get_comment_author_link

Definition:
function get_comment_author_link( $comment_ID = 0 ) {}

Retrieve the html link to the url of the author of the current comment.

Parameters

  • int $comment_ID: The ID of the comment for which to get the author’s link. Optional.

Return values

returns:Comment Author name or HTML link for author’s URL

Defined filters

  • get_comment_author_link
    apply_filters('get_comment_author_link', $return)

Source code

function get_comment_author_link( $comment_ID = 0 ) {

	/** @todo Only call these functions when they are needed. Include in if... else blocks */

	$url    = get_comment_author_url( $comment_ID );

	$author = get_comment_author( $comment_ID );



	if ( empty( $url ) || 'http://' == $url )

		$return = $author;

	else

		$return = "<a href='$url' rel='external nofollow' class='url'>$author</a>";

	return apply_filters('get_comment_author_link', $return);

}

1298

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: