A WordPress-centric search engine for devs and theme authors



wp_count_comments ›

Since2.7.0
Deprecatedn/a
apply_filters( 'wp_count_comments', array()
Parameters: (2)
  • (array|stdClass) $count An empty array or an object containing comment counts.
    Required: Yes
  • (int) $post_id The post ID. Can be 0 to represent the whole site.
    Required: Yes
Defined at:
Codex:

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





Source

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