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.


Top ↑

Source

File: wp-includes/class-wp-comment-query.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.