Docs: Document three missing parameters in core classes - #12823
Docs: Document three missing parameters in core classes#12823jigneshbhavani wants to merge 1 commit into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
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.
1d2a10c to
5f5d672
Compare
Three core-owned methods are missing a
@paramtag.WP_HTTP_IXR_Client::query()The docblock already records that the
...$argsparameter was formalized in 5.5.0 by adding it to the signature, but the parameter itself was never documented.WP_Dependency::__construct()carries the same@sincewording and does document it as@param mixed ...$args Dependency information., so this brings the two back in line.The description matches what the method does with the value:
array_shift( $args )takes the method name, and the remainder are the arguments passed to it.WP_REST_Font_Collections_Controller::get_items_permissions_check()Has
@sinceand@returnbut no@paramfor$request.WP_REST_Font_Families_Controller::get_endpoint_args_for_item_schema()Has
@sinceand@returnbut no@paramfor$method.Testing
--group xmlrpcpasses, 318 tests.phpcsclean on all three files.php -lclean on all three files.Documentation only, no behaviour change.
Trac ticket: https://core.trac.wordpress.org/ticket/64896
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Drafting the tags and this description. I confirmed each gap against the current file, checked the variadic wording against how core documents the same parameter on
WP_Dependency::__construct(), verified the...$argsdescription against the method body, confirmed no existing ticket or pull request already covers these three, ran the xmlrpc and font REST tests plus phpcs, and I take responsibility for the result.