comment_author_url_link()WP 0.71

Displays the HTML link of the url of the author of the current comment.

No Hooks.

Return

null. Nothing (null).

Usage

comment_author_url_link( $link_text, $before, $after, $comment );
$link_text(string)
Text to display instead of the comment author's email address.
Default: ''
$before(string)
Text or HTML to display before the email link.
Default: ''
$after(string)
Text or HTML to display after the email link.
Default: ''
$comment(int|WP_Comment)
Comment ID or WP_Comment object.
Default: current comment

Examples

0

#1 A simple example of how to use it:

Website: <?php comment_author_url_link(); ?>
0

#2 Display the link to the commenter's site and Styling

Displays comment author’s URL as text string "Visit Site of Comment Author" and adds bullets before and after the link to style it.

<?php comment_author_url_link( 'Visit Site of Comment Author', ' • ', ' • '); ?>

We get:

• <a href='https://example.com/' rel='external'>Visit Site of Comment Author</a> •

Changelog

Since 0.71 Introduced.
Since 4.6.0 Added the $comment parameter.

comment_author_url_link() code WP 6.4.3

function comment_author_url_link( $link_text = '', $before = '', $after = '', $comment = 0 ) {
	echo get_comment_author_url_link( $link_text, $before, $after, $comment );
}