Yasr – Yet Another Stars Rating - Version 1.8.9

Version Description

  • FIXED: updated freemius sdk to version 2.2.4
Download this release

Release Info

Developer Dudo
Plugin Icon 128x128 Yasr – Yet Another Stars Rating
Version 1.8.9
Comparing to
See all releases

Code changes from version 1.8.8 to 1.8.9

freemius/assets/css/admin/common.css CHANGED
@@ -1,2 +1,2 @@
1
  .theme-browser .theme .fs-premium-theme-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);font-size:1.1em}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
2
- .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
1
  .theme-browser .theme .fs-premium-theme-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);font-size:1.1em}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
2
+ .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
freemius/includes/class-freemius.php CHANGED
@@ -2977,6 +2977,10 @@
2977
  * @since 1.1.7.3
2978
  */
2979
  static function _toggle_debug_mode() {
 
 
 
 
2980
  $is_on = fs_request_get( 'is_on', false, 'post' );
2981
 
2982
  if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) {
@@ -3008,8 +3012,16 @@
3008
  * @since 1.2.1.7
3009
  */
3010
  static function _get_db_option() {
 
 
3011
  $option_name = fs_request_get( 'option_name' );
3012
 
 
 
 
 
 
 
3013
  $value = get_option( $option_name );
3014
 
3015
  $result = array(
@@ -3032,7 +3044,16 @@
3032
  * @since 1.2.1.7
3033
  */
3034
  static function _set_db_option() {
3035
- $option_name = fs_request_get( 'option_name' );
 
 
 
 
 
 
 
 
 
3036
  $option_value = fs_request_get( 'option_value' );
3037
 
3038
  if ( ! empty( $option_value ) ) {
2977
  * @since 1.1.7.3
2978
  */
2979
  static function _toggle_debug_mode() {
2980
+ if ( ! is_super_admin() ) {
2981
+ return;
2982
+ }
2983
+
2984
  $is_on = fs_request_get( 'is_on', false, 'post' );
2985
 
2986
  if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) {
3012
  * @since 1.2.1.7
3013
  */
3014
  static function _get_db_option() {
3015
+ check_admin_referer( 'fs_get_db_option' );
3016
+
3017
  $option_name = fs_request_get( 'option_name' );
3018
 
3019
+ if ( ! is_super_admin() ||
3020
+ ! fs_starts_with( $option_name, 'fs_' )
3021
+ ) {
3022
+ self::shoot_ajax_failure();
3023
+ }
3024
+
3025
  $value = get_option( $option_name );
3026
 
3027
  $result = array(
3044
  * @since 1.2.1.7
3045
  */
3046
  static function _set_db_option() {
3047
+ check_admin_referer( 'fs_set_db_option' );
3048
+
3049
+ $option_name = fs_request_get( 'option_name' );
3050
+
3051
+ if ( ! is_super_admin() ||
3052
+ ! fs_starts_with( $option_name, 'fs_' )
3053
+ ) {
3054
+ self::shoot_ajax_failure();
3055
+ }
3056
+
3057
  $option_value = fs_request_get( 'option_value' );
3058
 
3059
  if ( ! empty( $option_value ) ) {
freemius/start.php CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @var string
17
  */
18
- $this_sdk_version = '2.2.3';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
15
  *
16
  * @var string
17
  */
18
+ $this_sdk_version = '2.2.4';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
freemius/templates/debug.php CHANGED
@@ -113,6 +113,7 @@
113
  if (optionName) {
114
  $.post(ajaxurl, {
115
  action : 'fs_get_db_option',
 
116
  option_name: optionName
117
  }, function (response) {
118
  if (response.data.value)
@@ -132,6 +133,7 @@
132
  if (optionValue) {
133
  $.post(ajaxurl, {
134
  action : 'fs_set_db_option',
 
135
  option_name : optionName,
136
  option_value: optionValue
137
  }, function () {
113
  if (optionName) {
114
  $.post(ajaxurl, {
115
  action : 'fs_get_db_option',
116
+ _wpnonce : '<?php echo wp_create_nonce( 'fs_get_db_option' ) ?>',
117
  option_name: optionName
118
  }, function (response) {
119
  if (response.data.value)
133
  if (optionValue) {
134
  $.post(ajaxurl, {
135
  action : 'fs_set_db_option',
136
+ _wpnonce : '<?php echo wp_create_nonce( 'fs_set_db_option' ) ?>',
137
  option_name : optionName,
138
  option_value: optionValue
139
  }, function () {
lib/yasr-functions.php CHANGED
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
28
 
29
  function yasr_add_scripts () {
30
 
31
- wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, NULL, 'all' );
32
  wp_enqueue_style( 'dashicons' ); //dashicons
33
 
34
  //Run after default css are loaded
@@ -36,11 +36,11 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
36
 
37
  //If choosen is light or not dark (force to be default)
38
  if (YASR_SCHEME_COLOR === 'light' || YASR_SCHEME_COLOR != 'dark' ) {
39
- wp_enqueue_style( 'yasrcsslightscheme', YASR_CSS_DIR . 'yasr-table-light.css', array('yasrcss'), NULL, 'all' );
40
  }
41
 
42
  elseif (YASR_SCHEME_COLOR === 'dark') {
43
- wp_enqueue_style( 'yasrcssdarkscheme', YASR_CSS_DIR . 'yasr-table-dark.css', array('yasrcss'), NULL, 'all' );
44
  }
45
 
46
  if (YASR_CUSTOM_CSS_RULES) {
@@ -54,8 +54,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
54
  wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js-rtl.js' , '', '0.6.0', TRUE );
55
  }
56
 
57
- wp_enqueue_script( 'yasrfront', YASR_JS_DIR . 'yasr-front.js' , array('jquery', 'rater'), '1.0.0', TRUE );
58
- wp_enqueue_script('tippy', YASR_JS_DIR . 'tippy.all.min.js', '', '3.2.0', TRUE );
59
 
60
  do_action('yasr_add_front_script_js');
61
 
@@ -86,16 +86,11 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
86
 
87
  do_action('yasr_add_admin_scripts_begin');
88
 
89
- wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr-admin.css', FALSE, NULL, 'all' );
90
 
91
- wp_enqueue_script( 'yasradmin', YASR_JS_DIR . 'yasr-admin.js' , array('jquery'), '1.0.00', TRUE );
92
 
93
- if (!is_rtl()) {
94
- wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js.js' , '', '0.6.0', TRUE );
95
- }
96
- else {
97
- wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js-rtl.js' , '', '0.6.0', TRUE );
98
- }
99
 
100
  wp_enqueue_script('yasr_shortcode_creator', YASR_JS_DIR . 'yasr-shortcode-creator.js', array('jquery'), '1.0', TRUE);
101
 
28
 
29
  function yasr_add_scripts () {
30
 
31
+ wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr.css', FALSE, YASR_VERSION_NUM, 'all' );
32
  wp_enqueue_style( 'dashicons' ); //dashicons
33
 
34
  //Run after default css are loaded
36
 
37
  //If choosen is light or not dark (force to be default)
38
  if (YASR_SCHEME_COLOR === 'light' || YASR_SCHEME_COLOR != 'dark' ) {
39
+ wp_enqueue_style( 'yasrcsslightscheme', YASR_CSS_DIR . 'yasr-table-light.css', array('yasrcss'), YASR_VERSION_NUM, 'all' );
40
  }
41
 
42
  elseif (YASR_SCHEME_COLOR === 'dark') {
43
+ wp_enqueue_style( 'yasrcssdarkscheme', YASR_CSS_DIR . 'yasr-table-dark.css', array('yasrcss'), YASR_VERSION_NUM, 'all' );
44
  }
45
 
46
  if (YASR_CUSTOM_CSS_RULES) {
54
  wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js-rtl.js' , '', '0.6.0', TRUE );
55
  }
56
 
57
+ wp_enqueue_script( 'yasrfront', YASR_JS_DIR . 'yasr-front.js' , array('jquery', 'rater'), YASR_VERSION_NUM, TRUE );
58
+ wp_enqueue_script('tippy', YASR_JS_DIR . 'tippy.all.min.js', '', '3.6.0', TRUE );
59
 
60
  do_action('yasr_add_front_script_js');
61
 
86
 
87
  do_action('yasr_add_admin_scripts_begin');
88
 
89
+ wp_enqueue_style( 'yasrcss', YASR_CSS_DIR . 'yasr-admin.css', FALSE, YASR_VERSION_NUM, 'all' );
90
 
91
+ wp_enqueue_script( 'yasradmin', YASR_JS_DIR . 'yasr-admin.js' , array('jquery'), YASR_VERSION_NUM, TRUE );
92
 
93
+ wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js.js' , '', YASR_VERSION_NUM, TRUE );
 
 
 
 
 
94
 
95
  wp_enqueue_script('yasr_shortcode_creator', YASR_JS_DIR . 'yasr-shortcode-creator.js', array('jquery'), '1.0', TRUE);
96
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires at least: 4.3.0
5
  Contributors: Dudo
6
  Tested up to: 5.1
7
  Requires PHP: 5.3
8
- Stable tag: 1.8.8
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Boost the way people interact with your website, e-commerce or blog with an easy and intuitive WordPress rating system!
@@ -21,9 +21,6 @@ Yasr - Yet Another Stars Rating is a powerful way to add SEO-friendly user-gener
21
  Once YASR is installed, when you create or update a page or a post, a box (metabox) will be available in the upper right corner where you'll
22
  be able to insert the overall rating. You can either place the overall rating automatically at the beginning or the end of a post (look in "Settings"
23
  -> "Yet Another Stars Rating: Settings"), or wherever you want in the page using the shortcode [yasr_overall_rating] (easily added through the visual editor).
24
- **For Gutenberg users**
25
- Just click on the "+" symbol to add a block, and search for YASR section: select "Yasr: Overall Rating": the panel settings will appear in the right, you can rate here.
26
-
27
 
28
  = Visitor Votes =
29
  You can give your users the ability to vote, pasting the shortcode [yasr_visitor_votes] where you want the stars to appear.
@@ -127,6 +124,9 @@ If doesn't, it's suggested to ask in a SEO oriented forum.
127
 
128
  The full changelog can be found in the plugin's directory. Recent entries:
129
 
 
 
 
130
  = 1.8.8 =
131
  * FIXED: bug when using more than a multi set in a single page (remember to delete browser cache)
132
  * FIXED: undefined notice
@@ -189,4 +189,4 @@ External Libraries: [Rater](https://github.com/fredolss/rater-js)
189
  [tippy](https://atomiks.github.io/tippyjs/)
190
 
191
  Svg star icon made by [Freepik](http://www.freepik.com)
192
- from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)
5
  Contributors: Dudo
6
  Tested up to: 5.1
7
  Requires PHP: 5.3
8
+ Stable tag: 1.8.9
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Boost the way people interact with your website, e-commerce or blog with an easy and intuitive WordPress rating system!
21
  Once YASR is installed, when you create or update a page or a post, a box (metabox) will be available in the upper right corner where you'll
22
  be able to insert the overall rating. You can either place the overall rating automatically at the beginning or the end of a post (look in "Settings"
23
  -> "Yet Another Stars Rating: Settings"), or wherever you want in the page using the shortcode [yasr_overall_rating] (easily added through the visual editor).
 
 
 
24
 
25
  = Visitor Votes =
26
  You can give your users the ability to vote, pasting the shortcode [yasr_visitor_votes] where you want the stars to appear.
124
 
125
  The full changelog can be found in the plugin's directory. Recent entries:
126
 
127
+ = 1.8.9 =
128
+ * FIXED: updated freemius sdk to version 2.2.4
129
+
130
  = 1.8.8 =
131
  * FIXED: bug when using more than a multi set in a single page (remember to delete browser cache)
132
  * FIXED: undefined notice
189
  [tippy](https://atomiks.github.io/tippyjs/)
190
 
191
  Svg star icon made by [Freepik](http://www.freepik.com)
192
+ from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)
yet-another-stars-rating.php CHANGED
@@ -4,14 +4,13 @@
4
  * Plugin Name: Yet Another Stars Rating
5
  * Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
6
  * Description: Yasr - Yet Another Stars Rating is a powerful way to add SEO-friendly user-generated reviews and testimonials to your website posts, pages and CPT, without affecting its speed.
7
- * Version: 1.8.8
8
  * Author: Dario Curvino
9
  * Author URI: https://yetanotherstarsrating.com/
10
  * Text Domain: yet-another-stars-rating
11
  * Domain Path: languages
12
  * License: GPL2
13
  *
14
- * @fs_premium_only /yasr_pro/
15
  *
16
  */
17
  /*
@@ -77,7 +76,7 @@ if ( !function_exists( 'yasr_fs' ) ) {
77
  yasr_fs();
78
  // Signal that SDK was initiated.
79
  do_action( 'yasr_fs_loaded' );
80
- define( 'YASR_VERSION_NUM', '1.8.8' );
81
  //Plugin relative path
82
  define( "YASR_ABSOLUTE_PATH", dirname( __FILE__ ) );
83
  //Plugin RELATIVE PATH without slashes (just the directory's name)
4
  * Plugin Name: Yet Another Stars Rating
5
  * Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
6
  * Description: Yasr - Yet Another Stars Rating is a powerful way to add SEO-friendly user-generated reviews and testimonials to your website posts, pages and CPT, without affecting its speed.
7
+ * Version: 1.8.9
8
  * Author: Dario Curvino
9
  * Author URI: https://yetanotherstarsrating.com/
10
  * Text Domain: yet-another-stars-rating
11
  * Domain Path: languages
12
  * License: GPL2
13
  *
 
14
  *
15
  */
16
  /*
76
  yasr_fs();
77
  // Signal that SDK was initiated.
78
  do_action( 'yasr_fs_loaded' );
79
+ define( 'YASR_VERSION_NUM', '1.8.9' );
80
  //Plugin relative path
81
  define( "YASR_ABSOLUTE_PATH", dirname( __FILE__ ) );
82
  //Plugin RELATIVE PATH without slashes (just the directory's name)