function extlink_extra_tokens in External Links Extra 7
Same name and namespace in other branches
- 8 extlink_extra.module \extlink_extra_tokens()
File
- ./
extlink_extra.module, line 317 - This module adds some extra functionality to the External Links module.
Code
function extlink_extra_tokens($type, $tokens, array $data = array(), array $options = array()) {
if ($type == 'extlink') {
$replacements = array();
foreach ($tokens as $name => $original) {
switch ($name) {
// Simple key values on the node.
case 'external-url':
$replacements[$original] = $data['extlink']['external_url'];
break;
case 'back-url':
$replacements[$original] = $data['extlink']['back_url'];
break;
case 'timer':
$replacements[$original] = extlink_extra_timer_markup();
break;
}
}
return $replacements;
}
return NULL;
}