You are here

function theme_fivestar_static_element in Fivestar 6.2

Same name and namespace in other branches
  1. 5 fivestar.module \theme_fivestar_static_element()
  2. 6 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
Form builder; Build a custom Fivestar rating widget with arbitrary settings.
fivestar_static in ./fivestar.module
Retreive and print out a static display of stars for a piece of content.

File

./fivestar.module, line 1157
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;
}