function theme_fivestar_widget in Fivestar 6
Same name and namespace in other branches
- 5 fivestar.module \theme_fivestar_widget()
- 6.2 fivestar.module \theme_fivestar_widget()
Theme an entire fivestar widget, including the submit button and the normal fivestar widget themed in the theme_fivestar() function.
1 theme call to theme_fivestar_widget()
File
- ./
fivestar.module, line 1369 - A simple n-star voting widget, usable in other forms.
Code
function theme_fivestar_widget($form) {
// Only print out the summary if text is being displayed or using rollover text.
if (empty($form['vote']['#description']) && strpos($form['vote']['#prefix'], 'fivestar-labels-hover') === FALSE) {
unset($form['vote']['#description']);
}
$class = 'fivestar-form';
$class .= '-' . (isset($form['vote']['#tag']) ? $form['vote']['#tag'] : 'vote');
$class .= '-' . (isset($form['content_id']['#value']) ? $form['content_id']['#value'] : 0);
$output = '';
$output .= '<div class="' . $class . ' clear-block">';
$output .= drupal_render($form);
$output .= '</div>';
return $output;
}