get_comment_author_link
Filters the comment author's link for display.
Usage
add_filter( 'get_comment_author_link', 'wp_kama_get_comment_author_link_filter', 10, 3 );
/**
* Function for `get_comment_author_link` filter-hook.
*
* @param string $comment_author_link The HTML-formatted comment author link. Empty for an invalid URL.
* @param string $comment_author The comment author's username.
* @param string $comment_id The comment ID as a numeric string.
*
* @return string
*/
function wp_kama_get_comment_author_link_filter( $comment_author_link, $comment_author, $comment_id ){
// filter...
return $comment_author_link;
}
- $comment_author_link(string)
- The HTML-formatted comment author link. Empty for an invalid URL.
- $comment_author(string)
- The comment author's username.
- $comment_id(string)
- The comment ID as a numeric string.
Changelog
| Since 1.5.0 | Introduced. |
| Since 4.1.0 | The $comment_author and $comment_id parameters were added. |
Where the hook is called
get_comment_author_link
wp-includes/comment-template.php 293
return apply_filters( 'get_comment_author_link', $comment_author_link, $comment_author, $comment_id );