function custom_breadcrumbs_token_types in Custom Breadcrumbs 6.2
Same name and namespace in other branches
- 7.2 custom_breadcrumbs.module \custom_breadcrumbs_token_types()
Prepares some common contexts for token substitution.
Parameters
$objs: An array of objects to be used in token replacement. Array keys indicate type of object.
Return value
$types An array of substitution classes for token_replace_multiple().
2 calls to custom_breadcrumbs_token_types()
- custom_breadcrumbs_taxonomy_generate_breadcrumb in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.inc - Generates a breadcrumb from the taxonomy hierarchy of the term id or vocab id. This will only be called if custom_breadcrumbs_taxonomy_use_hierarchy has been enabled.
- _custom_breadcrumbs_get_breadcrumb in ./
custom_breadcrumbs.module - Gets the custom breadcrumb.
File
- ./
custom_breadcrumbs.module, line 474 - Provide custom breadcrumbs for node-type pages and base functionality for submodules to add custom breadcrumbs for other types of pages.
Code
function custom_breadcrumbs_token_types($objs = array()) {
if (!isset($objs['user'])) {
global $user;
if ($user->uid) {
$user = user_load(array(
'uid' => $user->uid,
));
}
$objs['user'] = $user;
}
$objs['global'] = NULL;
return $objs;
}