On this page
apply_filters( 'wp_count_comments', array|stdClass $count, int $post_id )
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
File: wp-includes/comment.php. View all references
$filtered = apply_filters( 'wp_count_comments', array(), $post_id );
Related
Used By
| Used By | Description |
|---|---|
| wp_count_comments() wp-includes/comment.php | Retrieves the total comment counts for the whole site or a single post. |
Changelog
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_count_comments