You are here

function invisimail_filter_info in Invisimail 7

Implements hook_filter_info().

File

./invisimail.module, line 58
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_info() {
  $filters = array();
  foreach (invisimail_get_encoders() as $encoder => $encoder_info) {
    $filters['invisimail_encode_' . $encoder] = array(
      'title' => t('Encode email addresses: @label', array(
        '@label' => $encoder_info['label'],
      )),
      'description' => t('Email addresses will be obfuscated in the page source to reduce the chances of being harvested by spammers.'),
      'prepare callback' => 'invisimail_encode_prepare',
      'process callback' => 'invisimail_encode_process',
      'settings callback' => 'invisimail_encode_settings',
      'default settings' => array(
        'encoder' => $encoder,
        'chunk' => FALSE,
      ) + $encoder_info['default settings'],
      'tips callback' => 'invisimail_encode_tips',
    );
  }
  return $filters;
}