Commit 63bf50f2 authored by Matthias Hutterer's avatar Matthias Hutterer
Browse files

added token integration

parent f0cce5f5
...@@ -354,4 +354,29 @@ function email_mail_page_form_submit($form_id, $edit) { ...@@ -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. // Jump to home page rather than back to contact page to avoid contradictory messages if flood control has been activated.
return 'node/'.$node->nid; 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
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