apply_filters( ‘wp_count_comments’, array|stdClass $count, int $post_id )

In this article

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

Parameters

$countarray|stdClass
An empty array or an object containing comment counts.
$post_idint
The post ID. Can be 0 to represent the whole site.

Source

$filtered = apply_filters( 'wp_count_comments', array(), $post_id );

Changelog

VersionDescription
2.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.