Version Description
- Fixed bug inserted on 0.2.2 when a logged in user try to update his own vote
- Minor changes on yasr_visitor_votes shortcode
Download this release
Release Info
Developer | Dudo |
Plugin | Yasr – Yet Another Stars Rating |
Version | 0.7.9 |
Comparing to | |
See all releases |
Code changes from version 0.7.8 to 0.7.9
- js/yasr-front.js +2 -1
- lib/yasr-shortcode-functions.php +1 -1
- readme.txt +6 -2
- yet-another-stars-rating.php +2 -2
js/yasr-front.js
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
|
7 |
var cookiename = "yasr_visitor_vote_" + postid;
|
8 |
|
|
|
9 |
if (voteIfUserAlredyRated == "0" ) {
|
10 |
voteIfUserAlredyRated = false;
|
11 |
}
|
@@ -44,7 +45,7 @@
|
|
44 |
|
45 |
//Do this code only if he has rated yet
|
46 |
//Check only for value in db, not cookie, see here https://wordpress.org/support/topic/vote-updates-and-different-users-votes-problem
|
47 |
-
if (voteIfUserAlredyRated
|
48 |
|
49 |
jQuery('#yasr_rateit_visitor_votes_' + postid).on('rated', function() {
|
50 |
|
6 |
|
7 |
var cookiename = "yasr_visitor_vote_" + postid;
|
8 |
|
9 |
+
//Should be useless from version 0.7.9, just to be safe
|
10 |
if (voteIfUserAlredyRated == "0" ) {
|
11 |
voteIfUserAlredyRated = false;
|
12 |
}
|
45 |
|
46 |
//Do this code only if he has rated yet
|
47 |
//Check only for value in db, not cookie, see here https://wordpress.org/support/topic/vote-updates-and-different-users-votes-problem
|
48 |
+
if (voteIfUserAlredyRated) {
|
49 |
|
50 |
jQuery('#yasr_rateit_visitor_votes_' + postid).on('rated', function() {
|
51 |
|
lib/yasr-shortcode-functions.php
CHANGED
@@ -228,7 +228,7 @@ function shortcode_visitor_votes_callback ($atts) {
|
|
228 |
|
229 |
else {
|
230 |
|
231 |
-
$vote_if_user_already_rated =
|
232 |
|
233 |
$shortcode_html.="<div class=\"$rateit_class\" id=\"yasr_rateit_visitor_votes_$post_id\" data-rateit-starwidth=\"$px_size\" data-rateit-starheight=\"$px_size\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
234 |
<span class=\"yasr-total-average-text\" id=\"yasr-total-average-text_$post_id\" title=\"yasr-stats\">[" . __("Total: ", "yasr") . "$votes_number " . __("Average: ","yasr") . "$medium_rating/5]</span>";
|
228 |
|
229 |
else {
|
230 |
|
231 |
+
$vote_if_user_already_rated = FALSE;
|
232 |
|
233 |
$shortcode_html.="<div class=\"$rateit_class\" id=\"yasr_rateit_visitor_votes_$post_id\" data-rateit-starwidth=\"$px_size\" data-rateit-starheight=\"$px_size\" data-rateit-value=\"$medium_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
234 |
<span class=\"yasr-total-average-text\" id=\"yasr-total-average-text_$post_id\" title=\"yasr-stats\">[" . __("Total: ", "yasr") . "$votes_number " . __("Average: ","yasr") . "$medium_rating/5]</span>";
|
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.1
|
7 |
-
Stable tag: 0.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
|
@@ -118,6 +118,10 @@ Of course not: you can easily add it on the visual editor just by clicking on th
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
121 |
= 0.7.8 =
|
122 |
* Fixed bug that occur when a post was rated from 2 users that use same browser
|
123 |
* Switched cdn, from google to jquery
|
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.1.1
|
7 |
+
Stable tag: 0.7.9
|
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
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 0.7.9 =
|
122 |
+
* Fixed bug inserted on 0.2.2 when a logged in user try to update his own vote
|
123 |
+
* Minor changes on yasr_visitor_votes shortcode
|
124 |
+
|
125 |
= 0.7.8 =
|
126 |
* Fixed bug that occur when a post was rated from 2 users that use same browser
|
127 |
* Switched cdn, from google to jquery
|
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: Rating system with rich snippets
|
6 |
-
* Version: 0.7.
|
7 |
* Author: Dario Curvino
|
8 |
* Author URI: https://yetanotherstarsrating.com/
|
9 |
* License: GPL2
|
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
28 |
*/
|
29 |
|
30 |
|
31 |
-
define('YASR_VERSION_NUM', '0.7.
|
32 |
|
33 |
//Plugin relative path
|
34 |
define( "YASR_RELATIVE_PATH", dirname(__FILE__) );
|
3 |
* Plugin Name: Yet Another Stars Rating
|
4 |
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
|
5 |
* Description: Rating system with rich snippets
|
6 |
+
* Version: 0.7.9
|
7 |
* Author: Dario Curvino
|
8 |
* Author URI: https://yetanotherstarsrating.com/
|
9 |
* License: GPL2
|
28 |
*/
|
29 |
|
30 |
|
31 |
+
define('YASR_VERSION_NUM', '0.7.9');
|
32 |
|
33 |
//Plugin relative path
|
34 |
define( "YASR_RELATIVE_PATH", dirname(__FILE__) );
|