WordPress at a glance
filter is not described

rest_(post_type)_query filter-hook . WP 4.7.0

Filters the query arguments for a request.

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


add_filter( 'rest_(post_type)_query', 'filter_function_name_7601', 10, 2 );
function filter_function_name_7601( $args, $request ){
	// filter...

	return $args;
Key value array of query var to query value.
The request used.

Where the hook is called

wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 269
$args       = apply_filters( "rest_{$this->post_type}_query", $args, $request );

Where the hook is used (in WP core)

Использование не найдено.