Commit db88b73d authored by Matthias Hutterer's avatar Matthias Hutterer
Browse files

added plain text formatter

parent 74797132
......@@ -75,6 +75,10 @@ function email_field_formatter_info() {
'label' => t('Email contact form'),
'field types' => array('email'),
),
'plain' => array(
'label' => t('Email plain text'),
'field types' => array('email'),
),
);
if (module_exists('spamspan')) {
$formats += array(
......@@ -106,7 +110,13 @@ function email_field_formatter_view($object_type, $object, $field, $instance, $l
$element[$delta] = l(t('Email contact form'), 'email/'. $object_type .'/'. $ids[0] .'/'. $instance['field_name']);
}
break;
case 'plain':
foreach ($items as $delta => $item) {
$element[$delta] = array('#markup' => check_plain($item['email']));
}
break;
case 'spamspan':
foreach ($items as $delta => $item) {
if (module_exists('spamspan')) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment