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

Key value array of query var to query value.

$request

The request used.


Source

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

View on GitHub



Changelog

Changelog
Version Description
WP-4.7.0 Introduced.