Version Description
Download this release
Release Info
Developer | bhittani |
Plugin | kk Star Ratings |
Version | 3.0.4 |
Comparing to | |
See all releases |
Code changes from version 3.0.3 to 3.0.4
- index.php +2 -2
- languages/kk-star-ratings.pot +29 -29
- readme.txt +1 -1
- src/admin/general.php +2 -1
- src/functions.php +4 -1
index.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Author URI: http://bhittani.com
|
9 |
* Text Domain: kk-star-ratings
|
10 |
* Domain Path: /languages
|
11 |
-
* Version: 3.0.
|
12 |
* License: GPLv2 or later
|
13 |
*
|
14 |
* @package Bhittani\StarRating
|
@@ -21,7 +21,7 @@ if (! defined('ABSPATH')) {
|
|
21 |
|
22 |
define('KKSR_FILE', __FILE__);
|
23 |
define('KKSR_PLUGIN', plugin_basename(KKSR_FILE));
|
24 |
-
define('KKSR_VERSION', '3.0.
|
25 |
define('KKSR_PREFIX', 'kksr_');
|
26 |
define('KKSR_SLUG', 'kk-star-ratings');
|
27 |
define('KKSR_LABEL', 'kk Star Ratings');
|
8 |
* Author URI: http://bhittani.com
|
9 |
* Text Domain: kk-star-ratings
|
10 |
* Domain Path: /languages
|
11 |
+
* Version: 3.0.4
|
12 |
* License: GPLv2 or later
|
13 |
*
|
14 |
* @package Bhittani\StarRating
|
21 |
|
22 |
define('KKSR_FILE', __FILE__);
|
23 |
define('KKSR_PLUGIN', plugin_basename(KKSR_FILE));
|
24 |
+
define('KKSR_VERSION', '3.0.4');
|
25 |
define('KKSR_PREFIX', 'kksr_');
|
26 |
define('KKSR_SLUG', 'kk-star-ratings');
|
27 |
define('KKSR_LABEL', 'kk Star Ratings');
|
languages/kk-star-ratings.pot
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/kk-star-ratings\n"
|
7 |
-
"POT-Creation-Date: 2019-07-18 09:33
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -88,99 +88,99 @@ msgstr ""
|
|
88 |
msgid "Stroke color of hover stars."
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: src/admin/general.php:
|
92 |
msgid "Status"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: src/admin/general.php:
|
96 |
msgid "Active"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: src/admin/general.php:
|
100 |
msgid "Globally activate/deactivate the star ratings."
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: src/admin/general.php:
|
104 |
msgid "Strategies"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: src/admin/general.php:
|
108 |
msgid "Select the voting strategies."
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: src/admin/general.php:
|
112 |
msgid "Allow voting in archives"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: src/admin/general.php:
|
116 |
msgid "Allow guests to vote"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: src/admin/general.php:
|
120 |
msgid "Unique votes (based on IP Address)"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: src/admin/general.php:
|
124 |
msgid "Default Position"
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: src/admin/general.php:
|
128 |
msgid "Choose a default position."
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: src/admin/general.php:
|
132 |
msgid "Top Left"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: src/admin/general.php:
|
136 |
msgid "Top Center"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: src/admin/general.php:
|
140 |
msgid "Top Right"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: src/admin/general.php:
|
144 |
msgid "Bottom Left"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: src/admin/general.php:
|
148 |
msgid "Bottom Center"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: src/admin/general.php:
|
152 |
msgid "Bottom Right"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: src/admin/general.php:
|
156 |
msgid "Disable Locations"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: src/admin/general.php:
|
160 |
msgid "Select the locations where the star ratings should be excluded."
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: src/admin/general.php:
|
164 |
msgid "Home page"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: src/admin/general.php:
|
168 |
msgid "Archives"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: src/admin/general.php:
|
172 |
msgid "Posts"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: src/admin/general.php:
|
176 |
msgid "Pages"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: src/admin/general.php:
|
180 |
msgid "Disable Categories"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: src/admin/general.php:
|
184 |
msgid ""
|
185 |
"Exclude star ratings from posts belonging to the selected "
|
186 |
"categories.<br>Use <strong>cmd/ctrl + click</strong> to select/deselect "
|
@@ -227,18 +227,18 @@ msgstr ""
|
|
227 |
msgid "A rating is required to vote."
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: src/functions.php:
|
231 |
msgid "You can only rate between 0 and %s."
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: src/functions.php:
|
235 |
msgid "General"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: src/functions.php:
|
239 |
msgid "Rich Snippets"
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: src/functions.php:
|
243 |
msgid "Appearance"
|
244 |
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/kk-star-ratings\n"
|
7 |
+
"POT-Creation-Date: 2019-07-18 09:56:33+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
88 |
msgid "Stroke color of hover stars."
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: src/admin/general.php:54 src/admin/rich-snippets.php:18
|
92 |
msgid "Status"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: src/admin/general.php:55 src/admin/rich-snippets.php:19
|
96 |
msgid "Active"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: src/admin/general.php:59
|
100 |
msgid "Globally activate/deactivate the star ratings."
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: src/admin/general.php:66
|
104 |
msgid "Strategies"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: src/admin/general.php:68
|
108 |
msgid "Select the voting strategies."
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: src/admin/general.php:75
|
112 |
msgid "Allow voting in archives"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: src/admin/general.php:82
|
116 |
msgid "Allow guests to vote"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: src/admin/general.php:89
|
120 |
msgid "Unique votes (based on IP Address)"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: src/admin/general.php:101
|
124 |
msgid "Default Position"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: src/admin/general.php:103
|
128 |
msgid "Choose a default position."
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: src/admin/general.php:107
|
132 |
msgid "Top Left"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: src/admin/general.php:114
|
136 |
msgid "Top Center"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: src/admin/general.php:121
|
140 |
msgid "Top Right"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: src/admin/general.php:128
|
144 |
msgid "Bottom Left"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: src/admin/general.php:135
|
148 |
msgid "Bottom Center"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: src/admin/general.php:142
|
152 |
msgid "Bottom Right"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: src/admin/general.php:154
|
156 |
msgid "Disable Locations"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: src/admin/general.php:156
|
160 |
msgid "Select the locations where the star ratings should be excluded."
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: src/admin/general.php:163
|
164 |
msgid "Home page"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: src/admin/general.php:170
|
168 |
msgid "Archives"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: src/admin/general.php:177
|
172 |
msgid "Posts"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: src/admin/general.php:184
|
176 |
msgid "Pages"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: src/admin/general.php:197
|
180 |
msgid "Disable Categories"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: src/admin/general.php:204
|
184 |
msgid ""
|
185 |
"Exclude star ratings from posts belonging to the selected "
|
186 |
"categories.<br>Use <strong>cmd/ctrl + click</strong> to select/deselect "
|
227 |
msgid "A rating is required to vote."
|
228 |
msgstr ""
|
229 |
|
230 |
+
#: src/functions.php:340
|
231 |
msgid "You can only rate between 0 and %s."
|
232 |
msgstr ""
|
233 |
|
234 |
+
#: src/functions.php:441
|
235 |
msgid "General"
|
236 |
msgstr ""
|
237 |
|
238 |
+
#: src/functions.php:442
|
239 |
msgid "Rich Snippets"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: src/functions.php:443
|
243 |
msgid "Appearance"
|
244 |
msgstr ""
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: star ratings, votings, rate posts, ajax ratings, infinite stars, unlimited
|
|
5 |
Requires at least: 4.5
|
6 |
Requires PHP: 5.5.9
|
7 |
Tested up to: 5.2.2
|
8 |
-
Stable tag: 3.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
5 |
Requires at least: 4.5
|
6 |
Requires PHP: 5.5.9
|
7 |
Tested up to: 5.2.2
|
8 |
+
Stable tag: 3.0.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
src/admin/general.php
CHANGED
@@ -15,7 +15,8 @@ $enabled = (bool) getOption('enable');
|
|
15 |
$position = getOption('position');
|
16 |
$excludedLocations = getOption('exclude_locations');
|
17 |
$strategies = getOption('strategies');
|
18 |
-
$excludedCategories = getOption('exclude_categories');
|
|
|
19 |
|
20 |
$categories = get_terms([
|
21 |
'taxonomy' => 'category',
|
15 |
$position = getOption('position');
|
16 |
$excludedLocations = getOption('exclude_locations');
|
17 |
$strategies = getOption('strategies');
|
18 |
+
$excludedCategories = getOption('exclude_categories', []);
|
19 |
+
$excludedCategories = is_array($excludedCategories) ? $excludedCategories : [];
|
20 |
|
21 |
$categories = get_terms([
|
22 |
'taxonomy' => 'category',
|
src/functions.php
CHANGED
@@ -215,7 +215,10 @@ function isValidPost($p = null)
|
|
215 |
return $category->term_id;
|
216 |
}, get_the_category($p->ID));
|
217 |
|
218 |
-
$
|
|
|
|
|
|
|
219 |
|
220 |
$bool = ($type = get_post_type($p))
|
221 |
// post does not belong to an excluded category.
|
215 |
return $category->term_id;
|
216 |
}, get_the_category($p->ID));
|
217 |
|
218 |
+
$excludedCategories = getOption('exclude_categories', []);
|
219 |
+
$excludedCategories = is_array($excludedCategories) ? $excludedCategories : [];
|
220 |
+
|
221 |
+
$categoriesDiff = array_diff($categories, $excludedCategories);
|
222 |
|
223 |
$bool = ($type = get_post_type($p))
|
224 |
// post does not belong to an excluded category.
|