From d45cb4460aa535471017452b806f8d5769e17326 Mon Sep 17 00:00:00 2001 From: rboren Date: Wed, 28 Jul 2004 16:08:03 +0000 Subject: [PATCH] Delete postmeta when deleting a post. Bug 0000080. git-svn-id: http://svn.automattic.com/wordpress/trunk@1495 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/post.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-admin/post.php b/wp-admin/post.php index 3e31070c22..35f71a465e 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -466,6 +466,8 @@ case 'delete': $categories = $wpdb->query("DELETE FROM $wpdb->post2cat WHERE post_id = $post_id"); + $meta = $wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = $post_id"); + if (isset($sleep_after_edit) && $sleep_after_edit > 0) { sleep($sleep_after_edit); }