redirect_term_location
Filters the taxonomy redirect destination URL.
Использование
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(строка)
- The destination URL.
- $tax(WP_Taxonomy)
- The taxonomy object.
Список изменений
С версии 4.6.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/edit-tags.php
redirect_term_location
wp-admin/edit-tags.php 228
wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );