theme_fivestar

5 fivestar.module theme_fivestar($element)
6 fivestar.module theme_fivestar($element)
7 fivestar.theme.inc theme_fivestar($variables)

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

File

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

Code

<?php
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']);
}
?>