function elf_filter in External Links Filter 6.3
Same name and namespace in other branches
- 5.3 elf.module \elf_filter()
- 5 elf.module \elf_filter()
- 5.2 elf.module \elf_filter()
- 6.2 elf.module \elf_filter()
Implementation of hook_filter().
File
- ./
elf.module, line 44 - Adds an icon to external and mailto links.
Code
function elf_filter($op, $delta = 0, $format = -1, $text = '', $cache_id = 0) {
switch ($op) {
case 'list':
return array(
0 => t('Add an icon to external and mailto links'),
);
case 'process':
return elf_replace($text, $format);
case 'settings':
$form['elf'] = array(
'#type' => 'fieldset',
'#title' => t('External links filter'),
'#collapsible' => TRUE,
);
$form['elf']["elf_nofollow_{$format}"] = array(
'#type' => 'checkbox',
'#title' => t('Add !nofollow to external links', array(
'!nofollow' => '<code>rel="nofollow"</code>',
)),
'#default_value' => variable_get("elf_nofollow_{$format}", FALSE),
);
return $form;
default:
return $text;
}
}