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
This commit is contained in:
parent
50a3c1c368
commit
1a8ca6a167
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user