Make WordPress Core

Changeset 25266


Ignore:
Timestamp:
09/05/2013 10:12:17 PM (12 years ago)
Author:
wonderboymusic
Message:

Add docs to the woefully under-documented get_pages().

Props DrewAPicture.
Fixes #25186.

File:
1 edited

Legend:

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

    r25262 r25266  
    36183618 * Retrieve a list of pages.
    36193619 *
    3620  * The defaults that can be overridden are the following: 'child_of',
    3621  * 'sort_order', 'sort_column', 'post_title', 'hierarchical', 'exclude',
    3622  * 'include', 'meta_key', 'meta_value','authors', 'number', and 'offset'.
     3620 * @global wpdb $wpdb WordPress database abstraction object
    36233621 *
    36243622 * @since 1.5.0
    3625  * @uses $wpdb
    3626  *
    3627  * @param mixed $args Optional. Array or string of options that overrides defaults.
     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').
     3640 * }
    36283641 * @return array List of pages matching defaults or $args
    36293642 */
Note: See TracChangeset for help on using the changeset viewer.