You are here

function theme_tagadelic_weighted in Tagadelic 7

Same name and namespace in other branches
  1. 5 tagadelic.module \theme_tagadelic_weighted()
  2. 6 tagadelic.module \theme_tagadelic_weighted()

Theme function that renders the HTML for the tags.

3 theme calls to theme_tagadelic_weighted()
tagadelic_block_view in ./tagadelic.module
Implements hook_block_view().
tagadelic_page_chunk in ./tagadelic.module
Menu callback renders a tagadelic page.
theme_tagadelic_list_box in ./tagadelic.module
Theme function that renders an entry in tagadelic/list/ views.

File

./tagadelic.module, line 320

Code

function theme_tagadelic_weighted(array $vars) {
  $terms = $vars['terms'];
  $output = '';
  foreach ($terms as $term) {
    $output .= l($term->name, 'taxonomy/term/' . $term->tid, array(
      'attributes' => array(
        'class' => array(
          "tagadelic",
          "level" . $term->weight,
        ),
        'rel' => 'tag',
        'title' => $term->description,
      ),
    )) . " \n";
  }
  if (count($terms) >= variable_get('tagadelic_block_tags_' . $vars['voc']->vid, 12)) {
    $output .= theme('more_link', array(
      'title' => t('more tags'),
      'url' => "tagadelic/chunk/{$vars['voc']->vid}",
    ));
  }
  return $output;
}