rest_queried_resource_route
Filter HookDescription
Filters the REST route for the currently queried object.Hook Information
File Location |
wp-includes/rest-api.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3326 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$link
|
The route with a leading slash, or an empty string. |
Usage Examples
Basic Usage
<?php
// Hook into rest_queried_resource_route
add_filter('rest_queried_resource_route', 'my_custom_filter', 10, 1);
function my_custom_filter($link) {
// Your custom filtering logic here
return $link;
}
Source Code Context
wp-includes/rest-api.php:3326
- How this hook is used in WordPress core
<?php
3321 *
3322 * @since 5.5.0
3323 *
3324 * @param string $link The route with a leading slash, or an empty string.
3325 */
3326 return apply_filters( 'rest_queried_resource_route', $route );
3327 }
3328
3329 /**
3330 * Retrieves an array of endpoint arguments from the item schema and endpoint method.
3331 *
PHP Documentation
<?php
/**
* Filters the REST route for the currently queried object.
*
* @since 5.5.0
*
* @param string $link The route with a leading slash, or an empty string.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/rest-api.php
Related Hooks
Related hooks will be displayed here in future updates.