From d4e1683d23cb50abad3055d57de62bd7d26465ae Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 14 Jun 2016 15:06:30 +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. Built from https://develop.svn.wordpress.org/trunk@37696 git-svn-id: http://core.svn.wordpress.org/trunk@37662 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tags.php | 11 ++++++++++- wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index e0602017d0..e80dae4e59 100644 --- a/wp-admin/edit-tags.php +++ b/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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 24be859be9..d16f12355a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37695'; +$wp_version = '4.6-alpha-37696'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.