Version Description
(2020-10-23) =
- Added back the deprecated "count" option on the [site_reviews] shortcode so that it will still work for people who have not yet replaced it with the "display" option.
Download this release
Release Info
Developer | geminilabs |
Plugin | Site Reviews |
Version | 5.0.1 |
Comparing to | |
See all releases |
Code changes from version 5.0.0 to 5.0.1
- plugin/Database/SqlSchema.php +14 -14
- plugin/Defaults/SiteReviewsDefaults.php +1 -0
- readme.txt +7 -2
- site-reviews.php +1 -1
plugin/Database/SqlSchema.php
CHANGED
@@ -23,19 +23,19 @@ class SqlSchema
|
|
23 |
*/
|
24 |
public function addAssignedPostsTableConstraints()
|
25 |
{
|
26 |
-
if (!$this->tableConstraintExists($
|
27 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
28 |
ALTER TABLE {$this->table('assigned_posts')}
|
29 |
-
ADD CONSTRAINT {$
|
30 |
FOREIGN KEY (rating_id)
|
31 |
REFERENCES {$this->table('ratings')} (ID)
|
32 |
ON DELETE CASCADE
|
33 |
"));
|
34 |
}
|
35 |
-
if (!$this->tableConstraintExists($
|
36 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
37 |
ALTER TABLE {$this->table('assigned_posts')}
|
38 |
-
ADD CONSTRAINT {$
|
39 |
FOREIGN KEY (post_id)
|
40 |
REFERENCES {$this->db->posts} (ID)
|
41 |
ON DELETE CASCADE
|
@@ -48,19 +48,19 @@ class SqlSchema
|
|
48 |
*/
|
49 |
public function addAssignedTermsTableConstraints()
|
50 |
{
|
51 |
-
if (!$this->tableConstraintExists($
|
52 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
53 |
ALTER TABLE {$this->table('assigned_terms')}
|
54 |
-
ADD CONSTRAINT {$
|
55 |
FOREIGN KEY (rating_id)
|
56 |
REFERENCES {$this->table('ratings')} (ID)
|
57 |
ON DELETE CASCADE
|
58 |
"));
|
59 |
}
|
60 |
-
if (!$this->tableConstraintExists($
|
61 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
62 |
ALTER TABLE {$this->table('assigned_terms')}
|
63 |
-
ADD CONSTRAINT {$
|
64 |
FOREIGN KEY (term_id)
|
65 |
REFERENCES {$this->db->terms} (term_id)
|
66 |
ON DELETE CASCADE
|
@@ -73,19 +73,19 @@ class SqlSchema
|
|
73 |
*/
|
74 |
public function addAssignedUsersTableConstraints()
|
75 |
{
|
76 |
-
if (!$this->tableConstraintExists($
|
77 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
78 |
ALTER TABLE {$this->table('assigned_users')}
|
79 |
-
ADD CONSTRAINT {$
|
80 |
FOREIGN KEY (rating_id)
|
81 |
REFERENCES {$this->table('ratings')} (ID)
|
82 |
ON DELETE CASCADE
|
83 |
"));
|
84 |
}
|
85 |
-
if (!$this->tableConstraintExists($
|
86 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
87 |
ALTER TABLE {$this->table('assigned_users')}
|
88 |
-
ADD CONSTRAINT {$
|
89 |
FOREIGN KEY (user_id)
|
90 |
REFERENCES {$this->db->users} (ID)
|
91 |
ON DELETE CASCADE
|
@@ -98,10 +98,10 @@ class SqlSchema
|
|
98 |
*/
|
99 |
public function addReviewsTableConstraints()
|
100 |
{
|
101 |
-
if (!$this->tableConstraintExists($
|
102 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
103 |
ALTER TABLE {$this->table('ratings')}
|
104 |
-
ADD CONSTRAINT {$
|
105 |
FOREIGN KEY (review_id)
|
106 |
REFERENCES {$this->db->posts} (ID)
|
107 |
ON DELETE CASCADE
|
23 |
*/
|
24 |
public function addAssignedPostsTableConstraints()
|
25 |
{
|
26 |
+
if (!$this->tableConstraintExists($ratingIdConstraint = $this->prefix('assigned_posts').'_rating_id_foreign')) {
|
27 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
28 |
ALTER TABLE {$this->table('assigned_posts')}
|
29 |
+
ADD CONSTRAINT {$ratingIdConstraint}
|
30 |
FOREIGN KEY (rating_id)
|
31 |
REFERENCES {$this->table('ratings')} (ID)
|
32 |
ON DELETE CASCADE
|
33 |
"));
|
34 |
}
|
35 |
+
if (!$this->tableConstraintExists($postIdConstraint = $this->prefix('assigned_posts').'_post_id_foreign')) {
|
36 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
37 |
ALTER TABLE {$this->table('assigned_posts')}
|
38 |
+
ADD CONSTRAINT {$postIdConstraint}
|
39 |
FOREIGN KEY (post_id)
|
40 |
REFERENCES {$this->db->posts} (ID)
|
41 |
ON DELETE CASCADE
|
48 |
*/
|
49 |
public function addAssignedTermsTableConstraints()
|
50 |
{
|
51 |
+
if (!$this->tableConstraintExists($ratingIdConstraint = $this->prefix('assigned_terms').'_rating_id_foreign')) {
|
52 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
53 |
ALTER TABLE {$this->table('assigned_terms')}
|
54 |
+
ADD CONSTRAINT {$ratingIdConstraint}
|
55 |
FOREIGN KEY (rating_id)
|
56 |
REFERENCES {$this->table('ratings')} (ID)
|
57 |
ON DELETE CASCADE
|
58 |
"));
|
59 |
}
|
60 |
+
if (!$this->tableConstraintExists($termIdConstraint = $this->prefix('assigned_terms').'_term_id_foreign')) {
|
61 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
62 |
ALTER TABLE {$this->table('assigned_terms')}
|
63 |
+
ADD CONSTRAINT {$termIdConstraint}
|
64 |
FOREIGN KEY (term_id)
|
65 |
REFERENCES {$this->db->terms} (term_id)
|
66 |
ON DELETE CASCADE
|
73 |
*/
|
74 |
public function addAssignedUsersTableConstraints()
|
75 |
{
|
76 |
+
if (!$this->tableConstraintExists($ratingIdConstraint = $this->prefix('assigned_users').'_rating_id_foreign')) {
|
77 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
78 |
ALTER TABLE {$this->table('assigned_users')}
|
79 |
+
ADD CONSTRAINT {$ratingIdConstraint}
|
80 |
FOREIGN KEY (rating_id)
|
81 |
REFERENCES {$this->table('ratings')} (ID)
|
82 |
ON DELETE CASCADE
|
83 |
"));
|
84 |
}
|
85 |
+
if (!$this->tableConstraintExists($userIdConstraint = $this->prefix('assigned_users').'_user_id_foreign')) {
|
86 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
87 |
ALTER TABLE {$this->table('assigned_users')}
|
88 |
+
ADD CONSTRAINT {$userIdConstraint}
|
89 |
FOREIGN KEY (user_id)
|
90 |
REFERENCES {$this->db->users} (ID)
|
91 |
ON DELETE CASCADE
|
98 |
*/
|
99 |
public function addReviewsTableConstraints()
|
100 |
{
|
101 |
+
if (!$this->tableConstraintExists($reviewIdConstraint = $this->prefix('assigned_posts').'_review_id_foreign')) {
|
102 |
glsr(Database::class)->dbQuery(glsr(Query::class)->sql("
|
103 |
ALTER TABLE {$this->table('ratings')}
|
104 |
+
ADD CONSTRAINT {$reviewIdConstraint}
|
105 |
FOREIGN KEY (review_id)
|
106 |
REFERENCES {$this->db->posts} (ID)
|
107 |
ON DELETE CASCADE
|
plugin/Defaults/SiteReviewsDefaults.php
CHANGED
@@ -32,6 +32,7 @@ class SiteReviewsDefaults extends Defaults
|
|
32 |
public $mapped = [
|
33 |
'assigned_to' => 'assigned_posts',
|
34 |
'category' => 'assigned_terms',
|
|
|
35 |
'per_page' => 'display',
|
36 |
'user' => 'assigned_users',
|
37 |
];
|
32 |
public $mapped = [
|
33 |
'assigned_to' => 'assigned_posts',
|
34 |
'category' => 'assigned_terms',
|
35 |
+
'count' => 'display', // @deprecated in v4.1.0
|
36 |
'per_page' => 'display',
|
37 |
'user' => 'assigned_users',
|
38 |
];
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: reviews, ratings, testimonials, business reviews, product reviews, stars,
|
|
5 |
Tested up to: 5.5
|
6 |
Requires at least: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 5.0.
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -113,7 +113,11 @@ All documentation can be found in the "Help" page of the plugin. If your questio
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
-
= 5.0.
|
|
|
|
|
|
|
|
|
117 |
|
118 |
- Added "Delete data on uninstall" option to selectively delete plugin data when removing the plugin
|
119 |
- Added "Send Emails From" option to send notifications from a custom email address
|
@@ -151,6 +155,7 @@ All documentation can be found in the "Help" page of the plugin. If your questio
|
|
151 |
- Improved the Terms checkbox in the review form to align correctly with the text
|
152 |
- Improved translation settings
|
153 |
- Refreshed the stars SVG images
|
|
|
154 |
- Removed the "site-reviews/config/forms/submission-form" filter hook (see the Upgrade Guide on the Welcome page)
|
155 |
- Removed the "site-reviews/reviews/reviews-wrapper" filter hook (see the Upgrade Guide on the Welcome page)
|
156 |
- Removed the "site-reviews/submission-form/order" filter hook (see the Upgrade Guide on the Welcome page)
|
5 |
Tested up to: 5.5
|
6 |
Requires at least: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 5.0.1
|
9 |
License: GPLv3
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= 5.0.1 (2020-10-23) =
|
117 |
+
|
118 |
+
- Added back the deprecated "count" option on the [site_reviews] shortcode so that it will still work for people who have not yet replaced it with the "display" option.
|
119 |
+
|
120 |
+
= 5.0.0 (2020-10-22) =
|
121 |
|
122 |
- Added "Delete data on uninstall" option to selectively delete plugin data when removing the plugin
|
123 |
- Added "Send Emails From" option to send notifications from a custom email address
|
155 |
- Improved the Terms checkbox in the review form to align correctly with the text
|
156 |
- Improved translation settings
|
157 |
- Refreshed the stars SVG images
|
158 |
+
- Removed the deprecated "count" option from the [site_reviews] ahortcode (use the "display" option instead).
|
159 |
- Removed the "site-reviews/config/forms/submission-form" filter hook (see the Upgrade Guide on the Welcome page)
|
160 |
- Removed the "site-reviews/reviews/reviews-wrapper" filter hook (see the Upgrade Guide on the Welcome page)
|
161 |
- Removed the "site-reviews/submission-form/order" filter hook (see the Upgrade Guide on the Welcome 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.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.0.1
|
11 |
* Author: Paul Ryley
|
12 |
* Author URI: https://geminilabs.io
|
13 |
* License: GPL2
|