Make WordPress Core

Changeset 48563


Ignore:
Timestamp:
07/22/2020 11:34:32 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-query.php

    r48462 r48563  
    650650     *     @type int          $day                     Day of the month. Default empty. Accepts numbers 1-31.
    651651     *     @type bool         $exact                   Whether to search by exact keyword. Default false.
    652      *     @type string|array $fields                  Which fields to return. Single field or all fields (string),
    653      *                                                 or array of fields. 'id=>parent' uses 'id' and 'post_parent'.
    654      *                                                 Default all fields. Accepts 'ids', 'id=>parent'.
     652     *     @type string       $fields                  Post fields to query for. Accepts:
     653     *                                                 - '' Returns an array of complete post objects (`WP_Post[]`).
     654     *                                                 - 'ids' Returns an array of post IDs (`int[]`).
     655     *                                                 - 'id=>parent' Returns an associative array of parent post IDs,
     656     *                                                   keyed by post ID (`int[]`).
     657     *                                                 Default ''.
    655658     *     @type int          $hour                    Hour of the day. Default empty. Accepts numbers 0-23.
    656659     *     @type int|bool     $ignore_sticky_posts     Whether to ignore sticky posts or not. Setting this to false
Note: See TracChangeset for help on using the changeset viewer.