Changeset 38523 for trunk/src/wp-includes/nav-menu-template.php
- Timestamp:
- 09/06/2016 09:05:45 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu-template.php
r38470 r38523 41 41 * @type string $items_wrap How the list items should be wrapped. Default is a ul with an id and class. 42 42 * Uses printf() format with numbered placeholders. 43 * @type string $item_spacing Whether whitespace format the menu's HTML: 'discard' or 'preserve' (default). 43 44 * } 44 45 * @return object|false|void Menu output if $echo is false, false if there are no items or no menu was found. … … 48 49 49 50 $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 50 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 51 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'item_spacing' => 'preserve', 51 52 'depth' => 0, 'walker' => '', 'theme_location' => '' ); 52 53 53 54 $args = wp_parse_args( $args, $defaults ); 55 56 if ( ! in_array( $args['item_spacing'], array( 'preserve', 'discard' ), true ) ) { 57 // invalid value, fall back to default. 58 $args['item_spacing'] = $defaults['item_spacing']; 59 } 60 54 61 /** 55 62 * Filters the arguments used to display a navigation menu.
Note: See TracChangeset
for help on using the changeset viewer.