Site Reviews - Version 5.12.5

Version Description

(2021-07-01) =

  • Fixed the plugin migration which sets the custom role capabilities in cases where the default WordPress roles have been renamed or removed
Download this release

Release Info

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

Code changes from version 5.12.4 to 5.12.5

plugin/Modules/Migrations/Migrate_5_11_0.php CHANGED
@@ -23,8 +23,12 @@ class Migrate_5_11_0
23
  $newCapabilities = ['create_posts', 'respond_to_posts', 'respond_to_others_posts'];
24
  foreach ($roles as $role => $capabilities) {
25
  foreach ($newCapabilities as $capability) {
26
- if (in_array($capability, $capabilities)) {
27
- get_role($role)->add_cap(glsr(Role::class)->capability($capability));
 
 
 
 
28
  }
29
  }
30
  }
23
  $newCapabilities = ['create_posts', 'respond_to_posts', 'respond_to_others_posts'];
24
  foreach ($roles as $role => $capabilities) {
25
  foreach ($newCapabilities as $capability) {
26
+ if (!in_array($capability, $capabilities)) {
27
+ continue;
28
+ }
29
+ $wpRole = get_role($role);
30
+ if (!empty($wpRole)) {
31
+ $wpRole->add_cap(glsr(Role::class)->capability($capability));
32
  }
33
  }
34
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: reviews, ratings, testimonials, woocommerce, product reviews
5
  Tested up to: 5.7
6
  Requires at least: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 5.12.4
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -137,6 +137,10 @@ All documentation can be found in the "Help" page of the plugin. If your questio
137
 
138
  ## Changelog
139
 
 
 
 
 
140
  = 5.12.4 (2021-07-01) =
141
 
142
  - Fixed the filters on the "All Reviews" admin page
5
  Tested up to: 5.7
6
  Requires at least: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 5.12.5
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
137
 
138
  ## Changelog
139
 
140
+ = 5.12.5 (2021-07-01) =
141
+
142
+ - Fixed the plugin migration which sets the custom role capabilities in cases where the default WordPress roles have been renamed or removed
143
+
144
  = 5.12.4 (2021-07-01) =
145
 
146
  - Fixed the filters on the "All Reviews" admin page
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.12.4
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.12.5
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2