Core Function
View Source on Trac ↗ rest_get_route_for_term()
rest_get_route_for_term( mixed $term ) Gets the REST API route for a term.
Parameters 1 required
| Name / Type | Description |
|---|---|
| (int | | WP_Term) $term Term ID or term object. Required |
Return Value
(string)
string The route path with a leading slash for the given term,
or an empty string if there is not a route.
Function Information
Since Version
5.5.0
Source File
wp-includes/rest-api.php
Advertisement