function hansel_action_add_single_link_get_crumbs in Hansel breadcrumbs 7
Same name and namespace in other branches
- 8 hansel.actions.inc \hansel_action_add_single_link_get_crumbs()
Callback for the "add single link" breadcrumb action to generate the crumbs.
Parameters
array $arguments:
Return value
array
2 string references to 'hansel_action_add_single_link_get_crumbs'
- hansel_hansel_action_types in ./
hansel.module - Implements hook_hansel_action_types().
- hook_hansel_action_types in ./
hansel.hooks.inc - Define action types.
File
- ./
hansel.actions.inc, line 19 - Hansel breadcrumb actions
Code
function hansel_action_add_single_link_get_crumbs($arguments) {
global $_hansel_flags;
if (!empty($arguments['skipalias']) && in_array('alias', $_hansel_flags)) {
return array();
}
if (isset($arguments['translate']) && $arguments['translate']) {
$title = t($arguments['title']);
}
else {
$title = $arguments['title'];
}
if (!empty($arguments['remove_tokens'])) {
$title = preg_replace('/\\[[a-z0-9_\\-]+\\]/si', '', $title);
}
return array(
array(
'title' => $title,
'href' => $arguments['path'],
),
);
}