WordPress.org

Make WordPress Core

Changeset 34746


Ignore:
Timestamp:
10/01/2015 05:39:25 PM (4 years ago)
Author:
DrewAPicture
Message:

Docs: Update the argument descriptions for $child_of and $hierarchical in get_pages() to more closely reflect expected behavior.

See #18701. See #32246.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-functions.php

    r34717 r34746  
    42814281 *     Optional. Array or string of arguments to retrieve pages.
    42824282 *
    4283  *     @type int          $child_of     Page ID to return child and grandchild pages of.
    4284  *                                      Default 0, or no restriction.
     4283 *     @type int          $child_of     Page ID to return child and grandchild pages of. Note: The value
     4284 *                                      of `$hierarchical` has no bearing on whether `$child_of` returns
     4285 *                                      hierarchical results. Default 0, or no restriction.
    42854286 *     @type string       $sort_order   How to sort retrieved pages. Accepts 'ASC', 'DESC'. Default 'ASC'.
    42864287 *     @type string       $sort_column  What columns to sort pages by, comma-separated. Accepts 'post_author',
     
    42894290 *                                      'post_' can be omitted for any values that start with it.
    42904291 *                                      Default 'post_title'.
    4291  *     @type bool         $hierarchical Whether to return pages hierarchically. Default true.
     4292 *     @type bool         $hierarchical Whether to return pages hierarchically. If false in conjunction with
     4293 *                                      `$child_of` also being false, both arguments will be disregarded.
     4294 *                                      Default true.
    42924295 *     @type array        $exclude      Array of page IDs to exclude. Default empty array.
    42934296 *     @type array        $include      Array of page IDs to include. Cannot be used with `$child_of`,
     
    42984301 *                                      Default empty.
    42994302 *     @type string       $authors      A comma-separated list of author IDs. Default empty.
    4300  *     @type int          $parent       Page ID to return direct children of. `$hierarchical` must be false.
    4301  *                                      Default -1, or no restriction.
     4303 *     @type int          $parent       Page ID to return direct children of. Default -1, or no restriction.
    43024304 *     @type string|array $exclude_tree Comma-separated string or array of page IDs to exclude.
    43034305 *                                      Default empty array.
Note: See TracChangeset for help on using the changeset viewer.