- 🇮🇹Italy apaderno Brescia, 🇮🇹
Since patches are no longer tested, it is better to provide a merge request.
- @ccoulon opened merge request.
We were not able to get our custom icons to display within the menu.
The current list of prefixes does not include 'fak' which is necessary to access custom icons.
$form['fa_icon']['fa_icon_prefix'] = [
'#type' => 'select',
'#title' => t('Style prefix'),
'#default_value' => !empty($menu_link_options['fa_icon_prefix']) ? $menu_link_options['fa_icon_prefix'] : 'fa',
'#options' => [
'fa' => 'fa (' . t('4.x only') . ')',
'fas' => 'fas (' . t('5.x only') . ')',
'far' => 'far (' . t('5.x only') . ')',
'fal' => 'fal (' . t('5.x only') . ')',
'fad' => 'fad (' . t('5.x only') . ')',
'fab' => 'fab (' . t('5.x only') . ')',
'fa-solid' => 'Solid (' . t('6.x only') . ')',
'fa-regular' => 'Regular (' . t('6.x only') . ')',
'fa-light' => 'Light (' . t('6.x only') . ')',
'fa-thin' => 'Thin (' . t('6.x only') . ')',
'fa-duotone' => 'Duotone (' . t('6.x only') . ')',
'fa-brands' => 'Brands (' . t('6.x only') . ')',
],
];
Use the dropdown menu in the form.
Add 'fak' in the options list.
$form['fa_icon']['fa_icon_prefix'] = [
'#type' => 'select',
'#title' => t('Style prefix'),
'#default_value' => !empty($menu_link_options['fa_icon_prefix']) ? $menu_link_options['fa_icon_prefix'] : 'fa',
'#options' => [
'fa' => 'fa (' . t('4.x only') . ')',
'fas' => 'fas (' . t('5.x only') . ')',
'far' => 'far (' . t('5.x only') . ')',
'fal' => 'fal (' . t('5.x only') . ')',
'fad' => 'fad (' . t('5.x only') . ')',
'fab' => 'fab (' . t('5.x only') . ')',
'fak' => 'Custom Icons (' . t('6.x only') . ')',
'fa-solid' => 'Solid (' . t('6.x only') . ')',
'fa-regular' => 'Regular (' . t('6.x only') . ')',
'fa-light' => 'Light (' . t('6.x only') . ')',
'fa-thin' => 'Thin (' . t('6.x only') . ')',
'fa-duotone' => 'Duotone (' . t('6.x only') . ')',
'fa-brands' => 'Brands (' . t('6.x only') . ')',
],
];
Create a merge request to add this additional feature.
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Since patches are no longer tested, it is better to provide a merge request.