function invisimail_get_encoders in Invisimail 7
Gets a list of all encoders defined in the system.
Encoders are defined by hook_invisimail_encoder_info() and use nearly the same keys as filter definitions. The main difference is the "label" key is used in place of "title" to avoid confusion. All callbacks will be called from common callbacks defined by invisimail.
Return value
array An array of all defined encoders.
3 calls to invisimail_get_encoders()
- invisimail_field_formatter_info in ./
invisimail.module - Implements hook_field_formatter_info().
- invisimail_filter_info in ./
invisimail.module - Implements hook_filter_info().
- invisimail_get_encoder in ./
invisimail.module - Gets the definition of the specified encoder.
File
- ./
invisimail.module, line 22 - 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_get_encoders() {
$encoders =& drupal_static(__FUNCTION__, array());
if (empty($encoders)) {
$encoders = module_invoke_all('invisimail_encoder_info');
foreach (array_keys($encoders) as $encoder) {
$encoders[$encoder] += array(
'settings callback' => '',
'prepare callback' => '',
'encode callback' => '',
'default settings' => array(),
);
}
drupal_alter('invisimail_encoder_info', $encoders);
}
return $encoders;
}