function scheduler_token_values in Scheduler 6
Implementation of hook_token_values().
File
- ./
scheduler.module, line 1043
Code
function scheduler_token_values($type, $object = NULL, $options = array()) {
if (!function_exists("token_get_date_token_values") || !function_exists("token_get_date_token_info")) {
return array();
}
if ($type == 'node') {
$tokens = array();
$node = $object;
if (isset($node->publish_on)) {
$tokens += token_get_date_token_values($node->publish_on, 'scheduler-publish-');
}
if (isset($node->unpublish_on)) {
$tokens += token_get_date_token_values($node->unpublish_on, 'scheduler-unpublish-');
}
return $tokens;
}
}