function publication_date_token_info_alter in Publication Date 7.2
Same name and namespace in other branches
- 8.2 publication_date.tokens.inc \publication_date_token_info_alter()
- 8 publication_date.tokens.inc \publication_date_token_info_alter()
- 7 publication_date.tokens.inc \publication_date_token_info_alter()
Implements hook_token_info_alter().
File
- ./
publication_date.tokens.inc, line 11 - Builds placeholder replacement tokens for node-related data.
Code
function publication_date_token_info_alter(&$data) {
$data['tokens']['node']['published'] = array(
'name' => t("Date published"),
'description' => t("The date the node was first published."),
'type' => 'date',
);
$data['tokens']['node']['published_or_now'] = array(
'name' => t("Date published"),
'description' => t("The date the node was first published, or the current time if never published."),
'type' => 'date',
);
$data['tokens']['node']['published_or_created'] = array(
'name' => t("Date published"),
'description' => t("The date the node was first published, or the date created if never published."),
'type' => 'date',
);
$data['tokens']['node']['published_or_changed'] = array(
'name' => t("Date published"),
'description' => t("The date the node was first published, or the date modified if never published."),
'type' => 'date',
);
}