rest_{$this->post_type}_query

SummerySummery

Filters the query arguments for a request.

Syntax

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

DescriptionDescription

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

ParametersParameters

$args

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

$request

(WP_REST_Request) The request used.

SourceSource

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

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top