You are here

function theme_fivestar in Fivestar 5

Same name and namespace in other branches
  1. 8 includes/fivestar.theme.inc \theme_fivestar()
  2. 6.2 fivestar.module \theme_fivestar()
  3. 6 fivestar.module \theme_fivestar()
  4. 7.2 includes/fivestar.theme.inc \theme_fivestar()

Theme the fivestar form element by adding necessary css and javascript.

File

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

Code

function theme_fivestar($element) {
  if (empty($element['#description'])) {
    if ($element['#feedback_enable']) {
      $element['#description'] = '<div class="fivestar-summary fivestar-feedback-enabled">&nbsp;</div>';
    }
    elseif ($element['#labels_enable']) {
      $element['#description'] = '<div class="fivestar-summary">&nbsp;</div>';
    }
  }
  return theme('form_element', $element, $element['#children']);
}