From 94e5cffaa7361c3c0e451899c215fd5d87d116e2 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 13 Mar 2009 05:24:20 +0000 Subject: [PATCH] Remember page when redirecting after tag edit. Props Viper007Bond. fixes #9220 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@10775 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tags.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 7c4effd784..a6d13e2537 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -52,7 +52,14 @@ case 'delete': wp_delete_term( $tag_ID, $taxonomy); - wp_redirect('edit-tags.php?message=2'); + $location = 'edit-tags.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos($referer, 'edit-tags.php') ) + $location = $referer; + } + + $location = add_query_arg('message', 2, $location); + wp_redirect($location); exit; break; @@ -271,13 +278,13 @@ else
-

+

-

+