function document_mail_tokens in Document 8.x
Same name and namespace in other branches
- 6 document.inc \document_mail_tokens()
- 7 document.inc \document_mail_tokens()
1 call to document_mail_tokens()
- document_mail in ./
document.module - Implementation of hook_mail().
File
- ./
document.inc, line 290
Code
function document_mail_tokens($account, $node, $language) {
global $base_url;
$node_link = 'node/' . $node->nid;
$tokens = array(
'!username' => $account->name,
'!doc_link' => l($node->document_url, $node->document_url),
'!node_title' => $node->title,
'!node_title_link' => l($node->title, $node_link),
'!node_link' => l($node_link, $node_link),
'!site' => variable_get('site_name', 'Drupal'),
'!uri' => $base_url,
'!uri_brief' => preg_replace('!^https?://!', '', $base_url),
'!mailto' => $account->mail,
'!date' => format_date(time(), 'medium', '', NULL, $language->language),
);
return $tokens;
}