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: https://develop.svn.wordpress.org/trunk@12820 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b0898268c3
commit
ba857dbae9
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user