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

See #18701. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34746 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2015-10-01 17:39:25 +00:00
parent 1b70f27b04
commit 08f047176b
1 changed files with 7 additions and 5 deletions

View File

@ -4280,15 +4280,18 @@ function get_page_uri( $page ) {
* @param array|string $args {
* Optional. Array or string of arguments to retrieve pages.
*
* @type int $child_of Page ID to return child and grandchild pages of.
* Default 0, or no restriction.
* @type int $child_of Page ID to return child and grandchild pages of. Note: The value
* of `$hierarchical` has no bearing on whether `$child_of` returns
* hierarchical results. Default 0, or no restriction.
* @type string $sort_order How to sort retrieved pages. Accepts 'ASC', 'DESC'. Default 'ASC'.
* @type string $sort_column What columns to sort pages by, comma-separated. Accepts 'post_author',
* 'post_date', 'post_title', 'post_name', 'post_modified', 'menu_order',
* 'post_modified_gmt', 'post_parent', 'ID', 'rand', 'comment_count'.
* 'post_' can be omitted for any values that start with it.
* Default 'post_title'.
* @type bool $hierarchical Whether to return pages hierarchically. Default true.
* @type bool $hierarchical Whether to return pages hierarchically. If false in conjunction with
* `$child_of` also being false, both arguments will be disregarded.
* Default true.
* @type array $exclude Array of page IDs to exclude. Default empty array.
* @type array $include Array of page IDs to include. Cannot be used with `$child_of`,
* `$parent`, `$exclude`, `$meta_key`, `$meta_value`, or `$hierarchical`.
@ -4297,8 +4300,7 @@ function get_page_uri( $page ) {
* @type string $meta_value Only include pages with this meta value. Requires `$meta_key`.
* Default empty.
* @type string $authors A comma-separated list of author IDs. Default empty.
* @type int $parent Page ID to return direct children of. `$hierarchical` must be false.
* Default -1, or no restriction.
* @type int $parent Page ID to return direct children of. Default -1, or no restriction.
* @type string|array $exclude_tree Comma-separated string or array of page IDs to exclude.
* Default empty array.
* @type int $number The number of pages to return. Default 0, or all pages.