apply_filters( ‘pre_wp_update_comment_count_now’, int|null $new, int $old, int $post_id )

In this article

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

$new = apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id );

Changelog

VersionDescription
4.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.