Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #49025, comment 2


Ignore:
Timestamp:
04/22/2020 05:19:02 PM (4 years ago)
Author:
anonymized_14254218
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #49025, comment 2

    v3 v4  
    3131**Edit2**
    3232Now only untoggles the modal menu if this is a valid anchor, otherwise simply follows the link.
     33
     34**Edit3**
     35I went live with this code on multiple sites and it works fine for every costumer.
     36One thing to mention though:
     37The menu entry for `/parent1/page#anchor` would need to be set up like the url shown in the browser based on the wp settings. You could change the code to only check if the url ends with the targeted menu item allowing to use `/page#anchor` as a valid menu entry, this would lead to false positive matches for `parent2/page#anchor` though.