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

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 12 12:52:05 UTC 2010


#12812: New Nav Menu needs to have ancestor class
-------------------------+--------------------------------------------------
 Reporter:  joostdevalk  |        Owner:  filosofo
     Type:  enhancement  |       Status:  closed  
 Priority:  normal       |    Milestone:  3.0     
Component:  Menus        |      Version:  3.0     
 Severity:  blocker      |   Resolution:  fixed   
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------

Comment(by ryanhellyer):

 This does not appear to be fixed, in fact I think it might be worse than
 before. The HTML attached, is a chunk of code from my test install running
 WP 3.0 beta 3.

 To create that code, I set a Page to be at the fourth level, the list item
 gets classes of "current-menu-item" and "current_page_item", which makes
 complete sense.

 However ... the parent of that Page, regardless of whether the parent is
 in fact it's "Page parent", is given the class of "current_page_parent" as
 well as the expected "current-menu-parent". Since it isn't actually the
 current pages parent and is just a parent in the menu, it shouldn't be
 given the "current_page_parent" class IMO.

 Then it gets really bizarre, as the actual top level page ancestor,
 regardless of where it is in the menu structure, is given a class of
 "current-menu-ancestor" despite not being an ancestor within the menu
 structure and also classes of "current-page-parent" (expected) and
 "current_page_ancestor" (unexpected).


 Unfortunately I don't have a solution :( I'm just pointing out the problem
 in the hope that someone with more knowledge than I can help figure out a
 way to make it work!

 Thanks to Diana for bringing this to my attention :)

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


More information about the wp-trac mailing list