WP Review - Version 3.2.4

Version Description

  • Fixed text from review box appearing in widgets
  • Fixed PHP notice on reviews with only total rating and no criteria
Download this release

Release Info

Developer MyThemeShop
Plugin Icon 128x128 WP Review
Version 3.2.4
Comparing to
See all releases

Code changes from version 3.2.3 to 3.2.4

assets/css/admin.css CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  .wp-review-field label { width: 15%; display: inline-block; *display: inline; *zoom: 1; }
2
  .wp-review-field select { width: 15em }
3
  .wp-review-field .wp-color-result { margin: 0 }
1
+ /*
2
+ * Plugin Name: WP Review
3
+ * Plugin URI: http://mythemeshop.com/plugins/wp-review/
4
+ * Description: Create reviews! Choose from Stars, Percentages or Points for review scores. Supports Retina Display, WPMU & Unlimited Color Schemes.
5
+ * Author: MyThemesShop
6
+ * Author URI: http://mythemeshop.com/
7
+ */
8
  .wp-review-field label { width: 15%; display: inline-block; *display: inline; *zoom: 1; }
9
  .wp-review-field select { width: 15em }
10
  .wp-review-field .wp-color-result { margin: 0 }
assets/images/wp-review-pro.jpg CHANGED
Binary file
includes/functions.php CHANGED
@@ -99,6 +99,16 @@ function wp_review_get_data() {
99
 
100
 
101
  /* Review item. */
 
 
 
 
 
 
 
 
 
 
102
  if ( $items ) {
103
  $review .= '<ul class="review-list">';
104
  foreach( $items as $item ) {
@@ -108,16 +118,10 @@ function wp_review_get_data() {
108
 
109
  if ( 'star' == $type ) {
110
  $result = $item['wp_review_item_star'] * 20;
111
- $bestresult = '<meta itemprop="best" content="5"/>';
112
- $best = '5';
113
  } elseif( 'point' == $type ) {
114
  $result = $item['wp_review_item_star'] * 10;
115
- $bestresult = '<meta itemprop="best" content="10"/>';
116
- $best = '10';
117
  } else { // percentage
118
  $result = $item['wp_review_item_star'] * 100 / 100;
119
- $bestresult = '<meta itemprop="best" content="100"/>';
120
- $best = '100';
121
  }
122
 
123
  $review .= '<li>';
@@ -307,7 +311,7 @@ function wp_review_inject_data( $content ) {
307
 
308
  $location = apply_filters('wp_review_location', $location, $post->ID);
309
 
310
- if (empty($location) || $location == 'custom') {
311
  return $content;
312
  }
313
  $review = wp_review_get_data();
99
 
100
 
101
  /* Review item. */
102
+ if ( 'star' == $type ) {
103
+ $bestresult = '<meta itemprop="best" content="5"/>';
104
+ $best = '5';
105
+ } elseif( 'point' == $type ) {
106
+ $bestresult = '<meta itemprop="best" content="10"/>';
107
+ $best = '10';
108
+ } else { // percentage
109
+ $bestresult = '<meta itemprop="best" content="100"/>';
110
+ $best = '100';
111
+ }
112
  if ( $items ) {
113
  $review .= '<ul class="review-list">';
114
  foreach( $items as $item ) {
118
 
119
  if ( 'star' == $type ) {
120
  $result = $item['wp_review_item_star'] * 20;
 
 
121
  } elseif( 'point' == $type ) {
122
  $result = $item['wp_review_item_star'] * 10;
 
 
123
  } else { // percentage
124
  $result = $item['wp_review_item_star'] * 100 / 100;
 
 
125
  }
126
 
127
  $review .= '<li>';
311
 
312
  $location = apply_filters('wp_review_location', $location, $post->ID);
313
 
314
+ if (empty($location) || $location == 'custom' || ! is_main_query() || ! in_the_loop()) {
315
  return $content;
316
  }
317
  $review = wp_review_get_data();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Creator's website link: http://mythemeshop.com/plugins/wp-review/
4
  Tags: review, wp review, rating, wp rating, user rating, google rating, star rating, product review
5
  Requires at least: 3.0.1
6
  Tested up to: 4.0
7
- Stable tag: 3.2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -89,6 +89,10 @@ Please disable all plugins and check if rating is working properly. Then you can
89
 
90
  == Changelog ==
91
 
 
 
 
 
92
  = 3.2.3 =
93
  * Added version number to wp_enqueue_ functions
94
  * Added filter to remove banner from options page
4
  Tags: review, wp review, rating, wp rating, user rating, google rating, star rating, product review
5
  Requires at least: 3.0.1
6
  Tested up to: 4.0
7
+ Stable tag: 3.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
89
 
90
  == Changelog ==
91
 
92
+ = 3.2.4 =
93
+ * Fixed text from review box appearing in widgets
94
+ * Fixed PHP notice on reviews with only total rating and no criteria
95
+
96
  = 3.2.3 =
97
  * Added version number to wp_enqueue_ functions
98
  * Added filter to remove banner from options page
wp-review.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP Review
4
  * Plugin URI: http://mythemeshop.com/plugins/wp-review/
5
  * Description: Create reviews! Choose from stars, percentages or points for review scores. Supports Retina Display, WPMU and Unlimited Color Schemes.
6
- * Version: 3.2.3
7
  * Author: MyThemesShop
8
  * Author URI: http://mythemeshop.com/
9
  *
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
26
  if ( ! defined( 'MTS_WP_REVIEW_DB_TABLE' ) ) {
27
 
28
  /* Plugin version */
29
- define( 'WP_REVIEW_PLUGIN_VERSION', '3.2.3' );
30
 
31
  /* Sets the custom db table name. */
32
  define( 'MTS_WP_REVIEW_DB_TABLE', 'mts_wp_reviews' );
3
  * Plugin Name: WP Review
4
  * Plugin URI: http://mythemeshop.com/plugins/wp-review/
5
  * Description: Create reviews! Choose from stars, percentages or points for review scores. Supports Retina Display, WPMU and Unlimited Color Schemes.
6
+ * Version: 3.2.4
7
  * Author: MyThemesShop
8
  * Author URI: http://mythemeshop.com/
9
  *
26
  if ( ! defined( 'MTS_WP_REVIEW_DB_TABLE' ) ) {
27
 
28
  /* Plugin version */
29
+ define( 'WP_REVIEW_PLUGIN_VERSION', '3.2.4' );
30
 
31
  /* Sets the custom db table name. */
32
  define( 'MTS_WP_REVIEW_DB_TABLE', 'mts_wp_reviews' );