Ticket #10968: 10968.patch
| File 10968.patch, 2.2 KB (added by , 10 years ago) |
|---|
-
src/wp-includes/post-template.php
1187 1187 * arguments. 1188 1188 * 1189 1189 * @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. 1191 1191 * 1192 1192 * @param array|string $args { 1193 1193 * Optional. Arguments to generate a page menu. See wp_list_pages() for additional arguments. … … 1194 1194 * 1195 1195 * @type string $sort_column How to short the list of pages. Accepts post column names. 1196 1196 * Default 'menu_order, post_title'. 1197 * @type string $menu_class Class to use for the div IDcontaining the page list. Default 'menu'.1198 * @type string $ menu_tagElement 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'. 1199 1199 * @type bool $echo Whether to echo the list or return it. Accepts true (echo) or false (return). 1200 1200 * Default true. 1201 1201 * @type int|bool|string $show_home Whether to display the link to the home page. Can just enter the text … … 1212 1212 $defaults = array( 1213 1213 'sort_column' => 'menu_order, post_title', 1214 1214 'menu_class' => 'menu', 1215 ' menu_tag'=> 'div',1215 'container' => 'div', 1216 1216 'echo' => true, 1217 1217 'show_home' => false, 1218 1218 'link_before' => '', … … 1266 1266 if ( $menu ) { 1267 1267 $menu = $args['before'] . $menu . $args['after']; 1268 1268 } 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"; 1271 1271 1272 1272 /** 1273 1273 * Filter the HTML output of a page-based menu.