Changeset 20435 for trunk/wp-includes/comment.php
- Timestamp:
- 04/11/2012 08:02:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r20423 r20435 981 981 982 982 // Delete metadata 983 $meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d ", $comment_id ) ); 984 if ( !empty($meta_ids) ) { 985 do_action( 'delete_commentmeta', $meta_ids ); 986 $in_meta_ids = "'" . implode("', '", $meta_ids) . "'"; 987 $wpdb->query( "DELETE FROM $wpdb->commentmeta WHERE meta_id IN ($in_meta_ids)" ); 988 do_action( 'deleted_commentmeta', $meta_ids ); 989 } 983 $meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d", $comment_id ) ); 984 foreach ( $meta_ids as $mid ) 985 delete_metadata_by_mid( 'comment', $mid ); 990 986 991 987 if ( ! $wpdb->delete( $wpdb->comments, array( 'comment_ID' => $comment_id ) ) )
Note: See TracChangeset
for help on using the changeset viewer.