function theme_fivestar_formatter_default in Fivestar 6
Same name and namespace in other branches
- 8 includes/fivestar.theme.inc \theme_fivestar_formatter_default()
- 6.2 includes/fivestar.field.inc \theme_fivestar_formatter_default()
- 7.2 includes/fivestar.theme.inc \theme_fivestar_formatter_default()
Theme function for 'default' fivestar field formatter.
File
- ./
fivestar_field.inc, line 263 - Provides CCK integration for fivestar module
Code
function theme_fivestar_formatter_default($element) {
if (!isset($element['#item']['rating'])) {
$element['#item']['rating'] = 0;
}
if (empty($element['#item']['stars'])) {
$element['#item']['stars'] = 5;
}
return theme('fivestar_static', $element['#item']['rating'], $element['#item']['stars']);
}