From 1a8ca6a1678037f70e8772ea6b10de9e859aad45 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 14 Jun 2016 15:05:21 +0000 Subject: [PATCH] Taxonomy: Introduce a `redirect_term_location` filter to change the redirect on term editing. This complements the `redirect_post_location` filter added in [12260]. Props alexvandervegt. Fixes #36367. git-svn-id: https://develop.svn.wordpress.org/trunk@37696 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-tags.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/edit-tags.php b/src/wp-admin/edit-tags.php index e0602017d0..e80dae4e59 100644 --- a/src/wp-admin/edit-tags.php +++ b/src/wp-admin/edit-tags.php @@ -205,7 +205,16 @@ if ( $location ) { if ( ! empty( $_REQUEST['paged'] ) ) { $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location ); } - wp_redirect( $location ); + + /** + * Filters the taxonomy redirect destination URL. + * + * @since 4.6.0 + * + * @param string $location The destination URL. + * @param object $tax The taxonomy object. + */ + wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) ); exit; }