Changeset 34330
- Timestamp:
- 09/19/2015 06:06:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-template.php
r34307 r34330 1188 1188 * 1189 1189 * @since 2.7.0 1190 * @since 4.4.0 Added ` container`, `before`, `after`, and `walker` arguments.1190 * @since 4.4.0 Added `menu_id`, `container`, `before`, `after`, and `walker` arguments. 1191 1191 * 1192 1192 * @param array|string $args { … … 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_id ID for the div containing the page list. Default is empty string. 1197 1198 * @type string $menu_class Class to use for the element containing the page list. Default 'menu'. 1198 1199 * @type string $container Element to use for the element containing the page list. Default 'div'. … … 1212 1213 $defaults = array( 1213 1214 'sort_column' => 'menu_order, post_title', 1215 'menu_id' => '', 1214 1216 'menu_class' => 'menu', 1215 1217 'container' => 'div', … … 1268 1270 } 1269 1271 $container = sanitize_text_field( $args['container'] ); 1270 $menu = "<{$container} class=\"" . esc_attr( $args['menu_class'] ) . '">' . $menu . "</{$container}>\n"; 1272 $attrs = ''; 1273 if ( ! empty( $args['menu_id'] ) ) { 1274 $attrs .= ' id="' . esc_attr( $args['menu_id'] ) . '"'; 1275 } 1276 1277 if ( ! empty( $args['menu_class'] ) ) { 1278 $attrs .= ' class="' . esc_attr( $args['menu_class'] ) . '"'; 1279 } 1280 1281 $menu = "<{$container}{$attrs}>" . $menu . "</{$container}>\n"; 1271 1282 1272 1283 /**
Note: See TracChangeset
for help on using the changeset viewer.