function taxonomy_list_block_view in Taxonomy List 7
Implementation of hook_block_view().
File
- ./
taxonomy_list.module, line 955 - List all terms in a vocabulary.
Code
function taxonomy_list_block_view($delta = '') {
// $delta is the vocabulary id.
$voc = taxonomy_vocabulary_load($delta);
$block['subject'] = t('Terms in @name', array(
'@name' => $voc->name,
));
$max_depth = variable_get('taxonomy_list_block_max_depth_' . $delta, 2);
$tree = taxonomy_list_get_tree($delta, 0, 'block', $max_depth);
$block['content'] = theme('taxonomy_list_block', array(
'terms' => $tree,
));
return $block;
}