Changeset 3792 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
- Timestamp:
- 08/09/2016 08:20:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r3670 r3792 91 91 $num_ratings = array_sum( $ratings ); 92 92 93 return '<div class="plugin-rating" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">' . 94 '<meta itemprop="ratingCount" content="' . esc_attr( $num_ratings ) . '"/>' . 95 '<meta itemprop="ratingValue" content="' . esc_attr( $rating ) . '"/>' . 96 Template::dashicons_stars( $rating ) . 97 '<span class="rating-count">(' . esc_html( $num_ratings ) . ')</span>' . 98 '</div>'; 93 return 94 '<div class="plugin-rating" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">' . 95 '<meta itemprop="ratingCount" content="' . esc_attr( $num_ratings ) . '"/>' . 96 '<meta itemprop="ratingValue" content="' . esc_attr( $rating ) . '"/>' . 97 Template::dashicons_stars( $rating ) . 98 /* translators: 1: number of ratings */ 99 '<span class="rating-count">(' . sprintf( __( '%1$s <span class="screen-reader-text">total ratings</span>' ), esc_html( $num_ratings ) ) . ')</span>' . 100 '</div>'; 99 101 } 100 102 … … 410 412 $title = sprintf( $title_template, $rating ); 411 413 412 $output = '<div class="wporg-ratings" title="' . esc_attr( $title ) . '" data-title-template="' . esc_attr( $title_template ) . '" data-rating="' . esc_attr( $rating ) . '" style="color:#ffb900;">';414 $output = '<div class="wporg-ratings" aria-label="' . esc_attr( $title ) . '" data-title-template="' . esc_attr( $title_template ) . '" data-rating="' . esc_attr( $rating ) . '" style="color:#ffb900;">'; 413 415 $counter = round( $rating * 2 ); 414 416 for ( $i = 1; $i <= 5; $i++ ) {
Note: See TracChangeset
for help on using the changeset viewer.