Yasr – Yet Another Stars Rating - Version 1.1.8

Version Description

  • FIXED: added the rating type at the bottom of the post if no kind of rating exists for a post or page
Download this release

Release Info

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

Code changes from version 1.1.7 to 1.1.8

lib/yasr-functions.php CHANGED
@@ -308,17 +308,18 @@ add_filter('the_content', 'yasr_add_schema');
308
  //if is not jsonld (default case)
309
  if(YASR_SCHEMA_FORMAT != 'jsonld'){
310
 
311
- $schema=FALSE; //To avoid undefined variable notice outside the loop
 
312
 
313
  $review_choosen = yasr_get_snippet_type();
314
 
315
  //if doesn't exists a filter for yasr_filter_schema_microdata $review_chosen value is assigned to $schema...
316
- $schema = apply_filters( 'yasr_filter_schema_microdata', $review_choosen );
317
 
318
  //So check here if $schema != $review_choosen
319
- if ($schema != $review_choosen) {
320
 
321
- return $content . $schema;
322
 
323
  }
324
 
@@ -365,6 +366,7 @@ add_filter('the_content', 'yasr_add_schema');
365
 
366
  $schema = $div . $title . $author . $date . $rating . $end_div;
367
 
 
368
  if ($review_choosen == "Other") {
369
 
370
  $schema = $div . $title . $date . $author . $rating . $end_div;
308
  //if is not jsonld (default case)
309
  if(YASR_SCHEMA_FORMAT != 'jsonld'){
310
 
311
+ $schema = FALSE;
312
+ $filtered_schema=FALSE; //To avoid undefined variable notice outside the loop
313
 
314
  $review_choosen = yasr_get_snippet_type();
315
 
316
  //if doesn't exists a filter for yasr_filter_schema_microdata $review_chosen value is assigned to $schema...
317
+ $filtered_schema = apply_filters( 'yasr_filter_schema_microdata', $review_choosen );
318
 
319
  //So check here if $schema != $review_choosen
320
+ if ($filtered_schema !== $review_choosen) {
321
 
322
+ return $content . $filtered_schema;
323
 
324
  }
325
 
366
 
367
  $schema = $div . $title . $author . $date . $rating . $end_div;
368
 
369
+
370
  if ($review_choosen == "Other") {
371
 
372
  $schema = $div . $title . $date . $author . $rating . $end_div;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
3
  Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post rating, posts, rate, rating, rating platform, rating system, ratings, review, reviews, rich snippets, seo, star, star rating, stars, vote, Votes, voting, voting contest, schema, serp
4
  Requires at least: 3.5
5
  Contributors: Dudo
6
- Tested up to: 4.4
7
- Stable tag: 1.1.7
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Yet Another Stars Rating is a simple plugin which allows you and / or your visitor to rate a post or element. Ideal for review's website
@@ -110,6 +110,9 @@ Of course not: you can easily add it on the visual editor just by clicking on th
110
 
111
  == Changelog ==
112
 
 
 
 
113
  = 1.1.7 =
114
  * FIXED: filters on yasr_add_schema() functions
115
  * TWEAKED: disabled right click on rating
3
  Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post rating, posts, rate, rating, rating platform, rating system, ratings, review, reviews, rich snippets, seo, star, star rating, stars, vote, Votes, voting, voting contest, schema, serp
4
  Requires at least: 3.5
5
  Contributors: Dudo
6
+ Tested up to: 4.4.1
7
+ Stable tag: 1.1.8
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Yet Another Stars Rating is a simple plugin which allows you and / or your visitor to rate a post or element. Ideal for review's website
110
 
111
  == Changelog ==
112
 
113
+ = 1.1.8 =
114
+ * FIXED: added the rating type at the bottom of the post if no kind of rating exists for a post or page
115
+
116
  = 1.1.7 =
117
  * FIXED: filters on yasr_add_schema() functions
118
  * TWEAKED: disabled right click on rating
yet-another-stars-rating.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Yet Another Stars Rating
4
  * Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
  * Description: Yet Another Stars Rating turn your WordPress into a complete review website.
6
- * Version: 1.1.7
7
  * Author: Dario Curvino
8
  * Author URI: https://yetanotherstarsrating.com/
9
  * Text Domain: yet-another-stars-rating
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
32
  if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
33
 
34
 
35
- define('YASR_VERSION_NUM', '1.1.7');
36
 
37
  //Plugin relative path
38
  define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );
3
  * Plugin Name: Yet Another Stars Rating
4
  * Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
5
  * Description: Yet Another Stars Rating turn your WordPress into a complete review website.
6
+ * Version: 1.1.8
7
  * Author: Dario Curvino
8
  * Author URI: https://yetanotherstarsrating.com/
9
  * Text Domain: yet-another-stars-rating
32
  if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // Exit if accessed directly
33
 
34
 
35
+ define('YASR_VERSION_NUM', '1.1.8');
36
 
37
  //Plugin relative path
38
  define( "YASR_ABSOLUTE_PATH", dirname(__FILE__) );