Skip to content

Commit

Permalink
Use get_the_title() instead of $post->title, because there could be '…
Browse files Browse the repository at this point in the history
…the_title' filters
  • Loading branch information
tivnet committed Sep 23, 2013
1 parent 97b1e17 commit c401ac9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/single-product-reviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

echo '<div class="star-rating" title="'.sprintf(__( 'Rated %s out of 5', 'woocommerce' ), $average ).'"><span style="width:'.( ( $average / 5 ) * 100 ) . '%"><strong itemprop="ratingValue" class="rating">'.$average.'</strong> '.__( 'out of 5', 'woocommerce' ).'</span></div>';

echo '<h2>'.sprintf( _n('%s review for %s', '%s reviews for %s', $count, 'woocommerce'), '<span itemprop="ratingCount" class="count">'.$count.'</span>', wptexturize($post->post_title) ).'</h2>';
echo '<h2>'.sprintf( _n('%s review for %s', '%s reviews for %s', $count, 'woocommerce'), '<span itemprop="ratingCount" class="count">'.$count.'</span>', wptexturize(get_the_title()) ).'</h2>';

echo '</div>';

Expand Down Expand Up @@ -66,7 +66,7 @@

else :

$title_reply = __( 'Be the first to review', 'woocommerce' ).' &ldquo;'.$post->post_title.'&rdquo;';
$title_reply = __( 'Be the first to review', 'woocommerce' ).' &ldquo;'.get_the_title().'&rdquo;';

echo '<p class="noreviews">' . sprintf( __( 'There are no reviews yet, would you like to %s submit yours%s?', 'woocommerce' ), '<a href="#review_form" class="inline show_review_form" title="' . __( 'Add Your Review', 'woocommerce' ) . '">', '</a>' ) . '</p>';

Expand Down

0 comments on commit c401ac9

Please sign in to comment.