Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments.
* Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments.
* A query string may also be provided.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review, @westonruter!

Other functions that already document string|array mention it inline in the description instead of using a separate line. For example, wp_dropdown_categories() uses "Optional. Array or string of arguments to generate a categories drop-down element." and wp_list_pages() uses "Optional. Array or string of arguments to generate a list of pages."

What do you think about using something like "Optional. Array or query string of arguments to retrieve posts." here instead, to stay consistent with the existing pattern?

Suggested change
* Optional. Arguments to retrieve posts. See WP_Query::parse_query() for all available arguments.
* Optional. Array or query string of 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`
Expand Down
Loading