rest_comment_query WordPress Filter Hook
The rest_comment_query hook is used to modify the parameters of a comment query made via the REST API. This hook allows you to change the default behavior of the REST API in regards to comments, and can be used to customize the output of your comment queries.
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
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |