Site Reviews - Version 5.23.4

Version Description

(2022-04-12) =

  • Fixed compatibility with Oxygen Builder
  • Fixed terms toggle when it's not required in the settings
Download this release

Release Info

Developer geminilabs
Plugin Icon 128x128 Site Reviews
Version 5.23.4
Comparing to
See all releases

Code changes from version 5.23.3 to 5.23.4

compatibility.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
 
 
3
  use GeminiLabs\SiteReviews\Controllers\BlocksController;
4
 
5
  defined('ABSPATH') || exit;
@@ -42,6 +43,18 @@ add_action('members_register_caps', function () {
42
  });
43
  });
44
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  /**
46
  * Exclude the reCAPTCHA script from being defered
47
  * @param array $scriptHandles
1
  <?php
2
 
3
+ use GeminiLabs\SiteReviews\Application;
4
  use GeminiLabs\SiteReviews\Controllers\BlocksController;
5
 
6
  defined('ABSPATH') || exit;
43
  });
44
  });
45
 
46
+ /**
47
+ * Remove Oxygen Builder metabox from reviews
48
+ * @see https://oxygenbuilder.com
49
+ */
50
+ add_action('plugins_loaded', function () {
51
+ global $ct_ignore_post_types;
52
+ if (!empty($ct_ignore_post_types) && is_array($ct_ignore_post_types)) {
53
+ $ct_ignore_post_types[] = Application::POST_TYPE;
54
+ add_filter('pre_option_oxygen_vsb_ignore_post_type_'.Application::POST_TYPE, '__return_true');
55
+ }
56
+ });
57
+
58
  /**
59
  * Exclude the reCAPTCHA script from being defered
60
  * @param array $scriptHandles
languages/site-reviews-en_US.po CHANGED
@@ -432,67 +432,67 @@ msgctxt "admin-text"
432
  msgid "This plugin requires %s or greater in order to work properly."
433
  msgstr "This plugin requires %s or greater in order to work properly."
434
 
435
- #: compatibility.php:26
436
  msgctxt "admin-text"
437
  msgid "Create Reviews"
438
  msgstr "Create Reviews"
439
 
440
- #: compatibility.php:27
441
  msgctxt "admin-text"
442
  msgid "Delete Others' Reviews"
443
  msgstr "Delete Others' Reviews"
444
 
445
- #: compatibility.php:28
446
  msgctxt "admin-text"
447
  msgid "Delete Reviews"
448
  msgstr "Delete Reviews"
449
 
450
- #: compatibility.php:29
451
  msgctxt "admin-text"
452
  msgid "Delete Private Reviews"
453
  msgstr "Delete Private Reviews"
454
 
455
- #: compatibility.php:30
456
  msgctxt "admin-text"
457
  msgid "Delete Approved Reviews"
458
  msgstr "Delete Approved Reviews"
459
 
460
- #: compatibility.php:31
461
  msgctxt "admin-text"
462
  msgid "Edit Others' Reviews"
463
  msgstr "Edit Others' Reviews"
464
 
465
- #: compatibility.php:32
466
  msgctxt "admin-text"
467
  msgid "Edit Reviews"
468
  msgstr "Edit Reviews"
469
 
470
- #: compatibility.php:33
471
  msgctxt "admin-text"
472
  msgid "Edit Private Reviews"
473
  msgstr "Edit Private Reviews"
474
 
475
- #: compatibility.php:34
476
  msgctxt "admin-text"
477
  msgid "Edit Approved Reviews"
478
  msgstr "Edit Approved Reviews"
479
 
480
- #: compatibility.php:35
481
  msgctxt "admin-text"
482
  msgid "Approve Reviews"
483
  msgstr "Approve Reviews"
484
 
485
- #: compatibility.php:36
486
  msgctxt "admin-text"
487
  msgid "Read Private Reviews"
488
  msgstr "Read Private Reviews"
489
 
490
- #: compatibility.php:37
491
  msgctxt "admin-text"
492
  msgid "Respond To Reviews"
493
  msgstr "Respond To Reviews"
494
 
495
- #: compatibility.php:38
496
  msgctxt "admin-text"
497
  msgid "Respond To Others' Reviews"
498
  msgstr "Respond To Others' Reviews"
432
  msgid "This plugin requires %s or greater in order to work properly."
433
  msgstr "This plugin requires %s or greater in order to work properly."
434
 
435
+ #: compatibility.php:27
436
  msgctxt "admin-text"
437
  msgid "Create Reviews"
438
  msgstr "Create Reviews"
439
 
440
+ #: compatibility.php:28
441
  msgctxt "admin-text"
442
  msgid "Delete Others' Reviews"
443
  msgstr "Delete Others' Reviews"
444
 
445
+ #: compatibility.php:29
446
  msgctxt "admin-text"
447
  msgid "Delete Reviews"
448
  msgstr "Delete Reviews"
449
 
450
+ #: compatibility.php:30
451
  msgctxt "admin-text"
452
  msgid "Delete Private Reviews"
453
  msgstr "Delete Private Reviews"
454
 
455
+ #: compatibility.php:31
456
  msgctxt "admin-text"
457
  msgid "Delete Approved Reviews"
458
  msgstr "Delete Approved Reviews"
459
 
460
+ #: compatibility.php:32
461
  msgctxt "admin-text"
462
  msgid "Edit Others' Reviews"
463
  msgstr "Edit Others' Reviews"
464
 
465
+ #: compatibility.php:33
466
  msgctxt "admin-text"
467
  msgid "Edit Reviews"
468
  msgstr "Edit Reviews"
469
 
470
+ #: compatibility.php:34
471
  msgctxt "admin-text"
472
  msgid "Edit Private Reviews"
473
  msgstr "Edit Private Reviews"
474
 
475
+ #: compatibility.php:35
476
  msgctxt "admin-text"
477
  msgid "Edit Approved Reviews"
478
  msgstr "Edit Approved Reviews"
479
 
480
+ #: compatibility.php:36
481
  msgctxt "admin-text"
482
  msgid "Approve Reviews"
483
  msgstr "Approve Reviews"
484
 
485
+ #: compatibility.php:37
486
  msgctxt "admin-text"
487
  msgid "Read Private Reviews"
488
  msgstr "Read Private Reviews"
489
 
490
+ #: compatibility.php:38
491
  msgctxt "admin-text"
492
  msgid "Respond To Reviews"
493
  msgstr "Respond To Reviews"
494
 
495
+ #: compatibility.php:39
496
  msgctxt "admin-text"
497
  msgid "Respond To Others' Reviews"
498
  msgstr "Respond To Others' Reviews"
languages/site-reviews.pot CHANGED
@@ -54,67 +54,67 @@ msgctxt "admin-text"
54
  msgid "This plugin requires %s or greater in order to work properly."
55
  msgstr ""
56
 
57
- #: compatibility.php:26
58
  msgctxt "admin-text"
59
  msgid "Create Reviews"
60
  msgstr ""
61
 
62
- #: compatibility.php:27
63
  msgctxt "admin-text"
64
  msgid "Delete Others' Reviews"
65
  msgstr ""
66
 
67
- #: compatibility.php:28
68
  msgctxt "admin-text"
69
  msgid "Delete Reviews"
70
  msgstr ""
71
 
72
- #: compatibility.php:29
73
  msgctxt "admin-text"
74
  msgid "Delete Private Reviews"
75
  msgstr ""
76
 
77
- #: compatibility.php:30
78
  msgctxt "admin-text"
79
  msgid "Delete Approved Reviews"
80
  msgstr ""
81
 
82
- #: compatibility.php:31
83
  msgctxt "admin-text"
84
  msgid "Edit Others' Reviews"
85
  msgstr ""
86
 
87
- #: compatibility.php:32
88
  msgctxt "admin-text"
89
  msgid "Edit Reviews"
90
  msgstr ""
91
 
92
- #: compatibility.php:33
93
  msgctxt "admin-text"
94
  msgid "Edit Private Reviews"
95
  msgstr ""
96
 
97
- #: compatibility.php:34
98
  msgctxt "admin-text"
99
  msgid "Edit Approved Reviews"
100
  msgstr ""
101
 
102
- #: compatibility.php:35
103
  msgctxt "admin-text"
104
  msgid "Approve Reviews"
105
  msgstr ""
106
 
107
- #: compatibility.php:36
108
  msgctxt "admin-text"
109
  msgid "Read Private Reviews"
110
  msgstr ""
111
 
112
- #: compatibility.php:37
113
  msgctxt "admin-text"
114
  msgid "Respond To Reviews"
115
  msgstr ""
116
 
117
- #: compatibility.php:38
118
  msgctxt "admin-text"
119
  msgid "Respond To Others' Reviews"
120
  msgstr ""
54
  msgid "This plugin requires %s or greater in order to work properly."
55
  msgstr ""
56
 
57
+ #: compatibility.php:27
58
  msgctxt "admin-text"
59
  msgid "Create Reviews"
60
  msgstr ""
61
 
62
+ #: compatibility.php:28
63
  msgctxt "admin-text"
64
  msgid "Delete Others' Reviews"
65
  msgstr ""
66
 
67
+ #: compatibility.php:29
68
  msgctxt "admin-text"
69
  msgid "Delete Reviews"
70
  msgstr ""
71
 
72
+ #: compatibility.php:30
73
  msgctxt "admin-text"
74
  msgid "Delete Private Reviews"
75
  msgstr ""
76
 
77
+ #: compatibility.php:31
78
  msgctxt "admin-text"
79
  msgid "Delete Approved Reviews"
80
  msgstr ""
81
 
82
+ #: compatibility.php:32
83
  msgctxt "admin-text"
84
  msgid "Edit Others' Reviews"
85
  msgstr ""
86
 
87
+ #: compatibility.php:33
88
  msgctxt "admin-text"
89
  msgid "Edit Reviews"
90
  msgstr ""
91
 
92
+ #: compatibility.php:34
93
  msgctxt "admin-text"
94
  msgid "Edit Private Reviews"
95
  msgstr ""
96
 
97
+ #: compatibility.php:35
98
  msgctxt "admin-text"
99
  msgid "Edit Approved Reviews"
100
  msgstr ""
101
 
102
+ #: compatibility.php:36
103
  msgctxt "admin-text"
104
  msgid "Approve Reviews"
105
  msgstr ""
106
 
107
+ #: compatibility.php:37
108
  msgctxt "admin-text"
109
  msgid "Read Private Reviews"
110
  msgstr ""
111
 
112
+ #: compatibility.php:38
113
  msgctxt "admin-text"
114
  msgid "Respond To Reviews"
115
  msgstr ""
116
 
117
+ #: compatibility.php:39
118
  msgctxt "admin-text"
119
  msgid "Respond To Others' Reviews"
120
  msgstr ""
plugin/Modules/Validator/DefaultValidator.php CHANGED
@@ -79,8 +79,10 @@ class DefaultValidator extends ValidatorAbstract
79
  $required = glsr_get_option('submissions.required', []);
80
  array_walk($rules, function (&$value, $key) use ($required) {
81
  if (!in_array($key, $required)) {
 
 
82
  $values = explode('|', $value);
83
- $values = array_diff($values, ['required']); // remove the required rule from validation
84
  $value = implode('|', $values);
85
  }
86
  });
@@ -99,9 +101,6 @@ class DefaultValidator extends ValidatorAbstract
99
  $excluded = Arr::convertFromString($this->request->excluded); // these fields were ommited with the hide option
100
  $rules = array_merge($defaultRules, $customRules);
101
  $rules = array_diff_key($rules, array_flip($excluded));
102
-
103
- glsr_log($rules);
104
-
105
  return glsr()->filterArray('validation/rules/normalized', $rules, $this->request, $defaultRules);
106
  }
107
  }
79
  $required = glsr_get_option('submissions.required', []);
80
  array_walk($rules, function (&$value, $key) use ($required) {
81
  if (!in_array($key, $required)) {
82
+ // remove the accepted and required rules from validation
83
+ // since they are not required in the settings
84
  $values = explode('|', $value);
85
+ $values = array_diff($values, ['accepted','required']);
86
  $value = implode('|', $values);
87
  }
88
  });
101
  $excluded = Arr::convertFromString($this->request->excluded); // these fields were ommited with the hide option
102
  $rules = array_merge($defaultRules, $customRules);
103
  $rules = array_diff_key($rules, array_flip($excluded));
 
 
 
104
  return glsr()->filterArray('validation/rules/normalized', $rules, $this->request, $defaultRules);
105
  }
106
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: reviews, ratings, testimonials, woocommerce, product reviews, business rev
5
  Tested up to: 5.9
6
  Requires at least: 5.5
7
  Requires PHP: 5.6.20
8
- Stable tag: 5.23.3
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -142,6 +142,11 @@ All documentation can be found in the "Help" page of the plugin. If your questio
142
 
143
  ## Changelog
144
 
 
 
 
 
 
145
  = 5.23.3 (2022-04-10) =
146
 
147
  - Reverted build tool used to generate javascript files (as it seems to be causing problems with Divi and Oxygen Builder)
5
  Tested up to: 5.9
6
  Requires at least: 5.5
7
  Requires PHP: 5.6.20
8
+ Stable tag: 5.23.4
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
142
 
143
  ## Changelog
144
 
145
+ = 5.23.4 (2022-04-12) =
146
+
147
+ - Fixed compatibility with Oxygen Builder
148
+ - Fixed terms toggle when it's not required in the settings
149
+
150
  = 5.23.3 (2022-04-10) =
151
 
152
  - Reverted build tool used to generate javascript files (as it seems to be causing problems with Divi and Oxygen Builder)
site-reviews.php CHANGED
@@ -7,7 +7,7 @@
7
  * Plugin Name: Site Reviews
8
  * Plugin URI: https://wordpress.org/plugins/site-reviews
9
  * Description: Receive and display reviews on your website
10
- * Version: 5.23.3
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
7
  * Plugin Name: Site Reviews
8
  * Plugin URI: https://wordpress.org/plugins/site-reviews
9
  * Description: Receive and display reviews on your website
10
+ * Version: 5.23.4
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2