Ticket #9422: 9422.diff
File 9422.diff, 2.3 KB (added by , 15 years ago) |
---|
-
Users/denis/Sites/wp/wp-includes/post.php
1159 1159 foreach ( $revision_ids as $revision_id ) 1160 1160 wp_delete_post_revision( $revision_id ); 1161 1161 1162 do_action('deleted_post', $postid); 1163 1162 1164 // Point all attachments to this post up one level 1163 1165 $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'attachment' ) ); 1164 1166 1165 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID = %d", $postid ));1166 1167 1167 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->comments WHERE comment_post_ID = %d", $postid )); 1168 1168 1169 1169 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d", $postid )); 1170 1170 1171 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID = %d", $postid )); 1172 1171 1173 if ( 'page' == $post->post_type ) { 1172 1174 clean_page_cache($postid); 1173 1175 … … 1179 1181 clean_post_cache($postid); 1180 1182 } 1181 1183 1182 do_action('deleted_post', $postid);1183 1184 1184 return $post; 1185 1185 } 1186 1186 … … 2516 2516 /** @todo Delete for pluggable post taxonomies too */ 2517 2517 wp_delete_object_term_relationships($postid, array('category', 'post_tag')); 2518 2518 2519 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID = %d", $postid ));2520 2521 2519 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->comments WHERE comment_post_ID = %d", $postid )); 2522 2520 2523 2521 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d ", $postid )); 2524 2522 2523 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID = %d", $postid )); 2524 2525 2525 $uploadPath = wp_upload_dir(); 2526 2526 2527 2527 if ( ! empty($meta['thumb']) ) { -
Users/denis/Sites/wp/wp-admin/includes/user.php
431 431 // FINALLY, delete user 432 432 do_action('delete_user', $id); 433 433 434 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d", $id) ); 434 435 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->users WHERE ID = %d", $id) ); 435 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d", $id) );436 436 437 437 $user = new WP_User($id); 438 438