function tagclouds_page_list in TagCloud 7
Menu callback renders a tagclouds page with listed items: each vocabulary.
1 string reference to 'tagclouds_page_list'
- tagclouds_menu in ./
tagclouds.module - Implements hook_menu().
File
- ./
tagclouds.module, line 174
Code
function tagclouds_page_list($vocs) {
if ($vocs == NULL) {
return drupal_not_found();
}
$output = '';
foreach ($vocs as $vid) {
$vocabulary = taxonomy_vocabulary_load($vid);
if ($vocabulary == FALSE) {
return drupal_not_found();
}
// Clean out vocabulary, so that we don't have to leave security to our
// theme layer.
$vocabulary->description = filter_xss_admin($vocabulary->description);
$vocabulary->name = filter_xss_admin($vocabulary->name);
$tags = tagclouds_get_tags(array(
$vocabulary->vid,
), variable_get('tagclouds_levels', 6), variable_get('tagclouds_page_amount', '60'));
$tags = tagclouds_sort_tags($tags);
$output .= theme('tagclouds_list_box', array(
'vocabulary' => $vocabulary,
'tags' => $tags,
));
}
if (!$output) {
return drupal_not_found();
}
$output = "<div class=\"wrapper tagclouds\">{$output}</div>";
return $output;
}