Changeset 13997 for trunk/wp-includes/post.php
- Timestamp:
- 04/04/2010 12:42:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r13995 r13997 1665 1665 if ( ! empty($comment_ids) ) { 1666 1666 do_action( 'delete_comment', $comment_ids ); 1667 $in_comment_ids = "'" . implode("', '", $comment_ids) . "'";1668 $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_ID IN($in_comment_ids)");1667 foreach ( $comment_ids as $comment_id ) 1668 wp_delete_comment( $comment_id, true ); 1669 1669 do_action( 'deleted_comment', $comment_ids ); 1670 1670 } … … 3351 3351 3352 3352 $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $post_id )); 3353 if ( ! empty( $comment_ids) ) {3353 if ( ! empty( $comment_ids ) ) { 3354 3354 do_action( 'delete_comment', $comment_ids ); 3355 $in_comment_ids = "'" . implode("', '", $comment_ids) . "'";3356 $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_ID IN($in_comment_ids)");3355 foreach ( $comment_ids as $comment_id ) 3356 wp_delete_comment( $comment_id, true ); 3357 3357 do_action( 'deleted_comment', $comment_ids ); 3358 3358 }
Note: See TracChangeset
for help on using the changeset viewer.