function invisimail_filter in Invisimail 6
Same name and namespace in other branches
- 5 invisimail.module \invisimail_filter()
Implementation of hook_filter().
File
- ./
invisimail.module, line 70 - This module provides a filter that will search content for email addresses and replace them with their ascii equivalents before display. This is not a complete protection from spam harvesters, but it is some help.
Code
function invisimail_filter($op, $delta = 0, $format = -1, $text = '') {
if ($op == 'list') {
return array(
0 => t('Encode email addresses'),
);
}
switch ($delta) {
case 0:
switch ($op) {
case 'description':
return t('Hide email addresses from spam-bots.');
case 'prepare':
return $text;
case 'process':
return invisimail($text, $format);
case 'settings':
$form['invisimail_settings'] = array(
'#type' => 'fieldset',
'#title' => t('Invisimail email address encoding filter'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['invisimail_settings'] += _invisimail_settings($format);
return $form;
}
break;
}
}