mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Undo for posts, pages and media, props caesarsgrunt, see #4529
git-svn-id: https://develop.svn.wordpress.org/trunk@12121 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -196,11 +196,11 @@ case 'trash':
|
||||
if ( ! wp_trash_post($post_id) )
|
||||
wp_die( __('Error in moving to trash...') );
|
||||
|
||||
$sendback = wp_get_referer();
|
||||
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() );
|
||||
if ( strpos($sendback, 'post.php') !== false || strpos($sendback, 'post-new.php') !== false )
|
||||
$sendback = admin_url('edit.php?trashed=1');
|
||||
$sendback = admin_url('edit.php?trashed=1&ids='.$post_id);
|
||||
else
|
||||
$sendback = add_query_arg('trashed', 1, $sendback);
|
||||
$sendback = add_query_arg( array('trashed' => 1, ids => $post_id), $sendback );
|
||||
|
||||
wp_redirect($sendback);
|
||||
exit();
|
||||
|
||||
Reference in New Issue
Block a user