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

See #18701. See #32246.

Built from https://develop.svn.wordpress.org/trunk@34746


git-svn-id: http://core.svn.wordpress.org/trunk@34711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2015-10-01 17:40:25 +00:00
parent d8179a2a1f
commit a985977856
2 changed files with 8 additions and 6 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.

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34745';
$wp_version = '4.4-alpha-34746';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.