Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
email
Commits
db88b73d
Commit
db88b73d
authored
Aug 17, 2010
by
Matthias Hutterer
Browse files
added plain text formatter
parent
74797132
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
email.module
email.module
+11
-1
No files found.
email.module
View file @
db88b73d
...
...
@@ -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'
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment