WP Product Review Lite - Version 3.0.7

Version Description

  • 2017-08-29
Download this release

Release Info

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

Code changes from version 3.0.6 to 3.0.7

CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
 
 
 
 
 
 
2
  ### v3.0.6 - 2017-08-29
3
  **Changes:**
4
  * Fix for category name matching when filtering reviews.
1
 
2
+ ### v3.0.7 - 2017-08-29
3
+ **Changes:**
4
+ * Fixed empty links for reviews.
5
+ * Fixed widget and reviews query.
6
+
7
  ### v3.0.6 - 2017-08-29
8
  **Changes:**
9
  * Fix for category name matching when filtering reviews.
assets/css/frontpage.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- Version: 3.0.6
3
  */
4
  #review-statistics {
5
  width: 100%;
1
  /*
2
+ Version: 3.0.7
3
  */
4
  #review-statistics {
5
  width: 100%;
includes/admin/layouts/editor-default-tpl.php CHANGED
@@ -10,7 +10,10 @@
10
  */
11
 
12
  $review = $model->review;
13
- $check = $review->is_active() ? 'yes' : 'no';
 
 
 
14
  ?>
15
  <p class="wppr-active wppr-<?php echo $check; ?>">
16
  <label for="wppr-review-yes"><?php _e( 'Is this a review post ?', 'wp-product-review' ); ?> </label>
@@ -163,7 +166,7 @@ $check = $review->is_active() ? 'yes' : 'no';
163
  </li>
164
  <?php
165
  }
166
- ?>
167
  <?php
168
  if ( ! empty( $links ) ) {
169
  if ( count( $links ) > 1 ) {
@@ -224,15 +227,15 @@ $check = $review->is_active() ? 'yes' : 'no';
224
  <h4><?php _e( 'Product Options', 'wp-product-review' ); ?></h4>
225
  <p><?php _e( 'Insert your options and their grades. Grading must be done from 0 to 100.', 'wp-product-review' ); ?></p>
226
  <div class="cwpr_clearfix">
227
- <?php
228
- if ( $model->wppr_get_option( 'cwppos_show_poweredby' ) === 'yes' || class_exists( 'WPPR_Pro' ) || function_exists( 'wppr_ep_js_preloader' ) ) {
229
- ?>
230
- <a href="#" class="preload_info"><?php _e( 'Preload Info', 'wp-product-review' ); ?></a>
231
- <?php
232
- } else {
233
- echo '<label class="wppr-upsell-label">' . __( ' In order to be able to automatically load your options from another posts, you need the ', 'wp-product-review' ) . '<a href="' . WPPR_UPSELL_LINK . '" target="_blank" >' . __( 'PRO add-on','wp-product-review' ) . '</a></label>';
234
- }
235
- ?>
236
  </div>
237
  <?php do_action( 'wppr_editor_options_before', $model->post ); ?>
238
  <div class="wppr-review-fieldset wppr-review-options-fields">
@@ -339,7 +342,8 @@ $check = $review->is_active() ? 'yes' : 'no';
339
  <br class="clear">
340
 
341
  <?php if ( ! shortcode_exists( 'P_REVIEW' ) ) : ?>
342
- <label class="wppr-upsell-label"> You can use the shortcode <b>[P_REVIEW]</b> to show a review you already made or
 
343
  <b>[wpr_landing]</b> to display a comparision table of them. The shortcodes are available on the <a
344
  target="_blank" href="<?php echo WPPR_UPSELL_LINK; ?>">Pro Bundle</a><br/><br/></label>
345
  <?php endif; ?>
10
  */
11
 
12
  $review = $model->review;
13
+ if ( empty( $review ) ) {
14
+ return;
15
+ }
16
+ $check = $review->is_active() ? 'yes' : 'no';
17
  ?>
18
  <p class="wppr-active wppr-<?php echo $check; ?>">
19
  <label for="wppr-review-yes"><?php _e( 'Is this a review post ?', 'wp-product-review' ); ?> </label>
166
  </li>
167
  <?php
168
  }
169
+ ?>
170
  <?php
171
  if ( ! empty( $links ) ) {
172
  if ( count( $links ) > 1 ) {
227
  <h4><?php _e( 'Product Options', 'wp-product-review' ); ?></h4>
228
  <p><?php _e( 'Insert your options and their grades. Grading must be done from 0 to 100.', 'wp-product-review' ); ?></p>
229
  <div class="cwpr_clearfix">
230
+ <?php
231
+ if ( $model->wppr_get_option( 'cwppos_show_poweredby' ) === 'yes' || class_exists( 'WPPR_Pro' ) || function_exists( 'wppr_ep_js_preloader' ) ) {
232
+ ?>
233
+ <a href="#" class="preload_info"><?php _e( 'Preload Info', 'wp-product-review' ); ?></a>
234
+ <?php
235
+ } else {
236
+ echo '<label class="wppr-upsell-label">' . __( ' In order to be able to automatically load your options from another posts, you need the ', 'wp-product-review' ) . '<a href="' . WPPR_UPSELL_LINK . '" target="_blank" >' . __( 'PRO add-on', 'wp-product-review' ) . '</a></label>';
237
+ }
238
+ ?>
239
  </div>
240
  <?php do_action( 'wppr_editor_options_before', $model->post ); ?>
241
  <div class="wppr-review-fieldset wppr-review-options-fields">
342
  <br class="clear">
343
 
344
  <?php if ( ! shortcode_exists( 'P_REVIEW' ) ) : ?>
345
+ <label class="wppr-upsell-label"> You can use the shortcode <b>[P_REVIEW]</b> to show a review you already made
346
+ or
347
  <b>[wpr_landing]</b> to display a comparision table of them. The shortcodes are available on the <a
348
  target="_blank" href="<?php echo WPPR_UPSELL_LINK; ?>">Pro Bundle</a><br/><br/></label>
349
  <?php endif; ?>
includes/admin/models/class-wppr-query-model.php CHANGED
@@ -234,7 +234,7 @@ class WPPR_Query_Model extends WPPR_Model_Abstract {
234
  }
235
 
236
  if ( isset( $post['category_name'] ) && $post['category_name'] != false ) {
237
- $sub_query_conditions .= $this->db->prepare( " AND wt.slug like '%s%' ", $post['category_name'] );
238
  }
239
 
240
  return $sub_query_conditions;
234
  }
235
 
236
  if ( isset( $post['category_name'] ) && $post['category_name'] != false ) {
237
+ $sub_query_conditions .= $this->db->prepare( ' AND wt.slug = %s ', $post['category_name'] );
238
  }
239
 
240
  return $sub_query_conditions;
includes/class-wppr.php CHANGED
@@ -67,7 +67,7 @@ class WPPR {
67
  */
68
  public function __construct() {
69
  $this->plugin_name = 'wppr';
70
- $this->version = '3.0.6';
71
 
72
  $this->load_dependencies();
73
  $this->set_locale();
67
  */
68
  public function __construct() {
69
  $this->plugin_name = 'wppr';
70
+ $this->version = '3.0.7';
71
 
72
  $this->load_dependencies();
73
  $this->set_locale();
includes/public/layouts/default-tpl.php CHANGED
@@ -18,6 +18,7 @@ if ( $review_object->get_click() == 'image' ) {
18
  }
19
  $links = $review_object->get_links();
20
  $multiple_affiliates_class = 'affiliate-button';
 
21
  if ( count( $links ) > 1 ) {
22
  $multiple_affiliates_class = 'affiliate-button2 affiliate-button';
23
  }
18
  }
19
  $links = $review_object->get_links();
20
  $multiple_affiliates_class = 'affiliate-button';
21
+ $links = array_filter( $links );
22
  if ( count( $links ) > 1 ) {
23
  $multiple_affiliates_class = 'affiliate-button2 affiliate-button';
24
  }
readme.txt CHANGED
@@ -67,6 +67,12 @@ If you wanna learn more about the <a href="http://www.codeinwp.com/blog/fastest-
67
  * fr_FR translation by Jacques Soule of http://wordpress-pour-vous.com/
68
 
69
  == Changelog ==
 
 
 
 
 
 
70
  = 3.0.6 - 2017-08-29 =
71
 
72
  * Fix for category name matching when filtering reviews.
67
  * fr_FR translation by Jacques Soule of http://wordpress-pour-vous.com/
68
 
69
  == Changelog ==
70
+ = 3.0.7 - 2017-08-29 =
71
+
72
+ * Fixed empty links for reviews.
73
+ * Fixed widget and reviews query.
74
+
75
+
76
  = 3.0.6 - 2017-08-29 =
77
 
78
  * Fix for category name matching when filtering reviews.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitfb1debc9069f6a50bb8470a4c450e15a::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit86d46abce0bdea91457932424bfa7b78::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit2e892a79ae5bcc34099773a208effe11::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit9eaef6f6e70aef395c1322c733506e0c::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitfb1debc9069f6a50bb8470a4c450e15a
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitfb1debc9069f6a50bb8470a4c450e15a
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitfb1debc9069f6a50bb8470a4c450e15a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitfb1debc9069f6a50bb8470a4c450e15a', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInitfb1debc9069f6a50bb8470a4c450e15a
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequirefb1debc9069f6a50bb8470a4c450e15a($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequirefb1debc9069f6a50bb8470a4c450e15a($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit86d46abce0bdea91457932424bfa7b78
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit86d46abce0bdea91457932424bfa7b78', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit86d46abce0bdea91457932424bfa7b78', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
+ composerRequire86d46abce0bdea91457932424bfa7b78($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequire86d46abce0bdea91457932424bfa7b78($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit2e892a79ae5bcc34099773a208effe11 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit2e892a79ae5bcc34099773a208effe11 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit2e892a79ae5bcc34099773a208effe11', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit2e892a79ae5bcc34099773a208effe11', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit9eaef6f6e70aef395c1322c733506e0c {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit9eaef6f6e70aef395c1322c733506e0c', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit9eaef6f6e70aef395c1322c733506e0c', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
wp-product-review.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: WP Product Review Lite
16
  * Plugin URI: https://themeisle.com/plugins/wp-product-review/
17
  * Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
18
- * Version: 3.0.6
19
  * Author: ThemeIsle
20
  * Author URI: https://themeisle.com/
21
  * Requires at least: 3.5
@@ -67,7 +67,7 @@ register_deactivation_hook( __FILE__, 'deactivate_wppr' );
67
  */
68
  function run_wppr() {
69
 
70
- define( 'WPPR_LITE_VERSION', '3.0.6' );
71
  define( 'WPPR_PATH', dirname( __FILE__ ) );
72
  define( 'WPPR_SLUG', 'wppr' );
73
  define( 'WPPR_UPSELL_LINK', 'https://themeisle.com/plugins/wp-product-review/' );
15
  * Plugin Name: WP Product Review Lite
16
  * Plugin URI: https://themeisle.com/plugins/wp-product-review/
17
  * Description: The highest rated and most complete review plugin, now with rich snippets support. Easily turn your basic posts into in-depth reviews.
18
+ * Version: 3.0.7
19
  * Author: ThemeIsle
20
  * Author URI: https://themeisle.com/
21
  * Requires at least: 3.5
67
  */
68
  function run_wppr() {
69
 
70
+ define( 'WPPR_LITE_VERSION', '3.0.7' );
71
  define( 'WPPR_PATH', dirname( __FILE__ ) );
72
  define( 'WPPR_SLUG', 'wppr' );
73
  define( 'WPPR_UPSELL_LINK', 'https://themeisle.com/plugins/wp-product-review/' );