You are here

function theme_dimension_theme_value in Dimension 7

Callback to theme an individual value of a dimension field.

Parameters

array $variable:

Return value

string

2 theme calls to theme_dimension_theme_value()
theme_dimension_theme_simple in ./dimension.module
Callback to theme a complete dimension field with all values combined into a single line with the labels shortened to the first character.
theme_dimension_theme_table in ./dimension.module
Callback to theme a complete dimension field with one value per line and a leading label for each of them.

File

./dimension.module, line 320

Code

function theme_dimension_theme_value($variable) {
  $value = $variable['value'];
  $settings = $variable['settings'];
  $container = $variable['label'] ? 'div' : 'span';
  $output = '<' . $container . ' class="dimension">';
  if ($variable['label']) {
    $output .= '<span class="label">' . $settings['label'] . ':</span>';
  }
  $output .= '<span class="value">' . $settings['prefix'] . $value . $settings['suffix'] . '</span>';
  $output .= '</' . $container . '>';
  return $output;
}