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

WordPress Trac noreply at wordpress.org
Mon Oct 24 13:05:21 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 adamsilverstein):

 Replying to [comment:11 mdgl]:
 > Pardon me if I'm being stupid, but how is this patch supposed to work?
 The value being tested in the `if` statement looks just like a constant
 string to me.

 @mdgl I think you are right, this conditional wasn’t doing anything. When
 I tested it actually seemed to work, I think the reason the patch mostly
 worked is that by the time logic reached this point only the home page was
 left?

 In [attachment:35272.2.diff] I added an actual check for the object id set
 as the 'front page'. When the ids match, the calss is added. Some unit
 tests here to verify behavior would be helpful.

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


More information about the wp-trac mailing list