Skip to content

Commit

Permalink
consistent title on rating
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster committed Jan 2, 2013
1 parent 843614f commit 1622b7b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/js/admin/editor_plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion classes/widgets/class-wc-widget-recent-reviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function widget( $args, $instance ) {

$rating = intval( get_comment_meta( $comment->comment_ID, 'rating', true ) );

$rating_html = '<div class="star-rating" title="' . $rating . '">
$rating_html = '<div class="star-rating" title="' . sprintf(__( 'Rated %d out of 5', 'woocommerce' ), $rating) . '">
<span style="width:' . ( $rating * $star_size ) . 'px">' . $rating . ' ' . __( 'out of 5', 'woocommerce' ) . '</span>
</div>';

Expand Down
2 changes: 1 addition & 1 deletion templates/single-product/review.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<?php if ( get_option('woocommerce_enable_review_rating') == 'yes' ) : ?>

<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="star-rating" title="<?php echo sprintf(__( 'Rated %s out of 5', 'woocommerce' ), $rating) ?>">
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="star-rating" title="<?php echo sprintf(__( 'Rated %d out of 5', 'woocommerce' ), $rating) ?>">
<span style="width:<?php echo intval( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ) * 16; ?>px"><span itemprop="ratingValue"><?php echo intval( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ); ?></span> <?php _e( 'out of 5', 'woocommerce' ); ?></span>
</div>

Expand Down

0 comments on commit 1622b7b

Please sign in to comment.