WP Product Review Lite - Version 2.9.2

Version Description

Download this release

Release Info

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

Code changes from version 2.9.1 to 2.9.2

admin/functions.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
- require( plugin_dir_path ( __FILE__ ) . 'inc/config.php' );
3
- require( plugin_dir_path ( __FILE__) . 'inc/adminOptionsValidator.php' );
4
- require( plugin_dir_path ( __FILE__ ) . 'inc/adminSanitizer.php' );
5
- require( plugin_dir_path ( __FILE__ ) . 'inc/render.php' );
6
- require( plugin_dir_path ( __FILE__ ) . 'inc/loader.php' );
 
1
  <?php
2
+
3
+ require( plugin_dir_path ( __FILE__ ) . 'inc/config.php' );
4
+ require( plugin_dir_path ( __FILE__) . 'inc/adminOptionsValidator.php' );
5
+ require( plugin_dir_path ( __FILE__ ) . 'inc/adminSanitizer.php' );
6
+ require( plugin_dir_path ( __FILE__ ) . 'inc/render.php' );
7
+ require( plugin_dir_path ( __FILE__ ) . 'inc/loader.php' );
css/dashboard_styles.css CHANGED
@@ -330,7 +330,7 @@ a.preload_info, a.preload_info_upsell {
330
  text-shadow: 0 -1px 0 #4c9021;
331
  text-decoration: none;
332
  float: right;
333
- margin-top: -34px;
334
  padding: 5px 10px
335
  }
336
 
330
  text-shadow: 0 -1px 0 #4c9021;
331
  text-decoration: none;
332
  float: right;
333
+ margin-top: -14px;
334
  padding: 5px 10px
335
  }
336
 
css/frontpage.css CHANGED
@@ -1,4 +1,6 @@
1
-
 
 
2
  #review-statistics{
3
 
4
  font-family:FontAwesome;
@@ -402,4 +404,13 @@
402
  #review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart span {
403
  font-size: 30px;
404
  }
405
- }
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Version: 2.9.2
3
+ */
4
  #review-statistics{
5
 
6
  font-family:FontAwesome;
404
  #review-statistics .review-wrap-up .review-wu-left .review-wu-grade .cwp-review-chart span {
405
  font-size: 30px;
406
  }
407
+ }
408
+
409
+ .cwp-review-percentage.cwp_easyPieChart canvas{
410
+ position: absolute;
411
+ left:0px;
412
+ }
413
+ .cwp-review-percentage.cwp_easyPieChart{
414
+ position: relative;
415
+ text-align: center;
416
+ }
inc/abtesting/abtesting.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class TIABTesting
4
+ {
5
+ private $config;
6
+ private $slug;
7
+
8
+ public function __construct($slug = "")
9
+ {
10
+ $this->loadHooks($slug);
11
+ }
12
+
13
+ private function loadHooks($slug)
14
+ {
15
+ $this->slug = $slug;
16
+ $this->config = apply_filters($this->slug . "_upsell_config", array());
17
+
18
+ foreach ($this->config as $section=>$values) {
19
+ add_filter($this->slug . "_" . $section . "_upsell_text", array($this, "getUpsellText"), 10, 2);
20
+ }
21
+ }
22
+
23
+ public function getUpsellText($default="", $escapeHTML=false)
24
+ {
25
+ $filter = current_filter();
26
+ if (strpos($filter, $this->slug) !== false) {
27
+ $attr = explode("_", str_replace($this->slug . "_", "", $filter));
28
+ if (is_array($attr) && !empty($attr)) {
29
+ $section = $attr[0];
30
+ if (array_key_exists($section, $this->config)) {
31
+ $values = $this->config[$section];
32
+ $html = $values[rand(0, count($values) - 1)];
33
+ return $escapeHTML ? esc_html($html) : $html;
34
+ }
35
+ }
36
+ }
37
+ return $default;
38
+ }
39
+
40
+ public static function writeDebug($msg)
41
+ {
42
+ @mkdir(dirname(__FILE__) . "/tmp");
43
+ file_put_contents(dirname(__FILE__) . "/tmp/log.log", date("F j, Y H:i:s", current_time("timestamp")) . " - " . $msg."\n", FILE_APPEND);
44
+ }
45
+
46
+ }
inc/cwp_metabox.php CHANGED
@@ -163,25 +163,22 @@ function cwp_review_meta_boxes(){
163
 
164
  ?>"/>
165
  </li>
166
-
167
 
168
  </ul>
169
  </div><!-- end .review-settings-group option -->
170
  </div><!-- end .review-settings group -->
171
  <div class="review-settings-notice">
172
  <h4><?php _e("Product Options Setting", "cwppos"); ?></h4>
173
- <div class="preloadInfo"><?php _e("Insert your options and their grades. Grading must be done <b><i>from 0 to 100</i></b>.");
174
- if(cwppos("cwppos_show_poweredby") !== 'yes' && !class_exists('CWP_PR_PRO_Core') && !function_exists('wppr_ep_js_preloader'))
175
- _e(" In order to be able to automatically load your options from another posts, you need the PRO add-on", "cwppos"); ?>
176
- </div><?php if(cwppos("cwppos_show_poweredby") === 'yes' || class_exists('CWP_PR_PRO_Core')|| function_exists('wppr_ep_js_preloader')) { ?>
177
  <a href="#" class="preload_info"><?php _e("Preload Info","cwppos"); ?></a>
178
  <?php
179
  } else {
180
  $pageURL = admin_url('admin.php?page=cwppos_options#tab-upgrade_to_pro');
181
  $pageURL = str_replace(":80","",$pageURL);
182
- ?>
183
- <a href="http://bit.ly/2aYWkgu" target="_blank" class="preload_info_upsell"><?php _e("View Preload features","cwppos"); ?></a>
184
- <?php } ?>
185
  </div><!-- end .review-settings-notice -->
186
  <div class="review-settings-group">
187
  <?php
163
 
164
  ?>"/>
165
  </li>
166
+
167
 
168
  </ul>
169
  </div><!-- end .review-settings-group option -->
170
  </div><!-- end .review-settings group -->
171
  <div class="review-settings-notice">
172
  <h4><?php _e("Product Options Setting", "cwppos"); ?></h4>
173
+ <?php _e("Insert your options and their grades. Grading must be done <b><i>from 0 to 100</i></b>.");
174
+ if(cwppos("cwppos_show_poweredby") === 'yes' || class_exists('CWP_PR_PRO_Core')|| function_exists('wppr_ep_js_preloader')) { ?>
 
 
175
  <a href="#" class="preload_info"><?php _e("Preload Info","cwppos"); ?></a>
176
  <?php
177
  } else {
178
  $pageURL = admin_url('admin.php?page=cwppos_options#tab-upgrade_to_pro');
179
  $pageURL = str_replace(":80","",$pageURL);
180
+ echo apply_filters(WPPR_SLUG."_"."preloader"."_upsell_text", "");
181
+ } ?>
 
182
  </div><!-- end .review-settings-notice -->
183
  <div class="review-settings-group">
184
  <?php
inc/wppr-main.php CHANGED
@@ -88,17 +88,15 @@ function cwppos_calc_overall_rating($id){
88
 
89
  }
90
 
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;
97
-
98
-
99
  $cwp_review_stored_meta = get_post_meta( $id );
100
  $return_string = "";
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 );
@@ -125,21 +123,11 @@ function cwppos_show_review($id = "") {
125
 
126
  }
127
 
128
- $return_string = '<section id="review-statistics" class="article-section" itemscope itemtype="http://schema.org/Product">
129
- <div class="review-wrap-up cwpr_clearfix" >
130
- <div class="cwpr-review-top cwpr_clearfix">
131
- <span itemprop="name">' . $p_name. '</span>
132
-
133
- <span class="cwp-item-price cwp-item">'.$p_string.'</span>
134
- </div><!-- end .cwpr-review-top -->
135
- <div class="review-wu-left">
136
- <div class="rev-wu-image">';
137
-
138
  $product_image = do_shortcode(get_post_meta($id, "cwp_rev_product_image", true));
139
  $imgurl = do_shortcode(get_post_meta($id, "cwp_image_link", true));
140
  $lightbox = "";
141
  $feat_image = wp_get_attachment_url( get_post_thumbnail_id( $id ) );
142
-
143
  if(!empty($product_image)) {
144
  $product_image_cropped = wppr_get_image_id($id,$product_image);
145
  } else {
@@ -148,7 +136,7 @@ function cwppos_show_review($id = "") {
148
  }
149
 
150
  if ($imgurl =="image") {
151
-
152
  //no means no disabled
153
  if(cwppos("cwppos_lighbox") == "no"){
154
  $lightbox = 'data-lightbox="' . $product_image . '"';
@@ -158,10 +146,9 @@ function cwppos_show_review($id = "") {
158
  }else{
159
  $product_image = do_shortcode(get_post_meta($id, "cwp_product_affiliate_link", true));
160
  }
161
- //print_r($product_image);
162
- $return_string .= '<a href="'.$product_image.'" '.$lightbox.' rel="nofollow" target="_blank"><img itemprop="image" src="'.$product_image_cropped.'" alt="'. do_shortcode(get_post_meta($id, "cwp_rev_product_name", true)).'" class="photo photo-wrapup wppr-product-image" /></a>';
163
 
164
  $rating = cwppos_calc_overall_rating($id);
 
165
 
166
  for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
167
  ${"option".$i."_content"} = do_shortcode(get_post_meta($id, "option_".$i."_content", true));
@@ -172,50 +159,61 @@ function cwppos_show_review($id = "") {
172
  }
173
 
174
  $commentNr = get_comments_number($id)+1;
175
- $divrating = $rating['overall']/10;
176
- $return_string .= '</div><!-- end .rev-wu-image -->
177
- <div class="review-wu-grade">
178
- <div class="cwp-review-chart">
179
- <meta itemprop="datePublished" datetime="'.get_the_time("Y-m-d", $id).'">
180
- ';
181
- if(cwppos("cwppos_infl_userreview") != 0 && $commentNr>1) {
182
- $return_string .= '<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="cwp-review-percentage" data-percent="';
183
- $return_string .= $rating['overall'] . '"><span itemprop="ratingValue" class="cwp-review-rating">' . $divrating . '</span><meta itemprop="bestRating" content = "10"/>
184
- <meta itemprop="ratingCount" content="' . $commentNr . '"> </div>';
185
-
186
- }else
187
- {
188
- $return_string .= '<span itemscope itemtype="http://schema.org/Review"><span itemprop="author" itemscope itemtype="http://schema.org/Person" >
189
- <meta itemprop="name" content="'.get_the_author().'"/>
190
- </span><span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product"><meta itemprop="name" content="'.do_shortcode(get_post_meta($id,'cwp_rev_product_name',true)).'"/></span><div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="cwp-review-percentage" data-percent="';
191
- $return_string .= $rating['overall'] . '"><span itemprop="ratingValue" class="cwp-review-rating">' . $divrating . '</span> <meta itemprop="bestRating" content="10"> </div></span>';
192
-
193
-
194
- }
195
- $return_string .='
196
- </div><!-- end .chart -->
197
- </div><!-- end .review-wu-grade -->
198
- <div class="review-wu-bars">';
199
 
200
- for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
201
- if (!empty(${'option'.$i.'_content'}) && isset($rating['option'.$i]) && (!empty($rating['option'.$i]) || $rating['option'.$i] === '0' ) && strtoupper(${'option'.$i.'_content'}) != 'DEFAULT FEATURE '.$i) {
202
- $return_string .= '<div class="rev-option" data-value='.$rating['option'.$i].'>
203
- <div class="cwpr_clearfix">
204
- '.apply_filters("wppr_option_name_html",$id, ${'option'.$i.'_content'} ).'
205
- <span>'.round($rating['option'.$i]/10).'/10</span>
206
- </div>
207
- <ul class="cwpr_clearfix"></ul>
208
- </div>';
209
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
 
 
211
 
212
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
 
214
- $return_string .='
215
- </div><!-- end .review-wu-bars -->
216
- </div><!-- end .review-wu-left -->
217
- <div class="review-wu-right">
218
- <div class="pros">';
219
 
220
  for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
221
  ${"pro_option_".$i} = do_shortcode(get_post_meta($id, "cwp_option_".$i."_pro", true));
@@ -232,32 +230,33 @@ function cwppos_show_review($id = "") {
232
 
233
  }
234
 
235
- $return_string .= apply_filters( 'wppr_review_pros_text',$id, __(cwppos("cwppos_pros_text"), "cwppos")).' <ul>';
236
- for($i=1;$i<=cwppos("cwppos_option_nr");$i++) {
237
- if(!empty(${"pro_option_".$i})) {
238
- $return_string .= ' <li>'.${"pro_option_".$i}.'</li>';
239
- }
240
- }
 
241
 
242
- $return_string .= ' </ul>
243
- </div><!-- end .pros -->
244
- <div class="cons">';
245
- $return_string .= apply_filters( 'wppr_review_cons_text',$id, __(cwppos("cwppos_cons_text"), "cwppos")).' <ul>';
246
 
247
- for($i=1;$i<=cwppos("cwppos_option_nr");$i++){
248
- if(!empty(${"cons_option_".$i})) {
249
- $return_string .= ' <li>'.${"cons_option_".$i}.'</li>';
250
- }
251
 
252
- }
253
 
254
- $return_string .='
255
- </ul>
256
- </div>';
257
- $return_string .='
258
- </div><!-- end .review-wu-right -->
259
- </div><!-- end .review-wrap-up -->
260
- </section><!-- end #review-statistics -->';
261
 
262
  if(cwppos("cwppos_show_poweredby") == 'yes' && !class_exists('CWP_PR_PRO_Core')) {
263
  $return_string.='<div style="font-size:12px;width:100%;float:right"><p style="float:right;">Powered by <a href="http://wordpress.org/plugins/wp-product-review/" target="_blank" rel="nofollow" > WP Product Review</a></p></div>';
@@ -270,24 +269,25 @@ function cwppos_show_review($id = "") {
270
 
271
  if(!empty($affiliate_text2) && !empty($affiliate_link2)) {
272
  $bclass="affiliate-button2 affiliate-button";
273
- }
274
- else
275
  $bclass="affiliate-button";
 
276
 
277
- if(!empty($affiliate_text) && !empty($affiliate_link)) {
278
  $return_string .= '<div class="'.$bclass.'">
279
  <a href="'.$affiliate_link.'" rel="nofollow" target="_blank"><span>'. $affiliate_text.'</span> </a>
280
  </div><!-- end .affiliate-button -->';
281
  }
282
 
283
-
284
-
285
-
286
- if(!empty($affiliate_text2) && !empty($affiliate_link2)) {
287
  $return_string .= '<div class="affiliate-button affiliate-button2">
288
  <a href="'.$affiliate_link2.'" rel="nofollow" target="_blank"><span>'. $affiliate_text2.'</span> </a>
289
  </div><!-- end .affiliate-button -->';
290
  }
 
 
 
 
291
  }
292
 
293
  return $return_string;
@@ -326,7 +326,7 @@ function wppr_get_image_id($post_id, $image_url = "", $size = "thumbnail" ) {
326
  $image_thumb = "";
327
  if(!empty($image_id)){
328
  $image_thumb = wp_get_attachment_image_src($image_id, $size);
329
-
330
  if( $size !== 'thumbnail' ) {
331
  if($image_thumb[0] === $image_url){
332
  $image_thumb = wp_get_attachment_image_src($image_id, "thumbnail");
@@ -406,14 +406,14 @@ function cwppos_pac_print() {
406
 
407
  function cwppos_dynamic_stylesheet() {
408
  $options = cwppos();
409
- //Get theme content width or plugin setting content width
410
  global $content_width;
411
  $c_width = 700;
412
  if ($options['cwppos_widget_size']!="")
413
  $c_width = $options['cwppos_widget_size'];
414
- else
415
  $c_width = $content_width;
416
-
417
  if ($c_width<200)
418
  $c_width = 600;
419
 
@@ -444,7 +444,7 @@ function cwppos_dynamic_stylesheet() {
444
  <?php } ?>
445
 
446
  }
447
-
448
  #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']; ?>; }
449
  .user-comments-grades .comment-meta-grade-bar,
450
  #review-statistics .review-wu-bars ul li{
@@ -455,7 +455,7 @@ function cwppos_dynamic_stylesheet() {
455
  color: <?php echo $options['cwppos_rating_default']; ?>;
456
  }
457
 
458
-
459
  #review-statistics .review-wrap-up .review-wu-right ul li,#review-statistics .review-wu-bars h3, .review-wu-bars span,#review-statistics .review-wrap-up .cwpr-review-top .cwp-item-category a{
460
  color: <?php echo $options['cwppos_font_color']; ?>;
461
  }
88
 
89
  }
90
 
91
+ function cwppos_show_review($id="", $visual="full") {
92
  global $post;
93
  if ( post_password_required($post) ) return false;
94
 
95
+ if ($id=="") {
96
  $id = $post->ID;
97
+ }
 
98
  $cwp_review_stored_meta = get_post_meta( $id );
99
  $return_string = "";
 
100
  if(@$cwp_review_stored_meta['cwp_meta_box_check'][0] == 'Yes' ) {
101
 
102
  wp_enqueue_style( 'cwp-pac-frontpage-stylesheet', WPPR_URL.'/css/frontpage.css',array(),WPPR_LITE_VERSION );
123
 
124
  }
125
 
 
 
 
 
 
 
 
 
 
 
126
  $product_image = do_shortcode(get_post_meta($id, "cwp_rev_product_image", true));
127
  $imgurl = do_shortcode(get_post_meta($id, "cwp_image_link", true));
128
  $lightbox = "";
129
  $feat_image = wp_get_attachment_url( get_post_thumbnail_id( $id ) );
130
+
131
  if(!empty($product_image)) {
132
  $product_image_cropped = wppr_get_image_id($id,$product_image);
133
  } else {
136
  }
137
 
138
  if ($imgurl =="image") {
139
+
140
  //no means no disabled
141
  if(cwppos("cwppos_lighbox") == "no"){
142
  $lightbox = 'data-lightbox="' . $product_image . '"';
146
  }else{
147
  $product_image = do_shortcode(get_post_meta($id, "cwp_product_affiliate_link", true));
148
  }
 
 
149
 
150
  $rating = cwppos_calc_overall_rating($id);
151
+ $divrating = $rating['overall']/10;
152
 
153
  for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
154
  ${"option".$i."_content"} = do_shortcode(get_post_meta($id, "option_".$i."_content", true));
159
  }
160
 
161
  $commentNr = get_comments_number($id)+1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
 
163
+ if ($visual == "full") {
164
+ $return_string .= '<section id="review-statistics" class="article-section" itemscope itemtype="http://schema.org/Product">
165
+ <div class="review-wrap-up cwpr_clearfix" >
166
+ <div class="cwpr-review-top cwpr_clearfix">
167
+ <span itemprop="name">' . $p_name. '</span>
168
+
169
+ <span class="cwp-item-price cwp-item">'.$p_string.'</span>
170
+ </div><!-- end .cwpr-review-top -->
171
+ <div class="review-wu-left">
172
+ <div class="rev-wu-image">
173
+ <a href="'.$product_image.'" '.$lightbox.' rel="nofollow" target="_blank"><img itemprop="image" src="'.$product_image_cropped.'" alt="'. do_shortcode(get_post_meta($id, "cwp_rev_product_name", true)).'" class="photo photo-wrapup wppr-product-image" /></a>
174
+ </div><!-- end .rev-wu-image -->
175
+ <div class="review-wu-grade">';
176
+ }
177
+ if ($visual == "full" || $visual == "yes") {
178
+ $extra_class = $visual == "yes" ? "cwp-chart-embed" : "";
179
+ $return_string .= '<div class="cwp-review-chart ' . $extra_class . '">
180
+ <meta itemprop="datePublished" datetime="'.get_the_time("Y-m-d", $id).'">';
181
+ if(cwppos("cwppos_infl_userreview") != 0 && $commentNr>1) {
182
+ $return_string .= '<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="cwp-review-percentage" data-percent="';
183
+ $return_string .= $rating['overall'] . '"><span itemprop="ratingValue" class="cwp-review-rating">' . $divrating . '</span><meta itemprop="bestRating" content = "10"/>
184
+ <meta itemprop="ratingCount" content="' . $commentNr . '"> </div>';
185
+
186
+ } else {
187
+ $return_string .= '<span itemscope itemtype="http://schema.org/Review"><span itemprop="author" itemscope itemtype="http://schema.org/Person" >
188
+ <meta itemprop="name" content="'.get_the_author().'"/>
189
+ </span><span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product"><meta itemprop="name" content="'.do_shortcode(get_post_meta($id,'cwp_rev_product_name',true)).'"/></span><div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="cwp-review-percentage" data-percent="';
190
+ $return_string .= $rating['overall'] . '"><span itemprop="ratingValue" class="cwp-review-rating">' . $divrating . '</span> <meta itemprop="bestRating" content="10"> </div></span>';
191
+ }
192
 
193
+ $return_string .= '</div><!-- end .chart -->';
194
+ }
195
 
196
+ if ($visual == "full") {
197
+ $return_string .= '</div><!-- end .review-wu-grade -->
198
+ <div class="review-wu-bars">';
199
+
200
+ for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
201
+ if (!empty(${'option'.$i.'_content'}) && isset($rating['option'.$i]) && (!empty($rating['option'.$i]) || $rating['option'.$i] === '0' ) && strtoupper(${'option'.$i.'_content'}) != 'DEFAULT FEATURE '.$i) {
202
+ $return_string .= '<div class="rev-option" data-value='.$rating['option'.$i].'>
203
+ <div class="cwpr_clearfix">
204
+ '.apply_filters("wppr_option_name_html",$id, ${'option'.$i.'_content'} ).'
205
+ <span>'.round($rating['option'.$i]/10).'/10</span>
206
+ </div>
207
+ <ul class="cwpr_clearfix"></ul>
208
+ </div>';
209
+ }
210
+ }
211
 
212
+ $return_string .='</div><!-- end .review-wu-bars -->
213
+ </div><!-- end .review-wu-left -->
214
+ <div class="review-wu-right">
215
+ <div class="pros">';
216
+ }
217
 
218
  for($i=1; $i<=cwppos("cwppos_option_nr"); $i++) {
219
  ${"pro_option_".$i} = do_shortcode(get_post_meta($id, "cwp_option_".$i."_pro", true));
230
 
231
  }
232
 
233
+ if ($visual == "full") {
234
+ $return_string .= apply_filters( 'wppr_review_pros_text',$id, __(cwppos("cwppos_pros_text"), "cwppos")).' <ul>';
235
+ for($i=1;$i<=cwppos("cwppos_option_nr");$i++) {
236
+ if(!empty(${"pro_option_".$i})) {
237
+ $return_string .= ' <li>'.${"pro_option_".$i}.'</li>';
238
+ }
239
+ }
240
 
241
+ $return_string .= ' </ul>
242
+ </div><!-- end .pros -->
243
+ <div class="cons">';
244
+ $return_string .= apply_filters( 'wppr_review_cons_text',$id, __(cwppos("cwppos_cons_text"), "cwppos")).' <ul>';
245
 
246
+ for($i=1;$i<=cwppos("cwppos_option_nr");$i++){
247
+ if(!empty(${"cons_option_".$i})) {
248
+ $return_string .= ' <li>'.${"cons_option_".$i}.'</li>';
249
+ }
250
 
251
+ }
252
 
253
+ $return_string .='
254
+ </ul>
255
+ </div>
256
+ </div><!-- end .review-wu-right -->
257
+ </div><!-- end .review-wrap-up -->
258
+ </section><!-- end #review-statistics -->';
259
+ }
260
 
261
  if(cwppos("cwppos_show_poweredby") == 'yes' && !class_exists('CWP_PR_PRO_Core')) {
262
  $return_string.='<div style="font-size:12px;width:100%;float:right"><p style="float:right;">Powered by <a href="http://wordpress.org/plugins/wp-product-review/" target="_blank" rel="nofollow" > WP Product Review</a></p></div>';
269
 
270
  if(!empty($affiliate_text2) && !empty($affiliate_link2)) {
271
  $bclass="affiliate-button2 affiliate-button";
272
+ } else {
 
273
  $bclass="affiliate-button";
274
+ }
275
 
276
+ if($visual == "full" && !empty($affiliate_text) && !empty($affiliate_link)) {
277
  $return_string .= '<div class="'.$bclass.'">
278
  <a href="'.$affiliate_link.'" rel="nofollow" target="_blank"><span>'. $affiliate_text.'</span> </a>
279
  </div><!-- end .affiliate-button -->';
280
  }
281
 
282
+ if($visual == "full" && !empty($affiliate_text2) && !empty($affiliate_link2)) {
 
 
 
283
  $return_string .= '<div class="affiliate-button affiliate-button2">
284
  <a href="'.$affiliate_link2.'" rel="nofollow" target="_blank"><span>'. $affiliate_text2.'</span> </a>
285
  </div><!-- end .affiliate-button -->';
286
  }
287
+
288
+ if ($visual == "no") {
289
+ $return_string = round($divrating);
290
+ }
291
  }
292
 
293
  return $return_string;
326
  $image_thumb = "";
327
  if(!empty($image_id)){
328
  $image_thumb = wp_get_attachment_image_src($image_id, $size);
329
+
330
  if( $size !== 'thumbnail' ) {
331
  if($image_thumb[0] === $image_url){
332
  $image_thumb = wp_get_attachment_image_src($image_id, "thumbnail");
406
 
407
  function cwppos_dynamic_stylesheet() {
408
  $options = cwppos();
409
+ //Get theme content width or plugin setting content width
410
  global $content_width;
411
  $c_width = 700;
412
  if ($options['cwppos_widget_size']!="")
413
  $c_width = $options['cwppos_widget_size'];
414
+ else
415
  $c_width = $content_width;
416
+
417
  if ($c_width<200)
418
  $c_width = 600;
419
 
444
  <?php } ?>
445
 
446
  }
447
+
448
  #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']; ?>; }
449
  .user-comments-grades .comment-meta-grade-bar,
450
  #review-statistics .review-wu-bars ul li{
455
  color: <?php echo $options['cwppos_rating_default']; ?>;
456
  }
457
 
458
+
459
  #review-statistics .review-wrap-up .review-wu-right ul li,#review-statistics .review-wu-bars h3, .review-wu-bars span,#review-statistics .review-wrap-up .cwpr-review-top .cwp-item-category a{
460
  color: <?php echo $options['cwppos_font_color']; ?>;
461
  }
javascript/admin-review.js CHANGED
@@ -1,7 +1,5 @@
1
  jQuery(document).ready(function(){
2
 
3
- if (ispro.value ==true) jQuery("#cwp_nav li:last").hide();
4
-
5
  var meta_image_frame;
6
 
7
 
1
  jQuery(document).ready(function(){
2
 
 
 
3
  var meta_image_frame;
4
 
5
 
readme.txt CHANGED
@@ -44,11 +44,11 @@ Other notable features :
44
 
45
  1. If you want to to edit the colors, enable/disable the affiliate button, change icons go on the plugin options page.
46
 
47
- 1. All the plugin settings/colors are fully customizable, and you can read more about it <a rel="friend" href="https://themeisle.com/plugins/wp-product-review-lite/?utm_source=wpreadme&utm_medium=readme&utm_campaign=wporg">here</a>
48
 
49
  1. For updates follow https://twitter.com/themeisle.
50
 
51
- If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-wordpress-hosting/" rel="friend">fastest WordPress hosting</a> or which <a href="http://www.codeinwp.com/blog/15-best-wordpress-review-themes/" rel="friend">review themes</a> are playing nice with WP Product review, checkout our blog.
52
 
53
 
54
  **Fortcoming**
@@ -72,6 +72,10 @@ If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-
72
 
73
  == Changelog ==
74
 
 
 
 
 
75
  **New in 2.9.1**
76
 
77
  - Fixed undefined notice on plugin activation
44
 
45
  1. If you want to to edit the colors, enable/disable the affiliate button, change icons go on the plugin options page.
46
 
47
+ 1. All the plugin settings/colors are fully customizable, and you can read more about it <a rel="nofollow" href="https://themeisle.com/plugins/wp-product-review-lite/?utm_source=wpreadme&utm_medium=readme&utm_campaign=wporg">here</a>
48
 
49
  1. For updates follow https://twitter.com/themeisle.
50
 
51
+ If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-wordpress-hosting/" rel="nofollow">fastest WordPress hosting</a> or which <a href="http://www.codeinwp.com/blog/15-best-wordpress-review-themes/" rel="nofollow">review themes</a> are playing nice with WP Product review, checkout our blog.
52
 
53
 
54
  **Fortcoming**
72
 
73
  == Changelog ==
74
 
75
+ **New in 2.9.2**
76
+
77
+ - Fixed shortcode compatibility with pro version
78
+
79
  **New in 2.9.1**
80
 
81
  - Fixed undefined notice on plugin activation
wp-product-review.php CHANGED
@@ -9,10 +9,10 @@
9
  *
10
  * Plugin Name: WP Product Review Lite
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.9.1
13
  * Author: Themeisle
14
  * Author URI: http://themeisle.com/
15
- * Plugin URI: http://themeisle.com/plugins/wp-product-review/
16
  * Requires at least: 3.5
17
  * Tested up to: 4.6
18
  * Stable tag: trunk
@@ -22,8 +22,9 @@
22
  * Domain Path: /languages
23
  */
24
 
25
- define( 'WPPR_LITE_VERSION','2.9.1' );
26
  define( 'WPPR_PATH',dirname( __FILE__ ) );
 
27
  define( 'WPPR_URL',plugins_url( 'wp-product-review' ) );
28
 
29
  if ( wp_get_theme() !== 'Reviewgine Affiliate PRO' ) {
@@ -36,4 +37,23 @@ if ( wp_get_theme() !== 'Reviewgine Affiliate PRO' ) {
36
  include 'inc/cwp_comment.php';
37
  include 'inc/cwp_js_preloader.php';
38
  include 'inc/wppr-main.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
9
  *
10
  * Plugin Name: WP Product Review Lite
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.9.2
13
  * Author: Themeisle
14
  * Author URI: http://themeisle.com/
15
+ * Plugin URI: http://themeisle.com/plugins/wp-product-review-lite/
16
  * Requires at least: 3.5
17
  * Tested up to: 4.6
18
  * Stable tag: trunk
22
  * Domain Path: /languages
23
  */
24
 
25
+ define( 'WPPR_LITE_VERSION','2.9.2' );
26
  define( 'WPPR_PATH',dirname( __FILE__ ) );
27
+ define( 'WPPR_SLUG', "wppr" );
28
  define( 'WPPR_URL',plugins_url( 'wp-product-review' ) );
29
 
30
  if ( wp_get_theme() !== 'Reviewgine Affiliate PRO' ) {
37
  include 'inc/cwp_comment.php';
38
  include 'inc/cwp_js_preloader.php';
39
  include 'inc/wppr-main.php';
40
+ include 'inc/abtesting/abtesting.php';
41
+ }
42
+
43
+ add_filter(WPPR_SLUG . "_upsell_config", "wppr_upsell_config");
44
+ if( class_exists("TIABTesting") ) {
45
+
46
+ $abtesting = new TIABTesting(WPPR_SLUG);
47
+
48
+ }
49
+ function wppr_upsell_config($config)
50
+ {
51
+ return array (
52
+ "preloader" => array(
53
+ __(" In order to be able to automatically load your options from another posts, you need the PRO add-on", "cwppos"). '<a href="http://bit.ly/2bpC3vT" target="_blank" class="preload_info_upsell">'.__("View Preload features","cwppos").'</a>',
54
+ "<i>".__(" You can always import options from other reviews using the preloader feature from the PRO add-on", "cwppos"). '</i><a href="http://bit.ly/2c1QNFK" target="_blank" class="preload_info_upsell">'.__("View more PRO features","cwppos").'</a>',
55
+ "<i>".__(" Build review more easily by importing them from other posts using the preloader feature from the pro addon", "cwppos"). '</i><a href="http://bit.ly/2bT89Sk" target="_blank" class="preload_info_upsell">'.__("View details","cwppos").'</a>',
56
+
57
+ )
58
+ );
59
  }