Skip to content

Commit 80a2459

Browse files
committed
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()`.
1 parent 8a7d2ce commit 80a2459

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2599,7 +2599,7 @@ function is_post_embeddable( $post = null ) {
25992599
* @see WP_Query
26002600
* @see WP_Query::parse_query()
26012601
*
2602-
* @param array $args {
2602+
* @param array|string $args {
26032603
* Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments.
26042604
*
26052605
* @type int $numberposts Total number of posts to retrieve. Is an alias of `$posts_per_page`

0 commit comments

Comments
 (0)