Changeset 16519
- Timestamp:
- 11/21/2010 01:32:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r16095 r16519 129 129 * walker - allows a custom walker to be specified. 130 130 * theme_location - the location in the theme to be used. Must be registered with register_nav_menu() in order to be selectable by the user. 131 * items_wrap - How the list items should be wrapped. Defaults to a ul with an id and class. Uses printf() format with numbered placeholders. 131 132 * 132 133 * @since 3.0.0 … … 138 139 139 140 $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 140 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 141 '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>', 141 142 'depth' => 0, 'walker' => '', 'theme_location' => '' ); 142 143 … … 216 217 } 217 218 $menu_id_slugs[] = $slug; 218 $attributes = ' id="' . $slug . '"'; 219 $attributes .= $args->menu_class ? ' class="'. $args->menu_class .'"' : ''; 220 221 $nav_menu .= '<ul'. $attributes .'>'; 219 220 $wrap_class = $args->menu_class ? $args->menu_class : ''; 222 221 223 222 // Allow plugins to hook into the menu to add their own <li>'s 224 223 $items = apply_filters( 'wp_nav_menu_items', $items, $args ); 225 224 $items = apply_filters( "wp_nav_menu_{$menu->slug}_items", $items, $args ); 226 $nav_menu .= $items; 225 226 $nav_menu .= sprintf( $args->items_wrap, $slug, $wrap_class, $items ); 227 227 unset($items); 228 229 $nav_menu .= '</ul>';230 228 231 229 if ( $show_container )
Note: See TracChangeset
for help on using the changeset viewer.