diff --git a/wp-admin/categories.php b/wp-admin/categories.php index bd76bdf264..af712855ff 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -95,6 +95,11 @@ break; default: +if ( !empty($_GET['_wp_http_referer']) ) { + wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); + exit; +} + wp_enqueue_script( 'admin-categories' ); wp_enqueue_script('admin-forms'); diff --git a/wp-admin/edit-link-categories.php b/wp-admin/edit-link-categories.php index 8d58965385..0d1685fc43 100644 --- a/wp-admin/edit-link-categories.php +++ b/wp-admin/edit-link-categories.php @@ -20,6 +20,9 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { wp_redirect('edit-link-categories.php?message=6'); exit(); +} elseif ( !empty($_GET['_wp_http_referer']) ) { + wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); + exit; } $title = __('Link Categories'); diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index 3020ff12f7..d0a2563bc9 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -26,6 +26,9 @@ if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) { wp_redirect($sendback); exit(); +} elseif ( !empty($_GET['_wp_http_referer']) ) { + wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); + exit; } $title = __('Pages'); diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 92c93842eb..579dc6c649 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -85,6 +85,11 @@ break; default: +if ( !empty($_GET['_wp_http_referer']) ) { + wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); + exit; +} + wp_enqueue_script( 'admin-tags' ); wp_enqueue_script('admin-forms'); diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index 4c9ee02437..dd853809ae 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -19,6 +19,9 @@ if ( isset($_GET['deleteit']) && isset($_GET['linkcheck']) ) { $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); wp_redirect($sendback); exit; +} elseif ( !empty($_GET['_wp_http_referer']) ) { + wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); + exit; } wp_enqueue_script( 'wp-lists' );