Changeset 12428
- Timestamp:
- 12/17/2009 05:10:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r12420 r12428 823 823 do_action('delete_comment', $comment_id); 824 824 825 delete_comment_meta($comment_id,'_wp_trash_meta_status');826 delete_comment_meta($comment_id,'_wp_trash_meta_time');827 828 825 if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) ) 829 826 return false; … … 834 831 $wpdb->update($wpdb->comments, array('comment_parent' => $comment->comment_parent), array('comment_parent' => $comment_id)); 835 832 clean_comment_cache($children); 833 } 834 835 // Delete metadata 836 $meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d ", $comment_id ) ); 837 if ( !empty($meta_ids) ) { 838 do_action( 'delete_commentmeta', $meta_ids ); 839 $in_meta_ids = "'" . implode("', '", $meta_ids) . "'"; 840 $wpdb->query( "DELETE FROM $wpdb->commentmeta WHERE meta_id IN ($in_meta_ids)" ); 841 do_action( 'deleted_commentmeta', $meta_ids ); 836 842 } 837 843
Note: See TracChangeset
for help on using the changeset viewer.