kk Star Ratings - Version 3.1.2

Version Description

Download this release

Release Info

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

Code changes from version 3.1.1 to 3.1.2

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.1.1
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.1.1');
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.1.2
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.1.2');
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
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: kk Star Ratings 3.1.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/index\n"
7
- "POT-Creation-Date: 2019-07-24 06:55:56+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: kk Star Ratings 3.1.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/index\n"
7
+ "POT-Creation-Date: 2019-08-16 15:27:23+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
public/js/kk-star-ratings.js CHANGED
@@ -44,7 +44,7 @@ jQuery(document).ready(function ($) {
44
  $score.text(response.score);
45
  $count.text(response.count);
46
  $legend.show();
47
- if (response.block) {
48
  $el.addClass('kksr-disable');
49
  }
50
  console.log('success', response);
44
  $score.text(response.score);
45
  $count.text(response.count);
46
  $legend.show();
47
+ if (response.disable) {
48
  $el.addClass('kksr-disable');
49
  }
50
  console.log('success', response);
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.1.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -92,6 +92,14 @@ The source of this plugin is located at [Github](https://github.com/kamalkhan/kk
92
 
93
  == Changelog ==
94
 
 
 
 
 
 
 
 
 
95
  = 3.1.0 =
96
 
97
  **Added**
5
  Requires at least: 4.5
6
  Requires PHP: 5.5.9
7
  Tested up to: 5.2.2
8
+ Stable tag: 3.1.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
92
 
93
  == Changelog ==
94
 
95
+ = 3.1.1 =
96
+
97
+ **Fixed **
98
+ - GitHub PR #84: Voting is now disabled on the current page when unique IP is enforced.
99
+
100
+ **Changed**
101
+ - GitHub PR #83: Trim extra spacing in the legend.
102
+
103
  = 3.1.0 =
104
 
105
  **Added**
src/ajax.php CHANGED
@@ -71,7 +71,7 @@ add_action('wp_ajax_nopriv_'.KKSR_SLUG, KKSR_NAMESPACE.'ajax'); function ajax()
71
 
72
  status_header(201);
73
 
74
- $disable = false;
75
  $count = apply_filters('kksr_count', $count);
76
  $score = apply_filters('kksr_score', calculateScore($ratings, $count, getOption('stars')));
77
  $percentage = apply_filters('kksr_percentage', calculatePercentage($ratings, $count));
71
 
72
  status_header(201);
73
 
74
+ $disable = in_array('unique', getOption('strategies'));
75
  $count = apply_filters('kksr_count', $count);
76
  $score = apply_filters('kksr_score', calculateScore($ratings, $count, getOption('stars')));
77
  $percentage = apply_filters('kksr_percentage', calculatePercentage($ratings, $count));
views/legend.php CHANGED
@@ -1,8 +1,4 @@
1
  <div class="kksr-legend" style="<?php echo $count ? '' : 'display: none; ' ?>line-height:<?php echo $size; ?>px;font-size:<?php echo $size/1.5; ?>px">
2
- <div class="kksr-legend-score">
3
- <?php echo apply_filters('kksr_score', $score); ?>
4
- </div>
5
- <div class="kksr-legend-meta">
6
- <?php echo apply_filters('kksr_count', $count); ?>
7
- </div>
8
  </div>
1
  <div class="kksr-legend" style="<?php echo $count ? '' : 'display: none; ' ?>line-height:<?php echo $size; ?>px;font-size:<?php echo $size/1.5; ?>px">
2
+ <div class="kksr-legend-score"><?php echo apply_filters('kksr_score', $score); ?></div>
3
+ <div class="kksr-legend-meta"><?php echo apply_filters('kksr_count', $count); ?></div>
 
 
 
 
4
  </div>