rest_queried_resource_route WordPress Filter Hook

The rest_queried_resource_route hook is used to filter the route for a REST API request prior to dispatching the request. This hook allows you to change the route for a request based on the resource type being requested.

apply_filters( 'rest_queried_resource_route', string $link ) #

Filters the REST route for the currently queried object.


Parameters

$link

(string)The route with a leading slash, or an empty string.


Top ↑

Source

File: wp-includes/rest-api.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More