rest_route_for_term WordPress Filter Hook
The rest_route_for_term hook allows developers to register custom routes for terms in the WordPress REST API. This hook is called when the WordPress REST API is initializing and is passed the term object and the request object.
apply_filters( 'rest_route_for_term', string $route , WP_Term $term ) #
Filters the REST API route for a term.
Parameters
- $route
(string)The route path.
- $term
(WP_Term)The term object.
Source
File: wp-includes/rest-api.php
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |