Advertisements

get_comment_author_url_link

Definition:
function get_comment_author_url_link( $linktext = '', $before = '', $after = '' ) {}

Retrieves the HTML link of the url of the author of the current comment.
$linktext parameter is only used if the URL does not exist for the comment author. If the URL does exist then the URL will be used and the $linktext will be ignored.

Parameters

  • string $linktext: The text to display instead of the comment author’s email address
  • string $before: The text or HTML to display before the email link.
  • string $after: The text or HTML to display after the email link.

Return values

returns:The HTML link between the $before and $after parameters

Defined filters

  • get_comment_author_url_link
    apply_filters('get_comment_author_url_link', $return)

Source code

function get_comment_author_url_link( $linktext = '', $before = '', $after = '' ) {

	$url = get_comment_author_url();

	$display = ($linktext != '') ? $linktext : $url;

	$display = str_replace( 'http://www.', '', $display );

	$display = str_replace( 'http://', '', $display );

	if ( '/' == substr($display, -1) )

		$display = substr($display, 0, -1);

	$return = "$before<a href='$url' rel='external'>$display</a>$after";

	return apply_filters('get_comment_author_url_link', $return);

}

1304

Advertisements

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: