WordPress.org

Make WordPress Core

Changeset 46263


Ignore:
Timestamp:
09/23/2019 07:09:54 PM (3 months ago)
Author:
johnbillion
Message:

Taxonomy: Redirect to the correct URL after deleting a taxonomy term attached to a post type other than Post.

Props donmhico, mukesh27

Fixes #47858

File:
1 edited

Legend:

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

    r42719 r46263  
    1616        $sendback = add_query_arg( array( 'taxonomy' => $taxnow ), $sendback );
    1717    }
    18     wp_redirect( esc_url( $sendback ) );
     18
     19    if ( 'post' !== get_current_screen()->post_type ) {
     20        $sendback = add_query_arg( 'post_type', get_current_screen()->post_type, $sendback );
     21    }
     22
     23    wp_redirect( esc_url_raw( $sendback ) );
    1924    exit;
    2025}
Note: See TracChangeset for help on using the changeset viewer.