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
This commit is contained in:
parent
b1222311f7
commit
94e5cffaa7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue