From f6fa5ddda7e83154f16fa222ed2979fb810f63f2 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Fri, 30 Dec 2016 03:10:34 +0000 Subject: [PATCH] Taxonomy: Redirect to current taxonomy when adding a term without AJAX. Fixes a regression in which adding terms via a full page refresh, ie without AJAX, would always redirect to the tags taxonomy. Props szaqal21. Fixes #39328 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@39649 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-tags.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/edit-tags.php b/src/wp-admin/edit-tags.php index b0d73ded5c..2e4dd35797 100644 --- a/src/wp-admin/edit-tags.php +++ b/src/wp-admin/edit-tags.php @@ -81,7 +81,7 @@ case 'add-tag': $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); if ( $ret && !is_wp_error( $ret ) ) - $location = add_query_arg( 'message', 1, $location ); + $location = add_query_arg( 'message', 1, $referer ); else $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $referer );