pre_wp_update_comment_count_now filter-hook . WP 4.5.0
Filters a post's comment count before it is updated in the database.
Usage
add_filter( 'pre_wp_update_comment_count_now', 'filter_function_name_2436', 10, 3 ); function filter_function_name_2436( $new, $old, $post_id ){ // filter... return $new; }
- $new(int/null)
- The new comment count.
Default: null - $old(int)
- The old comment count.
- $post_id(int)
- Post ID.
Changelog
Since 4.5.0 | Introduced. |
Where the hook is called
wp-includes/comment.php 2673
$new = apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id );