Version Description
Download this release
Release Info
Developer | bhittani |
Plugin | kk Star Ratings |
Version | 5.2.8 |
Comparing to | |
See all releases |
Code changes from version 5.2.7 to 5.2.8
- CHANGELOG.md +5 -0
- index.php +1 -1
- languages/kk-star-ratings.pot +2 -2
- readme.txt +1 -1
- src/core/index.php +1 -1
- src/core/wp/filters/the_content.php +52 -0
CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
5 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
6 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
## [5.2.7] - 2022-02-07
|
9 |
|
10 |
### Fixed
|
5 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
6 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
7 |
|
8 |
+
## [5.2.8] - 2022-02-08
|
9 |
+
|
10 |
+
### Fixed
|
11 |
+
- The priority for `the_content` filter has been set back to 10 to avoid issues with elementor.
|
12 |
+
|
13 |
## [5.2.7] - 2022-02-07
|
14 |
|
15 |
### Fixed
|
index.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Author URI: http://bhittani.com
|
11 |
* Text Domain: kk-star-ratings
|
12 |
* Domain Path: /languages
|
13 |
-
* Version: 5.2.
|
14 |
* License: GPLv2 or later
|
15 |
*/
|
16 |
|
10 |
* Author URI: http://bhittani.com
|
11 |
* Text Domain: kk-star-ratings
|
12 |
* Domain Path: /languages
|
13 |
+
* Version: 5.2.8
|
14 |
* License: GPLv2 or later
|
15 |
*/
|
16 |
|
languages/kk-star-ratings.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the kk Star Ratings plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: kk Star Ratings 5.2.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/kk-star-ratings\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2022-02-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: kk-star-ratings\n"
|
2 |
# This file is distributed under the same license as the kk Star Ratings plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: kk Star Ratings 5.2.8\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/kk-star-ratings\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2022-02-08T06:54:33+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: kk-star-ratings\n"
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: star ratings, votings, rate posts, ajax ratings, infinite stars, unlimited
|
|
6 |
Requires at least: 5.0
|
7 |
Requires PHP: 7.2
|
8 |
Tested up to: 5.9
|
9 |
-
Stable tag: 5.2.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
6 |
Requires at least: 5.0
|
7 |
Requires PHP: 7.2
|
8 |
Tested up to: 5.9
|
9 |
+
Stable tag: 5.2.8
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
src/core/index.php
CHANGED
@@ -36,4 +36,4 @@ The activation will be handled when the plugin is loaded.
|
|
36 |
We need a higher priority for `the_content` filter
|
37 |
so that we can check for shortcodes and blocks.
|
38 |
================================================== */
|
39 |
-
add_filter('the_content', kksr('core.wp.functions.the_content'), 8);
|
36 |
We need a higher priority for `the_content` filter
|
37 |
so that we can check for shortcodes and blocks.
|
38 |
================================================== */
|
39 |
+
// add_filter('the_content', kksr('core.wp.functions.the_content'), 8);
|
src/core/wp/filters/the_content.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of bhittani/kk-star-ratings.
|
5 |
+
*
|
6 |
+
* (c) Kamal Khan <shout@bhittani.com>
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view
|
9 |
+
* the LICENSE file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Bhittani\StarRating\core\wp\filters;
|
13 |
+
|
14 |
+
use function Bhittani\StarRating\core\functions\filter;
|
15 |
+
use function Bhittani\StarRating\core\functions\option;
|
16 |
+
use function Bhittani\StarRating\functions\to_shortcode;
|
17 |
+
|
18 |
+
if (! defined('KK_STAR_RATINGS')) {
|
19 |
+
http_response_code(404);
|
20 |
+
exit();
|
21 |
+
}
|
22 |
+
|
23 |
+
function the_content(string $content): string
|
24 |
+
{
|
25 |
+
if (! filter('embed', null, $content)) {
|
26 |
+
return $content;
|
27 |
+
}
|
28 |
+
|
29 |
+
$align = 'left';
|
30 |
+
$reference = 'auto';
|
31 |
+
$valign = 'top';
|
32 |
+
|
33 |
+
$position = option('position');
|
34 |
+
|
35 |
+
if (strpos($position, 'top-') === 0) {
|
36 |
+
$align = substr($position, 4);
|
37 |
+
$valign = 'top';
|
38 |
+
}
|
39 |
+
|
40 |
+
if (strpos($position, 'bottom-') === 0) {
|
41 |
+
$align = substr($position, 7);
|
42 |
+
$valign = 'bottom';
|
43 |
+
}
|
44 |
+
|
45 |
+
$starRatings = to_shortcode(kksr('slug'), compact('align', 'reference', 'valign'));
|
46 |
+
|
47 |
+
if ($valign == 'top') {
|
48 |
+
return $starRatings.$content;
|
49 |
+
}
|
50 |
+
|
51 |
+
return $content.$starRatings;
|
52 |
+
}
|