[wp-trac] [WordPress Trac] #39758: menu-item-home does not get class current-menu-item (not consistent with live page)

WordPress Trac noreply at wordpress.org
Wed Feb 1 11:04:29 UTC 2017


#39758: menu-item-home does not get class current-menu-item (not consistent with
live page)
--------------------------+-----------------------------
 Reporter:  Liddika       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  4.7.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When inside of the customizer, and the navigation menu has a home menu
 item, and the user is on the home page, that menu item will not get tagged
 with the class `current-menu-item` nor `current_page_item` inside of
 `<li>`.

 This is not consistent with the live page of the navigation menu. The live
 page does include both `current-menu-item` and `current_page_item` when
 being on the home page.

 Home menu item on live page:

 {{{
 <li id="menu-item-2" class="menu-item menu-item-type-custom menu-item-
 object-custom current-menu-item current_page_item menu-item-home menu-
 item-2"><a href="http://example.com/">Home</a></li>
 }}}


 Home menu item in customizer:

 {{{
 <li id="menu-item-2" class="menu-item menu-item-type-custom menu-item-
 object-custom  menu-item-home menu-item-2"><a
 href="http://example.com/">Home</a></li>
 }}}


 As you can see, `current-menu-item current_page_item` are missing in the
 customizer.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39758>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list