WordPress at a glance
filter is not described

wp_count_comments filter-hook . WP 2.7.0

Filters the comments count for a given post or the whole site.


add_filter( 'wp_count_comments', 'filter_function_name_5474', 10, 2 );
function filter_function_name_5474( $count, $post_id ){
	// filter...

	return $count;
An empty array or an object containing comment counts.
The post ID. Can be 0 to represent the whole site.

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

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

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

wp-includes/comment.php 1432
$filtered = apply_filters( 'wp_count_comments', array(), $post_id );

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

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