found_comments_query хук-фильтр . WP 4.4.0
Filters the query used to retrieve found comment count.
Использование
add_filter( 'found_comments_query', 'filter_function_name_3290', 10, 2 ); function filter_function_name_3290( $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 972
$found_comments_query = apply_filters( 'found_comments_query', 'SELECT FOUND_ROWS()', $this );