Make WordPress Core

Ticket #10968: 10968.patch

File 10968.patch, 2.2 KB (added by DrewAPicture, 10 years ago)

s/menu_tag/container + .2

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

     
    11871187 * arguments.
    11881188 *
    11891189 * @since 2.7.0
    1190  * @since 4.4.0 Added `$before`, `$after`, and `$walker` arguments.
     1190 * @since 4.4.0 Added `container`, `before`, `after`, and `walker` arguments.
    11911191 *
    11921192 * @param array|string $args {
    11931193 *     Optional. Arguments to generate a page menu. See wp_list_pages() for additional arguments.
     
    11941194 *
    11951195 *     @type string          $sort_column How to short the list of pages. Accepts post column names.
    11961196 *                                        Default 'menu_order, post_title'.
    1197  *     @type string          $menu_class  Class to use for the div ID containing the page list. Default 'menu'.
    1198  *     @type string          $menu_tag    Element to use for the element containing the page list. Default 'div'.
     1197 *     @type string          $menu_class  Class to use for the element containing the page list. Default 'menu'.
     1198 *     @type string          $container   Element to use for the element containing the page list. Default 'div'.
    11991199 *     @type bool            $echo        Whether to echo the list or return it. Accepts true (echo) or false (return).
    12001200 *                                        Default true.
    12011201 *     @type int|bool|string $show_home   Whether to display the link to the home page. Can just enter the text
     
    12121212        $defaults = array(
    12131213                'sort_column' => 'menu_order, post_title',
    12141214                'menu_class'  => 'menu',
    1215                 'menu_tag'    => 'div',
     1215                'container'   => 'div',
    12161216                'echo'        => true,
    12171217                'show_home'   => false,
    12181218                'link_before' => '',
     
    12661266        if ( $menu ) {
    12671267                $menu = $args['before'] . $menu . $args['after'];
    12681268        }
    1269         $tag = sanitize_text_field( $args['menu_tag'] );
    1270         $menu = "<{$args['menu_tag']} class=\"" . esc_attr( $args['menu_class'] ) . '">' . $menu . "</{$args['menu_tag']}>\n";
     1269        $container = sanitize_text_field( $args['container'] );
     1270        $menu = "<{$container} class=\"" . esc_attr( $args['menu_class'] ) . '">' . $menu . "</{$container}>\n";
    12711271
    12721272        /**
    12731273         * Filter the HTML output of a page-based menu.