wp_update_comment_count

动作钩子


do_action( 'wp_update_comment_count', $post_id, $new, $old )
参数
  • (int)
    $post_id
    Post ID.
    Required:
  • (int)
    $new
    The new comment count.
    Required:
  • (int)
    $old
    The old comment count.
    Required:
定义位置
  • wp-includes/comment.php
    , line 2766
引入
2.3.0
弃用

Fires immediately after a post’s comment count is updated in the database.

do_action( 'wp_update_comment_count', $post_id, $new, $old );