[wp-trac] [WordPress Trac] #14701: HTML markup inconsistency in menus

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 26 20:19:38 UTC 2010


#14701: HTML markup inconsistency in menus
--------------------------+-------------------------------------------------
 Reporter:  jneuenhaus    |        Owner:         
     Type:  defect (bug)  |       Status:  closed 
 Priority:  normal        |    Milestone:         
Component:  Menus         |      Version:  3.0.1  
 Severity:  trivial       |   Resolution:  wontfix
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by filosofo):

  * keywords:  markup, html, css, javascript, menus, drop down, current-
               page-ancestor, current_page_ancestor =>
  * status:  new => closed
  * resolution:  => wontfix
  * milestone:  Awaiting Review =>


Comment:

 This is intended behavior, because `current_page_ancestor` and `current-
 page-ancestor` have different meanings.

 `current_page_ancestor` is meant to be backwards-compatible with
 `wp_page_menu()` as an alias for `current-menu-ancestor`.  It indicates
 that the menu item assigned that class is an ancestor in the ''arbitrary''
 menu hierarchy to the menu item of whatever page you're currently viewing.

 For example, if C is a post (not a page) and is made a menu item under A
 in the menu hierarchy, when viewing C you will see that A has the
 `current-menu-ancestor` and `current_page_ancestor` classes. That's
 because ''in the menu'' A is ancestor to C.

 In contrast, `current-page-ancestor` indicates a relationship among
 ''pages'' not ''menu items''.  If D is a page that's a child of A, viewing
 D will give A's menu item the `current-page-ancestor` class, because D is
 actually a child page of A.

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


More information about the wp-trac mailing list