[wp-trac] [WordPress Trac] #14768: Incorrect wp_nav_menu behavior when theme_location is set but no menus exist/assigned

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 6 22:05:03 UTC 2010


#14768: Incorrect wp_nav_menu behavior when theme_location is set but no menus
exist/assigned
----------------------------------------------------+-----------------------
 Reporter:  almostdaniel                            |        Owner:  jnthnlstr      
     Type:  defect (bug)                            |       Status:  accepted       
 Priority:  normal                                  |    Milestone:  Awaiting Review
Component:  Menus                                   |      Version:  3.0.1          
 Severity:  normal                                  |   Resolution:                 
 Keywords:  wp_nav_menu, theme_location, has-patch  |  
----------------------------------------------------+-----------------------

Comment(by filosofo):

 There's a simple way to produce the behavior you want: just call
 `wp_nav_menu` with the `fallback_cb` argument set to  `null`.

 For backwards-compatibility reasons, I don't think you will get support to
 change the default behavior.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14768#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list