You are here

function theme_fivestar_static_element in Fivestar 6

Same name and namespace in other branches
  1. 5 fivestar.module \theme_fivestar_static_element()
  2. 6.2 fivestar.module \theme_fivestar_static_element()
  3. 7.2 includes/fivestar.theme.inc \theme_fivestar_static_element()

Display a static fivestar value as stars with a title and description.

2 theme calls to theme_fivestar_static_element()
fivestar_custom_widget in ./fivestar.module
fivestar_static in ./fivestar.module

File

./fivestar.module, line 1470
A simple n-star voting widget, usable in other forms.

Code

function theme_fivestar_static_element($value, $title = NULL, $description = NULL) {
  $output = '';
  $output .= '<div class="fivestar-static-form-item">';
  $element = array(
    '#type' => 'item',
    '#title' => $title,
    '#description' => $description,
  );
  $output .= theme('form_element', $element, $value);
  $output .= '</div>';
  return $output;
}