[wp-trac] [WordPress Trac] #16382: Menus adds "current_page_parent" class to the blog page when viewing a custom post type entry

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 21 10:19:31 UTC 2011


#16382: Menus adds "current_page_parent" class to the blog page when viewing a
custom post type entry
--------------------------------+-----------------------------
 Reporter:  tammyhart           |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Future Release
Component:  Menus               |     Version:  3.0.5
 Severity:  normal              |  Resolution:
 Keywords:  dev-feedback close  |
--------------------------------+-----------------------------
Changes (by filosofo):

 * keywords:  dev-feedback => dev-feedback close
 * milestone:  Awaiting Review => Future Release


Comment:

 `current_page_parent` is meant to make the menus work in a backwards-
 compatible way with the classes given to pages in lists, thanks to
 `Walker_Page`.

 Specifically, `Walker_Page`, which generates the class names for many page
 lists, considers everything not a page to be a child of the "posts page."
 Maybe it shouldn't, but that's the behavior that would need to be changed
 first.

 Instead, you can use the "`current-menu-parent`" class to specify elements
 that are parents of the currently-requested page, without this backwards-
 compatibility quirk.

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


More information about the wp-trac mailing list