From bc62f53df47097f35267e254738bb0fae2fe4640 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Sun, 24 Jan 2010 20:50:50 +0000 Subject: [PATCH] Include post_type= when redirecting after "Trash" click from item individual edit screen, to avoid going to Post edit screen for other post_types git-svn-id: http://svn.automattic.com/wordpress/trunk@12820 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/post.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index 3bdd2b79c0..6e0778c7e0 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -110,10 +110,12 @@ elseif ( isset($_POST['wp-preview']) && 'dopreview' == $_POST['wp-preview'] ) $action = 'preview'; $sendback = wp_get_referer(); -if ( strpos($sendback, 'post.php') !== false || strpos($sendback, 'post-new.php') !== false ) +if ( strpos($sendback, 'post.php') !== false || strpos($sendback, 'post-new.php') !== false ) { $sendback = admin_url('edit.php'); -else + $sendback .= ( !empty( $post_type ) ) ? '?post_type=' . $post_type : ''; +} else { $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), $sendback ); +} switch($action) { case 'postajaxpost':