[wp-trac] [WordPress Trac] #36012: Add .current-ancestor class to any relative menu item ancestor

WordPress Trac noreply at wordpress.org
Wed Apr 24 21:53:09 UTC 2019


#36012: Add .current-ancestor class to any relative menu item ancestor
-------------------------------------+-------------------------------------
 Reporter:  vovkasolovev             |       Owner:  SergeyBiryukov
     Type:  enhancement              |      Status:  reopened
 Priority:  normal                   |   Milestone:  Future Release
Component:  Menus                    |     Version:  4.4.2
 Severity:  normal                   |  Resolution:
 Keywords:  needs-unit-tests has-    |     Focuses:  accessibility,
  patch                              |  template
-------------------------------------+-------------------------------------

Comment (by vovkasolovev):

 Replying to [comment:10 Mista-Flo]:
 > The patch is really simple, instead of just adding this class for page,
 it add it for all custom post types and taxonomies.

 Sorry, If you decide to add specific type, maybe we can add both:
 **.current-ancestor** and **.current_%s_ancestor**

 Similar how we have with item classes:
 **.menu-item** and **.menu-item-type-taxonomy**.

 Reason to have short **.current-ancestor** (without %argument) for all the
 parents is to be able to select and to stylize menu items in bread crumbs
 way, without specifying their type, level or something else.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/36012#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list