Ticket #15565: 15565.1.diff
| File 15565.1.diff, 597 bytes (added by mdawaffe, 3 years ago) |
|---|
-
wp-includes/comment.php
1562 1562 1563 1563 $old = (int) $post->comment_count; 1564 1564 $new = (int) $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1'", $post_id) ); 1565 1566 do_action('wp_updating_comment_count', $post_id, $new, $old); 1567 1565 1568 $wpdb->update( $wpdb->posts, array('comment_count' => $new), array('ID' => $post_id) ); 1566 1569 1567 1570 if ( 'page' == $post->post_type )