get_comment_link filter-hook . WP 2.8.0
Filters the returned single comment permalink.
Usage
add_filter( 'get_comment_link', 'filter_function_name_8503', 10, 4 ); function filter_function_name_8503( $link, $comment, $args, $cpage ){ // filter... return $link; }
- $link(string)
- The comment permalink with '#comment-$id' appended.
- $comment(WP_Comment)
- The current comment object.
- $args(array)
- An array of arguments to override the defaults.
- $cpage(int)
- The calculated 'cpage' value.
Changelog
Since 2.8.0 | Introduced. |
Since 4.4.0 | Added the $cpage parameter. |
Where the hook is called
get_comment_link
wp-includes/comment-template.php 801
return apply_filters( 'get_comment_link', $link, $comment, $args, $cpage );