rest_queried_resource_route
Filters the REST route for the currently queried object.
Использование
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(строка)
- The route with a leading slash, or an empty string.
Список изменений
| С версии 5.5.0 | Введена. |
Где вызывается хук
rest_queried_resource_route
wp-includes/rest-api.php 3382
return apply_filters( 'rest_queried_resource_route', $route );