Don't redirect back to permalink after editing from Edit This link. fixes #7503 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@8627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-08-12 21:00:22 +00:00
parent 6ff77fabe3
commit 5d98412e04
1 changed files with 1 additions and 3 deletions

View File

@ -37,9 +37,7 @@ function redirect_page($page_ID) {
} elseif (!empty($referredby) && $referredby != $referer) { } elseif (!empty($referredby) && $referredby != $referer) {
$location = $_POST['referredby']; $location = $_POST['referredby'];
$location = remove_query_arg('_wp_original_http_referer', $location); $location = remove_query_arg('_wp_original_http_referer', $location);
if ( $_POST['referredby'] == 'redo' ) if ( false !== strpos($location, 'edit-pages.php') )
$location = get_permalink( $page_ID );
elseif ( false !== strpos($location, 'edit-pages.php') )
$location = add_query_arg('posted', $page_ID, $location); $location = add_query_arg('posted', $page_ID, $location);
elseif ( false !== strpos($location, 'wp-admin') ) elseif ( false !== strpos($location, 'wp-admin') )
$location = "page-new.php?posted=$page_ID"; $location = "page-new.php?posted=$page_ID";