Version Description
- FIXED: Minor bugfixes for multisets and visitor multisets
Download this release
Release Info
Developer | Dudo |
Plugin | Yasr – Yet Another Stars Rating |
Version | 0.8.9 |
Comparing to | |
See all releases |
Code changes from version 0.8.8 to 0.8.9
- js/yasr-front.js +5 -5
- lib/yasr-ajax-functions.php +1 -1
- lib/yasr-shortcode-functions.php +9 -9
- readme.txt +6 -1
- yet-another-stars-rating.php +2 -2
js/yasr-front.js
CHANGED
@@ -72,7 +72,7 @@
|
|
72 |
//an array with all the ratingonjects
|
73 |
var ratingArray = new Array();
|
74 |
|
75 |
-
jQuery('.yasr-visitor-multi-'+postId).on('rated', function() {
|
76 |
var el = jQuery(this);
|
77 |
var value = el.rateit('value');
|
78 |
var value = value.toFixed(1);
|
@@ -90,11 +90,11 @@
|
|
90 |
|
91 |
});
|
92 |
|
93 |
-
jQuery('#yasr-send-visitor-multiset-'+postId).on('click', function() {
|
94 |
|
95 |
-
var cookiename = "yasr_multi_visitor_vote_" + postId;
|
96 |
|
97 |
-
jQuery('#yasr-loader-multiset-visitor-'+postId).show();
|
98 |
|
99 |
var data = {
|
100 |
|
@@ -108,7 +108,7 @@
|
|
108 |
|
109 |
//Send value to the Server
|
110 |
jQuery.post(ajaxurl, data, function(response) {
|
111 |
-
jQuery('#yasr-loader-multiset-visitor-'+postId).text(response);
|
112 |
});
|
113 |
|
114 |
});
|
72 |
//an array with all the ratingonjects
|
73 |
var ratingArray = new Array();
|
74 |
|
75 |
+
jQuery('.yasr-visitor-multi-'+postId+'-'+setType).on('rated', function() {
|
76 |
var el = jQuery(this);
|
77 |
var value = el.rateit('value');
|
78 |
var value = value.toFixed(1);
|
90 |
|
91 |
});
|
92 |
|
93 |
+
jQuery('#yasr-send-visitor-multiset-'+postId+'-'+setType).on('click', function() {
|
94 |
|
95 |
+
var cookiename = "yasr_multi_visitor_vote_" + postId+'_'+setType;
|
96 |
|
97 |
+
jQuery('#yasr-loader-multiset-visitor-'+postId+'-'+setType).show();
|
98 |
|
99 |
var data = {
|
100 |
|
108 |
|
109 |
//Send value to the Server
|
110 |
jQuery.post(ajaxurl, data, function(response) {
|
111 |
+
jQuery('#yasr-loader-multiset-visitor-'+postId+'-'+setType).text(response);
|
112 |
});
|
113 |
|
114 |
});
|
lib/yasr-ajax-functions.php
CHANGED
@@ -1320,7 +1320,7 @@ if ( ! defined( 'ABSPATH' ) ) exit('You\'re not allowed to see this page'); // E
|
|
1320 |
|
1321 |
if(!$error_found) {
|
1322 |
|
1323 |
-
$cookiename = 'yasr_multi_visitor_cookie_' . $post_id;
|
1324 |
|
1325 |
yasr_setcookie($cookiename, 'true');
|
1326 |
|
1320 |
|
1321 |
if(!$error_found) {
|
1322 |
|
1323 |
+
$cookiename = 'yasr_multi_visitor_cookie_' . $post_id . '_' . $set_type ;
|
1324 |
|
1325 |
yasr_setcookie($cookiename, 'true');
|
1326 |
|
lib/yasr-shortcode-functions.php
CHANGED
@@ -502,7 +502,7 @@ function shortcode_multi_set_callback( $atts ) {
|
|
502 |
else {
|
503 |
$set_name=$wpdb->get_results($wpdb->prepare("SELECT field_name AS name, field_id AS id
|
504 |
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
505 |
-
WHERE parent_set_id=%
|
506 |
ORDER BY field_id ASC", $setid));
|
507 |
|
508 |
$shortcode_html="<table class=\"yasr_table_multi_set_shortcode\">";
|
@@ -535,15 +535,15 @@ function yasr_visitor_multiset_callback ( $atts ) {
|
|
535 |
// Attributes
|
536 |
extract( shortcode_atts(
|
537 |
array(
|
538 |
-
'setid' => '
|
539 |
), $atts )
|
540 |
);
|
541 |
|
542 |
-
$cookiename = 'yasr_multi_visitor_cookie_' . $post_id;
|
543 |
|
544 |
$image = YASR_IMG_DIR . "/loader.gif";
|
545 |
|
546 |
-
$loader_html = "<span class=\"yasr-loader-multiset-visitor\" id=\"yasr-loader-multiset-visitor-$post_id\" > " . __("Loading, please wait","yasr") . ' <img src=' . "$image" .' title="yasr-loader" alt="yasr-loader"></span>';
|
547 |
|
548 |
|
549 |
if (isset($_COOKIE[$cookiename])) {
|
@@ -561,7 +561,7 @@ function yasr_visitor_multiset_callback ( $atts ) {
|
|
561 |
|
562 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
563 |
|
564 |
-
$button = "<input type=\"submit\" name=\"submit\" id=\"yasr-send-visitor-multiset-$post_id\" class=\"button button-primary\" value=\"". __('Submit!', 'yasr') . " \" />";
|
565 |
$star_readonly = 'false';
|
566 |
$span_message_content = "";
|
567 |
|
@@ -569,7 +569,7 @@ function yasr_visitor_multiset_callback ( $atts ) {
|
|
569 |
|
570 |
elseif (YASR_ALLOWED_USER === 'logged_only') {
|
571 |
|
572 |
-
$button = "<input type=\"submit\" name=\"submit\" id=\"yasr-send-visitor-multiset-$post_id\" class=\"button button-primary\" value=\"". __('Submit!', 'yasr') . " \" />";
|
573 |
$star_readonly = 'true';
|
574 |
$span_message_content = __("You must sign to vote", "yasr");;
|
575 |
|
@@ -581,7 +581,7 @@ function yasr_visitor_multiset_callback ( $atts ) {
|
|
581 |
//Is user is logged in
|
582 |
else {
|
583 |
|
584 |
-
$button = "<input type=\"submit\" name=\"submit\" id=\"yasr-send-visitor-multiset-$post_id\" class=\"button button-primary\" value=\"" . __('Submit!', 'yasr') . " \" />";
|
585 |
$star_readonly = 'false';
|
586 |
$span_message_content = "";
|
587 |
|
@@ -618,7 +618,7 @@ function yasr_visitor_multiset_callback ( $atts ) {
|
|
618 |
<span class=\"yasr-multi-set-name-field\">$set_content->name </span>
|
619 |
</td>
|
620 |
<td>
|
621 |
-
<div class=\"rateit yasr-visitor-multi-$post_id\" id=\"$set_content->id \" data-rateit-value=\"$average_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"$star_readonly\"></div>
|
622 |
<span class=\"yasr-visitor-multiset-vote-count\">$set_content->number_of_votes</span>
|
623 |
</td>
|
624 |
</tr>";
|
@@ -649,7 +649,7 @@ function yasr_visitor_multiset_callback ( $atts ) {
|
|
649 |
<span class=\"yasr-multi-set-name-field\">$set_content->name </span>
|
650 |
</td>
|
651 |
<td>
|
652 |
-
<div class=\"rateit yasr-visitor-multi-$post_id\" id=\"$set_content->id\" data-rateit-value=\"0\" data-rateit-step=\"0.5\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
653 |
<span class=\"yasr-visitor-multiset-vote-count\"> 0 </span>
|
654 |
</td>
|
655 |
</tr>";
|
502 |
else {
|
503 |
$set_name=$wpdb->get_results($wpdb->prepare("SELECT field_name AS name, field_id AS id
|
504 |
FROM " . YASR_MULTI_SET_FIELDS_TABLE . "
|
505 |
+
WHERE parent_set_id=%f
|
506 |
ORDER BY field_id ASC", $setid));
|
507 |
|
508 |
$shortcode_html="<table class=\"yasr_table_multi_set_shortcode\">";
|
535 |
// Attributes
|
536 |
extract( shortcode_atts(
|
537 |
array(
|
538 |
+
'setid' => '0',
|
539 |
), $atts )
|
540 |
);
|
541 |
|
542 |
+
$cookiename = 'yasr_multi_visitor_cookie_' . $post_id . '_' . $setid;
|
543 |
|
544 |
$image = YASR_IMG_DIR . "/loader.gif";
|
545 |
|
546 |
+
$loader_html = "<span class=\"yasr-loader-multiset-visitor\" id=\"yasr-loader-multiset-visitor-$post_id-$setid\" > " . __("Loading, please wait","yasr") . ' <img src=' . "$image" .' title="yasr-loader" alt="yasr-loader"></span>';
|
547 |
|
548 |
|
549 |
if (isset($_COOKIE[$cookiename])) {
|
561 |
|
562 |
if (YASR_ALLOWED_USER === 'allow_anonymous') {
|
563 |
|
564 |
+
$button = "<input type=\"submit\" name=\"submit\" id=\"yasr-send-visitor-multiset-$post_id-$setid\" class=\"button button-primary\" value=\"". __('Submit!', 'yasr') . " \" />";
|
565 |
$star_readonly = 'false';
|
566 |
$span_message_content = "";
|
567 |
|
569 |
|
570 |
elseif (YASR_ALLOWED_USER === 'logged_only') {
|
571 |
|
572 |
+
$button = "<input type=\"submit\" name=\"submit\" id=\"yasr-send-visitor-multiset-$post_id-$setid\" class=\"button button-primary\" value=\"". __('Submit!', 'yasr') . " \" />";
|
573 |
$star_readonly = 'true';
|
574 |
$span_message_content = __("You must sign to vote", "yasr");;
|
575 |
|
581 |
//Is user is logged in
|
582 |
else {
|
583 |
|
584 |
+
$button = "<input type=\"submit\" name=\"submit\" id=\"yasr-send-visitor-multiset-$post_id-$setid\" class=\"button button-primary\" value=\"" . __('Submit!', 'yasr') . " \" />";
|
585 |
$star_readonly = 'false';
|
586 |
$span_message_content = "";
|
587 |
|
618 |
<span class=\"yasr-multi-set-name-field\">$set_content->name </span>
|
619 |
</td>
|
620 |
<td>
|
621 |
+
<div class=\"rateit yasr-visitor-multi-$post_id-$setid\" id=\"$set_content->id \" data-rateit-value=\"$average_rating\" data-rateit-step=\"1\" data-rateit-resetable=\"false\" data-rateit-readonly=\"$star_readonly\"></div>
|
622 |
<span class=\"yasr-visitor-multiset-vote-count\">$set_content->number_of_votes</span>
|
623 |
</td>
|
624 |
</tr>";
|
649 |
<span class=\"yasr-multi-set-name-field\">$set_content->name </span>
|
650 |
</td>
|
651 |
<td>
|
652 |
+
<div class=\"rateit yasr-visitor-multi-$post_id-$setid\" id=\"$set_content->id\" data-rateit-value=\"0\" data-rateit-step=\"0.5\" data-rateit-resetable=\"false\" data-rateit-readonly=\"false\"></div>
|
653 |
<span class=\"yasr-visitor-multiset-vote-count\"> 0 </span>
|
654 |
</td>
|
655 |
</tr>";
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: 5 star, admin, administrator, AJAX, five-star, javascript, jquery, post r
|
|
4 |
Requires at least: 3.5
|
5 |
Contributors: Dudo
|
6 |
Tested up to: 4.2.2
|
7 |
-
Stable tag: 0.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
|
@@ -123,6 +123,10 @@ Of course not: you can easily add it on the visual editor just by clicking on th
|
|
123 |
|
124 |
== Changelog ==
|
125 |
|
|
|
|
|
|
|
|
|
126 |
= 0.8.8 =
|
127 |
* NEW FEATURE: it's now possible to add the attribute postid on these shortcodes: yasr_overall_rating, yasr_visitor_votes, yasr_visitor_votes_readonly. It is only necessary when you wish to show another post/page's votes
|
128 |
* TWEAKED: Added facebook box in the settings
|
@@ -131,6 +135,7 @@ Of course not: you can easily add it on the visual editor just by clicking on th
|
|
131 |
* FIXED: support for rtl
|
132 |
* Minor bugfixes
|
133 |
|
|
|
134 |
= 0.8.7 =
|
135 |
* Minor changes and bugfixes
|
136 |
|
4 |
Requires at least: 3.5
|
5 |
Contributors: Dudo
|
6 |
Tested up to: 4.2.2
|
7 |
+
Stable tag: 0.8.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
|
123 |
|
124 |
== Changelog ==
|
125 |
|
126 |
+
= 0.8.9 =
|
127 |
+
* FIXED: Minor bugfixes for multisets and visitor multisets
|
128 |
+
|
129 |
+
|
130 |
= 0.8.8 =
|
131 |
* NEW FEATURE: it's now possible to add the attribute postid on these shortcodes: yasr_overall_rating, yasr_visitor_votes, yasr_visitor_votes_readonly. It is only necessary when you wish to show another post/page's votes
|
132 |
* TWEAKED: Added facebook box in the settings
|
135 |
* FIXED: support for rtl
|
136 |
* Minor bugfixes
|
137 |
|
138 |
+
|
139 |
= 0.8.7 =
|
140 |
* Minor changes and bugfixes
|
141 |
|
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.8.
|
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.8.
|
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.8.9
|
7 |
* Author: Dario Curvino
|
8 |
* Author URI: https://yetanotherstarsrating.com/
|
9 |
* License: GPL2
|
28 |
*/
|
29 |
|
30 |
|
31 |
+
define('YASR_VERSION_NUM', '0.8.9');
|
32 |
|
33 |
//Plugin relative path
|
34 |
define( "YASR_RELATIVE_PATH", dirname(__FILE__) );
|