You are here

function fontawesome_icon_bundle_configure in Font Awesome Icons 8.2

Same name and namespace in other branches
  1. 8 fontawesome.module \fontawesome_icon_bundle_configure()
  2. 7.3 fontawesome.module \fontawesome_icon_bundle_configure()
  3. 7 fontawesome.module \fontawesome_icon_bundle_configure()
  4. 7.2 fontawesome.module \fontawesome_icon_bundle_configure()

Implements hook_icon_bundle_configure().

File

./fontawesome.module, line 351
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',
      ], [
        'i',
        'span',
      ]),
      '#default_value' => $bundle['settings']['tag'],
    ];
  }
}