Filter hook 'pre_wp_update_comment_count_now'

in WP Core File wp-includes/comment.php at line 2747

Description

Filters a post's comment count before it is updated in the database.

Occurrences

Filename Line Number
wp-includes/comment.php 2747

Parameters

Type Name Description
int|null $new The new comment count. Default null.
int $old The old comment count.
int $post_id Post ID.

PHP Doc

/**
	 * Filters a post's comment count before it is updated in the database.
	 *
	 * @since 4.5.0
	 *
	 * @param int|null $new     The new comment count. Default null.
	 * @param int      $old     The old comment count.
	 * @param int      $post_id Post ID.
	 */