From 8d1af802b2a43632a5252be8b0a36bdc1b65ff45 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 13 Feb 2008 08:55:17 +0000 Subject: [PATCH] Update post save notifications and redirects git-svn-id: http://svn.automattic.com/wordpress/trunk@6807 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 49000a90c..ccf01f7b4 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 0f4ea001c..a322f4a70 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 ea58b0a46..ea1336a40 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"; } }