[wp-trac] [WordPress Trac] #13378: Associate nav menus with particular menu "slots" in a theme
WordPress Trac
wp-trac at lists.automattic.com
Thu May 13 19:50:50 UTC 2010
#13378: Associate nav menus with particular menu "slots" in a theme
--------------------------+-------------------------------------------------
Reporter: ryan | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Menus | Version:
Severity: blocker | Keywords:
--------------------------+-------------------------------------------------
Description changed by ryan:
Old description:
> There is currently no way to associate a particular menu with a given
> call to wp_nav_menu() in a theme. Themes cannot call wp_nav_menu()
> multiple times and have sane assignment of menus without hard coding
> particular menu names/ids/slugs (which is not portable across themes).
>
> This can be solved by allowing themes to register how many menus they use
> and give those menus a handle. A dropdown in the menus admin would show
> these handles and allow associating a menu with a given handle. Upon
> switching themes this association would be cleared, although a set of
> standard slot names could be used and preserved when switching themes
> (Main, Secondary, ...). Registering "slots" decouples assignment from
> menu naming, allowing users to name their menus as they see fit in any
> language instead of being tied to hard-coded strings coming from the
> theme.
New description:
There is currently no way to associate a particular menu with a given call
to wp_nav_menu() in a theme. Themes cannot call wp_nav_menu() multiple
times and have sane assignment of menus without hard coding particular
menu names/ids/slugs (which is not portable across themes and languages).
This can be solved by allowing themes to register how many menus they use
and give those menus a handle. A dropdown in the menus admin would show
these handles and allow associating a menu with a given handle. Upon
switching themes this association would be cleared, although a set of
standard slot names could be used and preserved when switching themes
(Main, Secondary, ...). Registering "slots" decouples assignment from
menu naming, allowing users to name their menus as they see fit in any
language instead of being tied to hard-coded strings coming from the
theme.
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13378#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list