You are here

function _glossify_taxonomy_settings in Glossify 7.4

The settings for configuring the glossify taxonomy filter.

1 string reference to '_glossify_taxonomy_settings'
glossify_filter_info in ./glossify.module
Implements hook_filter_info().

File

./glossify.module, line 98
Glossify module.

Code

function _glossify_taxonomy_settings($form, $form_state, $filter, $format, $defaults) {
  $filter->settings += $defaults;
  $vocabs = array();
  foreach (taxonomy_get_vocabularies() as $vocab) {
    $vocabs[$vocab->vid] = $vocab->name;
  }
  $settings['glossify_taxonomy_case_sensitivity'] = array(
    '#type' => 'checkbox',
    '#title' => t('Case sensitive'),
    '#description' => t('Whether or not the match is case sensitive.'),
    '#default_value' => $filter->settings['glossify_taxonomy_case_sensitivity'],
  );
  $settings['glossify_taxonomy_first_only'] = array(
    '#type' => 'checkbox',
    '#title' => t('First match only'),
    '#description' => t('Match and link only the first occurance.'),
    '#default_value' => $filter->settings['glossify_taxonomy_first_only'],
  );
  $settings['glossify_taxonomy_tooltips'] = array(
    '#type' => 'checkbox',
    '#title' => t('Tool tips'),
    '#description' => t('Enable tooltips displaying the taxonomy term description when hovering the link.'),
    '#default_value' => $filter->settings['glossify_taxonomy_tooltips'],
  );
  $settings['glossify_taxonomy_vocabs'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Taxonomy vocabularies'),
    '#description' => t('Select the taxonomy vocabularies who\'s terms should be linked to their term page.'),
    '#options' => $vocabs,
    '#default_value' => $filter->settings['glossify_taxonomy_vocabs'],
  );
  return $settings;
}