get_comment_link WordPress Filter Hook
The get_comment_link WordPress hook is used to retrieve the URL for a specific comment. This hook can be used in conjunction with the get_comments() function to create a custom comments feed.
apply_filters( 'get_comment_link', string $link , WP_Comment $comment , array $args , int $cpage ) #
Filters the returned single comment permalink.
Description
See also
Parameters
- $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.
Source
Changelog
Version | Description |
---|---|
4.4.0 | Added the $cpage parameter. |
2.8.0 | Introduced. |