kk Star Ratings - Version 5.2.7

Version Description

Download this release

Release Info

Developer bhittani
Plugin Icon 128x128 kk Star Ratings
Version 5.2.7
Comparing to
See all releases

Code changes from version 5.2.6 to 5.2.7

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.6] - 2022-01-27
9
 
10
  ### Updated
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
11
+ - Checks for `get_the_ID()` before falling back to query vars.
12
+
13
  ## [5.2.6] - 2022-01-27
14
 
15
  ### Updated
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.6
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.7
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\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-01-27T07:37:08+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"
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.7\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-07T09:11:10+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
@@ -5,8 +5,8 @@ Donate link: https://github.com/kamalkhan/kk-star-ratings
5
  Tags: star ratings, votings, rate posts, ajax ratings, infinite stars, unlimited stars, google rich snippets, structured data, SEO, SERP
6
  Requires at least: 5.0
7
  Requires PHP: 7.2
8
- Tested up to: 5.8.1
9
- Stable tag: 5.2.6
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
5
  Tags: star ratings, votings, rate posts, ajax ratings, infinite stars, unlimited stars, google rich snippets, structured data, SEO, SERP
6
  Requires at least: 5.0
7
  Requires PHP: 7.2
8
+ Tested up to: 5.9
9
+ Stable tag: 5.2.7
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
src/core/filters/payload.php CHANGED
@@ -25,8 +25,10 @@ function payload(array $payload): array
25
  $payload['id'] = (int) ($payload['id'] ?? get_post_field('ID'));
26
 
27
  if (! $payload['id']) {
28
- $url = home_url(add_query_arg([]));
29
- $payload['id'] = url_to_postid($url);
 
 
30
  }
31
 
32
  $payload['slug'] = $payload['slug'] ?? 'default';
25
  $payload['id'] = (int) ($payload['id'] ?? get_post_field('ID'));
26
 
27
  if (! $payload['id']) {
28
+ if (! ($payload['id'] = get_the_ID())) {
29
+ $url = home_url(add_query_arg([]));
30
+ $payload['id'] = url_to_postid($url);
31
+ }
32
  }
33
 
34
  $payload['slug'] = $payload['slug'] ?? 'default';