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.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More