You are here

function theme_choices_radiobtn in Poll Improved 7

1 theme call to theme_choices_radiobtn()
choices_field_formatter_view in modules/choices/choices.module
Implements hook_field_formatter_view().

File

modules/choices/theme/choices.theme.inc, line 26

Code

function theme_choices_radiobtn($variables) {
  $entity_id = intval($variables['element']['#entity_id']);
  $delta = intval($variables['element']['#delta']);
  $vote_count = isset($variables['element']['#votes_count']) ? strip_tags($variables['element']['#votes_count']) : NULL;
  $txt = strip_tags($variables['element']['#txt']);
  $output = "<input type='radio' class='choice' name='choice' id='pollim-{$entity_id}-{$delta}' value='{$delta}' entityid='{$entity_id}' />";
  $output .= "<label for='pollim-{$entity_id}-{$delta}'>";
  $output .= !empty($vote_count) ? "<span class='choice-votecount'> {$vote_count}</span>" : '';
  $output .= "{$txt}</label>";
  return $output;
}