Docs: Correct documentation for rest_{$post_type}_query and rest_{$taxonomy}_query filters.

Synchronize documentation for related `rest_{$object_type}_query` filters for consistency.

Props dlh.
Fixes #53568.

git-svn-id: https://develop.svn.wordpress.org/trunk@51293 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-07-01 09:11:29 +00:00
parent ee18b460b8
commit 278843f8e3
3 changed files with 6 additions and 7 deletions
@@ -261,14 +261,14 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
}
/**
* Filters arguments, before passing to WP_Comment_Query, when querying comments via the REST API.
* Filters WP_Comment_Query arguments when querying comments via the REST API.
*
* @since 4.7.0
*
* @link https://developer.wordpress.org/reference/classes/wp_comment_query/
*
* @param array $prepared_args Array of arguments for WP_Comment_Query.
* @param WP_REST_Request $request The current request.
* @param WP_REST_Request $request The REST API request.
*/
$prepared_args = apply_filters( 'rest_comment_query', $prepared_args, $request );
@@ -326,7 +326,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
$args['post_type'] = $this->post_type;
/**
* Filters WP_Query arguments when querying users via the REST API.
* Filters WP_Query arguments when querying posts via the REST API.
*
* The dynamic portion of the hook name, `$this->post_type`, refers to the post type slug.
*
@@ -343,7 +343,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
*
* @link https://developer.wordpress.org/reference/classes/wp_query/
*
* @param array $args Array of arguments to be passed to WP_Query.
* @param array $args Array of arguments for WP_Query.
* @param WP_REST_Request $request The REST API request.
*/
$args = apply_filters( "rest_{$this->post_type}_query", $args, $request );
@@ -233,7 +233,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
}
/**
* Filters get_terms() arguments when querying users via the REST API.
* Filters get_terms() arguments when querying terms via the REST API.
*
* The dynamic portion of the hook name, `$this->taxonomy`, refers to the taxonomy slug.
*
@@ -249,8 +249,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
*
* @link https://developer.wordpress.org/reference/functions/get_terms/
*
* @param array $prepared_args Array of arguments to be
* passed to get_terms().
* @param array $prepared_args Array of arguments for get_terms().
* @param WP_REST_Request $request The REST API request.
*/
$prepared_args = apply_filters( "rest_{$this->taxonomy}_query", $prepared_args, $request );