apply_filters( 'rest_comment_query', array $prepared_args, WP_REST_Request $request )

Filters WP_Comment_Query arguments when querying comments via the REST API.

Parameters

$prepared_args

(array) Array of arguments for WP_Comment_Query.

$request

(WP_REST_Request) The REST API request.

Source

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

View on Trac

Changelog

Version Description
4.7.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/rest_comment_query