Site Reviews - Version 5.20.1

Version Description

(2022-01-27) =

  • Fixed admin notices
Download this release

Release Info

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

Code changes from version 5.20.0 to 5.20.1

languages/site-reviews-en_US.po CHANGED
@@ -44,7 +44,7 @@ msgstr "There are no reviews yet. Be the first one to write one."
44
  msgid "Anonymous"
45
  msgstr "Anonymous"
46
 
47
- #: plugin/Router.php:187, views/pages/documentation/support/common-problems-and-solutions.php:55
48
  msgid "The form could not be submitted. Please notify the site administrator."
49
  msgstr "The form could not be submitted. Please notify the site administrator."
50
 
@@ -1652,7 +1652,7 @@ msgctxt "admin-text"
1652
  msgid "Unknown"
1653
  msgstr "Unknown"
1654
 
1655
- #: plugin/Router.php:183
1656
  msgctxt "admin-text"
1657
  msgid "There was an error (try reloading the page)."
1658
  msgstr "There was an error (try reloading the page)."
44
  msgid "Anonymous"
45
  msgstr "Anonymous"
46
 
47
+ #: plugin/Router.php:185, views/pages/documentation/support/common-problems-and-solutions.php:55
48
  msgid "The form could not be submitted. Please notify the site administrator."
49
  msgstr "The form could not be submitted. Please notify the site administrator."
50
 
1652
  msgid "Unknown"
1653
  msgstr "Unknown"
1654
 
1655
+ #: plugin/Router.php:181
1656
  msgctxt "admin-text"
1657
  msgid "There was an error (try reloading the page)."
1658
  msgstr "There was an error (try reloading the page)."
languages/site-reviews.pot CHANGED
@@ -1192,12 +1192,12 @@ msgctxt "admin-text"
1192
  msgid "Unknown"
1193
  msgstr ""
1194
 
1195
- #: plugin/Router.php:183
1196
  msgctxt "admin-text"
1197
  msgid "There was an error (try reloading the page)."
1198
  msgstr ""
1199
 
1200
- #: plugin/Router.php:187, views/pages/documentation/support/common-problems-and-solutions.php:55
1201
  msgid "The form could not be submitted. Please notify the site administrator."
1202
  msgstr ""
1203
 
1192
  msgid "Unknown"
1193
  msgstr ""
1194
 
1195
+ #: plugin/Router.php:181
1196
  msgctxt "admin-text"
1197
  msgid "There was an error (try reloading the page)."
1198
  msgstr ""
1199
 
1200
+ #: plugin/Router.php:185, views/pages/documentation/support/common-problems-and-solutions.php:55
1201
  msgid "The form could not be submitted. Please notify the site administrator."
1202
  msgstr ""
1203
 
plugin/Router.php CHANGED
@@ -20,10 +20,14 @@ class Router
20
 
21
  public function __construct()
22
  {
 
23
  $this->unguardedAdminActions = glsr()->filterArray('router/admin/unguarded-actions', [
24
  'dismiss-notice',
 
25
  ]);
 
26
  $this->unguardedPublicActions = glsr()->filterArray('router/public/unguarded-actions', [
 
27
  'fetch-paged-reviews',
28
  'submit-review',
29
  ]);
@@ -36,14 +40,8 @@ class Router
36
  {
37
  $request = $this->getRequest();
38
  $this->checkAjaxRequest($request);
39
- if (glsr()->isAdmin()) { // if viewing a WP admin page
40
- if (!in_array($request->_action, $this->unguardedAdminActions)) {
41
- $this->checkAjaxNonce($request);
42
- }
43
- } else {
44
- if (!in_array($request->_action, $this->unguardedPublicActions)) {
45
- $this->checkAjaxNonce($request);
46
- }
47
  }
48
  $this->routeRequest('ajax', $request);
49
  wp_die();
20
 
21
  public function __construct()
22
  {
23
+ // Authenticated routes to unguard
24
  $this->unguardedAdminActions = glsr()->filterArray('router/admin/unguarded-actions', [
25
  'dismiss-notice',
26
+ 'fetch-paged-reviews',
27
  ]);
28
+ // Unauthenticated routes to unguard
29
  $this->unguardedPublicActions = glsr()->filterArray('router/public/unguarded-actions', [
30
+ 'dismiss-notice',
31
  'fetch-paged-reviews',
32
  'submit-review',
33
  ]);
40
  {
41
  $request = $this->getRequest();
42
  $this->checkAjaxRequest($request);
43
+ if (!in_array($request->_action, $this->unguardedAdminActions)) {
44
+ $this->checkAjaxNonce($request);
 
 
 
 
 
 
45
  }
46
  $this->routeRequest('ajax', $request);
47
  wp_die();
readme.txt CHANGED
@@ -2,10 +2,10 @@
2
  Contributors: geminilabs, pryley
3
  Donate link: https://www.paypal.me/pryley
4
  Tags: reviews, ratings, testimonials, woocommerce, product reviews, business reviews, star ratings
5
- Tested up to: 5.8
6
  Requires at least: 5.5
7
- Requires PHP: 5.6
8
- Stable tag: 5.20.0
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -140,6 +140,10 @@ All documentation can be found in the "Help" page of the plugin. If your questio
140
 
141
  ## Changelog
142
 
 
 
 
 
143
  = 5.20.0 (2022-01-26) =
144
 
145
  - Added an "Author" filter to the All Reviews table
2
  Contributors: geminilabs, pryley
3
  Donate link: https://www.paypal.me/pryley
4
  Tags: reviews, ratings, testimonials, woocommerce, product reviews, business reviews, star ratings
5
+ Tested up to: 5.9
6
  Requires at least: 5.5
7
+ Requires PHP: 5.6.20
8
+ Stable tag: 5.20.1
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
140
 
141
  ## Changelog
142
 
143
+ = 5.20.1 (2022-01-27) =
144
+
145
+ - Fixed admin notices
146
+
147
  = 5.20.0 (2022-01-26) =
148
 
149
  - Added an "Author" filter to the All Reviews table
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.20.0
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.20.1
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2