kk Star Ratings - Version 4.1.9

Version Description

Download this release

Release Info

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

Code changes from version 4.1.8 to 4.1.9

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: 4.1.8
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: 4.1.9
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 4.1.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: 2021-03-14T13:23:50+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.3.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 4.1.9\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: 2021-04-18T15:24:53+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.3.0\n"
15
  "X-Domain: kk-star-ratings\n"
src/activate.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  register_activation_hook(config('file'), __NAMESPACE__.'\activation');
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  register_activation_hook(config('file'), __NAMESPACE__.'\activation');
src/admin.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  use RuntimeException;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  use RuntimeException;
src/admin/appearance.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  $gap = [prefix('gap'), get_option(prefix('gap'))];
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  $gap = [prefix('gap'), get_option(prefix('gap'))];
src/admin/general.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  $enable = [prefix('enable'), get_option(prefix('enable'))];
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  $enable = [prefix('enable'), get_option(prefix('enable'))];
src/admin/rich-snippets.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  $grs = [prefix('grs'), get_option(prefix('grs'))];
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  $grs = [prefix('grs'), get_option(prefix('grs'))];
src/ajax.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  add_action('wp_ajax_'.config('slug'), __NAMESPACE__.'\ajax');
@@ -55,7 +55,7 @@ function ajax()
55
  ]));
56
  }
57
 
58
- $best = isset($_POST['best']) ? sanitize_text_field($_POST['best']): get_option(prefix('stars'));
59
  $best = max((int) $best, 1);
60
  $score = sanitize_text_field($_POST['score']);
61
  $score = min(max((int) $score, 1), $best);
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  add_action('wp_ajax_'.config('slug'), __NAMESPACE__.'\ajax');
55
  ]));
56
  }
57
 
58
+ $best = isset($_POST['best']) ? sanitize_text_field($_POST['best']) : get_option(prefix('stars'));
59
  $best = max((int) $best, 1);
60
  $score = sanitize_text_field($_POST['score']);
61
  $score = min(max((int) $score, 1), $best);
src/assets.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  add_action('wp_enqueue_scripts', __NAMESPACE__.'\styles');
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  add_action('wp_enqueue_scripts', __NAMESPACE__.'\styles');
src/config.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  function config($keyOrValues = null, $default = null)
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  function config($keyOrValues = null, $default = null)
src/global.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  function prefix($str)
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  function prefix($str)
src/hook.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  function add_plugin_filter($tag, callable $callback, $priority = 10, $acceptedArgs = 1)
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  function add_plugin_filter($tag, callable $callback, $priority = 10, $acceptedArgs = 1)
src/i18n.php CHANGED
@@ -11,13 +11,13 @@
11
 
12
  namespace Bhittani\StarRating;
13
 
14
- if (!defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
- add_action('init', __NAMESPACE__ . '\load_textdomain');
20
  function load_textdomain()
21
  {
22
- load_plugin_textdomain('kk-star-ratings', false, __DIR__ . '/../languages');
23
  }
11
 
12
  namespace Bhittani\StarRating;
13
 
14
+ if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
+ add_action('init', __NAMESPACE__.'\load_textdomain');
20
  function load_textdomain()
21
  {
22
+ load_plugin_textdomain('kk-star-ratings', false, __DIR__.'/../languages');
23
  }
src/legacy.php CHANGED
@@ -11,7 +11,7 @@
11
 
12
  if (! defined('ABSPATH')) {
13
  http_response_code(404);
14
- die();
15
  }
16
 
17
  if (! function_exists('kk_star_ratings')) {
11
 
12
  if (! defined('ABSPATH')) {
13
  http_response_code(404);
14
+ exit();
15
  }
16
 
17
  if (! function_exists('kk_star_ratings')) {
src/metabox.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  add_action('add_meta_boxes', __NAMESPACE__.'\metabox', 10, 2);
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  add_action('add_meta_boxes', __NAMESPACE__.'\metabox', 10, 2);
src/post.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  add_filter('the_content', __NAMESPACE__.'\content_filter', 10);
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  add_filter('the_content', __NAMESPACE__.'\content_filter', 10);
src/response.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  function response(array $payload = [], $validate = true)
@@ -27,9 +27,9 @@ function response(array $payload = [], $validate = true)
27
  'valign' => null,
28
  'force' => true,
29
  'disabled' => false,
30
- 'size' => get_option(prefix('size')),
31
- 'best' => get_option(prefix('stars')),
32
- 'greet' => get_option(prefix('greet')),
33
  ], array_filter($payload, function ($value) {
34
  return ! is_null($value);
35
  }));
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  function response(array $payload = [], $validate = true)
27
  'valign' => null,
28
  'force' => true,
29
  'disabled' => false,
30
+ 'size' => get_option(prefix('size') ?: config('options')['size']),
31
+ 'best' => get_option(prefix('stars') ?: config('options')['stars']),
32
+ 'greet' => get_option(prefix('greet') ?: config('options')['greet']),
33
  ], array_filter($payload, function ($value) {
34
  return ! is_null($value);
35
  }));
src/shortcode.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  add_shortcode(config('shortcode'), __NAMESPACE__.'\shortcode');
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  add_shortcode(config('shortcode'), __NAMESPACE__.'\shortcode');
src/validate.php CHANGED
@@ -13,7 +13,7 @@ namespace Bhittani\StarRating;
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
- die();
17
  }
18
 
19
  function validate($default = true, $id = null, $slug = null)
13
 
14
  if (! defined('ABSPATH')) {
15
  http_response_code(404);
16
+ exit();
17
  }
18
 
19
  function validate($default = true, $id = null, $slug = null)
src/view.php CHANGED
@@ -16,7 +16,7 @@ use RuntimeException;
16
 
17
  if (! defined('ABSPATH')) {
18
  http_response_code(404);
19
- die();
20
  }
21
 
22
  function view($templates, array $payload = [])
16
 
17
  if (! defined('ABSPATH')) {
18
  http_response_code(404);
19
+ exit();
20
  }
21
 
22
  function view($templates, array $payload = [])
views/admin/fields/number.php CHANGED
@@ -9,4 +9,4 @@
9
  <?= isset($min) ? ('min="'. esc_attr($min).'"') : '' ?>
10
  <?= isset($max) ? ('max="'. esc_attr($max).'"') : '' ?>
11
  <?= isset($step) ? ('step="'. esc_attr($step).'"') : '' ?>
12
- style="width: 5rem;">
9
  <?= isset($min) ? ('min="'. esc_attr($min).'"') : '' ?>
10
  <?= isset($max) ? ('max="'. esc_attr($max).'"') : '' ?>
11
  <?= isset($step) ? ('step="'. esc_attr($step).'"') : '' ?>
12
+ style="width: 5rem; padding-right: 0;">
views/admin/fields/text.php CHANGED
@@ -1,9 +1,8 @@
1
  <?php
2
- if (! defined('ABSPATH')) {
3
- http_response_code(404);
4
- die();
5
- }
6
  ?>
7
 
8
- <input name="<?= esc_attr($name) ?>" value="<?= esc_attr($value) ?>"
9
- style="width: 15rem;">
1
  <?php
2
+ if (!defined('ABSPATH')) {
3
+ http_response_code(404);
4
+ die();
5
+ }
6
  ?>
7
 
8
+ <input type="text" name="<?= esc_attr($name) ?>" value="<?= esc_attr($value) ?>" class="regular-text">