[wp-trac] [WordPress Trac] #48015: Unexpected results from wp_nav_menu()
WordPress Trac
noreply at wordpress.org
Wed Sep 11 14:09:48 UTC 2019
#48015: Unexpected results from wp_nav_menu()
----------------------------+------------------------------
Reporter: ChiefAlchemist | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 5.2.3
Severity: major | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by ChiefAlchemist):
Also, the codex sez:
**'fallback_cb'**
(callable|bool) If the menu doesn't exists, a callback function will fire.
Default is 'wp_page_menu'. Set to false for no fallback.
https://developer.wordpress.org/reference/functions/wp_nav_menu/
However, this is firing even when the menu DOES exist. That is, I defined
a fallback_cb and it's always firing - even when I have a valid menu
request (because I check it against $_wp_registered_nav_menus.
Someone (me) or something (wp_nav_menu()) has lost its mind :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48015#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list