function workflow_extensions_replace_tokens_raw in Workflow Extensions 7
Same name and namespace in other branches
- 6 workflow_extensions.module \workflow_extensions_replace_tokens_raw()
2 calls to workflow_extensions_replace_tokens_raw()
File
- ./
workflow_extensions.module, line 620 - UI-related improvements to the Workflow module and tokens for Rules.
Code
function workflow_extensions_replace_tokens_raw($tokenized_label, $node = NULL) {
if (module_exists('token')) {
global $user;
$objects['global'] = NULL;
$objects['user'] = $user;
if ($node == NULL && arg(0) == 'node' && is_numeric(arg(1))) {
$node = node_load(arg(1));
// node/%
}
$objects['node'] = $objects['workflow'] = $node;
return token_replace($tokenized_label, $objects);
}
return $tokenized_label;
}