function _word_link_settings in Word Link 7.2
Implements callback_filter_settings().
Filter settings callback for the Word Link filter.
1 string reference to '_word_link_settings'
- word_link_filter_info in ./
word_link.module - Implements hook_filter_info().
File
- ./
word_link.module, line 221
Code
function _word_link_settings($form, &$form_state, $filter, $format, $defaults) {
$filter->settings += $defaults;
$settings['word_link_highlight'] = array(
'#type' => 'checkbox',
'#title' => t('Highlight words.'),
'#description' => t('Highlight found words instead of replace it to links.'),
'#default_value' => $filter->settings['word_link_highlight'],
);
$settings['word_link_wrap_tag'] = array(
'#type' => 'textfield',
'#size' => 9,
'#title' => t('Wrap HTML tag'),
'#description' => t('Enter HTML tag which will be used to wrap word link. Be careful and enter only tag name (e.g. h1).'),
'#default_value' => $filter->settings['word_link_wrap_tag'],
);
$settings['word_link_boundary'] = array(
'#type' => 'checkbox',
'#title' => t('Word boundary'),
'#description' => t('If enabled all words will be converted, even those that are not wrapped by spaces.'),
'#default_value' => $filter->settings['word_link_boundary'],
);
$settings['word_link_tags_except'] = array(
'#type' => 'textfield',
'#title' => t('Disallowed HTML tags'),
'#description' => t('A list of HTML tags that will be ignored. Never enter here tags that are not text. E.g. @tags.', array(
'@tags' => '<img>',
)),
'#default_value' => $filter->settings['word_link_tags_except'],
);
$settings['word_link_content_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Content types'),
'#description' => t('Choose content types in which words will be converted.'),
'#options' => node_type_get_names(),
'#default_value' => $filter->settings['word_link_content_types'],
);
return $settings;
}