get_comment_ID WordPress Filter Hook
The get_comment_ID WordPress hook is used to get the current comment ID. This can be useful when you need to get the ID of the current comment in the loop.
apply_filters( 'get_comment_ID', string $comment_ID , WP_Comment $comment ) #
Filters the returned comment ID.
Parameters
- $comment_ID
(string)The current comment ID as a numeric string.
- $comment
(WP_Comment)The comment object.
Source
Changelog
Version | Description |
---|---|
4.1.0 | The $comment parameter was added. |
1.5.0 | Introduced. |