found_comments_query
Filters the query used to retrieve found comment count.
Использование
add_filter( 'found_comments_query', 'wp_kama_found_comments_query_filter', 10, 2 ); /** * Function for `found_comments_query` filter-hook. * * @param string $found_comments_query SQL query. * @param WP_Comment_Query $comment_query The `WP_Comment_Query` instance. * * @return string */ function wp_kama_found_comments_query_filter( $found_comments_query, $comment_query ){ // filter... return $found_comments_query; }
- $found_comments_query(строка)
- SQL query.
По умолчанию: 'SELECT FOUND_ROWS()' - $comment_query(WP_Comment_Query)
- The WP_Comment_Query instance.
Список изменений
С версии 4.4.0 | Введена. |
Где вызывается хук
found_comments_query
wp-includes/class-wp-comment-query.php 1013
$found_comments_query = apply_filters( 'found_comments_query', 'SELECT FOUND_ROWS()', $this );