mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 14:50:29 +00:00
Fix autosave redirects
git-svn-id: https://develop.svn.wordpress.org/trunk@4088 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+34
-13
@@ -85,20 +85,41 @@ case 'editpost':
|
||||
|
||||
$page_ID = edit_post();
|
||||
|
||||
if ($_POST['save']) {
|
||||
$location = "page.php?action=edit&post=$page_ID";
|
||||
} elseif ($_POST['updatemeta']) {
|
||||
$location = wp_get_referer() . '&message=2#postcustom';
|
||||
} elseif ($_POST['deletemeta']) {
|
||||
$location = wp_get_referer() . '&message=3#postcustom';
|
||||
} elseif (!empty($_POST['referredby']) && $_POST['referredby'] != wp_get_referer()) {
|
||||
$location = $_POST['referredby'];
|
||||
if ( $_POST['referredby'] == 'redo' )
|
||||
$location = get_permalink( $page_ID );
|
||||
} elseif ($action == 'editattachment') {
|
||||
$location = 'attachments.php';
|
||||
if ( 'post' == $_POST['originalaction'] ) {
|
||||
if (!empty($_POST['mode'])) {
|
||||
switch($_POST['mode']) {
|
||||
case 'bookmarklet':
|
||||
$location = $_POST['referredby'];
|
||||
break;
|
||||
case 'sidebar':
|
||||
$location = 'sidebar.php?a=b';
|
||||
break;
|
||||
default:
|
||||
$location = 'page-new.php';
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$location = 'page-new.php?posted=true';
|
||||
}
|
||||
|
||||
if ( isset($_POST['save']) )
|
||||
$location = "page.php?action=edit&post=$page_ID";
|
||||
} else {
|
||||
$location = 'page-new.php';
|
||||
if ($_POST['save']) {
|
||||
$location = "page.php?action=edit&post=$page_ID";
|
||||
} elseif ($_POST['updatemeta']) {
|
||||
$location = wp_get_referer() . '&message=2#postcustom';
|
||||
} elseif ($_POST['deletemeta']) {
|
||||
$location = wp_get_referer() . '&message=3#postcustom';
|
||||
} elseif (!empty($_POST['referredby']) && $_POST['referredby'] != wp_get_referer()) {
|
||||
$location = $_POST['referredby'];
|
||||
if ( $_POST['referredby'] == 'redo' )
|
||||
$location = get_permalink( $page_ID );
|
||||
} elseif ($action == 'editattachment') {
|
||||
$location = 'attachments.php';
|
||||
} else {
|
||||
$location = 'page-new.php';
|
||||
}
|
||||
}
|
||||
wp_redirect($location); // Send user on their way while we keep working
|
||||
|
||||
|
||||
Reference in New Issue
Block a user