mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
"Go back" link for admin-initiated post/page edits. e.g. do a search, edit a post, click the link to go back to the search.
git-svn-id: https://develop.svn.wordpress.org/trunk@7438 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -136,7 +136,10 @@ case 'editpost':
|
||||
$referer = preg_replace('|https?://[^/]+|i', '', wp_get_referer());
|
||||
|
||||
if ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) {
|
||||
$location = "post.php?action=edit&post=$post_ID";
|
||||
if ( $_POST['_wp_original_http_referer'] && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false )
|
||||
$location = add_query_arg( '_wp_original_http_referer', urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ), "post.php?action=edit&post=$post_ID&message=1" );
|
||||
else
|
||||
$location = "post.php?action=edit&post=$post_ID";
|
||||
} elseif (isset($_POST['addmeta']) && $_POST['addmeta']) {
|
||||
$location = add_query_arg( 'message', 2, wp_get_referer() );
|
||||
$location = explode('#', $location);
|
||||
|
||||
Reference in New Issue
Block a user