From 4871e339162861090317a9992a939dd2308d520a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 1 Jul 2021 09:12:59 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@51293 git-svn-id: http://core.svn.wordpress.org/trunk@50902 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../rest-api/endpoints/class-wp-rest-comments-controller.php | 4 ++-- .../rest-api/endpoints/class-wp-rest-posts-controller.php | 4 ++-- .../rest-api/endpoints/class-wp-rest-terms-controller.php | 5 ++--- wp-includes/version.php | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php index 7fe58d8191..1845e7bd94 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php @@ -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 ); diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index c7c241ada7..5f414fd8bd 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -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 ); diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php index 951973ca8d..093b98a491 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php @@ -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 ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 704e0d0b6b..4846e6edef 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51292'; +$wp_version = '5.9-alpha-51293'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.