wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_count_comments › WordPress过滤钩子

Since2.7.0
已弃用n/a
apply_filters( 'wp_count_comments', array()
参数: (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
定义在:
文档:

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





源码

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