WordPress.org

Make WordPress Core

Changeset 34243


Ignore:
Timestamp:
09/16/2015 04:46:08 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Update the DocBlock for wp_page_menu() to include 'before', 'after', and 'walker' arguments added in [34200].

Align the $defaults array and include the default value for 'show_home'.

Props stevegrunwell.
Fixes #11095.

File:
1 edited

Legend:

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

    r34200 r34243  
    11881188 *
    11891189 * @since 2.7.0
     1190 * @since 4.4.0 Added `$before`, `$after`, and `$walker` arguments.
    11901191 *
    11911192 * @param array|string $args {
     
    11971198 *     @type bool            $echo        Whether to echo the list or return it. Accepts true (echo) or false (return).
    11981199 *                                        Default true.
     1200 *     @type int|bool|string $show_home   Whether to display the link to the home page. Can just enter the text
     1201 *                                        you'd like shown for the home link. 1|true defaults to 'Home'.
    11991202 *     @type string          $link_before The HTML or text to prepend to $show_home text. Default empty.
    12001203 *     @type string          $link_after  The HTML or text to append to $show_home text. Default empty.
    1201  *     @type int|bool|string $show_home   Whether to display the link to the home page. Can just enter the text
    1202  *                                        you'd like shown for the home link. 1|true defaults to 'Home'.
     1204 *     @type string          $before      The HTML or text to prepend to the menu. Default is '<ul>'.
     1205 *     @type string          $after       The HTML or text to append to the menu. Default is '</ul>'.
     1206 *     @type Walker          $walker      Walker instance to use for listing pages. Default empty (Walker_Page).
    12031207 * }
    12041208 * @return string|void HTML menu
     
    12071211    $defaults = array(
    12081212        'sort_column' => 'menu_order, post_title',
    1209         'menu_class' => 'menu',
    1210         'echo' => true,
     1213        'menu_class'  => 'menu',
     1214        'echo'        => true,
     1215        'show_home'   => false,
    12111216        'link_before' => '',
    1212         'link_after' => '',
    1213         'before' => '<ul>',
    1214         'after' => '</ul>',
    1215         'walker' => ''
     1217        'link_after'  => '',
     1218        'before'      => '<ul>',
     1219        'after'       => '</ul>',
     1220        'walker'      => '',
    12161221    );
    12171222    $args = wp_parse_args( $args, $defaults );
Note: See TracChangeset for help on using the changeset viewer.