From 9d87bc73e716470dd16e947ab6c48ef4aeb1c435 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 13 Feb 2008 08:55:17 +0000 Subject: [PATCH] Update post save notifications and redirects git-svn-id: https://develop.svn.wordpress.org/trunk@6807 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit.php | 14 +++++++------- wp-admin/post-new.php | 2 +- wp-admin/post.php | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 49000a90c2..ccf01f7b41 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -16,13 +16,6 @@ if ( !isset( $_GET['paged'] ) ) $_GET['paged'] = 1; ?> - -

|

- -
@@ -79,6 +72,13 @@ unset($status_links); ?> + +

|

+ +

diff --git a/wp-admin/post-new.php b/wp-admin/post-new.php index 0f4ea001ca..a322f4a708 100644 --- a/wp-admin/post-new.php +++ b/wp-admin/post-new.php @@ -24,7 +24,7 @@ When you’re promoted, just reload this page and you’ll be able to bl } if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> -

+

|

diff --git a/wp-admin/post.php b/wp-admin/post.php index ea58b0a466..ea1336a40d 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -126,9 +126,7 @@ case 'editpost': $referredby = preg_replace('|https?://[^/]+|i', '', $_POST['referredby']); $referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer()); - if ($_POST['save']) { - $location = "post.php?action=edit&post=$post_ID"; - } elseif ($_POST['addemeta']) { + if ($_POST['addemeta']) { $location = add_query_arg( 'message', 2, wp_get_referer() ); $location = explode('#', $location); $location = $location[0] . '#postcustom'; @@ -140,10 +138,12 @@ case 'editpost': $location = $_POST['referredby']; if ( $_POST['referredby'] == 'redo' ) $location = get_permalink( $post_ID ); + if (false !== strpos($location, 'edit.php') ) + $location = add_query_arg('posted', $post_ID, $location); } elseif ($action == 'editattachment') { $location = 'attachments.php'; } else { - $location = 'edit.php?posted=' . $post_ID; + $location = "post.php?action=edit&post=$post_ID"; } }