pre_wp_update_comment_count_now WordPress Filter Hook
The pre_wp_update_comment_count_now hook is used to update the number of comments a post has before the post is updated. This hook is used by the wp_update_comment_count_now() function.
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
- $new
(int|null)The new comment count. Default null.
- $old
(int)The old comment count.
- $post_id
(int)Post ID.
Source
File: wp-includes/comment.php
Changelog
Version | Description |
---|---|
4.5.0 | Introduced. |