function taxonomy_manager_tree_term_extra_info in Taxonomy Manager 6
Same name and namespace in other branches
- 6.2 taxonomy_manager.module \taxonomy_manager_tree_term_extra_info()
- 7 taxonomy_manager.module \taxonomy_manager_tree_term_extra_info()
returns some additional information about the term which gets added to the link title
1 call to taxonomy_manager_tree_term_extra_info()
- taxonomy_manager_tree_build_form in ./
taxonomy_manager.module - recursive function for building nested form array with checkboxes and weight forms for each term
File
- ./
taxonomy_manager.module, line 596 - Taxonomy Manager
Code
function taxonomy_manager_tree_term_extra_info($term) {
$extra_info = "";
$term_children_count = _taxonomy_manager_tree_term_children_count($term->tid);
$term_parents = taxonomy_get_parents($term->tid);
if ($term_children_count > 0) {
$extra_info = t('Children Count: ') . $term_children_count;
}
if (count($term_parents) >= 1) {
$extra_info .= !empty($extra_info) ? ' | ' : '';
$extra_info .= t('Direct Parents: ');
$p_names = array();
foreach ($term_parents as $p) {
if ($p->tid != $term->tid) {
$p_names[] = check_plain($p->name);
}
}
$extra_info .= implode(', ', $p_names);
}
return $extra_info;
}