function theme_fivestar in Fivestar 5
Same name and namespace in other branches
- 8 includes/fivestar.theme.inc \theme_fivestar()
- 6.2 fivestar.module \theme_fivestar()
- 6 fivestar.module \theme_fivestar()
- 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"> </div>';
}
elseif ($element['#labels_enable']) {
$element['#description'] = '<div class="fivestar-summary"> </div>';
}
}
return theme('form_element', $element, $element['#children']);
}