WordPress.org

Make WordPress Core

Ticket #11338: 11338.patch

File 11338.patch, 2.7 KB (added by garza, 7 years ago)

documentation for wp_list_pages in post-template.php

  • src/wp-includes/post-template.php

    diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php
    index be46258..84d433a 100644
    a b function wp_dropdown_pages($args = '') { 
    963963
    964964/**
    965965 * Retrieve or display list of pages in list (li) format.
     966 * Also inherits arguments from get_pages
     967 *
     968 * @see get_pages
    966969 *
    967970 * @since 1.5.0
    968971 *
    969  * @param array|string $args Optional. Override default arguments.
    970  * @return string HTML content, if not displaying.
     972 * @param mixed $args {
     973 *     Array or string of arguments. Optional.
     974 *
     975 *     @type int    'child_of'     Page ID to return child and grandchild pages of. Default 0, or no restriction.
     976 *     @type string 'authors'      A comma-separated list of author IDs.
     977 *     @type string 'date_format'  Controls the format of the Page date set by the show_date parameter.
     978 *     @type int    'depth'        Controls how many levels in the hierachy of pages are to be included in the generated list.
     979 *     @type bool   'echo'         Toggles the disply of the generated list of links or return the list as an HTML text string.
     980 *     @type array  'exclude'      Array of page IDs to exclude.
     981 *     @type array  'include'      Array of page IDs to include. Cannot be used with 'child_of', 'parent', 'exclude',
     982 *                                 'meta_key', 'meta_value', or 'hierarchical'.
     983 *     @type string 'link_after'   Sets the text or html that follows the link text inside anchor tag.
     984 *     @type string 'link_before'  Sets the text or html that precedes the link text inside anchor tag.
     985 *     @type string 'post_type'    The post type to query.
     986 *                                 Default 'page'.
     987 *     @type string 'post_status'  A comma-separated list of post status types to include.
     988 *                                 Default 'publish'.
     989 *     @type string 'show_date'    Display creation or last modified date next to each Page.
     990 *     @type string 'sort_column'  What columns to sort pages by, comma-separated.
     991 *                                 Default 'post_title'. Accepts 'post_author', 'post_date', 'post_title', 'post_name',
     992 *                                 'post_modified', 'post_modified_gmt', 'menu_order', 'post_parent', 'ID', 'rand',
     993 *                                 'comment_count'. 'post_' can be omitted for any values that start with it.
     994 *     @type string 'title_li'     Text and style of the Page list's heading
     995 *     @type Walker 'walker'       Instance of your custom Walker class.
     996 * }
     997 * @return string HTML list of pages matching defaults or $args.
    971998 */
     999
    9721000function wp_list_pages($args = '') {
    9731001        $defaults = array(
    9741002                'depth' => 0, 'show_date' => '',