diff --git a/wp-admin/list-manipulation.php b/wp-admin/list-manipulation.php index 63ff21bf6a..308089fc36 100644 --- a/wp-admin/list-manipulation.php +++ b/wp-admin/list-manipulation.php @@ -30,12 +30,13 @@ case 'delete-link' : case 'delete-post' : case 'delete-page' : $id = (int) $_POST['id']; - if ( !current_user_can('edit_post', $post_id) ) + if ( !current_user_can('edit_post', $id) ) { die('-1'); + } - if ( wp_delete_post($id) ) + if ( wp_delete_post($id) ) { die('1'); - else die('0'); + } else die('0'); break; case 'delete-cat' : if ( !current_user_can('manage_categories') )