function fivestar_property_info_callback in Fivestar 7.2
Callback to alter the property info of fivestar fields.
1 call to fivestar_property_info_callback()
- _fivestar_get_microdata_property_info in includes/
fivestar.field.inc - Get microdata attributes for Fivestar field.
1 string reference to 'fivestar_property_info_callback'
- fivestar_field_info in includes/
fivestar.field.inc - Implements hook_field_info().
File
- includes/
fivestar.field.inc, line 789 - Provides CCK integration for fivestar module.
Code
function fivestar_property_info_callback(&$info, $entity_type, $field, $instance, $field_type) {
$name = $field['field_name'];
$property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$name];
$property['getter callback'] = '_fivestar_field_property_values';
$property['property info'] = array(
'average_rating' => array(
'label' => t('Average Rating'),
'type' => 'text',
'microdata' => TRUE,
),
'user_rating' => array(
'label' => t('User\'s Rating'),
'type' => 'text',
'microdata' => TRUE,
),
'rating_count' => array(
'label' => t('Rating count'),
'type' => 'text',
'microdata' => TRUE,
),
);
}