Core Function
View Source on Trac ↗ wp_update_comment_count()
wp_update_comment_count( mixed $post_id, mixed $do_deferred = false ) Updates the comment count for post(s).
Parameters 2 required
| Name / Type | Description |
|---|---|
| (int | | null) $post_id Post ID. Required |
| bool | $do_deferred Optional. Whether to process previously deferred post comment counts. Default false. Required |
Return Value
((bool)
(bool | void) True on success, false on failure or if post with ID does
not exist.
Function Information
Since Version
2.1.0
Source File
wp-includes/comment.php
Advertisement