Making WordPress.org

Changeset 1354


Ignore:
Timestamp:
02/28/2015 01:39:08 AM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Specify reviewed item for schema.org's AggregateRating.

See https://developers.google.com/webmasters/structured-data/testing-tool?url=https%253A%252F%252Fwordpress.org%252Fthemes%252Fminnow%252F

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/content-single.php

    r1348 r1354  
    102102        <div class="theme-meta">
    103103            <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
     104                <meta itemprop="itemReviewed" content="<?php echo esc_attr( $theme->name ); ?>" />
    104105                <meta itemprop="ratingValue" content="<?php echo esc_attr( number_format_i18n( $theme->rating / 20, 1 ) ); ?>"/>
    105106                <meta itemprop="ratingCount" content="<?php echo esc_attr( $theme->num_ratings ); ?>"/>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php

    r1348 r1354  
    5656            <div class="theme-meta">
    5757                <div class="theme-ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
     58                    <meta itemprop="itemReviewed" content="{{ data.name }}" />
    5859                    <meta itemprop="ratingValue" content="{{ (data.rating/20).toFixed(1) }}"/>
    5960                    <meta itemprop="ratingCount" content="{{ data.num_ratings }}"/>
Note: See TracChangeset for help on using the changeset viewer.