Description
Issue:
This doesn't work with the latest FontAwesome v5 icons because a lot of the icons don't start with fa fa-xxx
. Some start with fab
or fas
.
Here are a few examples:
fab fa-accessible-icon
fas fa-align-justify
File: widgets\Menu.php
Line: 31
Currently is:
public static $iconClassPrefix = 'fa fa-';
Should be:
public $iconClassPrefix = 'fa fa-';
Then the corresponding fix on line 84 to this:
: '<i class="' . $this->iconClassPrefix . $item['icon'] . '"></i> ',
Reason:
I am using the latest FontAwesome icons from https://fontawesome.com/icons?d=gallery&m=free loaded via their CDN. So I am not using your built in, out-dated version of FontAwesome.
Implementing this simple fix, would allow us to continue using your plugin along with the latest FontAwesome.
Yes, we would have to set the $iconClassPrefix
to ''
, an empty string, and manually pass the prefixes ourself. Like so:
<?= Menu::widget([
'options' => ['class' => 'sidebar-menu'],
'iconClassPrefix' => '',
'items' => $items,
]) ?>
This would only take a couple minutes to update, until you get the rest of this package updated.