[wp-trac] [WordPress Trac] #12812: New Nav Menu needs to have ancestor class

WordPress Trac wp-trac at lists.automattic.com
Sat May 8 03:49:31 UTC 2010


#12812: New Nav Menu needs to have ancestor class
-------------------------+--------------------------------------------------
 Reporter:  joostdevalk  |       Owner:  filosofo                            
     Type:  enhancement  |      Status:  new                                 
 Priority:  normal       |   Milestone:  3.0                                 
Component:  Menus        |     Version:                                      
 Severity:  normal       |    Keywords:  has-patch dev-feedback needs-testing
-------------------------+--------------------------------------------------
Changes (by gvvaughan):

 * cc: gvvaughan (added)


Comment:

 Replying to [comment:4 ryan]:
 > These aren't really menu item parents and ancestors. They are page
 parents and ancestors. Menu item hierarchy doesn't have to follow page
 hierarchy. We need to keep in mind the difference.

 Agreed.  The patch just happens to work when upgrading from a blog which
 previously built a menu from the page hierarchy, provided that you build a
 new {{{wp_nav_menu}}} hierarchy that matches.

 I installed the patch after doing just that, and it appears to do the
 right thing.  BUT after going into the Edit Pages admin page and setting
 all pages to 'No Parent', the patches in this ticket are no longer able to
 decorate menu items with the correct (or any in fact) {{{menu-item-
 parent}}} or {{{menu-item-ancestor}}} classes.

 I don't know how to get a list of the children of the current menu item,
 otherwise I would have provided a correct patch... if someone can
 enlighten me on that detail, I will write the patch though.

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


More information about the wp-trac mailing list