W3cubDocs

/WordPress

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.

Parameters

$value

(string) The query_var value.

Source

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

View on Trac

Changelog

Version Description
4.7.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_query_var-key