pre_get_comments WordPress Action Hook
The pre_get_comments hook is a hook that is called before the comments are fetched. It is used to modify the query that is used to fetch the comments.
do_action_ref_array( 'pre_get_comments', WP_Comment_Query $query ) #
Fires before comments are retrieved.
Parameters
- $query
(WP_Comment_Query)Current instance of WP_Comment_Query (passed by reference).
Source
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |