You are here

function theme_cumulus_weighted in Cumulus 7

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

Themeing function.

1 theme call to theme_cumulus_weighted()
cumulus_block_view in ./cumulus.module
Implements hook_block_view().

File

./cumulus.module, line 194
The brain of Cumulus.

Code

function theme_cumulus_weighted($variables) {
  $terms = $variables['terms'];
  $config = $variables['config'];
  $output = '<tags>';
  foreach ($terms as $term) {

    // assign font size
    $font_size = intval($term->weight) * $config['flash_font_size_interval'] + ($config['flash_font_size'] - $config['flash_font_size_interval']);
    $uri = taxonomy_term_uri($term);
    $output .= l($term->name, $uri['path'], array(
      'absolute' => TRUE,
      'attributes' => array(
        'style' => '"font-size: ' . $font_size . 'px;"',
      ),
    )) . " \n";
  }
  $output .= '</tags>';
  $output = urlencode($output);
  return $output;
}