mirror of
git://develop.git.wordpress.org/
synced 2025-02-24 16:43:06 +01:00
Improve formatting of inline documentation for get_pages()
.
Adds missing default values, corrects several argument types, backtick-escapes argument names used in descriptions. See #28298. git-svn-id: https://develop.svn.wordpress.org/trunk@30725 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c12cce581e
commit
d167ce0070
@ -4392,32 +4392,35 @@ function get_page_uri( $page ) {
|
|||||||
* @param array|string $args {
|
* @param array|string $args {
|
||||||
* Optional. Array or string of arguments to retrieve pages.
|
* 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.
|
||||||
* @type string $sort_order How to sort retrieved pages.
|
* Default 0, or no restriction.
|
||||||
* Default 'ASC'. Accepts 'ASC', 'DESC'.
|
* @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.
|
* @type string $sort_column What columns to sort pages by, comma-separated. Accepts 'post_author',
|
||||||
* Default 'post_title'. Accepts 'post_author', 'post_date', 'post_title', 'post_name',
|
* 'post_date', 'post_title', 'post_name', 'post_modified', 'menu_order',
|
||||||
* 'post_modified', 'post_modified_gmt', 'menu_order', 'post_parent', 'ID', 'rand',
|
* 'post_modified_gmt', 'post_parent', 'ID', 'rand', 'comment_count'.
|
||||||
* 'comment_count'. 'post_' can be omitted for any values that start with it.
|
* 'post_' can be omitted for any values that start with it.
|
||||||
* @type bool $hierarchical Whether to return pages hierarchically. Default true.
|
* Default 'post_title'.
|
||||||
* @type array $exclude Array of page IDs to exclude.
|
* @type bool $hierarchical Whether to return pages hierarchically. Default true.
|
||||||
* @type array $include Array of page IDs to include. Cannot be used with 'child_of', 'parent', 'exclude',
|
* @type array $exclude Array of page IDs to exclude. Default empty array.
|
||||||
* 'meta_key', 'meta_value', or 'hierarchical'.
|
* @type array $include Array of page IDs to include. Cannot be used with `$child_of`,
|
||||||
* @type string $meta_key Only include pages with this meta key.
|
* `$parent`, `$exclude`, `$meta_key`, `$meta_value`, or `$hierarchical`.
|
||||||
* @type string $meta_value Only include pages with this meta value.
|
* Default empty array.
|
||||||
* @type string $authors A comma-separated list of author IDs.
|
* @type string $meta_key Only include pages with this meta key. Default empty.
|
||||||
* @type int $parent Page ID to return direct children of. 'hierarchical' must be false.
|
* @type string $meta_value Only include pages with this meta value. Requires `$meta_key`.
|
||||||
* Default -1, or no restriction.
|
* Default empty.
|
||||||
* @type int $exclude_tree Remove all children of the given ID from returned pages.
|
* @type string $authors A comma-separated list of author IDs. Default empty.
|
||||||
* @type int $number The number of pages to return. Default 0, or all pages.
|
* @type int $parent Page ID to return direct children of. `$hierarchical` must be false.
|
||||||
* @type int $offset The number of pages to skip before returning. Requires 'number'.
|
* Default -1, or no restriction.
|
||||||
* Default 0.
|
* @type string|array $exclude_tree Comma-separated string or array of page IDs to exclude.
|
||||||
* @type string $post_type The post type to query.
|
* Default empty array.
|
||||||
* Default 'page'.
|
* @type int $number The number of pages to return. Default 0, or all pages.
|
||||||
* @type string $post_status A comma-separated list of post status types to include.
|
* @type int $offset The number of pages to skip before returning. Requires `$number`.
|
||||||
* Default 'publish'.
|
* Default 0.
|
||||||
|
* @type string $post_type The post type to query. Default 'page'.
|
||||||
|
* @type string $post_status A comma-separated list of post status types to include.
|
||||||
|
* Default 'publish'.
|
||||||
* }
|
* }
|
||||||
* @return array List of pages matching defaults or $args.
|
* @return array List of pages matching defaults or `$args`.
|
||||||
*/
|
*/
|
||||||
function get_pages( $args = array() ) {
|
function get_pages( $args = array() ) {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user