Ticket #31656: 31656.2.patch
File 31656.2.patch, 1.7 KB (added by , 10 years ago) |
---|
-
src/wp-includes/post-template.php
1143 1143 * @type string $sort_column How to short the list of pages. Accepts post column names. 1144 1144 * Default 'menu_order, post_title'. 1145 1145 * @type string $menu_class Class to use for the div ID containing the page list. Default 'menu'. 1146 * @type string $menu_id ID for the div containing the page list. Default is empty string. 1146 1147 * @type bool $echo Whether to echo the list or return it. Accepts true (echo) or false (return). 1147 1148 * Default true. 1148 1149 * @type string $link_before The HTML or text to prepend to $show_home text. Default empty. … … 1153 1154 * @return string html menu 1154 1155 */ 1155 1156 function wp_page_menu( $args = array() ) { 1156 $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', ' echo' => true, 'link_before' => '', 'link_after' => '');1157 $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'menu_id' => '', 'echo' => true, 'link_before' => '', 'link_after' => ''); 1157 1158 $args = wp_parse_args( $args, $defaults ); 1158 1159 1159 1160 /** … … 1199 1200 if ( $menu ) 1200 1201 $menu = '<ul>' . $menu . '</ul>'; 1201 1202 1202 $menu = '<div class="' . esc_attr( $args['menu_class']) . '">' . $menu . "</div>\n";1203 $menu = '<div class="' . esc_attr( $menu_class ) . '" id="' . esc_attr( $menu_id ) . '">' . $menu . "</div>\n"; 1203 1204 1204 1205 /** 1205 1206 * Filter the HTML output of a page-based menu.