On this page
apply_filters( 'pre_wp_update_comment_count_now', int|null $new, int $old, int $post_id )
Filters a post’s comment count before it is updated in the database.
Parameters
$newint|null-
The new comment count. Default null.
$oldint-
The old comment count.
$post_idint-
Post ID.
Source
File: wp-includes/comment.php. View all references
$new = apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id );
Related
Used By
| Used By | Description |
|---|---|
| wp_update_comment_count_now() wp-includes/comment.php | Updates the comment count for the post. |
Changelog
| Version | Description |
|---|---|
| 4.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_wp_update_comment_count_now