rest_queried_resource_route
Filters the REST route for the currently queried object.
Usage
add_filter( 'rest_queried_resource_route', 'wp_kama_rest_queried_resource_route_filter' );
/**
* Function for `rest_queried_resource_route` filter-hook.
*
* @param string $link The route with a leading slash, or an empty string.
*
* @return string
*/
function wp_kama_rest_queried_resource_route_filter( $link ){
// filter...
return $link;
}
- $link(string)
- The route with a leading slash, or an empty string.
Changelog
| Since 5.5.0 | Introduced. |
Where the hook is called
rest_queried_resource_route
wp-includes/rest-api.php 3334
return apply_filters( 'rest_queried_resource_route', $route );