On this page
apply_filters( 'get_comments_number', string|int $count, int $post_id )
Filters the returned comment count for a post.
Parameters
$countstring|int-
A string representing the number of comments a post has, otherwise 0.
$post_idint-
Post ID.
Source
File: wp-includes/comment-template.php. View all references
return apply_filters( 'get_comments_number', $count, $post_id );
Related
Used By
| Used By | Description |
|---|---|
| get_comments_number() wp-includes/comment-template.php | Retrieves the amount of comments a post has. |
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_comments_number