You are here

function tagadelic_block_view in Tagadelic 7

Implements hook_block_view().

File

./tagadelic.module, line 379

Code

function tagadelic_block_view($delta = '') {
  $block = array();
  if ($voc = taxonomy_vocabulary_load($delta)) {
    $blocks['subject'] = variable_get('tagadelic_block_title_' . $delta, t('Tags in @voc', array(
      '@voc' => $voc->name,
    )));
    $tags = tagadelic_get_weighted_tags(array(
      $delta,
    ), variable_get('tagadelic_levels', 6), variable_get('tagadelic_block_tags_' . $delta, 12));
    $tags = tagadelic_sort_tags($tags);
    $blocks['content'] = theme('tagadelic_weighted', array(
      'terms' => $tags,
      'voc' => $voc,
    ));

    //return a chunk of 12 tags
  }
  return $blocks;
}