WP Product Review Lite - Version 2.7.2

Version Description

Download this release

Release Info

Developer codeinwp
Plugin Icon WP Product Review Lite
Version 2.7.2
Comparing to
See all releases

Code changes from version 2.6.9 to 2.7.2

css/cwppos-widget.css CHANGED
@@ -3,7 +3,7 @@
3
  .cwp-popular-review { position: relative; border-bottom: 1px solid #ddd; margin: 0; padding: 15px 0 !important;}
4
 
5
  .cwp-popular-review .cwp-review-chart canvas, .cwp-popular-review .cwp-review-chart span { width: 40px!important; height: 40px!important; line-height: 2.3; }
6
- .cwp-popular-review .cwp-review-chart .cwp-review-percentage { top: -1px; left: -1px; }
7
  .cwp-popular-review .cwp-review-chart { border: 0 solid #fff; width: 40px; height: 40px; top: 56%; margin-top: -22px; }
8
  /* Review Pie Chart Styles */
9
  .cwp-review-chart { float: left;
3
  .cwp-popular-review { position: relative; border-bottom: 1px solid #ddd; margin: 0; padding: 15px 0 !important;}
4
 
5
  .cwp-popular-review .cwp-review-chart canvas, .cwp-popular-review .cwp-review-chart span { width: 40px!important; height: 40px!important; line-height: 2.3; }
6
+ .cwp-popular-review .cwp-review-chart .cwp-review-percentage { top: -1px; left: -1px; width:40px!important;height: 40px !important; }
7
  .cwp-popular-review .cwp-review-chart { border: 0 solid #fff; width: 40px; height: 40px; top: 56%; margin-top: -22px; }
8
  /* Review Pie Chart Styles */
9
  .cwp-review-chart { float: left;
css/frontpage.css CHANGED
@@ -280,13 +280,13 @@
280
 
281
  #cwp-slider-comment .comment-form-default label { }
282
 
283
- #cwp-slider-comment .comment-form-meta-option { width: 100%; float: right; margin-bottom: 7px; }
284
 
285
  #cwp-slider-comment .comment-form-meta-option label { float: left; width: 80%; }
286
 
287
  #cwp-slider-comment .comment-form-meta-option .meta_option_input { float: right; width: 12%; text-align: center; border: none; padding: 0; font-weight: bold; }
288
 
289
- #cwp-slider-comment .comment-form-meta-option .comment_meta_slider { margin-top: 25px; background:#f3f3f3; border: none; height: 7px; box-shadow: inset 0 0 2px rgba(0,0,0,0.3);}
290
 
291
  #cwp-slider-comment .comment-form-meta-option .comment_meta_slider .ui-slider-handle { background: #3baeda; border:none; border-radius: 50%; width: 13px; height: 13px; top: -4px; left: 5px; }
292
 
@@ -353,61 +353,7 @@
353
  margin:10px!important;
354
  }
355
 
356
- @media only screen
357
- and (min-device-width : 320px)
358
- and (max-device-width : 321px) {
359
 
360
- #review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart {
361
- margin-left:10px;
362
- }
363
- #review-statistics .review-wu-bars {
364
- padding : 0 5% 10px 3%;
365
- }
366
-
367
- #review-statistics .review-wrap-up .review-wu-left {
368
- width:300px;
369
-
370
- }
371
-
372
- #review-statistics .review-wrap-up .review-wu-left .review-wu-grade {
373
- width:134px;
374
- }
375
-
376
- #review-statistics .review-wu-bars {
377
- width:274px;
378
- }
379
-
380
- #review-statistics .review-wrap-up .review-wu-right {
381
- max-width: 95%;
382
- }
383
-
384
- }
385
-
386
- @media only screen
387
- and (min-device-width : 360px)
388
- and (max-device-width : 391px) {
389
-
390
- #review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart {
391
- margin-left:25px;
392
- }
393
- #review-statistics .review-wu-bars {
394
- padding : 0 5% 10px 3%;
395
- }
396
-
397
- #review-statistics .review-wrap-up .review-wu-left {
398
- width:340px;
399
-
400
- }
401
-
402
- #review-statistics .review-wrap-up .review-wu-left .review-wu-grade {
403
- width:166px;
404
- }
405
-
406
- #review-statistics .review-wu-bars {
407
- width:309px;
408
- }
409
-
410
- }
411
  @media (max-width: 720px) {
412
  #review-statistics .review-wrap-up .review-wu-left {
413
  width:100%;
@@ -419,29 +365,4 @@ and (max-device-width : 391px) {
419
  #review-statistics .review-wrap-up .review-wu-left .review-wu-grade{
420
  border-right:none;
421
  }
422
- }
423
- @media only screen
424
- and (min-device-width : 374px)
425
- and (max-device-width : 385px) {
426
-
427
- #review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart {
428
- margin-left:35px;
429
- }
430
- #review-statistics .review-wu-bars {
431
- padding : 0 5% 10px 3%;
432
- }
433
-
434
- #review-statistics .review-wrap-up .review-wu-left {
435
- width:350px;
436
-
437
- }
438
-
439
- #review-statistics .review-wrap-up .review-wu-left .review-wu-grade {
440
- width:176px;
441
- }
442
-
443
- #review-statistics .review-wu-bars {
444
- width:319px;
445
- }
446
-
447
- }
280
 
281
  #cwp-slider-comment .comment-form-default label { }
282
 
283
+ #cwp-slider-comment .comment-form-meta-option { width: 100%; float: right; margin-bottom: 7px;position:relative; }
284
 
285
  #cwp-slider-comment .comment-form-meta-option label { float: left; width: 80%; }
286
 
287
  #cwp-slider-comment .comment-form-meta-option .meta_option_input { float: right; width: 12%; text-align: center; border: none; padding: 0; font-weight: bold; }
288
 
289
+ #cwp-slider-comment .comment-form-meta-option .comment_meta_slider { margin-top: 5px; background:#f3f3f3; border: none; height: 7px; box-shadow: inset 0 0 2px rgba(0,0,0,0.3); float:left;width:100%;}
290
 
291
  #cwp-slider-comment .comment-form-meta-option .comment_meta_slider .ui-slider-handle { background: #3baeda; border:none; border-radius: 50%; width: 13px; height: 13px; top: -4px; left: 5px; }
292
 
353
  margin:10px!important;
354
  }
355
 
 
 
 
356
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  @media (max-width: 720px) {
358
  #review-statistics .review-wrap-up .review-wu-left {
359
  width:100%;
365
  #review-statistics .review-wrap-up .review-wu-left .review-wu-grade{
366
  border-right:none;
367
  }
368
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/cwp_latest_products_widget.php CHANGED
@@ -109,6 +109,7 @@ array( 'description' => __( 'This widget displays the latest products based on t
109
  while($cwp_latest_products_loop->have_posts()) : $cwp_latest_products_loop->the_post();
110
 
111
  $product_image = wppr_get_image_id(get_the_ID(),get_post_meta(get_the_ID(), "cwp_rev_product_image", true),'wppr_widget_image');
 
112
  ?>
113
 
114
 
@@ -119,11 +120,11 @@ array( 'description' => __( 'This widget displays the latest products based on t
119
  if ($show_image==true&&!empty($product_image)) {
120
  ?>
121
 
122
- <img class="cwp_rev_image wppr-col" src="<?php echo $product_image;?>"\>
123
  <?php } ?>
124
  <a class="wppr-col" href="<?php the_permalink(); ?>">
125
 
126
- <?php if ($post_type==true) { $titlep = get_post_meta($cwp_latest_products_loop->post->ID, "cwp_rev_product_name", true);echo $titlep; } else the_title(); ?>
127
 
128
  </a>
129
 
109
  while($cwp_latest_products_loop->have_posts()) : $cwp_latest_products_loop->the_post();
110
 
111
  $product_image = wppr_get_image_id(get_the_ID(),get_post_meta(get_the_ID(), "cwp_rev_product_image", true),'wppr_widget_image');
112
+ $product_title = ($post_type==true) ? get_post_meta(get_the_ID(), "cwp_rev_product_name", true) : get_the_title();
113
  ?>
114
 
115
 
120
  if ($show_image==true&&!empty($product_image)) {
121
  ?>
122
 
123
+ <img class="cwp_rev_image wppr-col" src="<?php echo $product_image;?>" alt="<?php echo $product_title; ?>"\>
124
  <?php } ?>
125
  <a class="wppr-col" href="<?php the_permalink(); ?>">
126
 
127
+ <?php echo $product_title; ?>
128
 
129
  </a>
130
 
inc/cwp_top_products_widget.php CHANGED
@@ -106,6 +106,7 @@ array( 'description' => __( 'This widget displays the top products based on thei
106
  while($cwp_top_products_loop->have_posts()) : $cwp_top_products_loop->the_post();
107
 
108
  $product_image = wppr_get_image_id(get_the_ID(),get_post_meta(get_the_ID(), "cwp_rev_product_image", true),'wppr_widget_image');
 
109
  ?>
110
 
111
 
@@ -116,11 +117,11 @@ array( 'description' => __( 'This widget displays the top products based on thei
116
  if ($show_image==true&&!empty($product_image)) {
117
  ?>
118
 
119
- <img class="cwp_rev_image wppr-col" src="<?php echo $product_image;?>"\>
120
  <?php } ?>
121
  <a href="<?php the_permalink(); ?>" class="wppr-col">
122
 
123
- <?php if ($post_type==true) { $titlep = get_post_meta($cwp_top_products_loop->post->ID, "cwp_rev_product_name", true);echo $titlep; } else the_title(); ?>
124
 
125
  </a>
126
 
106
  while($cwp_top_products_loop->have_posts()) : $cwp_top_products_loop->the_post();
107
 
108
  $product_image = wppr_get_image_id(get_the_ID(),get_post_meta(get_the_ID(), "cwp_rev_product_image", true),'wppr_widget_image');
109
+ $product_title = ($post_type==true) ? get_post_meta($cwp_top_products_loop->post->ID, "cwp_rev_product_name", true) : get_the_title();
110
  ?>
111
 
112
 
117
  if ($show_image==true&&!empty($product_image)) {
118
  ?>
119
 
120
+ <img class="cwp_rev_image wppr-col" src="<?php echo $product_image;?>" alt="<?php echo $product_title; ?>"\>
121
  <?php } ?>
122
  <a href="<?php the_permalink(); ?>" class="wppr-col">
123
 
124
+ <?php echo $product_title; ?>
125
 
126
  </a>
127
 
inc/wppr-main.php CHANGED
@@ -69,7 +69,11 @@ function cwppos_calc_overall_rating($id){
69
 
70
  }
71
  if(!empty(${'option'.$i.'_grade'})|| ${'option'.$i.'_grade'} === '0') {
72
- ${'option'.$i.'_grade'} = round((${'option'.$i.'_grade'}*(100-$infl) + ${'comment_meta_option_'.$i}*$infl)/100);
 
 
 
 
73
  $iter++;
74
  $rating['option'.$i] = round(${'option'.$i.'_grade'});
75
  $overall_score+=${'option'.$i.'_grade'};
@@ -87,10 +91,6 @@ function cwppos_calc_overall_rating($id){
87
  function cwppos_show_review($id = "") {
88
  global $post;
89
  if ( post_password_required($post) ) return false;
90
- wp_enqueue_style( 'cwp-pac-frontpage-stylesheet', WPPR_URL.'/css/frontpage.css',array(),WPPR_LITE_VERSION );
91
-
92
- wp_enqueue_script( 'pie-chart', WPPR_URL.'/javascript/pie-chart.js',array("jquery"), WPPR_LITE_VERSION,true );
93
- wp_enqueue_script( 'cwp-pac-main-script', WPPR_URL.'/javascript/main.js',array("jquery",'pie-chart'),WPPR_LITE_VERSION,true );
94
 
95
  if ($id=="")
96
  $id = $post->ID;
@@ -101,6 +101,9 @@ function cwppos_show_review($id = "") {
101
 
102
  if(@$cwp_review_stored_meta['cwp_meta_box_check'][0] == 'Yes' ) {
103
 
 
 
 
104
 
105
  $return_string = '<section id="review-statistics" class="article-section" itemscope itemtype="http://schema.org/Review">
106
  <div class="review-wrap-up cwpr_clearfix" >
@@ -148,7 +151,7 @@ function cwppos_show_review($id = "") {
148
  <div class="review-wu-grade">
149
  <div class="cwp-review-chart">
150
  <meta itemprop="datePublished" datetime="'.get_the_time("Y-m-d", $id).'">
151
- <span itemprop="author" itemscope itemtype="http://schema.org/Person" display="none" >
152
  <meta itemprop="name" content="'.get_the_author().'">
153
  </span>';
154
  if(cwppos("cwppos_infl_userreview") == 0) {
@@ -167,12 +170,11 @@ function cwppos_show_review($id = "") {
167
  <div class="review-wu-bars">';
168
 
169
  for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
170
-
171
  if (!empty(${'option'.$i.'_content'}) && isset($rating['option'.$i]) && (!empty($rating['option'.$i]) || $rating['option'.$i] === '0' ) && strtoupper(${'option'.$i.'_content'}) != 'DEFAULT FEATURE '.$i) {
172
  $return_string .= '<div class="rev-option" data-value='.$rating['option'.$i].'>
173
  <div class="cwpr_clearfix">
174
  '.apply_filters("wppr_option_name_html",$id, ${'option'.$i.'_content'} ).'
175
- <span>'.$rating['option'.$i].'/10</span>
176
  </div>
177
  <ul class="cwpr_clearfix"></ul>
178
  </div>';
@@ -275,6 +277,9 @@ function cwppos_pac_admin_init() {
275
  function wppr_get_image_id($post_id, $image_url = "", $size = "thumbnail" ) {
276
 
277
  global $wpdb;
 
 
 
278
  if(!empty($image_url) && $image_url !== false ) {
279
 
280
  $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url ));
@@ -374,7 +379,7 @@ function cwppos_dynamic_stylesheet() {
374
  $options = cwppos();
375
  ?>
376
  <style type="text/css">
377
- #review-statistics .review-wrap-up .cwpr-review-top { border-top: <?php echo $options['cwppos_reviewboxbd_width']; ?>px solid <?php echo $options['cwppos_reviewboxbd_color']; ?>; }
378
  .user-comments-grades .comment-meta-grade-bar,
379
  #review-statistics .review-wu-bars ul li{
380
  background: <?php echo $options['cwppos_rating_default']; ?>;
69
 
70
  }
71
  if(!empty(${'option'.$i.'_grade'})|| ${'option'.$i.'_grade'} === '0') {
72
+ //if($infl !== 0 ){
73
+ ${'option'.$i.'_grade'} = round((${'option'.$i.'_grade'}*(100-$infl) + ${'comment_meta_option_'.$i}*$infl)/100);
74
+ //}else{
75
+
76
+ //}
77
  $iter++;
78
  $rating['option'.$i] = round(${'option'.$i.'_grade'});
79
  $overall_score+=${'option'.$i.'_grade'};
91
  function cwppos_show_review($id = "") {
92
  global $post;
93
  if ( post_password_required($post) ) return false;
 
 
 
 
94
 
95
  if ($id=="")
96
  $id = $post->ID;
101
 
102
  if(@$cwp_review_stored_meta['cwp_meta_box_check'][0] == 'Yes' ) {
103
 
104
+ wp_enqueue_style( 'cwp-pac-frontpage-stylesheet', WPPR_URL.'/css/frontpage.css',array(),WPPR_LITE_VERSION );
105
+ wp_enqueue_script( 'pie-chart', WPPR_URL.'/javascript/pie-chart.js',array("jquery"), WPPR_LITE_VERSION,true );
106
+ wp_enqueue_script( 'cwp-pac-main-script', WPPR_URL.'/javascript/main.js',array("jquery",'pie-chart'),WPPR_LITE_VERSION,true );
107
 
108
  $return_string = '<section id="review-statistics" class="article-section" itemscope itemtype="http://schema.org/Review">
109
  <div class="review-wrap-up cwpr_clearfix" >
151
  <div class="review-wu-grade">
152
  <div class="cwp-review-chart">
153
  <meta itemprop="datePublished" datetime="'.get_the_time("Y-m-d", $id).'">
154
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person" style="display:none" >
155
  <meta itemprop="name" content="'.get_the_author().'">
156
  </span>';
157
  if(cwppos("cwppos_infl_userreview") == 0) {
170
  <div class="review-wu-bars">';
171
 
172
  for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
 
173
  if (!empty(${'option'.$i.'_content'}) && isset($rating['option'.$i]) && (!empty($rating['option'.$i]) || $rating['option'.$i] === '0' ) && strtoupper(${'option'.$i.'_content'}) != 'DEFAULT FEATURE '.$i) {
174
  $return_string .= '<div class="rev-option" data-value='.$rating['option'.$i].'>
175
  <div class="cwpr_clearfix">
176
  '.apply_filters("wppr_option_name_html",$id, ${'option'.$i.'_content'} ).'
177
+ <span>'.round($rating['option'.$i]/10).'/10</span>
178
  </div>
179
  <ul class="cwpr_clearfix"></ul>
180
  </div>';
277
  function wppr_get_image_id($post_id, $image_url = "", $size = "thumbnail" ) {
278
 
279
  global $wpdb;
280
+ //filter for image size;
281
+ $size = apply_filters("wppr_review_image_size",$size,$post_id);
282
+
283
  if(!empty($image_url) && $image_url !== false ) {
284
 
285
  $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url ));
379
  $options = cwppos();
380
  ?>
381
  <style type="text/css">
382
+ #review-statistics .review-wrap-up div.cwpr-review-top { border-top: <?php echo $options['cwppos_reviewboxbd_width']; ?>px solid <?php echo $options['cwppos_reviewboxbd_color']; ?>; }
383
  .user-comments-grades .comment-meta-grade-bar,
384
  #review-statistics .review-wu-bars ul li{
385
  background: <?php echo $options['cwppos_rating_default']; ?>;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madali
3
  Tags: review, rating, posts, widget, review blogger, review blogging, affiliate, product reviews,plugin, google rating, product review, rating, review, star rating, user rating, wp rating, wp review, google, hreview,rich snippets,seo,snippet
4
  Author URI: https://themeisle.com
5
  Requires at least: 3.5
6
- Tested up to: 4.3
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -33,6 +33,7 @@ Other notable features :
33
  2. How to change dynamically the name of the review -> http://docs.themeisle.com/article/131-how-to-change-dynamically-the-name-of-the-review
34
  3. How to change dynamically the option name format -> http://docs.themeisle.com/article/132-how-to-change-dynamically-the-option-name-format
35
  4. How to change dynamically the pros/cons heading text -> http://docs.themeisle.com/article/133-how-to-change-dynamically-the-pros-cons-heading-text
 
36
 
37
 
38
  ### User Review Enabled
@@ -72,6 +73,24 @@ If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-
72
 
73
  == Changelog ==
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  **New in 2.6.9**
76
 
77
  - Improved design of the featured image
3
  Tags: review, rating, posts, widget, review blogger, review blogging, affiliate, product reviews,plugin, google rating, product review, rating, review, star rating, user rating, wp rating, wp review, google, hreview,rich snippets,seo,snippet
4
  Author URI: https://themeisle.com
5
  Requires at least: 3.5
6
+ Tested up to: 4.4.1
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
33
  2. How to change dynamically the name of the review -> http://docs.themeisle.com/article/131-how-to-change-dynamically-the-name-of-the-review
34
  3. How to change dynamically the option name format -> http://docs.themeisle.com/article/132-how-to-change-dynamically-the-option-name-format
35
  4. How to change dynamically the pros/cons heading text -> http://docs.themeisle.com/article/133-how-to-change-dynamically-the-pros-cons-heading-text
36
+ 5. How to change dynamically the image size for review -> http://docs.themeisle.com/article/135-how-to-change-dynamically-the-image-size-for-review
37
 
38
 
39
  ### User Review Enabled
73
 
74
  == Changelog ==
75
 
76
+ **New in 2.7.2**
77
+
78
+ - Fixed design issues in comments slider
79
+ - Fixed enque of media files when review is not available
80
+ - Fixed alt tags for images in the widgets
81
+
82
+ **New in 2.7.1**
83
+
84
+ - Fixed some design issues.
85
+ - Fixed rating problem on some instalation when display the numerator greater than denominator
86
+ - Added wppr_review_image_size for filter the image size;
87
+
88
+
89
+ **New in 2.7**
90
+
91
+ - Fixed responsive design bugs.
92
+ - Fixed border color and width customization for the review box
93
+
94
  **New in 2.6.9**
95
 
96
  - Improved design of the featured image
wp-product-review.php CHANGED
@@ -9,7 +9,7 @@
9
  *
10
  * Plugin Name: WP Product Review
11
  * Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
12
- * Version: 2.6.9
13
  * Author: Themeisle
14
  * Author URI: https://themeisle.com/
15
  * Plugin URI: https://themeisle.com/plugins/wp-product-review-lite/
@@ -22,7 +22,7 @@
22
  * Domain Path: /languages
23
  */
24
 
25
- define( 'WPPR_LITE_VERSION','2.6.9' );
26
  define( 'WPPR_PATH',dirname( __FILE__ ) );
27
  define( 'WPPR_URL',plugins_url( 'wp-product-review' ) );
28
 
9
  *
10
  * Plugin Name: WP Product Review
11
  * Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
12
+ * Version: 2.7.2
13
  * Author: Themeisle
14
  * Author URI: https://themeisle.com/
15
  * Plugin URI: https://themeisle.com/plugins/wp-product-review-lite/
22
  * Domain Path: /languages
23
  */
24
 
25
+ define( 'WPPR_LITE_VERSION','2.7.2' );
26
  define( 'WPPR_PATH',dirname( __FILE__ ) );
27
  define( 'WPPR_URL',plugins_url( 'wp-product-review' ) );
28