diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
index 67d84fbfcd..aafc5cb40d 100644
--- a/wp-admin/edit-form-advanced.php
+++ b/wp-admin/edit-form-advanced.php
@@ -16,7 +16,7 @@ $post_ID = isset($post_ID) ? (int) $post_ID : 0;
$action = isset($action) ? $action : '';
if ( isset($_GET['message']) )
$_GET['message'] = absint( $_GET['message'] );
-$messages[1] = sprintf( __( 'Post updated. Continue editing below or go back.' ), attr( stripslashes( ( isset( $_GET['_wp_original_http_referer'] ) ? $_GET['_wp_original_http_referer'] : '') ) ) );
+$messages[1] = sprintf(__('Post updated. View post'), get_permalink($post_ID));
$messages[2] = __('Custom field updated.');
$messages[3] = __('Custom field deleted.');
$messages[4] = __('Post updated.');
diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php
index b6dbe3c1cc..52946e6074 100644
--- a/wp-admin/edit-page-form.php
+++ b/wp-admin/edit-page-form.php
@@ -18,10 +18,9 @@ if ( ! isset( $temp_ID ) )
if ( isset($_GET['message']) )
$_GET['message'] = absint( $_GET['message'] );
-$messages[1] = sprintf( __( 'Page updated. Continue editing below or go back.' ), attr( stripslashes( ( isset( $_GET['_wp_original_http_referer'] ) ? $_GET['_wp_original_http_referer'] : '') ) ) );
+$messages[1] = sprintf(__('Page updated. View page'), get_permalink($post_ID));
$messages[2] = __('Custom field updated.');
$messages[3] = __('Custom field deleted.');
-$messages[4] = sprintf(__('Page updated. View page'), get_permalink($post_ID));
$messages[5] = sprintf(__('Page published. View page'), get_permalink($post_ID));
$messages[6] = sprintf(__('Page submitted. Preview page'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) );
diff --git a/wp-admin/page.php b/wp-admin/page.php
index 91918b5596..deb218af14 100644
--- a/wp-admin/page.php
+++ b/wp-admin/page.php
@@ -35,21 +35,14 @@ function redirect_page($page_ID) {
$location = $_POST['referredby'];
} elseif ( 'post' == $_POST['originalaction'] && !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) {
$location = 'sidebar.php?a=b';
- } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
- if ( isset($_POST['_wp_original_http_referer']) && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page-new.php') === false )
- $location = add_query_arg( array(
- '_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ),
- 'message' => 1
- ), get_edit_post_link( $page_ID, 'url' ) );
- else {
- if ( isset( $_POST['publish'] ) ) {
- if ( 'pending' == get_post_status( $page_ID ) )
- $location = add_query_arg( 'message', 6, get_edit_post_link( $page_ID, 'url' ) );
- else
- $location = add_query_arg( 'message', 5, get_edit_post_link( $page_ID, 'url' ) );
- } else {
- $location = add_query_arg( 'message', 4, get_edit_post_link( $page_ID, 'url' ) );
- }
+ } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) ) {
+ if ( isset( $_POST['publish'] ) ) {
+ if ( 'pending' == get_post_status( $page_ID ) )
+ $location = add_query_arg( 'message', 6, get_edit_post_link( $page_ID, 'url' ) );
+ else
+ $location = add_query_arg( 'message', 5, get_edit_post_link( $page_ID, 'url' ) );
+ } else {
+ $location = add_query_arg( 'message', 1, get_edit_post_link( $page_ID, 'url' ) );
}
} elseif ( isset($_POST['addmeta']) ) {
$location = add_query_arg( 'message', 2, wp_get_referer() );
@@ -59,19 +52,10 @@ function redirect_page($page_ID) {
$location = add_query_arg( 'message', 3, wp_get_referer() );
$location = explode('#', $location);
$location = $location[0] . '#postcustom';
- } elseif (!empty($referredby) && $referredby != $referer) {
- $location = $_POST['referredby'];
- $location = remove_query_arg('_wp_original_http_referer', $location);
- if ( false !== strpos($location, 'edit-pages.php') )
- $location = add_query_arg('posted', $page_ID, $location);
- elseif ( false !== strpos($location, 'wp-admin') )
- $location = "page-new.php?posted=$page_ID";
- } elseif ( isset($_POST['publish']) ) {
- $location = "page-new.php?posted=$page_ID";
} elseif ($action == 'editattachment') {
$location = 'attachments.php';
} else {
- $location = add_query_arg( 'message', 4, get_edit_post_link( $page_ID, 'url' ) );
+ $location = add_query_arg( 'message', 1, get_edit_post_link( $page_ID, 'url' ) );
}
wp_redirect($location);
diff --git a/wp-admin/post.php b/wp-admin/post.php
index 5f04fa71ff..3660b80e74 100644
--- a/wp-admin/post.php
+++ b/wp-admin/post.php
@@ -38,21 +38,14 @@ function redirect_post($post_ID = '') {
$location = 'sidebar.php?a=c';
elseif ( isset($_POST['publish']) )
$location = 'sidebar.php?a=b';
- } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
- if ( isset($_POST['_wp_original_http_referer']) && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false )
- $location = add_query_arg( array(
- '_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ),
- 'message' => 1
- ), get_edit_post_link( $post_ID, 'url' ) );
- else {
- if ( isset( $_POST['publish'] ) ) {
- if ( 'pending' == get_post_status( $post_ID ) )
- $location = add_query_arg( 'message', 8, get_edit_post_link( $post_ID, 'url' ) );
- else
- $location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) );
- } else {
- $location = add_query_arg( 'message', 7, get_edit_post_link( $post_ID, 'url' ) );
- }
+ } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) ) {
+ if ( isset( $_POST['publish'] ) ) {
+ if ( 'pending' == get_post_status( $post_ID ) )
+ $location = add_query_arg( 'message', 8, get_edit_post_link( $post_ID, 'url' ) );
+ else
+ $location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) );
+ } else {
+ $location = add_query_arg( 'message', 1, get_edit_post_link( $post_ID, 'url' ) );
}
} elseif (isset($_POST['addmeta']) && $_POST['addmeta']) {
$location = add_query_arg( 'message', 2, wp_get_referer() );
@@ -62,15 +55,6 @@ function redirect_post($post_ID = '') {
$location = add_query_arg( 'message', 3, wp_get_referer() );
$location = explode('#', $location);
$location = $location[0] . '#postcustom';
- } elseif (!empty($referredby) && $referredby != $referer) {
- $location = $_POST['referredby'];
- $location = remove_query_arg('_wp_original_http_referer', $location);
- if ( false !== strpos($location, 'edit.php') || false !== strpos($location, 'edit-post-drafts.php') )
- $location = add_query_arg('posted', $post_ID, $location);
- elseif ( false !== strpos($location, 'wp-admin') )
- $location = "post-new.php?posted=$post_ID";
- } elseif ( isset($_POST['publish']) ) {
- $location = "post-new.php?posted=$post_ID";
} elseif ($action == 'editattachment') {
$location = 'attachments.php';
} elseif ( 'post-quickpress-save-cont' == $_POST['action'] ) {