[wp-trac] [WordPress Trac] #35272: .menu-item-home class not applying to static front pages

WordPress Trac noreply at wordpress.org
Mon Oct 24 15:39:03 UTC 2016


#35272: .menu-item-home class not applying to static front pages
-----------------------------------------------+-----------------------
 Reporter:  RachieVee                          |       Owner:  pento
     Type:  defect (bug)                       |      Status:  reopened
 Priority:  normal                             |   Milestone:  4.7
Component:  Menus                              |     Version:  4.4
 Severity:  normal                             |  Resolution:
 Keywords:  has-patch commit needs-unit-tests  |     Focuses:
-----------------------------------------------+-----------------------

Comment (by christophherr):

 I did not see the class added to other current pages / taxonomies but that
 only proves your point about unit tests @mdgl.

 @adamsilverstein's patch looks much better and more robust.
 Following the format of the other checks, may I suggest to cast the
 get_option check to (int)?
 {{{#!php
 $front_page_id  = (int) get_option( 'page_on_front' );
 }}}

 I'd need some pointers to get started on unit tests for menu classes /
 items.
 (Seems rather daunting after reading 32367)

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


More information about the wp-trac mailing list