function workflow_extensions_token_list in Workflow Extensions 6
Same name and namespace in other branches
- 7 workflow_extensions.module \workflow_extensions_token_list()
Implementation of hook_token_list().
Note: [workflow-new-state-name] is in fact a pseudo-token, but the user doesn't have to know that!
File
- ./
workflow_extensions.module, line 478 - UI-related improvements to the Workflow module and tokens for Rules.
Code
function workflow_extensions_token_list($context = 'all') {
if (module_exists('workflow') && in_array($context, array(
'workflow',
'node',
'all',
))) {
$tokens['workflow']['workflow-new-state-name'] = 'New state of content';
$tokens['workflow']['workflow-state-age'] = 'Seconds elapsed since last state change';
}
if ($context == 'node' || $context == 'all') {
$tokens['node']['mod-since-seconds'] = 'Seconds elapsed since last modification';
}
return $tokens;
}