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
This commit is contained in:
Sergey Biryukov 2016-06-14 15:06:30 +00:00
parent 8427ebfd06
commit d4e1683d23
2 changed files with 11 additions and 2 deletions

View File

@ -205,7 +205,16 @@ if ( $location ) {
if ( ! empty( $_REQUEST['paged'] ) ) { if ( ! empty( $_REQUEST['paged'] ) ) {
$location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location ); $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; exit;
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.