[wp-trac] [WordPress Trac] #11817: Better Site Menu Management

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 25 21:44:17 UTC 2010


#11817: Better Site Menu Management
----------------------------+-----------------------------------------------
 Reporter:  scribu          |       Owner:           
     Type:  task (blessed)  |      Status:  assigned 
 Priority:  normal          |   Milestone:  3.0      
Component:  General         |     Version:           
 Severity:  normal          |    Keywords:  has-patch
----------------------------+-----------------------------------------------

Comment(by greenshady):

 So far, the work here has been amazing.  I'm loving how everything is
 coming together.

 Since menus are only really useful if themes support them, I have a few
 suggestions:

  * Use `add_theme_support( 'nav-menus' )` so that users won't be confused
 when their menus aren't appearing.
  * Create a `nav_menu_exists()` function that checks if a menu already
 exists.
  * Create an `is_active_nav_menu()` function to check if a menu has items
 in it.
  * Don't fall back on anything (e.g., page menu).  Allow themes to create
 their own fallbacks.

 Combining the last three ideas will allow theme authors to do something
 like this:

  * Create Menu 1.  On display, if no items have been saved, fall back to
 `wp_page_menu()`.
  * Create Menu 2. On display, if no items have been saved, fall back to
 `wp_list_categories()`.
  * Create Menu 3. On display, if no items have been saved, fall back to
 `wp_tag_cloud( 'format=list' )`.

 ---

 Can we drop the "Open link in a new window" functionality?  Should we even
 be supporting this at all?

 Probably a more useful feature would be the ability to add custom `class`
 and `rel` attributes.

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


More information about the wp-trac mailing list