Changeset 10851
- Timestamp:
- 03/31/2009 07:16:53 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/user.php
r10810 r10851 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); -
trunk/wp-includes/post.php
r10810 r10851 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 1167 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->comments WHERE comment_post_ID = %d", $postid )); 1168 1169 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d", $postid )); 1170 1165 1171 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID = %d", $postid )); 1166 1167 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->comments WHERE comment_post_ID = %d", $postid ));1168 1169 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d", $postid ));1170 1172 1171 1173 if ( 'page' == $post->post_type ) { … … 1179 1181 clean_post_cache($postid); 1180 1182 } 1181 1182 do_action('deleted_post', $postid);1183 1183 1184 1184 return $post; … … 2517 2517 wp_delete_object_term_relationships($postid, array('category', 'post_tag')); 2518 2518 2519 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->comments WHERE comment_post_ID = %d", $postid )); 2520 2521 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d ", $postid )); 2522 2519 2523 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->posts WHERE ID = %d", $postid )); 2520 2521 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->comments WHERE comment_post_ID = %d", $postid ));2522 2523 $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE post_id = %d ", $postid ));2524 2524 2525 2525 $uploadPath = wp_upload_dir();
Note: See TracChangeset
for help on using the changeset viewer.