Changeset 25271 for trunk/src/wp-includes/post.php
- Timestamp:
- 09/06/2013 01:20:17 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r25270 r25271 3616 3616 3617 3617 /** 3618 * Retrieve a list of pages 3618 * Retrieve a list of pages. 3619 3619 * 3620 3620 * @global wpdb $wpdb WordPress database abstraction object … … 3622 3622 * @since 1.5.0 3623 3623 * 3624 * @param mixed $args (optional) Array or string of arguments { 3625 * @type int 'child_of' Page ID to return child and grandchild pages of (default 0). 3626 * @type string 'sort_order' How to sort retrieved pages (default 'ASC', accepts 'ASC', 'DESC'). 3627 * @type string 'sort_column' What column to sort pages by (default 'post_title', accepts post fields). 3628 * @type bool 'hierarchical' Whether to return pages hierarchically (default 1|true). 3629 * @type array 'exclude' Array of page IDs to exclude (default array). 3630 * @type array 'include' Array of page IDs to include (default array). 3631 * @type string 'meta_key' Only include pages with this meta key (default empty). 3632 * @type string 'meta_value' Only include pages with this meta value (default empty). 3633 * @type string 'authors' A comma-separated list of author IDs (default empty). 3634 * @type int 'parent' Page ID to return direct children of. 'hierarchical' must be 0|false (default -1). 3635 * @type int 'exclude_tree' Remove all children of given ID from returned pages (default empty). 3636 * @type int 'number' The number of pages to return (default empty). 3637 * @type int 'offset' The number of pages to skip before returning (default 0). 3638 * @type string 'post_type' The post type to return (default 'page'). 3639 * @type string 'post_status' A comma-separated list of post status types to include (default 'publish'). 3624 * @param mixed $args { 3625 * Array or string of arguments. Optional. 3626 * 3627 * @type int 'child_of' Page ID to return child and grandchild pages of. Default 0, or no restriction. 3628 * @type string 'sort_order' How to sort retrieved pages. 3629 * Default 'ASC'. Accepts 'ASC', 'DESC'. 3630 * @type string 'sort_column' What columns to sort pages by, comma-separated. 3631 * Default 'post_title'. Accepts 'post_author', 'post_date', 'post_title', 'post_name', 3632 * 'post_modified', 'post_modified_gmt', 'menu_order', 'post_parent', 'ID', 'rand', 3633 * 'comment_count'. 'post_' can be omitted for any values that start with it. 3634 * @type bool 'hierarchical' Whether to return pages hierarchically. Default true. 3635 * @type array 'exclude' Array of page IDs to exclude. 3636 * @type array 'include' Array of page IDs to include. Cannot be used with 'child_of', 'parent', 'exclude', 3637 * 'meta_key', 'meta_value', or 'hierarchical'. 3638 * @type string 'meta_key' Only include pages with this meta key. 3639 * @type string 'meta_value' Only include pages with this meta value. 3640 * @type string 'authors' A comma-separated list of author IDs. 3641 * @type int 'parent' Page ID to return direct children of. 'hierarchical' must be false. 3642 * Default -1, or no restriction. 3643 * @type int 'exclude_tree' Remove all children of the given ID from returned pages. 3644 * @type int 'number' The number of pages to return. Default 0, or all pages. 3645 * @type int 'offset' The number of pages to skip before returning. Requires 'number'. 3646 * Default 0. 3647 * @type string 'post_type' The post type to query. 3648 * Default 'page'. 3649 * @type string 'post_status' A comma-separated list of post status types to include. 3650 * Default 'publish'. 3640 3651 * } 3641 3652 * @return array List of pages matching defaults or $args. 3642 3653 */ 3643 function get_pages( $args = '') {3654 function get_pages( $args = array() ) { 3644 3655 global $wpdb; 3645 3656
Note: See TracChangeset
for help on using the changeset viewer.