Post delete fix from David House. fixes #2173
git-svn-id: https://develop.svn.wordpress.org/trunk@3379 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dbde443d4a
commit
5f46bd2b5b
@ -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') )
|
||||
|
Loading…
Reference in New Issue
Block a user