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
63bf50f2
Commit
63bf50f2
authored
Apr 15, 2008
by
Matthias Hutterer
Browse files
added token integration
parent
f0cce5f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
email.module
email.module
+25
-0
No files found.
email.module
View file @
63bf50f2
...
...
@@ -354,4 +354,29 @@ function email_mail_page_form_submit($form_id, $edit) {
// Jump to home page rather than back to contact page to avoid contradictory messages if flood control has been activated.
return
'node/'
.
$node
->
nid
;
}
/**
* Token Integration
*/
/**
* Implementation of hook token_list
*/
function
email_token_list
(
$type
=
'all'
)
{
if
(
$type
==
'field'
||
$type
==
'all'
)
{
$tokens
[
'email'
][
'email'
]
=
t
(
"Email Address"
);
return
$tokens
;
}
}
/**
* Implementation of hook token_values
*/
function
email_token_values
(
$type
,
$object
=
NULL
,
$options
=
array
())
{
if
(
$type
==
'field'
)
{
$item
=
$object
[
0
];
$tokens
[
'email'
]
=
check_plain
(
$item
[
'email'
]);
return
$tokens
;
}
}
?>
\ No newline at end of file
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