wp_count_comments

Advertisement

Summery Summery

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

Syntax Syntax

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

Parameters Parameters

$count

(array|stdClass) An empty array or an object containing comment counts.

$post_id

(int) The post ID. Can be 0 to represent the whole site.

Source Source

File: wp-includes/comment.php

Advertisement

Changelog Changelog

Changelog
Version Description
2.7.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.