You are here

function theme_fivestar_select in Fivestar 6.2

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

Theme the straight HTML version of the fivestar select list. This is used to remove the wrapping 'form-item' div from the select list.

1 theme call to theme_fivestar_select()
fivestar_expand in ./fivestar.module
Process callback for fivestar_element -- see fivestar_element()

File

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

Code

function theme_fivestar_select($element) {
  $select = '';
  $size = $element['#size'] ? ' size="' . $element['#size'] . '"' : '';
  _form_set_class($element, array(
    'form-select',
  ));
  $multiple = isset($element['#multiple']) && $element['#multiple'];
  return '<select name="' . $element['#name'] . '' . ($multiple ? '[]' : '') . '"' . ($multiple ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) . ' id="' . $element['#id'] . '" ' . $size . '>' . form_select_options($element) . '</select>';
}