WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/get comment author link

Description

Retrieve the HTML link to the URL of the author of the current comment.

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.

<?php apply_filters( 'get_comment_author_link', $return ); ?>

Parameters

$comment_ID
(int) (required) ID of the comment for which to get the author's link.
Default: None
$return
(string) (required) The HTML-formatted comment author link. Empty for an invalid URL.
Default: None

Examples

Added to your child themes functions.php file, you can modify the HTML link to the URL of the author of the current comment.


Source File

get_comment_author_link is located in wp-includes/comment-template.php

Related