Code: Select all
function garland_separate_terms($node_taxonomy) {
if ($node_taxonomy) {
//separating terms by vocabularies
foreach ($node_taxonomy AS $term) {
$links[$term->vid]['taxonomy_term_'. $term->tid] = array(
'title' => $term->name,
'href' => taxonomy_term_path($term),
'attributes' => array(
'rel' => 'tag',
'title' => strip_tags($term->description)
),
);
}
//theming terms out
foreach ($links AS $key => $vid) {
$terms[$key] = theme_links($vid);
}
}
return $terms;
}