From 80a24594408cd602d691ed0b5522ef1ba8f78d4d Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Thu, 5 Mar 2026 11:17:26 -0300 Subject: [PATCH] Docs: Fix `@param` type for `get_posts()`. The `$args` parameter is passed through `wp_parse_args()`, which accepts both arrays and query strings. Update the `@param` type from `array` to `array|string` to reflect this, consistent with other functions like `wp_list_categories()` and `get_terms()`. --- src/wp-includes/post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 896142603278b..7e0d6a81bcb98 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -2599,7 +2599,7 @@ function is_post_embeddable( $post = null ) { * @see WP_Query * @see WP_Query::parse_query() * - * @param array $args { + * @param array|string $args { * Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments. * * @type int $numberposts Total number of posts to retrieve. Is an alias of `$posts_per_page`