WordPress.org

Make WordPress Core

Ticket #11338: 11338.1.patch

File 11338.1.patch, 4.2 KB (added by garza, 7 years ago)

Try two for the patch after feedback

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

    diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php
    index be46258..2ea1ad0 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     Displays the sub-pages of a single Page only; uses the ID for a Page as the value.
     976 *                                Defaults to 0 (displays all Pages).
     977 *     @type string $authors      A comma-separated list of author IDs. Default 0 (display Pages by all authors)
     978 *     @type string $date_format  Controls the format of the Page date set by the show_date parameter.
     979 *                                Default is the date format configured in your WordPress options.
     980 *     @type int    $depth        Controls how many levels in the hierachy of pages are to be included in the generated list.
     981 *                                Default 0 (display all pages, including all sub-pages). Accepts -1 displays pages
     982 *                                at any depth and arranges them in a single flat list, 1 displays top-level Pages only,
     983 *                                n displays pages to the given depth n.
     984 *     @type bool   $echo         Toggles the disply of the generated list of links or return the list as an HTML text string.
     985 *                                Default is 1 (display the generated list items). Valid values 1 (True), 0 (False)
     986 *     @type array  $exclude      Comma-separated list of Page IDs to be excluded. No default value.
     987 *     @type array  $include      Comma-separated list of Page IDs to be included. No default value.
     988 *     @type string $link_after   Sets the text or html that follows the link text inside anchor tag. Default null.
     989 *     @type string $link_before  Sets the text or html that precedes the link text inside anchor tag. Default null.
     990 *     @type string $post_type    The post type to query. Default 'page'. Accepts 'post', 'page', 'revision', 'attachment',
     991 *                                or hierarchical custom post type.
     992 *     @type string $post_status  A comma-separated list of post status types to include. Default 'publish'.
     993 *                                Possible values include 'publish', 'pending', 'draft', 'auto-draft', 'future',
     994 *                                'private', 'inherit', 'trash'.
     995 *     @type string $show_date    Display creation or last modified date next to each Page.
     996 *                                No default value (null), does not display date.
     997 *                                Accepts 'modified' displays the date last modified, any other value displays the
     998 *                                creation date of the Page (post_date)
     999 *     @type string $sort_column  Comma-separated list of column names to sort the pages. Can be used to sort the list of
     1000 *                                Pages by the descriptor of any field in the wp_post table.
     1001 *                                Default 'post_title'. Accepts 'post_author', 'post_date', 'post_title', 'post_name',
     1002 *                                'post_modified', 'post_modified_gmt', 'menu_order', 'post_parent', 'ID', 'rand',
     1003 *                                'comment_count'. 'post_' can be omitted for any values that start with it.
     1004 *     @type string $title_li     Set the text and style of the Page list's heading. Defaults to '__('Pages')', which
     1005 *                                displays "Pages" (the __('') is used for localization purposes). If passed a null or
     1006 *                                empty value (''), no heading is displayed, and the list will not be wrapped
     1007 *                                with <ul>, </ul> tags.
     1008 *     @type Walker $walker'      Instance of your custom Walker class.
     1009 * }
     1010 * @return string HTML list of pages matching defaults or $args.
    9711011 */
    9721012function wp_list_pages($args = '') {
    9731013        $defaults = array(