You are here

function fontawesome_icon_bundle_configure in Font Awesome Icons 7

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

Implements hook_icon_bundle_configure().

File

./fontawesome.module, line 76
fontawesome.module 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_LIBRARY) {
    $settings['tag'] = array(
      '#type' => 'select',
      '#title' => t('HTML Markup'),
      '#description' => t('Choose the HTML markup tag that @fontawesome icons should be created with. Typically, this is a %tag tag, however it can be changed to suite the theme requirements.', array(
        '@fontawesome' => FONTAWESOME_NAME,
        '%tag' => '<' . $bundle['settings']['tag'] . '>',
      )),
      '#options' => drupal_map_assoc(array(
        'i',
        'span',
        'div',
      )),
      '#default_value' => $bundle['settings']['tag'],
    );
  }
}