A WordPress-centric search engine for devs and theme authors



pre_wp_update_comment_count_now ›

Since4.5.0
Deprecatedn/a
apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id )
Parameters: (3)
  • (int) $new The new comment count. Default null.
    Required: Yes
  • (int) $old The old comment count.
    Required: Yes
  • (int) $post_id Post ID.
    Required: Yes
Defined at:
Codex:

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





Source

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