wpseek.com
A WordPress-centric search engine for devs and theme authors



pre_wp_update_comment_count_now › WordPress Filter Hooks

Since4.5.0
Deprecatedn/a
apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id )
Parameters: (3)
  • (int|null) $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 );