You are here

function fivestar_microdata_suggestions in Fivestar 7.2

Same name and namespace in other branches
  1. 8 fivestar.module \fivestar_microdata_suggestions()

Implements hook_microdata_suggestions().

File

./fivestar.module, line 67

Code

function fivestar_microdata_suggestions() {
  $mappings = array();

  // Add the review mapping for Schema.org.
  $mappings['fields']['fivestar']['schema.org'] = array(
    '#itemprop' => array(
      'aggregateRating',
    ),
    '#is_item' => TRUE,
    '#itemtype' => array(
      'http://schema.org/AggregateRating',
    ),
    'average_rating' => array(
      '#itemprop' => array(
        'ratingValue',
      ),
    ),
    'rating_count' => array(
      '#itemprop' => array(
        'ratingCount',
      ),
    ),
  );
  return $mappings;
}