Ticket #31656: 31656.patch
File 31656.patch, 1.8 KB (added by , 9 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_class = sanitize_html_class( $args['menu_class'] ); 1204 $menu_id = sanitize_html_class( $args['menu_id'] ); 1203 1205 1206 $menu = '<div class="' . esc_attr( $menu_class ) . '" id="' . esc_attr( $menu_id ) . '">' . $menu . "</div>\n"; 1207 1204 1208 /** 1205 1209 * Filter the HTML output of a page-based menu. 1206 1210 *