Yasr – Yet Another Stars Rating - Version 1.8.4

Version Description

  • Small changes on stars images to better look on dark backgrounds
  • Partial rtl support
Download this release

Release Info

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

Code changes from version 1.8.3 to 1.8.4

css/yasr.css CHANGED
@@ -41,6 +41,13 @@
41
  background-repeat: repeat-x;
42
  }
43
 
 
 
 
 
 
 
 
44
  /****** NON ADMIN RULES ******/
45
 
46
  .yasr_schema{
41
  background-repeat: repeat-x;
42
  }
43
 
44
+ .star-rating::before {
45
+ content: none !important;
46
+ }
47
+
48
+ .star-value::before {
49
+ content: none !important;
50
+ }
51
  /****** NON ADMIN RULES ******/
52
 
53
  .yasr_schema{
img/star_0.svg CHANGED
@@ -1 +1,2 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="108.9" height="103.6" viewBox="0 0 108.9 103.6"><defs><style>.cls-1{fill:#e3e6e6;}</style></defs><title>star_0</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><polygon class="cls-1" points="108.9 39.6 71.3 34.1 54.4 0 37.6 34.1 0 39.6 27.2 66.1 20.8 103.6 54.4 85.9 88.1 103.6 81.7 66.1 108.9 39.6"/></g></g></svg>
 
1
+ <?xml version="1.0"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 53.867 53.867" style="enable-background:new 0 0 53.867 53.867;" xml:space="preserve" width="512px" height="512px" class=""><g transform="matrix(0.904382, 0, 0, 0.904382, 2.57532, 2.57532)"><polygon points="26.934,1.318 35.256,18.182 53.867,20.887 40.4,34.013 43.579,52.549 26.934,43.798 10.288,52.549 13.467,34.013 0,20.887 18.611,18.182 " data-original="#EFCE4A" class="active-path" data-old_color="#e3e6e6" fill="#e3e6e6"/></g> </svg>
img/star_1.svg CHANGED
@@ -1,12 +1,2 @@
1
- <svg
2
- xmlns="http://www.w3.org/2000/svg" width="108.9" height="103.6" viewBox="0 0 108.9 103.6">
3
- <defs>
4
- <style>.cls-1{fill:#f1c947;}</style>
5
- </defs>
6
- <title>star1</title>
7
- <g id="Layer_2" data-name="Layer 2">
8
- <g id="Layer_1-2" data-name="Layer 1">
9
- <polygon class="cls-1" points="54.4 0 71.3 34.1 108.9 39.6 81.7 66.1 88.1 103.6 54.4 85.9 20.8 103.6 27.2 66.1 0 39.6 37.6 34.1 54.4 0"/>
10
- </g>
11
- </g>
12
- </svg>
1
+ <?xml version="1.0"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 53.867 53.867" style="enable-background:new 0 0 53.867 53.867;" xml:space="preserve" width="512px" height="512px" class=""><g transform="matrix(0.904382, 0, 0, 0.904382, 2.57532, 2.57532)"><polygon points="26.934,1.318 35.256,18.182 53.867,20.887 40.4,34.013 43.579,52.549 26.934,43.798 10.288,52.549 13.467,34.013 0,20.887 18.611,18.182 " data-original="#EFCE4A" class="active-path" fill="#EFCE4A"/></g> </svg>
 
 
 
 
 
 
 
 
 
 
img/star_2.svg CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 501.28 501.28" style="enable-background:new 0 0 501.28 501.28;" xml:space="preserve" width="512px" height="512px" class=""><g><g>
3
- <polygon style="fill:#DCDBDB" points="501.28,194.37 335.26,159.33 250.64,12.27 250.64,419.77 405.54,489.01 387.56,320.29 " data-original="#FFCD00" class="active-path" data-old_color="#dcdbdb"/>
4
- <polygon style="fill:#EEEEEE" points="166.02,159.33 0,194.37 113.72,320.29 95.74,489.01 250.64,419.77 250.64,12.27 " data-original="#FFDA44" class="" data-old_color="#eeeeee"/>
5
- </g></g> </svg>
1
  <?xml version="1.0"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 501.28 501.28" style="enable-background:new 0 0 501.28 501.28;" xml:space="preserve" width="512px" height="512px" class=""><g transform="matrix(0.95099, 0, 0, 0.95099, 12.2838, 12.2838)"><g>
3
+ <polygon style="fill:#DCDBDB" points="501.28,194.37 335.26,159.33 250.64,12.27 250.64,419.77 405.54,489.01 387.56,320.29 " data-original="#FFCD00" class="" data-old_color="#F1CB32"/>
4
+ <polygon style="fill:#EEEEEE" points="166.02,159.33 0,194.37 113.72,320.29 95.74,489.01 250.64,419.77 250.64,12.27 " data-original="#FFDA44" class="active-path" data-old_color="#eeeeee"/>
5
+ </g></g> </svg>
img/star_3.svg CHANGED
@@ -1,5 +1,5 @@
1
  <?xml version="1.0"?>
2
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 501.28 501.28" style="enable-background:new 0 0 501.28 501.28;" xml:space="preserve" width="512px" height="512px" class=""><g><g>
3
- <polygon style="fill:#F1CB32" points="501.28,194.37 335.26,159.33 250.64,12.27 250.64,419.77 405.54,489.01 387.56,320.29 " data-original="#FFCD00" class="active-path" data-old_color="#f1cb32"/>
4
- <polygon style="fill:#FFDA44" points="166.02,159.33 0,194.37 113.72,320.29 95.74,489.01 250.64,419.77 250.64,12.27 " data-original="#FFDA44" class=""/>
5
- </g></g> </svg>
1
  <?xml version="1.0"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 501.28 501.28" style="enable-background:new 0 0 501.28 501.28;" xml:space="preserve" width="512px" height="512px" class=""><g transform="matrix(0.95099, 0, 0, 0.95099, 12.2838, 12.2838)"><g>
3
+ <polygon style="fill:#F1CB32" points="501.28,194.37 335.26,159.33 250.64,12.27 250.64,419.77 405.54,489.01 387.56,320.29 " data-original="#FFCD00" class="" data-old_color="#FFCD00"/>
4
+ <polygon style="fill:#FED500" points="166.02,159.33 0,194.37 113.72,320.29 95.74,489.01 250.64,419.77 250.64,12.27 " data-original="#FFDA44" class="active-path" data-old_color="#FFDA44"/>
5
+ </g></g> </svg>
lib/yasr-functions.php CHANGED
@@ -47,11 +47,8 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
47
  wp_add_inline_style( 'yasrcss', YASR_CUSTOM_CSS_RULES );
48
  }
49
 
50
- //From version 1.7.4, always load rater
51
  wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js.js' , '', '0.6.0', TRUE );
52
-
53
  wp_enqueue_script( 'yasrfront', YASR_JS_DIR . 'yasr-front.js' , array('jquery', 'rater'), '1.0.0', TRUE );
54
-
55
  wp_enqueue_script('tippy', YASR_JS_DIR . 'tippy.all.min.js', '', '3.2.0', TRUE );
56
 
57
  do_action('yasr_add_front_script_js');
@@ -147,6 +144,30 @@ function yasr_css_stars_set() {
147
 
148
  }
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
 
151
 
152
  /****** Translating YASR ******/
@@ -253,6 +274,7 @@ function yasr_css_stars_set() {
253
  } //End function
254
 
255
  function yasr_metabox_overall_rating_content() {
 
256
  if ( current_user_can( 'publish_posts' ) ) {
257
  include (YASR_ABSOLUTE_PATH . '/yasr-metabox-top-right.php');
258
  }
@@ -263,6 +285,7 @@ function yasr_css_stars_set() {
263
  }
264
 
265
  function yasr_metabox_multiple_rating_content() {
 
266
  if ( current_user_can( 'publish_posts' ) ) {
267
  include (YASR_ABSOLUTE_PATH . '/yasr-metabox-multiple-rating.php');
268
  }
@@ -667,9 +690,7 @@ add_filter('the_content', 'yasr_add_schema');
667
  foreach ($review_type as $type) {
668
 
669
  if ($i == $review_type_choosen) {
670
-
671
  echo "<option value=\"$i\" selected>$type</option>";
672
-
673
  }
674
 
675
  else {
@@ -923,11 +944,9 @@ add_action('yasr_action_on_update_visitor_vote', 'yasr_delete_cache');
923
 
924
 
925
  function yasr_delete_cache($post_id) {
926
-
927
  yasr_wp_super_cache_support($post_id);
928
  yasr_wp_rocket_support($post_id);
929
  yasr_litespeed_cache_support($post_id);
930
-
931
  }
932
 
933
  ?>
47
  wp_add_inline_style( 'yasrcss', YASR_CUSTOM_CSS_RULES );
48
  }
49
 
 
50
  wp_enqueue_script( 'rater', YASR_JS_DIR . 'rater-js.js' , '', '0.6.0', TRUE );
 
51
  wp_enqueue_script( 'yasrfront', YASR_JS_DIR . 'yasr-front.js' , array('jquery', 'rater'), '1.0.0', TRUE );
 
52
  wp_enqueue_script('tippy', YASR_JS_DIR . 'tippy.all.min.js', '', '3.2.0', TRUE );
53
 
54
  do_action('yasr_add_front_script_js');
144
 
145
  }
146
 
147
+ add_action( 'yasr_add_front_script_css', 'yasr_rtl_support' );
148
+
149
+ function yasr_rtl_support () {
150
+
151
+ if (is_rtl()) {
152
+
153
+ $yasr_rtl_css = '.star-rating .star-value {
154
+ -moz-transform: scaleX(-1);
155
+ -o-transform: scaleX(-1);
156
+
157
+ -webkit-transform: scaleX(-1);
158
+ transform: scaleX(-1);
159
+ filter: FlipH;
160
+ -ms-filter: "FlipH";
161
+ right: 0;
162
+ left: auto;
163
+ }';
164
+
165
+ wp_add_inline_style( 'yasrcss', $yasr_rtl_css );
166
+
167
+ }
168
+
169
+ }
170
+
171
 
172
 
173
  /****** Translating YASR ******/
274
  } //End function
275
 
276
  function yasr_metabox_overall_rating_content() {
277
+
278
  if ( current_user_can( 'publish_posts' ) ) {
279
  include (YASR_ABSOLUTE_PATH . '/yasr-metabox-top-right.php');
280
  }
285
  }
286
 
287
  function yasr_metabox_multiple_rating_content() {
288
+
289
  if ( current_user_can( 'publish_posts' ) ) {
290
  include (YASR_ABSOLUTE_PATH . '/yasr-metabox-multiple-rating.php');
291
  }
690
  foreach ($review_type as $type) {
691
 
692
  if ($i == $review_type_choosen) {
 
693
  echo "<option value=\"$i\" selected>$type</option>";
 
694
  }
695
 
696
  else {
944
 
945
 
946
  function yasr_delete_cache($post_id) {
 
947
  yasr_wp_super_cache_support($post_id);
948
  yasr_wp_rocket_support($post_id);
949
  yasr_litespeed_cache_support($post_id);
 
950
  }
951
 
952
  ?>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires at least: 4.3.0
5
  Contributors: Dudo
6
  Tested up to: 5.0.2
7
  Requires PHP: 5.3
8
- Stable tag: 1.8.3
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!
@@ -116,9 +116,15 @@ If doesn't, it's suggested to ask in a SEO oriented forum.
116
 
117
  The full changelog can be found in the plugin's directory. Recent entries:
118
 
 
 
 
 
119
  = 1.8.3 =
120
  * FIXED: multiset doesn't show up in the edit screen if only 1 is used
121
 
 
 
122
  = 1.8.2 =
123
  * FIXED: widgets didn't load in front end
124
 
@@ -153,4 +159,4 @@ External Libraries: [Rater](https://github.com/fredolss/rater-js)
153
  [tippy](https://atomiks.github.io/tippyjs/)
154
 
155
  Svg star icon made by [Freepik](http://www.freepik.com)
156
- 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.0.2
7
  Requires PHP: 5.3
8
+ Stable tag: 1.8.4
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!
116
 
117
  The full changelog can be found in the plugin's directory. Recent entries:
118
 
119
+ = 1.8.4 =
120
+ * Small changes on stars images to better look on dark backgrounds
121
+ * Partial rtl support
122
+
123
  = 1.8.3 =
124
  * FIXED: multiset doesn't show up in the edit screen if only 1 is used
125
 
126
+
127
+
128
  = 1.8.2 =
129
  * FIXED: widgets didn't load in front end
130
 
159
  [tippy](https://atomiks.github.io/tippyjs/)
160
 
161
  Svg star icon made by [Freepik](http://www.freepik.com)
162
+ 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,7 +4,7 @@
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.3
8
  * Author: Dario Curvino
9
  * Author URI: https://yetanotherstarsrating.com/
10
  * Text Domain: yet-another-stars-rating
@@ -77,7 +77,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.3' );
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.4
8
  * Author: Dario Curvino
9
  * Author URI: https://yetanotherstarsrating.com/
10
  * Text Domain: yet-another-stars-rating
77
  yasr_fs();
78
  // Signal that SDK was initiated.
79
  do_action( 'yasr_fs_loaded' );
80
+ define( 'YASR_VERSION_NUM', '1.8.4' );
81
  //Plugin relative path
82
  define( "YASR_ABSOLUTE_PATH", dirname( __FILE__ ) );
83
  //Plugin RELATIVE PATH without slashes (just the directory's name)