Closed (fixed)
Project:
Simple Menu Icons
Version:
8.x-2.2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2020 at 01:45 UTC
Updated:
9 Nov 2021 at 08:44 UTC
Jump to comment: Most recent
Version 2.2 changed the line that adds the menu-item class to <li> tags, from:
if (!empty($link_plugin['options']['menu_icon']['fid'])) {
$mlid = $link_plugin['metadata']['entity_id'];
$item['attributes']->addClass('menu-icon menu-icon-' . $mlid);
}to:
$mlid = $link_plugin['metadata']['entity_id'];
$item['attributes']->addClass('menu-icon-' . $mlid);
This broke my site, leaving me without a way to apply a uniform style all menu icon items (I used this to hide the text while still making it accessable to screen readers). Perhaps there's a reason this was removed that I don't understand, since the if block that surrounds those lines that was also removed, but it's possible this was a simple oversight, since there was also a lot of refactoring in that file.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
miroslav-leeComment #6
podarokThank you