Site Reviews - Version 6.1.2

Version Description

(2022-10-16) =

  • Added a notice when integrating with "Schema and Structured Data plugin" to load schema markup in the footer
  • Fixed a possible issue with saving add-on licenses (hopefully!)
  • Fixed Schema Pro integration
  • Improved documentaton
Download this release

Release Info

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

Code changes from version 6.1.1 to 6.1.2

changelog.txt CHANGED
@@ -1,5 +1,12 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
3
  = 6.1.1 (2022-10-12) =
4
 
5
  - Fixed admin page header on mobile devices
1
  == Changelog ==
2
 
3
+ = 6.1.2 (2022-10-16) =
4
+
5
+ - Added a notice when integrating with "Schema and Structured Data plugin" to load schema markup in the footer
6
+ - Fixed a possible issue with saving add-on licenses (hopefully!)
7
+ - Fixed Schema Pro integration
8
+ - Improved documentaton
9
+
10
  = 6.1.1 (2022-10-12) =
11
 
12
  - Fixed admin page header on mobile devices
languages/site-reviews-en_US.mo CHANGED
Binary file
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:161, views/pages/documentation/support/common-problems-and-solutions.php:60
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
 
@@ -97,15 +97,15 @@ msgid "Your review has been submitted!"
97
  msgstr "Your review has been submitted!"
98
 
99
  #: plugin/Commands/CreateReview.php:178
100
- msgid "Your review has been submitted and is pending approval."
101
- msgstr "Your review has been submitted and is pending approval."
102
 
103
- #: plugin/Commands/CreateReview.php:183, views/pages/documentation/support/common-problems-and-solutions.php:80
104
  msgid ""
105
- "Your review could not be submitted and the error has been logged. Please "
106
  "notify the site administrator."
107
  msgstr ""
108
- "Your review could not be submitted and the error has been logged. Please "
109
  "notify the site administrator."
110
 
111
  #: plugin/Commands/EnqueuePublicAssets.php:73
@@ -320,11 +320,11 @@ msgstr "Get review"
320
  msgid "Write review"
321
  msgstr "Write review"
322
 
323
- #: plugin/Modules/Validator/AkismetValidator.php:48, plugin/Modules/Validator/HoneypotValidator.php:26, views/pages/documentation/support/common-problems-and-solutions.php:76
324
  msgid "This review has been flagged as possible spam and cannot be submitted."
325
  msgstr "This review has been flagged as possible spam and cannot be submitted."
326
 
327
- #: plugin/Modules/Validator/BlacklistValidator.php:36, views/pages/documentation/support/common-problems-and-solutions.php:72
328
  msgid "Your review cannot be submitted at this time."
329
  msgstr "Your review cannot be submitted at this time."
330
 
@@ -336,7 +336,7 @@ msgstr "The CAPTCHA failed to load, please refresh the page and try again."
336
  msgid "The CAPTCHA verification failed, please try again."
337
  msgstr "The CAPTCHA verification failed, please try again."
338
 
339
- #: plugin/Modules/Validator/CustomValidator.php:27, views/pages/documentation/support/common-problems-and-solutions.php:86
340
  msgid "The review submission failed. Please notify the site administrator."
341
  msgstr "The review submission failed. Please notify the site administrator."
342
 
@@ -406,7 +406,7 @@ msgstr "No Title"
406
  msgid "Verified"
407
  msgstr "Verified"
408
 
409
- #: views/pages/documentation/support/common-problems-and-solutions.php:90
410
  msgid "Service Unavailable."
411
  msgstr "Service Unavailable."
412
 
@@ -3705,7 +3705,25 @@ msgctxt "admin-text"
3705
  msgid "Additional CSS classes"
3706
  msgstr "Additional CSS classes"
3707
 
3708
- #: plugin/Integrations/SchemaPro/Controller.php:22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3709
  msgctxt "admin-text"
3710
  msgid ""
3711
  "Please go to the %sSchema Pro plugin settings%s page and change the \"%s\" "
@@ -3714,7 +3732,7 @@ msgstr ""
3714
  "Please go to the %sSchema Pro plugin settings%s page and change the \"%s\" "
3715
  "option to \"%s\"."
3716
 
3717
- #: plugin/Integrations/SchemaPro/Controller.php:29
3718
  msgctxt "admin-text"
3719
  msgid ""
3720
  "The Schema Pro integration with Site Reviews will only work if the schema "
@@ -4067,7 +4085,7 @@ msgctxt "admin-text"
4067
  msgid "Download System Info"
4068
  msgstr "Download System Info"
4069
 
4070
- #: views/pages/welcome/getting-started.php:68, views/pages/documentation/support/get-started.php:30
4071
  msgctxt "admin-text"
4072
  msgid "%s minutes, %s seconds"
4073
  msgstr "%s minutes, %s seconds"
@@ -5701,13 +5719,13 @@ msgstr "writing a review"
5701
  #: views/pages/settings/licenses.php:7
5702
  msgctxt "<a>|</a> (admin-text)"
5703
  msgid ""
5704
- "You need to authorize your website with the license before you can save it "
5705
- "here. To do this, go to the %sLicense Keys%s page on your Nifty Plugins "
5706
- "account and click the \"Manage Sites\" button."
5707
  msgstr ""
5708
- "You need to authorize your website with the license before you can save it "
5709
- "here. To do this, go to the %sLicense Keys%s page on your Nifty Plugins "
5710
- "account and click the \"Manage Sites\" button."
5711
 
5712
  #: plugin/Modules/Html/Partials/Pagination.php:43
5713
  msgctxt "screen reader text"
44
  msgid "Anonymous"
45
  msgstr "Anonymous"
46
 
47
+ #: plugin/Router.php:161, views/pages/documentation/support/common-problems-and-solutions.php:61
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
 
97
  msgstr "Your review has been submitted!"
98
 
99
  #: plugin/Commands/CreateReview.php:178
100
+ msgid "Your review has been submitted, and is pending approval."
101
+ msgstr "Your review has been submitted, and is pending approval."
102
 
103
+ #: plugin/Commands/CreateReview.php:183, views/pages/documentation/support/common-problems-and-solutions.php:87
104
  msgid ""
105
+ "Your review could not be submitted, and the error has been logged. Please "
106
  "notify the site administrator."
107
  msgstr ""
108
+ "Your review could not be submitted, and the error has been logged. Please "
109
  "notify the site administrator."
110
 
111
  #: plugin/Commands/EnqueuePublicAssets.php:73
320
  msgid "Write review"
321
  msgstr "Write review"
322
 
323
+ #: plugin/Modules/Validator/AkismetValidator.php:48, plugin/Modules/Validator/HoneypotValidator.php:26, views/pages/documentation/support/common-problems-and-solutions.php:81
324
  msgid "This review has been flagged as possible spam and cannot be submitted."
325
  msgstr "This review has been flagged as possible spam and cannot be submitted."
326
 
327
+ #: plugin/Modules/Validator/BlacklistValidator.php:36, views/pages/documentation/support/common-problems-and-solutions.php:75
328
  msgid "Your review cannot be submitted at this time."
329
  msgstr "Your review cannot be submitted at this time."
330
 
336
  msgid "The CAPTCHA verification failed, please try again."
337
  msgstr "The CAPTCHA verification failed, please try again."
338
 
339
+ #: plugin/Modules/Validator/CustomValidator.php:27, views/pages/documentation/support/common-problems-and-solutions.php:113
340
  msgid "The review submission failed. Please notify the site administrator."
341
  msgstr "The review submission failed. Please notify the site administrator."
342
 
406
  msgid "Verified"
407
  msgstr "Verified"
408
 
409
+ #: views/pages/documentation/support/common-problems-and-solutions.php:119
410
  msgid "Service Unavailable."
411
  msgstr "Service Unavailable."
412
 
3705
  msgid "Additional CSS classes"
3706
  msgstr "Additional CSS classes"
3707
 
3708
+ #: plugin/Integrations/SASWP/Controller.php:23
3709
+ msgctxt "admin-text"
3710
+ msgid ""
3711
+ "Please go to the %sSchema & Structured Data plugin settings%s page and "
3712
+ "enable the \"%s\" option."
3713
+ msgstr ""
3714
+ "Please go to the %sSchema & Structured Data plugin settings%s page and "
3715
+ "enable the \"%s\" option."
3716
+
3717
+ #: plugin/Integrations/SASWP/Controller.php:29
3718
+ msgctxt "admin-text"
3719
+ msgid ""
3720
+ "The Schema & Structured Data integration with Site Reviews will only work "
3721
+ "if the schema markup is added to the footer."
3722
+ msgstr ""
3723
+ "The Schema & Structured Data integration with Site Reviews will only work "
3724
+ "if the schema markup is added to the footer."
3725
+
3726
+ #: plugin/Integrations/SchemaPro/Controller.php:24
3727
  msgctxt "admin-text"
3728
  msgid ""
3729
  "Please go to the %sSchema Pro plugin settings%s page and change the \"%s\" "
3732
  "Please go to the %sSchema Pro plugin settings%s page and change the \"%s\" "
3733
  "option to \"%s\"."
3734
 
3735
+ #: plugin/Integrations/SchemaPro/Controller.php:31
3736
  msgctxt "admin-text"
3737
  msgid ""
3738
  "The Schema Pro integration with Site Reviews will only work if the schema "
4085
  msgid "Download System Info"
4086
  msgstr "Download System Info"
4087
 
4088
+ #: views/pages/welcome/getting-started.php:68
4089
  msgctxt "admin-text"
4090
  msgid "%s minutes, %s seconds"
4091
  msgstr "%s minutes, %s seconds"
5719
  #: views/pages/settings/licenses.php:7
5720
  msgctxt "<a>|</a> (admin-text)"
5721
  msgid ""
5722
+ "Make sure to authorize your website with the license before saving it here. "
5723
+ "To do this, go to the %sLicense Keys%s page on your Nifty Plugins account "
5724
+ "and click the \"Manage Sites\" button."
5725
  msgstr ""
5726
+ "Make sure to authorize your website with the license before saving it here. "
5727
+ "To do this, go to the %sLicense Keys%s page on your Nifty Plugins account "
5728
+ "and click the \"Manage Sites\" button."
5729
 
5730
  #: plugin/Modules/Html/Partials/Pagination.php:43
5731
  msgctxt "screen reader text"
languages/site-reviews.pot CHANGED
@@ -1448,7 +1448,7 @@ msgctxt "admin-text"
1448
  msgid "There was an error (try reloading the page)."
1449
  msgstr ""
1450
 
1451
- #: plugin/Router.php:161, views/pages/documentation/support/common-problems-and-solutions.php:60
1452
  msgid "The form could not be submitted. Please notify the site administrator."
1453
  msgstr ""
1454
 
@@ -1611,11 +1611,11 @@ msgid "Your review has been submitted!"
1611
  msgstr ""
1612
 
1613
  #: plugin/Commands/CreateReview.php:178
1614
- msgid "Your review has been submitted and is pending approval."
1615
  msgstr ""
1616
 
1617
- #: plugin/Commands/CreateReview.php:183, views/pages/documentation/support/common-problems-and-solutions.php:80
1618
- msgid "Your review could not be submitted and the error has been logged. Please notify the site administrator."
1619
  msgstr ""
1620
 
1621
  #: plugin/Commands/EnqueueAdminAssets.php:23
@@ -3724,12 +3724,22 @@ msgstr ""
3724
  msgid "Write review"
3725
  msgstr ""
3726
 
3727
- #: plugin/Integrations/SchemaPro/Controller.php:22
 
 
 
 
 
 
 
 
 
 
3728
  msgctxt "admin-text"
3729
  msgid "Please go to the %sSchema Pro plugin settings%s page and change the \"%s\" option to \"%s\"."
3730
  msgstr ""
3731
 
3732
- #: plugin/Integrations/SchemaPro/Controller.php:29
3733
  msgctxt "admin-text"
3734
  msgid "The Schema Pro integration with Site Reviews will only work if the schema is loaded in the Footer location."
3735
  msgstr ""
@@ -3739,11 +3749,11 @@ msgctxt "admin-text"
3739
  msgid "View the review in WordPress &rarr;"
3740
  msgstr ""
3741
 
3742
- #: plugin/Modules/Validator/AkismetValidator.php:48, plugin/Modules/Validator/HoneypotValidator.php:26, views/pages/documentation/support/common-problems-and-solutions.php:76
3743
  msgid "This review has been flagged as possible spam and cannot be submitted."
3744
  msgstr ""
3745
 
3746
- #: plugin/Modules/Validator/BlacklistValidator.php:36, views/pages/documentation/support/common-problems-and-solutions.php:72
3747
  msgid "Your review cannot be submitted at this time."
3748
  msgstr ""
3749
 
@@ -3755,7 +3765,7 @@ msgstr ""
3755
  msgid "The CAPTCHA verification failed, please try again."
3756
  msgstr ""
3757
 
3758
- #: plugin/Modules/Validator/CustomValidator.php:27, views/pages/documentation/support/common-problems-and-solutions.php:86
3759
  msgid "The review submission failed. Please notify the site administrator."
3760
  msgstr ""
3761
 
@@ -3849,7 +3859,7 @@ msgstr ""
3849
 
3850
  #: views/pages/settings/licenses.php:7
3851
  msgctxt "<a>|</a> (admin-text)"
3852
- msgid "You need to authorize your website with the license before you can save it here. To do this, go to the %sLicense Keys%s page on your Nifty Plugins account and click the \"Manage Sites\" button."
3853
  msgstr ""
3854
 
3855
  #: views/pages/settings/reviews.php:3
@@ -4037,7 +4047,7 @@ msgctxt "admin-text"
4037
  msgid "Download System Info"
4038
  msgstr ""
4039
 
4040
- #: views/pages/welcome/getting-started.php:68, views/pages/documentation/support/get-started.php:30
4041
  msgctxt "admin-text"
4042
  msgid "%s minutes, %s seconds"
4043
  msgstr ""
@@ -4482,7 +4492,7 @@ msgid_plural "{rating} out of {max} stars (based on {num} reviews)"
4482
  msgstr[0] ""
4483
  msgstr[1] ""
4484
 
4485
- #: views/pages/documentation/support/common-problems-and-solutions.php:90
4486
  msgid "Service Unavailable."
4487
  msgstr ""
4488
 
1448
  msgid "There was an error (try reloading the page)."
1449
  msgstr ""
1450
 
1451
+ #: plugin/Router.php:161, views/pages/documentation/support/common-problems-and-solutions.php:61
1452
  msgid "The form could not be submitted. Please notify the site administrator."
1453
  msgstr ""
1454
 
1611
  msgstr ""
1612
 
1613
  #: plugin/Commands/CreateReview.php:178
1614
+ msgid "Your review has been submitted, and is pending approval."
1615
  msgstr ""
1616
 
1617
+ #: plugin/Commands/CreateReview.php:183, views/pages/documentation/support/common-problems-and-solutions.php:87
1618
+ msgid "Your review could not be submitted, and the error has been logged. Please notify the site administrator."
1619
  msgstr ""
1620
 
1621
  #: plugin/Commands/EnqueueAdminAssets.php:23
3724
  msgid "Write review"
3725
  msgstr ""
3726
 
3727
+ #: plugin/Integrations/SASWP/Controller.php:23
3728
+ msgctxt "admin-text"
3729
+ msgid "Please go to the %sSchema & Structured Data plugin settings%s page and enable the \"%s\" option."
3730
+ msgstr ""
3731
+
3732
+ #: plugin/Integrations/SASWP/Controller.php:29
3733
+ msgctxt "admin-text"
3734
+ msgid "The Schema & Structured Data integration with Site Reviews will only work if the schema markup is added to the footer."
3735
+ msgstr ""
3736
+
3737
+ #: plugin/Integrations/SchemaPro/Controller.php:24
3738
  msgctxt "admin-text"
3739
  msgid "Please go to the %sSchema Pro plugin settings%s page and change the \"%s\" option to \"%s\"."
3740
  msgstr ""
3741
 
3742
+ #: plugin/Integrations/SchemaPro/Controller.php:31
3743
  msgctxt "admin-text"
3744
  msgid "The Schema Pro integration with Site Reviews will only work if the schema is loaded in the Footer location."
3745
  msgstr ""
3749
  msgid "View the review in WordPress &rarr;"
3750
  msgstr ""
3751
 
3752
+ #: plugin/Modules/Validator/AkismetValidator.php:48, plugin/Modules/Validator/HoneypotValidator.php:26, views/pages/documentation/support/common-problems-and-solutions.php:81
3753
  msgid "This review has been flagged as possible spam and cannot be submitted."
3754
  msgstr ""
3755
 
3756
+ #: plugin/Modules/Validator/BlacklistValidator.php:36, views/pages/documentation/support/common-problems-and-solutions.php:75
3757
  msgid "Your review cannot be submitted at this time."
3758
  msgstr ""
3759
 
3765
  msgid "The CAPTCHA verification failed, please try again."
3766
  msgstr ""
3767
 
3768
+ #: plugin/Modules/Validator/CustomValidator.php:27, views/pages/documentation/support/common-problems-and-solutions.php:113
3769
  msgid "The review submission failed. Please notify the site administrator."
3770
  msgstr ""
3771
 
3859
 
3860
  #: views/pages/settings/licenses.php:7
3861
  msgctxt "<a>|</a> (admin-text)"
3862
+ msgid "Make sure to authorize your website with the license before saving it here. To do this, go to the %sLicense Keys%s page on your Nifty Plugins account and click the \"Manage Sites\" button."
3863
  msgstr ""
3864
 
3865
  #: views/pages/settings/reviews.php:3
4047
  msgid "Download System Info"
4048
  msgstr ""
4049
 
4050
+ #: views/pages/welcome/getting-started.php:68
4051
  msgctxt "admin-text"
4052
  msgid "%s minutes, %s seconds"
4053
  msgstr ""
4492
  msgstr[0] ""
4493
  msgstr[1] ""
4494
 
4495
+ #: views/pages/documentation/support/common-problems-and-solutions.php:119
4496
  msgid "Service Unavailable."
4497
  msgstr ""
4498
 
plugin/Addons/Updater.php CHANGED
@@ -284,17 +284,21 @@ class Updater
284
  protected function request($action, array $data = [])
285
  {
286
  $data = wp_parse_args($data, $this->data);
 
 
 
 
 
 
 
 
287
  $response = wp_remote_post($this->apiUrl, [
288
- 'body' => [
289
- 'edd_action' => $action,
290
- 'item_id' => '', // we don't have access to the download ID which is why this is empty
291
- 'item_name' => Arr::get($data, 'TextDomain'), // we are using the slug for the name
292
- 'license' => Arr::get($data, 'license'),
293
- 'slug' => Arr::get($data, 'TextDomain'),
294
- 'url' => Url::home(),
295
- ],
296
  'timeout' => 15,
297
  ]);
 
 
 
298
  return $this->normalizeResponse($response);
299
  }
300
 
284
  protected function request($action, array $data = [])
285
  {
286
  $data = wp_parse_args($data, $this->data);
287
+ $body = [
288
+ 'edd_action' => $action,
289
+ 'item_id' => '', // we don't have access to the download ID which is why this is empty
290
+ 'item_name' => Arr::get($data, 'TextDomain'), // we are using the slug for the name
291
+ 'license' => Arr::get($data, 'license'),
292
+ 'slug' => Arr::get($data, 'TextDomain'),
293
+ 'url' => Url::home(),
294
+ ];
295
  $response = wp_remote_post($this->apiUrl, [
296
+ 'body' => $body,
 
 
 
 
 
 
 
297
  'timeout' => 15,
298
  ]);
299
+ if ('check_license' === $action) {
300
+ glsr_log()->debug($body);
301
+ }
302
  return $this->normalizeResponse($response);
303
  }
304
 
plugin/Commands/CreateReview.php CHANGED
@@ -175,12 +175,12 @@ class CreateReview implements Contract
175
  if ($review = glsr(ReviewManager::class)->create($this)) {
176
  $this->message = $review->is_approved
177
  ? __('Your review has been submitted!', 'site-reviews')
178
- : __('Your review has been submitted and is pending approval.', 'site-reviews');
179
  $this->review = $review; // overwrite the dummy review with the submitted review
180
  return;
181
  }
182
  $this->errors = [];
183
- $this->message = __('Your review could not be submitted and the error has been logged. Please notify the site administrator.', 'site-reviews');
184
  }
185
 
186
  /**
175
  if ($review = glsr(ReviewManager::class)->create($this)) {
176
  $this->message = $review->is_approved
177
  ? __('Your review has been submitted!', 'site-reviews')
178
+ : __('Your review has been submitted, and is pending approval.', 'site-reviews');
179
  $this->review = $review; // overwrite the dummy review with the submitted review
180
  return;
181
  }
182
  $this->errors = [];
183
+ $this->message = __('Your review could not be submitted, and the error has been logged. Please notify the site administrator.', 'site-reviews');
184
  }
185
 
186
  /**
plugin/Integrations/SASWP/Controller.php CHANGED
@@ -4,9 +4,32 @@ namespace GeminiLabs\SiteReviews\Integrations\SASWP;
4
 
5
  use GeminiLabs\SiteReviews\Controllers\Controller as BaseController;
6
  use GeminiLabs\SiteReviews\Helpers\Arr;
 
7
 
8
  class Controller extends BaseController
9
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  /**
11
  * @filter saswp_modify_schema_output
12
  */
4
 
5
  use GeminiLabs\SiteReviews\Controllers\Controller as BaseController;
6
  use GeminiLabs\SiteReviews\Helpers\Arr;
7
+ use GeminiLabs\SiteReviews\Modules\Notice;
8
 
9
  class Controller extends BaseController
10
  {
11
+ /**
12
+ * @action admin_head
13
+ */
14
+ public function displaySettingNotice()
15
+ {
16
+ if (!$this->isReviewAdminPage()) {
17
+ return;
18
+ }
19
+ $settings = get_option('sd_data');
20
+ if (1 === (int) Arr::get($settings, 'saswp-markup-footer')) {
21
+ return;
22
+ }
23
+ $message = sprintf(_x('Please go to the %sSchema & Structured Data plugin settings%s page and enable the "%s" option.', 'admin-text', 'site-reviews'),
24
+ sprintf('<a href="%s" target="_blank">', admin_url('admin.php?page=structured_data_options&tab=tools')),
25
+ '</a>',
26
+ '<strong>Add Schema Markup in footer</strong>'
27
+ );
28
+ glsr(Notice::class)->addError($message, [
29
+ _x('The Schema & Structured Data integration with Site Reviews will only work if the schema markup is added to the footer.', 'admin-text', 'site-reviews'),
30
+ ]);
31
+ }
32
+
33
  /**
34
  * @filter saswp_modify_schema_output
35
  */
plugin/Integrations/SASWP/Hooks.php CHANGED
@@ -27,6 +27,7 @@ class Hooks implements HooksContract
27
  if ('saswp' !== glsr_get_option('schema.integration.plugin')) {
28
  return;
29
  }
 
30
  add_filter('site-reviews/settings/sanitize', [$this->controller, 'filterSettingsSanitize'], 10, 2);
31
  add_filter('saswp_modify_schema_output', [$this->controller, 'filterSchema'], 20);
32
  }
27
  if ('saswp' !== glsr_get_option('schema.integration.plugin')) {
28
  return;
29
  }
30
+ add_action('admin_head', [$this->controller, 'displaySettingNotice']);
31
  add_filter('site-reviews/settings/sanitize', [$this->controller, 'filterSettingsSanitize'], 10, 2);
32
  add_filter('saswp_modify_schema_output', [$this->controller, 'filterSchema'], 20);
33
  }
plugin/Integrations/SchemaPro/Controller.php CHANGED
@@ -14,21 +14,22 @@ class Controller extends BaseController
14
  */
15
  public function displaySettingNotice()
16
  {
17
- if (!$this->isReviewAdminPage() || 'schema_pro' !== glsr_get_option('schema.integration.plugin')) {
18
  return;
19
  }
20
  $settings = \BSF_AIOSRS_Pro_Helper::$settings['aiosrs-pro-settings'];
21
- if ('footer' !== Arr::get($settings, 'schema-location')) {
22
- $message = sprintf(_x('Please go to the %sSchema Pro plugin settings%s page and change the "%s" option to "%s".', 'admin-text', 'site-reviews'),
23
- sprintf('<a href="%s" target="_blank">', admin_url('options-general.php?page=aiosrs_pro_admin_menu_page&action=wpsp-advanced-settings')),
24
- '</a>',
25
- sprintf('<strong>%s</strong>', esc_html__('Add Schema Code In', 'wp-schema-pro')),
26
- sprintf('<strong>%s</strong>', esc_html__('Footer', 'wp-schema-pro'))
27
- );
28
- glsr(Notice::class)->addError($message, [
29
- _x('The Schema Pro integration with Site Reviews will only work if the schema is loaded in the Footer location.', 'admin-text', 'site-reviews'),
30
- ]);
31
  }
 
 
 
 
 
 
 
 
 
32
  }
33
 
34
  /**
@@ -36,9 +37,6 @@ class Controller extends BaseController
36
  */
37
  public function filterSchema(array $schema): array
38
  {
39
- if ('schema_pro' !== glsr_get_option('schema.integration.plugin')) {
40
- return $schema;
41
- }
42
  $schemas = glsr()->filterArray('schema/all', glsr()->retrieve('schemas', []));
43
  if (empty($schemas)) {
44
  return $schema;
@@ -67,9 +65,6 @@ class Controller extends BaseController
67
  */
68
  public function onReviewCreated(Review $review)
69
  {
70
- if ('schema_pro' !== glsr_get_option('schema.integration.plugin')) {
71
- return;
72
- }
73
  foreach ($review->assigned_posts as $postId) {
74
  delete_post_meta($postId, BSF_AIOSRS_PRO_CACHE_KEY);
75
  }
14
  */
15
  public function displaySettingNotice()
16
  {
17
+ if (!$this->isReviewAdminPage()) {
18
  return;
19
  }
20
  $settings = \BSF_AIOSRS_Pro_Helper::$settings['aiosrs-pro-settings'];
21
+ if ('footer' === Arr::get($settings, 'schema-location')) {
22
+ return;
 
 
 
 
 
 
 
 
23
  }
24
+ $message = sprintf(_x('Please go to the %sSchema Pro plugin settings%s page and change the "%s" option to "%s".', 'admin-text', 'site-reviews'),
25
+ sprintf('<a href="%s" target="_blank">', admin_url('options-general.php?page=aiosrs_pro_admin_menu_page&action=wpsp-advanced-settings')),
26
+ '</a>',
27
+ sprintf('<strong>%s</strong>', esc_html__('Add Schema Code In', 'wp-schema-pro')),
28
+ sprintf('<strong>%s</strong>', esc_html__('Footer', 'wp-schema-pro'))
29
+ );
30
+ glsr(Notice::class)->addError($message, [
31
+ _x('The Schema Pro integration with Site Reviews will only work if the schema is loaded in the Footer location.', 'admin-text', 'site-reviews'),
32
+ ]);
33
  }
34
 
35
  /**
37
  */
38
  public function filterSchema(array $schema): array
39
  {
 
 
 
40
  $schemas = glsr()->filterArray('schema/all', glsr()->retrieve('schemas', []));
41
  if (empty($schemas)) {
42
  return $schema;
65
  */
66
  public function onReviewCreated(Review $review)
67
  {
 
 
 
68
  foreach ($review->assigned_posts as $postId) {
69
  delete_post_meta($postId, BSF_AIOSRS_PRO_CACHE_KEY);
70
  }
plugin/Integrations/SchemaPro/Hooks.php CHANGED
@@ -26,7 +26,10 @@ class Hooks implements HooksContract
26
  if (!defined('BSF_AIOSRS_PRO_CACHE_KEY') || !class_exists('BSF_AIOSRS_Pro_Helper')) {
27
  return;
28
  }
29
- $types = Arr::consolidate(glsr_get_option('settings.schema.integration.type'));
 
 
 
30
  foreach ($types as $type) {
31
  $type = Str::snakeCase($type);
32
  add_filter('wp_schema_pro_schema_'.$type, [$this->controller, 'filterSchema']);
26
  if (!defined('BSF_AIOSRS_PRO_CACHE_KEY') || !class_exists('BSF_AIOSRS_Pro_Helper')) {
27
  return;
28
  }
29
+ if ('schema_pro' !== glsr_get_option('schema.integration.plugin')) {
30
+ return;
31
+ }
32
+ $types = Arr::consolidate(glsr_get_option('schema.integration.types'));
33
  foreach ($types as $type) {
34
  $type = Str::snakeCase($type);
35
  add_filter('wp_schema_pro_schema_'.$type, [$this->controller, 'filterSchema']);
plugin/Provider.php CHANGED
@@ -23,8 +23,6 @@ use GeminiLabs\SiteReviews\Controllers\TaxonomyController;
23
  use GeminiLabs\SiteReviews\Controllers\ToolsController;
24
  use GeminiLabs\SiteReviews\Controllers\TranslationController;
25
  use GeminiLabs\SiteReviews\Controllers\WelcomeController;
26
- use GeminiLabs\SiteReviews\Database\DefaultsManager;
27
- use GeminiLabs\SiteReviews\Database\OptionManager;
28
  use GeminiLabs\SiteReviews\Modules\Notice;
29
  use GeminiLabs\SiteReviews\Modules\Queue;
30
  use GeminiLabs\SiteReviews\Modules\Style;
@@ -41,10 +39,8 @@ class Provider implements ProviderContract
41
  $app->bind(Application::class, function () use ($app) {
42
  return $app;
43
  });
44
- $app->singleton(DefaultsManager::class);
45
  $app->singleton(Hooks::class);
46
  $app->singleton(Notice::class);
47
- $app->singleton(OptionManager::class);
48
  $app->singleton(Queue::class);
49
  $app->singleton(Style::class);
50
  $app->singleton(Translator::class);
23
  use GeminiLabs\SiteReviews\Controllers\ToolsController;
24
  use GeminiLabs\SiteReviews\Controllers\TranslationController;
25
  use GeminiLabs\SiteReviews\Controllers\WelcomeController;
 
 
26
  use GeminiLabs\SiteReviews\Modules\Notice;
27
  use GeminiLabs\SiteReviews\Modules\Queue;
28
  use GeminiLabs\SiteReviews\Modules\Style;
39
  $app->bind(Application::class, function () use ($app) {
40
  return $app;
41
  });
 
42
  $app->singleton(Hooks::class);
43
  $app->singleton(Notice::class);
 
44
  $app->singleton(Queue::class);
45
  $app->singleton(Style::class);
46
  $app->singleton(Translator::class);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://ko-fi.com/pryley
4
  Tags: reviews, ratings, testimonials, woocommerce, product reviews, business reviews, stars, star ratings, elementor
5
  Tested up to: 6.0
6
  Requires at least: 5.8
7
- Stable tag: 6.1.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -156,6 +156,13 @@ This update requires a minimum of PHP 7.2 and WordPress 5.8. There are also a fe
156
 
157
  == Changelog ==
158
 
 
 
 
 
 
 
 
159
  = 6.1.1 (2022-10-12) =
160
 
161
  - Fixed admin page header on mobile devices
4
  Tags: reviews, ratings, testimonials, woocommerce, product reviews, business reviews, stars, star ratings, elementor
5
  Tested up to: 6.0
6
  Requires at least: 5.8
7
+ Stable tag: 6.1.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
156
 
157
  == Changelog ==
158
 
159
+ = 6.1.2 (2022-10-16) =
160
+
161
+ - Added a notice when integrating with "Schema and Structured Data plugin" to load schema markup in the footer
162
+ - Fixed a possible issue with saving add-on licenses (hopefully!)
163
+ - Fixed Schema Pro integration
164
+ - Improved documentaton
165
+
166
  = 6.1.1 (2022-10-12) =
167
 
168
  - Fixed admin page header on mobile devices
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: 6.1.1
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: 6.1.2
11
  * Author: Paul Ryley
12
  * Author URI: https://geminilabs.io
13
  * License: GPL2
views/pages/documentation/support.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php defined('ABSPATH') || exit;
2
 
3
  $sections = [ // order is intentional
4
- trailingslashit(__DIR__).'support/get-started.php',
5
  trailingslashit(__DIR__).'support/basic-troubleshooting.php',
6
  trailingslashit(__DIR__).'support/common-problems-and-solutions.php',
7
  trailingslashit(__DIR__).'support/compatibility-issues.php',
1
  <?php defined('ABSPATH') || exit;
2
 
3
  $sections = [ // order is intentional
4
+ trailingslashit(__DIR__).'support/getting-started.php',
5
  trailingslashit(__DIR__).'support/basic-troubleshooting.php',
6
  trailingslashit(__DIR__).'support/common-problems-and-solutions.php',
7
  trailingslashit(__DIR__).'support/compatibility-issues.php',
views/pages/documentation/support/basic-troubleshooting.php CHANGED
@@ -4,7 +4,7 @@
4
  <h3 class="glsr-card-heading">
5
  <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="support-basic-troubleshooting">
6
  <span class="title">Basic Troubleshooting Steps</span>
7
- <span class="badge code important">Do this first</span>
8
  <span class="icon"></span>
9
  </button>
10
  </h3>
@@ -13,15 +13,16 @@
13
  <p class="components-notice__content">If you find an incompatible theme or plugin, please <code><a data-expand="#support-contact-support" href="<?= glsr_admin_url('documentation', 'support'); ?>">contact support</a></code> so we can fix it.</p>
14
  </div>
15
  <h3>1. Make sure you are using the latest version of Site Reviews.</h3>
16
- <p>Site Reviews is updated frequently with bug patches, security updates, improvements, and new features. If you are not using the latest version and are experiencing problems, chances are good that your problem has already been addressed in the latest version.</p>
17
  <h3>2. Deactivate Site Reviews and then reactivate it.</h3>
18
- <p>This should repair any broken database table indexes; this may happen if you cloned your database, or restored it from a backup.</p>
19
  <h3>3. Run the repair tools.</h3>
20
- <p>If you have recently upgraded to a new major version of Site Reviews and your reviews have stopped working, you may need to run the <code><a data-expand="#tools-migrate-plugin" href="<?= glsr_admin_url('tools', 'general'); ?>">Migrate Plugin</a></code> and <code><a data-expand="#tools-reset-assigned-meta" href="<?= glsr_admin_url('tools', 'general'); ?>">Reset Assigned Meta Values</a></code> tools. Generally, plugin migrations should automatically run in the background as needed; however, if you are experiencing problems with your reviews after updating Site Reviews, you can also run these tools manually.</p>
21
  <h3>4. Temporarily switch to an official WordPress Theme.</h3>
22
- <p>Try switching to an official WordPress Theme (i.e. Twenty Twenty) and then see if you are still experiencing problems with the plugin. If this fixes the problem then there is a compatibility issue with your theme.</p>
23
  <h3>5. Temporarily deactivate all of your plugins.</h3>
24
- <p>If switching to an official WordPress theme did not fix anything, the final thing to try is to deactivate all of your plugins except for Site Reviews. If this fixes the problem then there is a compatibility issue with one of your plugins.</p>
25
- <p>To find out which plugin is incompatible with Site Reviews you will need to reactivate your plugins one-by-one until you find the plugin that is causing the problem. If you think that you’ve found the culprit, deactivate it and continue to test the rest of your plugins. Hopefully you won’t find any more but it’s always better to make sure.</p>
26
  </div>
27
  </div>
 
4
  <h3 class="glsr-card-heading">
5
  <button type="button" class="glsr-accordion-trigger" aria-expanded="false" aria-controls="support-basic-troubleshooting">
6
  <span class="title">Basic Troubleshooting Steps</span>
7
+ <span class="badge code important">Do this before asking for support!</span>
8
  <span class="icon"></span>
9
  </button>
10
  </h3>
13
  <p class="components-notice__content">If you find an incompatible theme or plugin, please <code><a data-expand="#support-contact-support" href="<?= glsr_admin_url('documentation', 'support'); ?>">contact support</a></code> so we can fix it.</p>
14
  </div>
15
  <h3>1. Make sure you are using the latest version of Site Reviews.</h3>
16
+ <p>Site Reviews is updated frequently with bug patches, security updates, improvements, and new features. If you are experiencing problems, make sure you are using the latest version, as there is a good chance that the problem has already been fixed.</p>
17
  <h3>2. Deactivate Site Reviews and then reactivate it.</h3>
18
+ <p>If you recently cloned your database or restored it from a backup, this should repair any broken database indexes.</p>
19
  <h3>3. Run the repair tools.</h3>
20
+ <p>If you recently upgraded to a new version of Site Reviews and your reviews stopped working, try running the <code><a data-expand="#tools-migrate-plugin" href="<?= glsr_admin_url('tools', 'general'); ?>">Migrate Plugin</a></code> and <code><a data-expand="#tools-reset-assigned-meta" href="<?= glsr_admin_url('tools', 'general'); ?>">Reset Assigned Meta Values</a></code> tools. Plugin migrations should run automatically in the background when needed; however, sometimes, you may need to run these tools manually.</p>
21
  <h3>4. Temporarily switch to an official WordPress Theme.</h3>
22
+ <p>Try switching to an official WordPress Theme (i.e. Twenty Twenty-One) and then see if you are still experiencing problems with the plugin. If this fixes the problem, your theme has a compatibility issue.</p>
23
  <h3>5. Temporarily deactivate all of your plugins.</h3>
24
+ <p>If switching to an official WordPress theme did not fix anything, the final thing to try is deactivating all of your plugins except for Site Reviews. If this fixes the problem, there is a compatibility issue with one of your plugins.</p>
25
+ <p>To find out which plugin is incompatible with Site Reviews you will need to reactivate your plugins one by one until you find the plugin causing the problem. Then, if you think you’ve found the culprit, deactivate it and continue testing the rest of your plugins. Hopefully, you won’t find any more, but it’s good to make sure.</p>
26
  </div>
27
  </div>
28
+
views/pages/documentation/support/common-problems-and-solutions.php CHANGED
@@ -10,54 +10,56 @@
10
  <div id="support-common-problems-and-solutions" class="inside">
11
 
12
  <h3>After restoring my database from a backup, reviews are no longer being assigned.</h3>
13
- <p>To fix this problem, deactivate the Site Reviews plugin and then activate it again.</p>
14
 
15
- <h3>Email notifications are not working</h3>
16
- <p>Site Reviews uses the standard WordPress mail functions to send email. However, this does not guarantee that emails will send successfully if your WordPress settings and server configuration are incorrect.</p>
17
- <p>To make sure that emails notifications are sent, please verify that you are sending from an email address that uses the same domain as your website. For example, if your website is <code>https://reviews.com</code>, then the email address you are sending from should end with <code>@reviews.com</code>. You can change the email address that notifications are sent from in the <code><a href="<?= glsr_admin_url('settings', 'general'); ?>">settings</a></code>. If the "Send Emails From" email address you have saved in the settings does not share the same domain as your website, you will likely experience issues sending email.</p>
18
- <p>If your email notifications are still not sending, I recommend that you install the <a href="https://wordpress.org/plugins/check-email/">Check Email</a> plugin to verify that your website is able to correctly send email. See also, <a href="https://www.butlerblog.com/2013/12/12/easy-smtp-email-wordpress-wp_mail/">Easy SMTP email settings for WordPress</a>.</p>
19
 
20
  <h3>The "Site Reviews will automatically migrate your reviews and settings to the latest version" notice keeps appearing.</h3>
21
- <p>This notice may appear after updating Site Reviews. If it does, please click the "Run Migration" button in the notice. If it continues to appear after reloading your pages:</p>
22
  <ol>
23
  <li>
24
- <p>Check the <code><a href="<?= glsr_admin_url('tools', 'console'); ?>">Tools &rarr; Console</a></code> page. If there are any entries that say "Unknown character set", then you will need to check your wp-config.php file to see if it defines <a href="https://wordpress.org/support/article/editing-wp-config-php/#database-character-set" target="_blank">DB_CHARSET</a> or <a href="https://wordpress.org/support/article/editing-wp-config-php/#database-collation" target="_blank">DB_COLLATE</a>. If it does, either remove those entries, or make sure that the values they define are correct.</p>
25
  </li>
26
  <li>
27
  <p>You may be using a caching plugin which is caching the database and preventing Site Reviews from storing the migration status. To fix this, you will need to flush your database cache and/or object cache and then try again.</p>
28
  </li>
29
  <li>
30
- <p>You may have 3rd-party reviews that were not imported correctly. You can verify this by looking for reviews on the <code><a href="<?= glsr_admin_url(); ?>">All Reviews</a></code> page that do not have any stars. To fix this, please delete the invalid reviews, empty the trash, and then try again. Afterwards, use the provided <code><a href="<?= glsr_admin_url('tools', 'general'); ?>" data-expand="#tools-import-reviews">Import Reviews</a></code> tool to re-import the reviews.</p>
31
  </li>
32
  <li>
33
- <p>You may have reviews that were duplicated with a plugin (i.e. "Duplicate Page" plugin). Duplication plugins will not work correctly with Site Reviews because the review details are stored in a custom database table and then linked to the review; this allows Site Reviews to perform much faster database queries. To fix this, please delete the duplicated reviews, empty the trash, then try again.</p>
34
  </li>
35
  </ol>
36
 
37
- <h3>The review form is not working, the submit button just spins.</h3>
38
  <ol>
39
  <li>
40
- <p>Does your website have a SSL certificate? If it does, make sure that your website is configured to always use it by using a SSL plugin such as <a href="https://wordpress.org/plugins/really-simple-ssl/">Really Simple SSL</a>. Site Reviews will use HTTPS to submit a review if possible, but if your site has a valid SSL certificate and you are viewing the website using HTTP (instead of HTTPS) then the browser will detect this as a cross-domain request and prevent the review submission from completing.</p>
41
  </li>
42
  <li>
43
- <p>Have you used a security plugin to disable access to <code>/wp-admin/admin-ajax.php</code> on the frontend of your website, or have you disabled <code>/wp-admin/</code> access for non-administrators? If you have, then it's possible this is preventing Site Reviews from submitting reviews.</p>
44
  </li>
45
  <li>
46
- <p>Are you using Cloudflare? If you created a Cloudflare Firewall rule to block access to the WordPress admin, you may have incorrectly configured the rule. See also: <a href="https://turbofuture.com/internet/Cloudflare-Firewall-Rules-for-Securing-WordPress#3-protect-the-wp-admin-area" target="_blank">Cloudflare Firewall Rules for Securing WordPress</a></p>
47
  </li>
48
  <li>
49
- <p>If the review is created but the button keeps spinning, then your server is likely not configured to send email and is preventing WordPress from sending the email notifications. You will need to either disable the notification setting for new reviews, or fix the problem on your server.</p>
50
  </li>
51
  <li>
52
- <p>Finally, check the <code><a href="<?= glsr_admin_url('tools', 'console'); ?>">Tools &rarr; Console</a></code> page for any helpful messages which may help you track down the cause of the problem.</p>
53
  </li>
54
  </ol>
55
 
56
- <h3>The review form is not working, it just returns an error message.</h3>
57
  <p>Here is a list of possible errors and what they mean:</p>
58
  <ol>
59
  <li>
60
- <h4 style="font-size:15px;"><?= __('The form could not be submitted. Please notify the site administrator.', 'site-reviews'); ?></h4>
 
 
61
  <p>This is an Ajax error that is triggered by any of the following reasons:</p>
62
  <ul>
63
  <li>The Form Request is missing a Nonce</li>
@@ -65,32 +67,60 @@
65
  <li>The Form Request is missing a required action</li>
66
  <li>The Form Request is invalid</li>
67
  </ul>
68
- <p>To fix the nonce errors, make sure that you are not caching the review page for logged in users because Site Reviews adds a <a href="https://www.bynicolas.com/code/wordpress-nonce/" target="_blank">WordPress Nonce</a> token to the form if the user is logged in. Nonces are a standard WordPress security feature that help to prevent malicious form submissions, but they will not work if your web pages are being cached because the nonce tokens are time-sensitive and their validity expires after 12 hours.</p>
69
- <p>Alternatively, you may remove the Nonce check as shown in the FAQ page: <code><a data-expand="#faq-remove-nonce-check" href="<?= glsr_admin_url('documentation', 'faq'); ?>">How do I remove the WordPress Nonce check for logged in users?</a></code>.</p>
70
  </li>
71
  <li>
72
- <h4 style="font-size:15px;"><?= __('Your review cannot be submitted at this time.', 'site-reviews'); ?></h4>
 
 
73
  <p>This error is shown when the Blacklist validator prevents the review from being submitted.</p>
74
  </li>
75
  <li>
76
- <h4 style="font-size:15px;"><?= __('This review has been flagged as possible spam and cannot be submitted.', 'site-reviews'); ?></h4>
 
 
77
  <p>This error is shown when the Akismet or Honeypot validator prevents the review from being submitted.</p>
78
  </li>
79
  <li>
80
- <h4 style="font-size:15px;"><?= __('Your review could not be submitted and the error has been logged. Please notify the site administrator.', 'site-reviews'); ?></h4>
81
- <p>You should almost never see this error. It is usually triggered when WordPress encounters an error when saving the review to the database. It may also be due to an error in a custom function that you have added to your theme's functions.php file that is triggered after a review is created.</p>
82
- <p>If you encounter this error, first try deactivating Site Reviews and then reactivate it. If you recently cloned your database, or restored it from a backup, then doing this should fix any broken database table indexes.</p>
83
- <p>If that doesn't work, please contact support for assistance.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  </li>
85
  <li>
86
- <h4 style="font-size:15px;"><?= __('The review submission failed. Please notify the site administrator.', 'site-reviews'); ?></h4>
87
- <p>This error is shown if you have added your own custom validation which is returning false. You can override this error with your own by returning an error message instead of <code>false</code> in your custom validation logic.</p>
 
 
88
  </li>
89
  <li>
90
- <h4 style="font-size:15px;"><?= __('Service Unavailable.', 'site-reviews'); ?></h4>
91
- <p>If your website is using Cloudflare and you have configured a Firewall rule to block access to <code>wp-admin</code>, then this is likely what is causing the error. Site Reviews uses the <code>/wp-admin/admin-ajax.php</code> file to submit AJAX requests, this is standard practice for WordPress plugins. To learn how to correctly configure Cloudflare to protect your <code>wp-admin</code> without blocking access to "admin-ajax.php", please see: <a href="https://turbofuture.com/internet/Cloudflare-Firewall-Rules-for-Securing-WordPress">Cloudflare Firewall Rules for Securing WordPress</a></p>
 
 
92
  </li>
93
  </ol>
94
- <p>Finally, in each case you should also check the <code><a href="<?= glsr_admin_url('tools', 'console'); ?>">Tools &rarr; Console</a></code> page for any error messages that may have been logged as this will provide you additional information on the error and why it happened.</p>
95
  </div>
96
  </div>
10
  <div id="support-common-problems-and-solutions" class="inside">
11
 
12
  <h3>After restoring my database from a backup, reviews are no longer being assigned.</h3>
13
+ <p>To fix this problem, deactivate the Site Reviews plugin and activate it again.</p>
14
 
15
+ <h3>Email notifications are not working.</h3>
16
+ <p>Site Reviews uses the standard WordPress mail functions to send emails. However, this does not guarantee that emails will send successfully if your WordPress settings and server configuration are incorrect.</p>
17
+ <p>To ensure notifications are sent, please verify that you are sending from an email address that uses the same domain as your website. For example, if your website is <code>https://reviews.com</code>, the email address you are sending from should end with <code>@reviews.com</code>. You can change the email address that notifications are sent from in the <code><a href="<?= glsr_admin_url('settings', 'general'); ?>">settings</a></code>. If the <em>Send Emails From</em> email address saved in the settings does not share the same domain as your website, you will likely experience issues sending emails.</p>
18
+ <p>If notifications are still not sending, I recommend you install the <a href="https://wordpress.org/plugins/check-email/">Check Email</a> plugin to verify that your website can correctly send emails. See also, <a href="https://www.butlerblog.com/2013/12/12/easy-smtp-email-wordpress-wp_mail/">Easy SMTP email settings for WordPress</a>.</p>
19
 
20
  <h3>The "Site Reviews will automatically migrate your reviews and settings to the latest version" notice keeps appearing.</h3>
21
+ <p>This message may appear after updating Site Reviews. Please click the "Run Migration" button in the notice if it does. If it continues to show after reloading your pages:</p>
22
  <ol>
23
  <li>
24
+ <p>Check the <code><a href="<?= glsr_admin_url('tools', 'console'); ?>">Tools &rarr; Console</a></code> page. If any entries say "Unknown character set", you will need to check your wp-config.php file to see if it defines <a href="https://wordpress.org/support/article/editing-wp-config-php/#database-character-set" target="_blank">DB_CHARSET</a> or <a href="https://wordpress.org/support/article/editing-wp-config-php/#database-collation" target="_blank">DB_COLLATE</a>. If it does, either remove those entries or ensure the values they define are correct, then try again.</p>
25
  </li>
26
  <li>
27
  <p>You may be using a caching plugin which is caching the database and preventing Site Reviews from storing the migration status. To fix this, you will need to flush your database cache and/or object cache and then try again.</p>
28
  </li>
29
  <li>
30
+ <p>You may have 3rd-party reviews that were not imported correctly. You can verify this by looking on the <code><a href="<?= glsr_admin_url(); ?>">All Reviews</a></code> page for reviews that do not have any stars. To fix this, delete the invalid reviews and empty the trash. Afterwards, use the provided <code><a href="<?= glsr_admin_url('tools', 'general'); ?>" data-expand="#tools-import-reviews">Import Reviews</a></code> tool to re-import the reviews and then try again.</p>
31
  </li>
32
  <li>
33
+ <p>You may have reviews that were duplicated or cloned with an unsupported plugin. Most duplication plugins will not work with Site Reviews because the review details are stored in a custom database table. Please delete the duplicated reviews, empty the trash and try again.</p>
34
  </li>
35
  </ol>
36
 
37
+ <h3>The review form is not working; the submit button spins forever.</h3>
38
  <ol>
39
  <li>
40
+ <p>Does your website have an SSL certificate? If it does, ensure your website is configured to always use it by using an SSL plugin like <a href="https://wordpress.org/plugins/really-simple-ssl/">Really Simple SSL</a>. If your website has a valid SSL certificate, but you view it using <code>http://</code> instead of <code>https://</code>, the browser will detect this as a <em>Cross-Domain Request</em> and prevent you from submitting the review.</p>
41
  </li>
42
  <li>
43
+ <p>Are you using a security plugin to disable access to <code>/wp-admin/admin-ajax.php</code> on the front end of your website? Or, have you disabled access to <code>/wp-admin/</code> for non-administrators? If you have, this could be preventing Site Reviews from submitting reviews.</p>
44
  </li>
45
  <li>
46
+ <p>Are you using Cloudflare? Have you created a Cloudflare Firewall rule to block access to the WordPress admin? If so, you might have incorrectly configured the rule. See also: <a href="https://turbofuture.com/internet/Cloudflare-Firewall-Rules-for-Securing-WordPress#3-protect-the-wp-admin-area" target="_blank">Cloudflare Firewall Rules for Securing WordPress</a></p>
47
  </li>
48
  <li>
49
+ <p>Was the review created? Do you have notifications enabled in the Site Reviews settings? If so, then your server might not be configured to send emails. You must either disable the notification setting for new reviews or fix your server configuration.</p>
50
  </li>
51
  <li>
52
+ <p>Finally, check the <code><a href="<?= glsr_admin_url('tools', 'console'); ?>">Tools &rarr; Console</a></code> page for helpful messages that may help you track down the cause of the problem.</p>
53
  </li>
54
  </ol>
55
 
56
+ <h3>The review form is not working; it returns an error message.</h3>
57
  <p>Here is a list of possible errors and what they mean:</p>
58
  <ol>
59
  <li>
60
+ <h4 class="components-notice is-error" style="font-size:15px;">
61
+ <?= __('The form could not be submitted. Please notify the site administrator.', 'site-reviews'); ?>
62
+ </h4>
63
  <p>This is an Ajax error that is triggered by any of the following reasons:</p>
64
  <ul>
65
  <li>The Form Request is missing a Nonce</li>
67
  <li>The Form Request is missing a required action</li>
68
  <li>The Form Request is invalid</li>
69
  </ul>
70
+ <p>To fix the nonce errors, ensure you are not caching the review page for logged-in users because Site Reviews adds a <a href="https://www.bynicolas.com/code/wordpress-nonce/" target="_blank">WordPress Nonce</a> token to the form if the user is logged in. Nonces are a standard WordPress security feature that helps to prevent malicious form submissions. Still, they will not work if your web pages are cached because the nonce tokens are time-sensitive, and their validity expires after 12 hours.</p>
71
+ <p>Alternatively, you may remove the Nonce check as shown on the FAQ page: <code><a data-expand="#faq-remove-nonce-check" href="<?= glsr_admin_url('documentation', 'faq'); ?>">How do I remove the WordPress Nonce check for logged-in users?</a></code>.</p>
72
  </li>
73
  <li>
74
+ <h4 class="components-notice is-error" style="font-size:15px;">
75
+ <?= __('Your review cannot be submitted at this time.', 'site-reviews'); ?>
76
+ </h4>
77
  <p>This error is shown when the Blacklist validator prevents the review from being submitted.</p>
78
  </li>
79
  <li>
80
+ <h4 class="components-notice is-error" style="font-size:15px;">
81
+ <?= __('This review has been flagged as possible spam and cannot be submitted.', 'site-reviews'); ?>
82
+ </h4>
83
  <p>This error is shown when the Akismet or Honeypot validator prevents the review from being submitted.</p>
84
  </li>
85
  <li>
86
+ <h4 class="components-notice is-error" style="font-size:15px;">
87
+ <?= __('Your review could not be submitted, and the error has been logged. Please notify the site administrator.', 'site-reviews'); ?>
88
+ </h4>
89
+ <p>This error is triggered when WordPress encounters an error when saving the review to the database.</p>
90
+ <p>If you encounter this error:</p>
91
+ <ul>
92
+ <li><p>Check for any invalid custom functions you may have added to your theme's <code>functions.php</code> file that might be triggered after a review is created.</p></li>
93
+ <li><p>Deactivate Site Reviews and then reactivate it. If you recently cloned your database or restored it from a backup, this <em>should</em> fix any broken database table indexes.</p></li>
94
+ <li><p>If you imported or cloned your database and can redo it, try deactivating Site Reviews before you export the database. This should prevent any issues related to broken indexes.</p></li>
95
+ <li>
96
+ <p>Finally, there is the "Nuclear" option:</p>
97
+ <p class="components-notice is-warning" style="margin-bottom:1em;">
98
+ <i class="dashicons dashicons-warning" style="color:#f0b849; margin-right:5px;"></i>
99
+ Only use this "Nuclear" option as a last resort, as it will delete all your reviews and settings!
100
+ </p>
101
+ <ul>
102
+ <li>Go to the Site Reviews settings.</li>
103
+ <li>Change the "Delete data on uninstall" option to "Delete everything".</li>
104
+ <li>Uninstall Site Reviews.</li>
105
+ <li>Install a new copy of Site Reviews.</li>
106
+ </ul>
107
+ </li>
108
+ </ul>
109
+ <p>If these solutions do not work, please contact support for assistance.</p>
110
  </li>
111
  <li>
112
+ <h4 class="components-notice is-error" style="font-size:15px;">
113
+ <?= __('The review submission failed. Please notify the site administrator.', 'site-reviews'); ?>
114
+ </h4>
115
+ <p>This error is shown if you have added any custom validation functions which are returning false You can override this error with your own by returning an error message instead of <code>false</code> in your custom validation logic.</p>
116
  </li>
117
  <li>
118
+ <h4 class="components-notice is-error" style="font-size:15px;">
119
+ <?= __('Service Unavailable.', 'site-reviews'); ?>
120
+ </h4>
121
+ <p>If your website is using Cloudflare and you configured a Firewall rule to block access to <code>wp-admin</code>, then this is likely causing the error. Site Reviews uses the <code>/wp-admin/admin-ajax.php</code> file to submit AJAX requests; this is standard practice for WordPress plugins. To learn how to correctly configure Cloudflare to protect your <code>wp-admin</code> without blocking access to "admin-ajax.php", please see: <a href="https://turbofuture.com/internet/Cloudflare-Firewall-Rules-for-Securing-WordPress">Cloudflare Firewall Rules for Securing WordPress</a></p>
122
  </li>
123
  </ol>
124
+ <p>Finally, in each case, you should also check the <code><a href="<?= glsr_admin_url('tools', 'console'); ?>">Tools &rarr; Console</a></code> page for any error messages that may have been logged. These provide additional information on the error and why it happened.</p>
125
  </div>
126
  </div>
views/pages/documentation/support/compatibility-issues.php CHANGED
@@ -9,7 +9,7 @@
9
  </h3>
10
  <div id="support-compatibility-issues" class="inside">
11
  <h3>Custom Content Shortcodes</h3>
12
- <p>The <a href="https://wordpress.org/plugins/custom-content-shortcode/">Custom Content Shortcodes</a> plugin provides a [content] shortcode which conflicts with the Site Reviews Gutenberg blocks, and with the shortcodes when they are used with page builder plugins. For a more detailed explaination of this issue, please see this <a href="https://wordpress.org/support/topic/conflict-with-name-attributes-in-form-field/">support forum topic</a>.</p>
13
  <p>Here is a workaround to fix the problem:</p>
14
  <ol>
15
  <li>
@@ -19,7 +19,7 @@
19
  <p>Disable the <code>[raw] shortcode</code> setting.</p>
20
  </li>
21
  <li>
22
- <p>In the Advanced section, add <code>content</code> to the "Deactivate shortcodes" setting to disable the [content] shortcode.</p>
23
  </li>
24
  </ol>
25
  </div>
9
  </h3>
10
  <div id="support-compatibility-issues" class="inside">
11
  <h3>Custom Content Shortcodes</h3>
12
+ <p>The <a href="https://wordpress.org/plugins/custom-content-shortcode/">Custom Content Shortcodes</a> plugin provides a <code>[content]</code> shortcode which conflicts with the Site Reviews blocks. It also conflicts with the Site Reviews shortcodes when they are used with page builder plugins. For a more detailed explaination of this issue, please see this <a href="https://wordpress.org/support/topic/conflict-with-name-attributes-in-form-field/">support forum topic</a>.</p>
13
  <p>Here is a workaround to fix the problem:</p>
14
  <ol>
15
  <li>
19
  <p>Disable the <code>[raw] shortcode</code> setting.</p>
20
  </li>
21
  <li>
22
+ <p>In the Advanced section, add <code>content</code> to the "Deactivate shortcodes" setting to disable the <code>[content]</code> shortcode.</p>
23
  </li>
24
  </ol>
25
  </div>
views/pages/documentation/support/get-started.php DELETED
@@ -1,44 +0,0 @@
1
- <?php defined('ABSPATH') || exit; ?>
2
-
3
- <div class="glsr-card postbox open">
4
- <h3 class="glsr-card-heading">
5
- <button type="button" class="glsr-accordion-trigger" aria-expanded="true" aria-controls="support-get-started">
6
- <span class="title">Getting Started</span>
7
- <span class="badge code">Video Series</span>
8
- <span class="icon"></span>
9
- </button>
10
- </h3>
11
- <div id="support-get-started" class="inside">
12
- <div class="glsr-notice-inline components-notice is-info">
13
- <p class="components-notice__content">See also the basic "getting started" overview on the <a href="<?= glsr_admin_url('welcome'); ?>">Welcome to Site Reviews</a> page.</p>
14
- </div>
15
- <p>These screen recordings (no audio yet, just video) demonstrate the basic features of Site Reviews on a demo website that collects film reviews. Feel free to use the same techniques and apply them to your website.</p>
16
- <div class="glsr-videos">
17
- <div class="glsr-videos__video">
18
- <?php
19
- glsr()->render('views/partials/youtube', [
20
- 'youtube_bg' => glsr()->url('assets/images/video-cover.png'),
21
- 'youtube_id' => $videos[0]['id'],
22
- ]);
23
- ?>
24
- </div>
25
- <div class="glsr-videos__playlist">
26
- <ul>
27
- <?php foreach ($videos as $index => $video) { ?>
28
- <?php
29
- $digits = explode(':', $video['duration']);
30
- $duration = sprintf(_x('%s minutes, %s seconds', 'admin-text', 'site-reviews'), glsr_get($digits, 0), glsr_get($digits, 1));
31
- ?>
32
- <li>
33
- <a class="<?= (0 === $index) ? 'is-active' : ''; ?>" href="https://youtu.be/<?= $video['id']; ?>" data-id="<?= $video['id']; ?>" target="_blank">
34
- <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M14.4 13.2h19.2c.66 0 1.2.54 1.2 1.2v19.2l-21.6-.024V14.4c0-.66.54-1.2 1.2-1.2zm4.8 1.2L16.8 18H18l2.4-3.6h-1.2zm4.8 0h-1.2L20.4 18h1.2l2.4-3.6zm3.6 0h-1.2L24 18h1.2l2.4-3.6zm3.6 0H30L27.6 18h1.2l2.4-3.6zm1.2 16.8v-12H15.6v12h16.8zM21.6 20.4l7.2 4.8-7.2 4.8v-9.6z"/></svg>
35
- <span><?= $video['title']; ?></span>
36
- <span aria-label="<?= $duration; ?>"><?= $video['duration']; ?></span>
37
- </a>
38
- </li>
39
- <?php } ?>
40
- </ul>
41
- </div>
42
- </div>
43
- </div>
44
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
views/pages/documentation/support/getting-started.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php defined('ABSPATH') || exit; ?>
2
+
3
+ <div class="glsr-card postbox open">
4
+ <h3 class="glsr-card-heading">
5
+ <button type="button" class="glsr-accordion-trigger" aria-expanded="true" aria-controls="support-get-started">
6
+ <span class="title">Getting Started</span>
7
+ <span class="icon"></span>
8
+ </button>
9
+ </h3>
10
+ <div id="support-get-started" class="inside">
11
+ <p>The Getting Started guide provides a quick overview of Site Reviews and demonstrates how to use it.</p>
12
+ <p><a class="components-button is-secondary" href="<?= glsr_admin_url('welcome'); ?>">Read the Getting Started Guide</a></p>
13
+ </div>
14
+ </div>
views/pages/documentation/support/upgrade-guide.php CHANGED
@@ -8,8 +8,7 @@
8
  </button>
9
  </h3>
10
  <div id="support-upgrade-guide" class="inside">
11
- <p>If you have not already done so, please make sure to read the Upgrade Guide after updating to a new major version to ensure that Site Reviews continues to work as expected.</p>
12
  <p><a class="components-button is-secondary" href="<?= glsr_admin_url('welcome', 'upgrade-guide'); ?>">Read the Upgrade Guide</a></p>
13
-
14
  </div>
15
  </div>
8
  </button>
9
  </h3>
10
  <div id="support-upgrade-guide" class="inside">
11
+ <p>Please read the Upgrade Guide after updating to a new major version to ensure that Site Reviews continues to work as expected.</p>
12
  <p><a class="components-button is-secondary" href="<?= glsr_admin_url('welcome', 'upgrade-guide'); ?>">Read the Upgrade Guide</a></p>
 
13
  </div>
14
  </div>
views/pages/settings/licenses.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  <div class="components-notice is-info" style="margin-left:0;">
6
  <p class="components-notice__content">
7
- <?= sprintf(_x('You need to authorize your website with the license before you can save it here. To do this, go to the %sLicense Keys%s page on your Nifty Plugins account and click the "Manage Sites" button.', '<a>|</a> (admin-text)', 'site-reviews'), '<a href="https://niftyplugins.com/account/license-keys/" target="_blank">', '</a>'); ?>
8
  </p>
9
  </div>
10
 
4
 
5
  <div class="components-notice is-info" style="margin-left:0;">
6
  <p class="components-notice__content">
7
+ <?= sprintf(_x('Make sure to authorize your website with the license before saving it here. To do this, go to the %sLicense Keys%s page on your Nifty Plugins account and click the "Manage Sites" button.', '<a>|</a> (admin-text)', 'site-reviews'), '<a href="https://niftyplugins.com/account/license-keys/" target="_blank">', '</a>'); ?>
8
  </p>
9
  </div>
10