WordPress.org

Make WordPress Core

Changeset 39649


Ignore:
Timestamp:
12/30/16 03:10:34 (7 months ago)
Author:
peterwilsoncc
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.
Fixes #39328 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r39553 r39649  
    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.