Skip to content
Permalink
Browse files

Taxonomy: Redirect to the correct URL after deleting a taxonomy term …

…attached to a post type other than Post.

Props donmhico, mukesh27

Fixes #47858


git-svn-id: https://develop.svn.wordpress.org/trunk@46263 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
johnbillion committed Sep 23, 2019
1 parent f3a268f commit 027710ef8e44bffabe37334f52b067baf49e6ba9
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/wp-admin/term.php
@@ -15,7 +15,12 @@
if ( ! empty( $taxnow ) ) {
$sendback = add_query_arg( array( 'taxonomy' => $taxnow ), $sendback );
}
wp_redirect( esc_url( $sendback ) );
if ( 'post' !== get_current_screen()->post_type ) {
$sendback = add_query_arg( 'post_type', get_current_screen()->post_type, $sendback );
}
wp_redirect( esc_url_raw( $sendback ) );
exit;
}

0 comments on commit 027710e

Please sign in to comment.
You can’t perform that action at this time.