function fontawesome_icon_bundle_configure in Font Awesome Icons 8
Same name and namespace in other branches
- 8.2 fontawesome.module \fontawesome_icon_bundle_configure()
- 7.3 fontawesome.module \fontawesome_icon_bundle_configure()
- 7 fontawesome.module \fontawesome_icon_bundle_configure()
- 7.2 fontawesome.module \fontawesome_icon_bundle_configure()
Implements hook_icon_bundle_configure().
File
- ./
fontawesome.module, line 97 - Drupal integration with Font Awesome, the iconic font for use with Bootstrap.
Code
function fontawesome_icon_bundle_configure(&$settings, &$form_state, &$complete_form) {
$bundle = $form_state['bundle'];
if ($bundle['provider'] === 'fontawesome') {
$settings['tag'] = [
'#type' => 'select',
'#title' => t('HTML Markup'),
'#description' => t('Choose the HTML markup tag that Font Awesome icons should be created with. Typically, this is a %tag tag, however it can be changed to suite the theme requirements.', [
'%tag' => '<' . $bundle['settings']['tag'] . '>',
]),
'#options' => array_combine([
'i',
'span',
'div',
], [
'i',
'span',
'div',
]),
'#default_value' => $bundle['settings']['tag'],
];
}
}