found_comments_query WordPress Filter Hook
The found_comments_query hook is used to modify the SQL query used to search for comments in the database. This hook is used by the function wp_list_comments() to search for comments matching the criteria specified in the comment_args array. The found_comments_query hook can be used to modify the SQL query used to search for comments in the database. This hook is used by the function wp_list_comments() to search for comments matching the criteria specified in the comment_args array. The found_comments_query hook can be used to alter the comments search query in order to change the comments that are returned by the wp_list_comments() function.
apply_filters( 'found_comments_query', string $found_comments_query , WP_Comment_Query $comment_query ) #
Filters the query used to retrieve found comment count.
Parameters
- $found_comments_query
(string)SQL query. Default 'SELECT FOUND_ROWS()'.
- $comment_query
(WP_Comment_Query)The
WP_Comment_Query
instance.
Source
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |