function theme_rate_admin_options in Rate 6.2
Same name and namespace in other branches
- 7 rate.admin.inc \theme_rate_admin_options()
Theme the options list in the widget form.
1 theme call to theme_rate_admin_options()
- rate_widget_form in ./
rate.admin.inc - Form for adding and editing widgets.
File
- ./
rate.admin.inc, line 690 - Rating admin
Code
function theme_rate_admin_options($element) {
$header = array(
t('Value'),
t('Label'),
t('Delete'),
);
$rows = array();
foreach ($element as $name => $subelement) {
if (preg_match('/^option([0-9]+)$/', $name, $match)) {
$id = $match[1];
unset($subelement['value' . $id]['#title']);
unset($subelement['label' . $id]['#title']);
unset($subelement['delete' . $id]['#title']);
$rows[] = array(
drupal_render($subelement['value' . $id]),
drupal_render($subelement['label' . $id]),
drupal_render($subelement['delete' . $id]),
);
}
}
return theme('table', $header, $rows);
}