Ticket #18232: 18232_v2.patch
| File 18232_v2.patch, 1.5 KB (added by bryanjwatson, 22 months ago) |
|---|
-
nav-menu-template.php
138 138 static $menu_id_slugs = array(); 139 139 140 140 $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 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>',142 ' depth' => 0, 'walker' => '', 'theme_location' => '' );141 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'fallback_args' => '', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 142 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 'depth' => 0, 'walker' => '', 'theme_location' => '' ); 143 143 144 144 $args = wp_parse_args( $args, $defaults ); 145 145 $args = apply_filters( 'wp_nav_menu_args', $args ); … … 170 170 // If no menu was found or if the menu has no items and no location was requested, call the fallback_cb if it exists 171 171 if ( ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) && !$args->theme_location ) ) 172 172 && $args->fallback_cb && is_callable( $args->fallback_cb ) ) 173 return call_user_func( $args->fallback_cb, (array) $args );173 return call_user_func( $args->fallback_cb, (array) $args->fallback_args ); 174 174 175 175 // If no fallback function was specified and the menu doesn't exists, bail. 176 176 if ( !$menu || is_wp_error($menu) )
