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, peterwilsoncc.
Merges [39649] to the 4.7 branch.
Fixes #39328 for 4.7.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2016-12-30 05:54:40 +00:00
parent d0e1d5db64
commit 8a19063818
1 changed files with 1 additions and 1 deletions

View File

@ -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 );