apply_filters( ‘get_comments_number’, string|int $comments_number, int $post_id )

In this article

Filters the returned comment count for a post.

Parameters

$comments_numberstring|int
A string representing the number of comments a post has, otherwise 0.
$post_idint
Post ID.

Source

return apply_filters( 'get_comments_number', $comments_number, $post_id );

Changelog

VersionDescription
1.5.0Introduced.

User Contributed Notes

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