the_comments хук-фильтрWP 3.1.0

Filters the comment query results.

Использование

add_filter( 'the_comments', 'wp_kama_the_comments_filter' );

/**
 * Function for `the_comments` filter-hook.
 * 
 * @param WP_Comment[] $_comments An array of comments.
 *
 * @return WP_Comment[]
 */
function wp_kama_the_comments_filter( $_comments ){

	// filter...
	return $_comments;
}
$_comments(WP_Comment[])
An array of comments.

Список изменений

С версии 3.1.0 Введена.

Где вызывается хук

WP_Comment_Query::get_comments()
the_comments
wp-includes/class-wp-comment-query.php 522
$_comments = apply_filters_ref_array( 'the_comments', array( $_comments, &$this ) );

Где используется хук в WordPress

Использование не найдено.