do_action( 'wp_update_comment_count', int $post_id, int $new, int $old )
- Since
- 2.3.0
Fires immediately after a post's comment count is updated in the database.
Parameters
$post_idint- Post ID.
$newint- The new comment count.
$oldint- The old comment count.
Where this hook fires · 1
wp-includes/comment.php:2893wp_update_comment_count_now()
Source code
* @since 2.3.0 * * @param int $post_id Post ID. * @param int $new The new comment count. * @param int $old The old comment count. */ do_action( 'wp_update_comment_count', $post_id, $new, $old ); /** This action is documented in wp-includes/post.php */ do_action( "edit_post_{$post->post_type}", $post_id, $post ); /** This action is documented in wp-includes/post.php */ do_action( 'edit_post', $post_id, $post );Changelog
Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.