W3cubDocs

/WordPress

apply_filters( "rest_{$this->post_type}_query", array $args, WP_REST_Request $request )

Filters the query arguments for a request.

Description

Enables adding extra arguments or setting defaults for a post collection request.

Parameters

$args

(array) Key value array of query var to query value.

$request

(WP_REST_Request) The request used.

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_this-post_type_query