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

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 9 17:25:45 UTC 2010


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

Comment(by scribu):

 Submitted menus.diff in pre-alpha state, just to get the ball rolling.

 Basically, I copied all the code related to widgets and transformed
 sidebars into menus and widgets into menu items.

 Made some modifications to use current_theme_supports('menus').

 There are currently 4 default menu item types: Home, Link, Page &
 Category.

 @ryanhellyer: The register_menu() function has 2 arguments to deal with
 markup: 'before_menu' and 'after_menu'.

 Saving menu items into menus is currently broken.

 == WP_Menu class ==

 We have nice classes for handling individual menu items: WP_Menu_Item and
 WP_Menu_Item_Factory, but the code that deals with entire menus relies on
 a lot of global variables.

 So we need a WP_Menu class that holds all the information about a
 particular menu.

 We might also need a WP_Menu_Map class to hold all the menus in one place.

 == Hierarchical items ==

 For page and category items, we need to handle child elements. I'm
 thinking of an option for each item to specify the depth to which child
 elements should be displayed.

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


More information about the wp-trac mailing list