function _custom_breadcrumbs_taxonomy_term_breadcrumb_name in Custom Breadcrumbs 6.2
Same name and namespace in other branches
- 7.2 custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module \_custom_breadcrumbs_taxonomy_term_breadcrumb_name()
Constructs a name to display in the admin screen from the taxonomy term.
Parameters
$breadcrumb: The breadcrumb object.
Return value
A text string that will be used as the breadcrumb name.
1 string reference to '_custom_breadcrumbs_taxonomy_term_breadcrumb_name'
- custom_breadcrumbs_taxonomy_cb_breadcrumb_info in custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module - Implements hook_cb_breadcrumb_info().
File
- custom_breadcrumbs_taxonomy/
custom_breadcrumbs_taxonomy.module, line 74 - This module implements taxonomy_based breadcrumbs using a hybrid of methods developed for the custom_breadcrumbs and taxonomy_breadcrumbs modules. Breadcrumbs are provided for node and taxonomy term pages. If 'Use taxonomy hierarchy' is…
Code
function _custom_breadcrumbs_taxonomy_term_breadcrumb_name($breadcrumb) {
$names = array();
$parents = taxonomy_get_parents_all($breadcrumb->tid);
while ($parent = array_shift($parents)) {
$names[] = $parent->name;
}
$term = taxonomy_get_term($breadcrumb->tid);
$vocabulary = taxonomy_vocabulary_load($term->vid);
$names[] = $vocabulary->name;
$names = array_reverse($names);
$output = implode('>', $names);
return $output;
}