rest_route_for_term filter-hook . WP 5.5.0
Filters the REST API route for a term.
Usage
add_filter( 'rest_route_for_term', 'filter_function_name_5017', 10, 2 ); function filter_function_name_5017( $route, $term ){ // filter... return $route; }
- $route(string)
- The route path.
- $term(WP_Term)
- The term object.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
rest_route_for_term
wp-includes/rest-api.php 2803
return apply_filters( 'rest_route_for_term', $route, $term );