You are here

function tagclouds_page_chunk in TagCloud 7

Menu callback renders a tagclouds page.

1 string reference to 'tagclouds_page_chunk'
tagclouds_menu in ./tagclouds.module
Implements hook_menu().

File

./tagclouds.module, line 150

Code

function tagclouds_page_chunk($vocs) {
  if ($vocs == NULL) {
    foreach (taxonomy_get_vocabularies(NULL) as $vocabulary) {
      $vocs[] = $vocabulary->vid;
    }
  }
  $tags = tagclouds_get_tags($vocs, variable_get('tagclouds_levels', 6), variable_get('tagclouds_page_amount', '60'));
  $tags = tagclouds_sort_tags($tags);
  $output = theme('tagclouds_weighted', array(
    'terms' => $tags,
  ));
  if (!$output) {
    return drupal_not_found();
  }
  $output = "<div class=\"wrapper tagclouds\">{$output}</div>";
  return $output;
}