rest_query_var-{$key} WordPress Filter Hook

The rest_query_var-{$key} hook is used to alter the value of a query variable for the REST API.

apply_filters( "rest_query_var-{$key}", string $value ) #

Filters the query_vars used in get_items() for the constructed query.


Description

The dynamic portion of the hook name, $key, refers to the query_var key.


Top ↑

Parameters

$value

(string)The query_var value.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.7.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.