the_comments хук-фильтр . WP 3.1.0
Filters the comment query results.
Использование
add_filter( 'the_comments', 'filter_function_name_9477', 10, 2 ); function filter_function_name_9477( $_comments, $this ){ // filter... return $_comments; }
- $_comments(WP_Comment[])
- An array of comments.
- $this(WP_Comment_Query)
- Current instance of WP_Comment_Query (passed by reference).
Список изменений
С версии 3.1.0 | Введена. |
Где вызывается хук
wp-includes/class-wp-comment-query.php 481
$_comments = apply_filters_ref_array( 'the_comments', array( $_comments, &$this ) );