Docs: Correct type and improve description for the `$fields` parameter of `WP_Query::parse_query()`.

Props ocean90, palmiak, johannadevos, noisysocks.
Fixes #44305.

git-svn-id: https://develop.svn.wordpress.org/trunk@48563 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-07-22 11:34:32 +00:00
parent e88e84c662
commit d6c7a479f4
1 changed files with 6 additions and 3 deletions

View File

@ -649,9 +649,12 @@ class WP_Query {
* See WP_Date_Query::__construct().
* @type int $day Day of the month. Default empty. Accepts numbers 1-31.
* @type bool $exact Whether to search by exact keyword. Default false.
* @type string|array $fields Which fields to return. Single field or all fields (string),
* or array of fields. 'id=>parent' uses 'id' and 'post_parent'.
* Default all fields. Accepts 'ids', 'id=>parent'.
* @type string $fields Post fields to query for. Accepts:
* - '' Returns an array of complete post objects (`WP_Post[]`).
* - 'ids' Returns an array of post IDs (`int[]`).
* - 'id=>parent' Returns an associative array of parent post IDs,
* keyed by post ID (`int[]`).
* Default ''.
* @type int $hour Hour of the day. Default empty. Accepts numbers 0-23.
* @type int|bool $ignore_sticky_posts Whether to ignore sticky posts or not. Setting this to false
* excludes stickies from 'post__in'. Accepts 1|true, 0|false.