function theme_invisimail_formatter_invisimail in Invisimail 6
File
- ./
invisimail.module, line 333 - 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 theme_invisimail_formatter_invisimail($element) {
// If there's no email address, don't bother trying to encode it.
if ($element['#item']['email'] == '') {
return;
}
if (module_exists('invisimail')) {
return invisimail_ascii_encode($element['#item']['email'], variable_get('invisimail_js_formatter', 0), variable_get('invisimail_link_formatter', 0));
}
else {
return '<a href="mailto:' . $element['#item']['email'] . '">' . check_plain($element['#item']['email']) . '</a>';
}
}