[wp-trac] [WordPress Trac] #64813: Docs: Fix `@param` type for `get_posts()` and other functions using `wp_parse_args()`
WordPress Trac
noreply at wordpress.org
Thu Mar 12 21:15:56 UTC 2026
#64813: Docs: Fix `@param` type for `get_posts()` and other functions using
`wp_parse_args()`
-------------------------------------------------+-------------------------
Reporter: rodrigosprimo | Owner:
| westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 7.0
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: has-patch changes-requested needs- | Focuses: docs
unit-tests |
-------------------------------------------------+-------------------------
Changes (by westonruter):
* keywords: has-patch commit => has-patch changes-requested needs-unit-
tests
Comment:
@rodrigosprimo I guess the I'm thinking of being more conservative. Once
we document something as being supported, then we're more-or-less locked
in. I'd rather document what //should// be passed in or what is expected
to be passed in, rather than everything that could be passed in. Using
usage data from ~~WPdirectory~~ [https://veloria.dev/ Veloria] I think
would help inform from actual usage whether we should document something
as being officially supported. It's a sort of “pave the cowpaths”
approach.
Also: We should have tests in place for anything we document as being
supported. In `Tests_Post_GetPosts` I don't see any tests present for
passing a query string. So we should be sure to add a test for that as
part of this, and any functions we update to indicate an array or query
string is supported as the argument.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64813#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list