WP Product Review Lite - Version 3.0.6

Version Description

  • 2017-08-29
Download this release

Release Info

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

Code changes from version 3.0.5 to 3.0.6

CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
 
 
 
 
 
 
2
  ### v3.0.5 - 2017-08-26
3
  **Changes:**
4
  * Fix for review links opening issue.
1
 
2
+ ### v3.0.6 - 2017-08-29
3
+ **Changes:**
4
+ * Fix for category name matching when filtering reviews.
5
+ * Fix for is_active error on null object.
6
+
7
  ### v3.0.5 - 2017-08-26
8
  **Changes:**
9
  * Fix for review links opening issue.
assets/css/frontpage.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- Version: 3.0.5
3
  */
4
  #review-statistics {
5
  width: 100%;
1
  /*
2
+ Version: 3.0.6
3
  */
4
  #review-statistics {
5
  width: 100%;
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 like '%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.5';
71
 
72
  $this->load_dependencies();
73
  $this->set_locale();
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();
includes/public/class-wppr-public.php CHANGED
@@ -85,7 +85,9 @@ class Wppr_Public {
85
  }
86
  } else {
87
  $review = $this->review;
88
- if ( $review->is_active() ) {
 
 
89
  $load = true;
90
  }
91
  }
@@ -287,7 +289,9 @@ class Wppr_Public {
287
  * @return mixed
288
  */
289
  public function display_on_front( $content ) {
290
-
 
 
291
  if ( $this->review->is_active() && is_singular() ) {
292
  $output = '';
293
  $visual = 'full';
@@ -356,7 +360,6 @@ class Wppr_Public {
356
  $review = new WPPR_Review_Model( $comment->comment_post_ID );
357
  if ( empty( $review ) ) {
358
  return;
359
-
360
  }
361
  if ( ! $review->is_active() ) {
362
  return;
@@ -396,6 +399,10 @@ class Wppr_Public {
396
  * @return string Comment text with review.
397
  */
398
  public function show_comment_ratings( $text ) {
 
 
 
 
399
  if ( ! $this->review->is_active() ) {
400
  return $text;
401
  }
@@ -412,7 +419,7 @@ class Wppr_Public {
412
  $return = '';
413
  $return .= '<div class="user-comments-grades">';
414
  foreach ( $options as $k => $option ) {
415
- $return .= '<div class="comment-meta-option">
416
  <p class="comment-meta-option-name">' . $option['name'] . '</p>
417
  <p class="comment-meta-option-grade">' . $option['value'] . '</p>
418
  <div class="cwpr_clearfix"></div>
85
  }
86
  } else {
87
  $review = $this->review;
88
+ if ( empty( $review ) ) {
89
+ $load = false;
90
+ } elseif ( $review->is_active() ) {
91
  $load = true;
92
  }
93
  }
289
  * @return mixed
290
  */
291
  public function display_on_front( $content ) {
292
+ if ( empty( $this->review ) ) {
293
+ return $content;
294
+ }
295
  if ( $this->review->is_active() && is_singular() ) {
296
  $output = '';
297
  $visual = 'full';
360
  $review = new WPPR_Review_Model( $comment->comment_post_ID );
361
  if ( empty( $review ) ) {
362
  return;
 
363
  }
364
  if ( ! $review->is_active() ) {
365
  return;
399
  * @return string Comment text with review.
400
  */
401
  public function show_comment_ratings( $text ) {
402
+
403
+ if ( empty( $this->review ) ) {
404
+ return $text;
405
+ }
406
  if ( ! $this->review->is_active() ) {
407
  return $text;
408
  }
419
  $return = '';
420
  $return .= '<div class="user-comments-grades">';
421
  foreach ( $options as $k => $option ) {
422
+ $return .= '<div class="comment-meta-option">
423
  <p class="comment-meta-option-name">' . $option['name'] . '</p>
424
  <p class="comment-meta-option-grade">' . $option['value'] . '</p>
425
  <div class="cwpr_clearfix"></div>
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.5 - 2017-08-26 =
71
 
72
  * Fix for review links opening issue.
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.
73
+ * Fix for is_active error on null object.
74
+
75
+
76
  = 3.0.5 - 2017-08-26 =
77
 
78
  * Fix for review links opening issue.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitf137aa189ce2b79e78ab9f9810dcd9f8::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitfb1debc9069f6a50bb8470a4c450e15a::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit957927ad2f070fc15c58074fba182039::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit2e892a79ae5bcc34099773a208effe11::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitf137aa189ce2b79e78ab9f9810dcd9f8
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitf137aa189ce2b79e78ab9f9810dcd9f8
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitf137aa189ce2b79e78ab9f9810dcd9f8', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitf137aa189ce2b79e78ab9f9810dcd9f8', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInitf137aa189ce2b79e78ab9f9810dcd9f8
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequiref137aa189ce2b79e78ab9f9810dcd9f8($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequiref137aa189ce2b79e78ab9f9810dcd9f8($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 ComposerAutoloaderInitfb1debc9069f6a50bb8470a4c450e15a
6
  {
7
  private static $loader;
8
 
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
 
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;
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 ComposerAutoloaderInit957927ad2f070fc15c58074fba182039 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit957927ad2f070fc15c58074fba182039 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit957927ad2f070fc15c58074fba182039', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit957927ad2f070fc15c58074fba182039', '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 ComposerAutoloaderInit2e892a79ae5bcc34099773a208effe11 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
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);
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.5
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.5' );
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.6
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.6' );
71
  define( 'WPPR_PATH', dirname( __FILE__ ) );
72
  define( 'WPPR_SLUG', 'wppr' );
73
  define( 'WPPR_UPSELL_LINK', 'https://themeisle.com/plugins/wp-product-review/' );