From 5f5d67259c34ee3fac4e8eea1f2faa4713257f5a Mon Sep 17 00:00:00 2001 From: Jignesh Bhavani Date: Tue, 4 Aug 2026 02:56:07 +0530 Subject: [PATCH] Docs: Document three missing parameters in core classes. WP_HTTP_IXR_Client::query() records in its @since tags that the `...$args` parameter was formalized in 5.5.0, but never documented the parameter itself. WP_Dependency::__construct() carries the same @since wording and does document it, so this brings the two back in line. WP_REST_Font_Collections_Controller::get_items_permissions_check() and WP_REST_Font_Families_Controller::get_endpoint_args_for_item_schema() both had a @since and a @return tag but no @param at all. Two nearby issues in the same docblocks, raised in review, are fixed as well. The @return on get_items_permissions_check() described write access for an item, but the method is a read check on a collection that returns rest_cannot_read, so it now uses the same wording as the font families and font faces controllers. WP_HTTP_IXR_Client::query() gains the summary line it was missing. See #64896. --- src/wp-includes/class-wp-http-ixr-client.php | 3 +++ .../endpoints/class-wp-rest-font-collections-controller.php | 3 ++- .../endpoints/class-wp-rest-font-families-controller.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-http-ixr-client.php b/src/wp-includes/class-wp-http-ixr-client.php index d4f7936cca177..1b34870725619 100644 --- a/src/wp-includes/class-wp-http-ixr-client.php +++ b/src/wp-includes/class-wp-http-ixr-client.php @@ -47,10 +47,13 @@ public function __construct( $server, $path = false, $port = false, $timeout = 1 } /** + * Sends an XML-RPC request. + * * @since 3.1.0 * @since 5.5.0 Formalized the existing `...$args` parameter by adding it * to the function signature. * + * @param mixed ...$args The method name, followed by the arguments to pass to it. * @return bool True if the request succeeded, false otherwise. */ public function query( ...$args ) { diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php index ff1051fbd07ac..8ed02e1414a84 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-collections-controller.php @@ -335,7 +335,8 @@ public function get_collection_params() { * * @since 6.5.0 * - * @return true|WP_Error True if the request has write access for the item, WP_Error object otherwise. + * @param WP_REST_Request $request Full details about the request. + * @return true|WP_Error True if the request has read access, WP_Error object otherwise. */ public function get_items_permissions_check( $request ) { if ( current_user_can( 'edit_theme_options' ) ) { diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php index a99a885d3945c..f5de33b6cb559 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-font-families-controller.php @@ -427,6 +427,7 @@ public function get_collection_params() { * * @since 6.5.0 * + * @param string $method Optional. HTTP method of the request. Default WP_REST_Server::CREATABLE. * @return array Font family create/edit arguments. */ public function get_endpoint_args_for_item_schema( $method = WP_REST_Server::CREATABLE ) {