[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 14:46:48 UTC 2017
#39758: menu-item-home does not get class current-menu-item (not consistent with
live page)
-----------------------------------------+------------------------------
Reporter: Liddika | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.8
Component: Customize | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch reporter-feedback | Focuses:
-----------------------------------------+------------------------------
Changes (by adamsilverstein):
* keywords: => has-patch reporter-feedback
* owner: => adamsilverstein
* version: 4.7.2 => 4.7
* status: new => assigned
* milestone: Awaiting Review => 4.8
Comment:
In [attachment:39758.diff]:
Nav Menus: Fix an issue with menu classes in the customizer.
Remove query vars when comparing menu urls with current url to determine
correct menu item classes.
In the customizer, menu items now contain a changeset `uuid` as part of
their url string, eg
`http://wpdev.localhost/?customize_changeset_uuid=ddc1fa2e-e347-4042-8f1c-
f5ac470839e0&customize_theme=twentyseventeen&customize_messenger_channel=preview-0`.
The code in `nav-menu-template.php` wasn't working because these urls
didn't match the comparison urls without the query vars, breaking applied
classes in several cases. This patch strips the query var off the url
before entering the comparison block and fixes the case raised on the
ticket.
cc: @westonruter
@Liddika can you please give this patch a test and test if it resolves the
issue you were seeing? Thanks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39758#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list