redirect_term_location
Filters the taxonomy redirect destination URL.
Usage
add_filter( 'redirect_term_location', 'wp_kama_redirect_term_location_filter', 10, 2 );
/**
* Function for `redirect_term_location` filter-hook.
*
* @param string $location The destination URL.
* @param WP_Taxonomy $tax The taxonomy object.
*
* @return string
*/
function wp_kama_redirect_term_location_filter( $location, $tax ){
// filter...
return $location;
}
- $location(string)
- The destination URL.
- $tax(WP_Taxonomy)
- The taxonomy object.
Changelog
| Since 4.6.0 | Introduced. |
Where the hook is called
In file: /wp-admin/edit-tags.php
redirect_term_location
wp-admin/edit-tags.php 231
wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );