### Eclipse Workspace Patch 1.0
#P wordpress
|
|
|
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 | 1565 | $wpdb->update( $wpdb->posts, array('comment_count' => $new), array('ID' => $post_id) ); |
1566 | 1566 | |
1567 | | if ( 'page' == $post->post_type ) |
1568 | | clean_page_cache( $post_id ); |
1569 | | else |
1570 | | clean_post_cache( $post_id ); |
| 1567 | clean_page_cache( $post_id ); |
1571 | 1568 | |
1572 | 1569 | do_action('wp_update_comment_count', $post_id, $new, $old); |
1573 | 1570 | do_action('edit_post', $post_id, $post); |