[wp-trac] [WordPress Trac] #16605: wp_nav_menu fallback_cb argument ignored with using menu argument

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 21 10:32:32 UTC 2011


#16605: wp_nav_menu fallback_cb argument ignored with using menu argument
--------------------------+----------------------
 Reporter:  jonkirkman    |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Menus         |     Version:  3.0.1
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------
Changes (by filosofo):

 * keywords:  needs-patch 2nd-opinion =>
 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Replying to [ticket:16605 jonkirkman]:
 > If this is the expected behavior, it should be documented as it isn't
 intuitive.

 It is documented in the PHPDoc for `wp_nav_menu`.  Is there somewhere else
 that it isn't documented correctly?
 ([http://codex.wordpress.org/Function_Reference/wp_nav_menu Codex] has it,
 too.)

   fallback_cb - If the menu doesn't exists [sic], a callback function will
 fire. Defaults to 'wp_page_menu'. Set to false for no fallback.


 To elaborate, because you're specifying the menu, the only time the
 `fallback_cb` would apply is if that menu doesn't exist.  In contrast,
 when you don't specify the menu, until one is assigned to that location
 the `fallback_cb` does apply.

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


More information about the wp-trac mailing list