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 $return The HTML-formatted comment author link. Empty for an invalid URL. * @param string $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( $return, $author, $comment_ID ){ // filter... return $return; }
- $return(string)
- The HTML-formatted comment author link. Empty for an invalid URL.
- $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 $author and $comment_ID parameters were added. |
Where the hook is called
get_comment_author_link
wp-includes/comment-template.php 242
return apply_filters( 'get_comment_author_link', $return, $author, $comment->comment_ID );