Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 11839)
+++ wp-includes/post.php	(working copy)
@@ -1135,15 +1135,15 @@
  * @param int $postid Post ID.
  * @return mixed False on failure
  */
-function wp_delete_post($postid = 0) {
+function wp_delete_post($postid = 0, $force = false) {
 	global $wpdb, $wp_rewrite;
 
-	if ( !$post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE ID = %d", $postid)) )
+	if ( !$post = wp_get_single_post($postid) )
 		return $post;
 
-	if ( ($post->post_type == 'post' || $post->post_type == 'page') && get_post_status($postid) != 'trash' && EMPTY_TRASH_DAYS > 0 )
+	if ( !$force && ($post->post_type == 'post' || $post->post_type == 'page') && $post->post_status != 'trash' && EMPTY_TRASH_DAYS > 0 )
 		return wp_trash_post($postid);
-		
+
 	if ( $post->post_type == 'attachment' )
 		return wp_delete_attachment($postid);
 
@@ -2654,16 +2654,16 @@
  * @param int $postid Attachment ID.
  * @return mixed False on failure. Post data on success.
  */
-function wp_delete_attachment($postid) {
+function wp_delete_attachment($postid, $force = false) {
 	global $wpdb;
 
-	if ( !$post = $wpdb->get_row(  $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE ID = %d", $postid)) )
+	if ( !$post = wp_get_single_post($postid) )
 		return $post;
 
 	if ( 'attachment' != $post->post_type )
 		return false;
 
-	if ( 'trash' != $post->post_status )
+	if ( !$force && 'trash' != $post->post_status )
 		return wp_trash_post($postid);
 
 	$trash_meta = get_option('wp_trash_meta');
