WordPress.org

Make WordPress Core

Changeset 39652


Ignore:
Timestamp:
12/30/16 05:54:40 (7 months ago)
Author:
dd32
Message:

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.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-admin/edit-tags.php

    r39308 r39652  
    8282    $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); 
    8383    if ( $ret && !is_wp_error( $ret ) ) 
    84         $location = add_query_arg( 'message', 1, $location ); 
     84        $location = add_query_arg( 'message', 1, $referer ); 
    8585    else 
    8686        $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $referer ); 
Note: See TracChangeset for help on using the changeset viewer.