pre_wp_update_comment_count_now

过滤钩子


apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id )
参数
  • (int|null)
    $new
    The new comment count. Default null.
    Required:
  • (int)
    $old
    The old comment count.
    Required:
  • (int)
    $post_id
    Post ID.
    Required:
定义位置
  • wp-includes/comment.php
    , line 2745
引入
4.5.0
弃用

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

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