You are here

function invisimail_field_formatter_info in Invisimail 7

Same name and namespace in other branches
  1. 6 invisimail.module \invisimail_field_formatter_info()

Implements hook_field_formatter_info().

File

./invisimail.module, line 401
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_field_formatter_info() {
  foreach (invisimail_get_encoders() as $encoder => $encoder_info) {
    $formats['invisimail_' . $encoder] = array(
      'label' => t('Invisimail: @encoder', array(
        '@encoder' => $encoder_info['label'],
      )),
      'field types' => array(
        'email',
      ),
      'settings' => $encoder_info['default settings'] + array(
        'encoder' => $encoder,
      ),
    );
  }
  return $formats;
}