Ticket #13910: 13910.diff
File 13910.diff, 1.2 KB (added by , 15 years ago) |
---|
-
nav-menu-template.php
138 138 139 139 $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 140 140 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 141 'title' => '', 'title_before' => '<h2>' , 'title_after' => '</h2>', 141 142 'depth' => 0, 'walker' => '', 'theme_location' => '' ); 142 143 143 144 $args = wp_parse_args( $args, $defaults ); … … 200 201 $items .= walk_nav_menu_tree( $sorted_menu_items, $args->depth, $args ); 201 202 unset($sorted_menu_items); 202 203 204 203 205 // Attributes 204 206 if ( ! empty( $args->menu_id ) ) { 205 207 $slug = $args->menu_id; … … 216 218 $attributes = ' id="' . $slug . '"'; 217 219 $attributes .= $args->menu_class ? ' class="'. $args->menu_class .'"' : ''; 218 220 221 if ( !empty( $title ) ) 222 $nav_menu .= $title_before . $title . $title_after; 223 219 224 $nav_menu .= '<ul'. $attributes .'>'; 225 220 226 221 227 // Allow plugins to hook into the menu to add their own <li>'s 222 228 $items = apply_filters( 'wp_nav_menu_items', $items, $args );