[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
Tue Mar 17 21:09:03 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: closed
Priority: normal | Milestone: 7.0
Component: Posts, Post Types | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch needs-unit-tests commit | Focuses: docs
-----------------------------------------------+--------------------------
Changes (by westonruter):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"62041" 62041]:
{{{
#!CommitTicketReference repository="" revision="62041"
Docs: Indicate that `get_posts()` can take a query string in addition to
an array of query vars.
A string is supported by virtue of `wp_parse_args()` being used on the
supplied arguments. While a string is not currently passed to
`get_posts()` in core, a significant number of plugins are doing so. So in
addition to documenting actual ecosystem usage, this also adds a test to
ensure that supplying a query string continues to be supported in the
future.
Developed in https://github.com/WordPress/wordpress-develop/pull/11179
Follow-up to r11528.
Props rodrigosprimo, westonruter, shailu25, mukesh27.
See #64224, #10047.
Fixes #64813.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64813#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list