Version Description
- TWEAKED: Added support for Catch Infinite Scroll
Download this release
Release Info
Developer | Dudo |
Plugin | Yasr – Yet Another Stars Rating |
Version | 2.9.3 |
Comparing to | |
See all releases |
Code changes from version 2.9.2 to 2.9.3
- admin/settings/yasr-settings-functions-misc.php +39 -6
- includes/js/catch-inifite-scroll.js +1 -0
- includes/js/shortcodes/visitorVotes.js +1 -1
- includes/js/src/catch-inifite-scroll.js +32 -0
- includes/js/src/modules/yasrSetRaterValue.js +8 -2
- includes/js/src/shortcodes/overall-multiset.js +1 -1
- includes/js/src/shortcodes/visitorVotes.js +10 -6
- includes/shortcodes/classes/YasrVisitorVotes.php +18 -4
- includes/yasr-includes-functions.php +29 -3
- includes/yasr-includes-init.php +4 -1
- readme.txt +4 -1
- yet-another-stars-rating.php +2 -2
admin/settings/yasr-settings-functions-misc.php
CHANGED
@@ -338,21 +338,54 @@ function yasr_buy_cofee()
|
|
338 |
* @author Dario Curvino <@dudo>
|
339 |
*/
|
340 |
function yasr_related_plugins()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
{
|
342 |
$movie_helper_description = __( 'Movie Helper allows you to easily add links to movie and tv shows, just by searching
|
343 |
them while you\'re writing your content. Search, click, done!', 'yet-another-stars-rating' );
|
344 |
-
$
|
345 |
-
$text = '<div class="yasr-donate-title">' . __( 'You may also like...', 'yet-another-stars-rating' ) . '</div>';
|
346 |
-
$text .= '<div style="text-align: center">';
|
347 |
$text .= '<a href="https://wordpress.org/plugins/yet-another-movie/" target="_blank">
|
348 |
-
<img src="' . YASR_IMG_DIR . '/movie_helper.svg" alt="Movie Helper" >
|
349 |
</a>';
|
350 |
$text .= '</div>';
|
351 |
$text .= '<div style="margin-top: 15px;">';
|
352 |
$text .= $movie_helper_description;
|
353 |
$text .= '</div>';
|
354 |
-
|
355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
}
|
357 |
|
358 |
/** Add a box on the right for asking to rate 5 stars on Wordpress.org
|
338 |
* @author Dario Curvino <@dudo>
|
339 |
*/
|
340 |
function yasr_related_plugins()
|
341 |
+
{
|
342 |
+
$div = "<div class='yasr-donatedivdx' id='yasr-related-plugins'>";
|
343 |
+
$text = '<div class="yasr-donate-title">' . __( 'You may also like...', 'yet-another-stars-rating' ) . '</div>';
|
344 |
+
$text .= yasr_movie_helper();
|
345 |
+
$text .= '<hr />';
|
346 |
+
$text .= yasr_cnrt();
|
347 |
+
$div_and_text = $div . $text . '</div>';
|
348 |
+
echo wp_kses_post( $div_and_text ) ;
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* @author Dario Curvino <@dudo>
|
353 |
+
* @since 2.9.3
|
354 |
+
* @return string
|
355 |
+
*/
|
356 |
+
function yasr_movie_helper()
|
357 |
{
|
358 |
$movie_helper_description = __( 'Movie Helper allows you to easily add links to movie and tv shows, just by searching
|
359 |
them while you\'re writing your content. Search, click, done!', 'yet-another-stars-rating' );
|
360 |
+
$text = '<div style="text-align: center">';
|
|
|
|
|
361 |
$text .= '<a href="https://wordpress.org/plugins/yet-another-movie/" target="_blank">
|
362 |
+
<img src="' . esc_attr( YASR_IMG_DIR ) . '/movie_helper.svg" alt="Movie Helper" >
|
363 |
</a>';
|
364 |
$text .= '</div>';
|
365 |
$text .= '<div style="margin-top: 15px;">';
|
366 |
$text .= $movie_helper_description;
|
367 |
$text .= '</div>';
|
368 |
+
return $text;
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* @author Dario Curvino <@dudo>
|
373 |
+
* @since 2.9.3
|
374 |
+
* @return string
|
375 |
+
*/
|
376 |
+
function yasr_cnrt()
|
377 |
+
{
|
378 |
+
$text = '<div style="text-align: center">';
|
379 |
+
$text .= '<a href="https://wordpress.org/plugins/comments-not-replied-to/">';
|
380 |
+
$text .= '<img src="'.esc_attr(YASR_IMG_DIR).'/cnrt.png" alt="cnrt" width="110">';
|
381 |
+
$text .= '<div>Comments Not Replied To</div>';
|
382 |
+
$text .= '</a>';
|
383 |
+
$text .= '</div>';
|
384 |
+
$text .= '<div style="margin-top: 15px;">';
|
385 |
+
$text .= __( '"Comments Not Replied To" introduces a new area in the administrative dashboard that allows you to
|
386 |
+
see what comments to which you - as the site author - have not yet replied.', 'movie-helper' );
|
387 |
+
$text .= '</div>';
|
388 |
+
return $text;
|
389 |
}
|
390 |
|
391 |
/** Add a box on the right for asking to rate 5 stars on Wordpress.org
|
includes/js/catch-inifite-scroll.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(()=>{"use strict";function t(t,e){var a,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.1,s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];a=r||document.getElementById(e),t=parseInt(t),raterJs({starSize:t,showToolTip:!1,element:a,step:n,readOnly:s,rating:o,rateCallback:i})}function e(t){return null!=t&&""!==t||(t=!0),"true"!==t&&"1"!==t||(t=!0),"false"!==t&&"0"!==t||(t=!1),t}wp.i18n.__;for(var a=["yasr-rater-stars","yasr-multiset-visitors-rater"],r=0;r<a.length;r++)n(a[r]);function n(a){var r=document.getElementsByClassName(a);r.length>0&&("yasr-rater-stars"===a&&function(e){for(var a=0;a<e.length;a++)if(!1===e.item(a).classList.contains("yasr-star-rating")){var r=e.item(a),n=r.id;t(r.getAttribute("data-rater-starsize"),n,r)}}(r),"yasr-multiset-visitors-rater"===a&&function(a){for(var r="",n=[],s=0;s<a.length;s++)!function(s){if(!1===a.item(s).classList.contains("yasr-star-rating")){var o=a.item(s),i=o.id,l=o.getAttribute("data-rater-readonly");l=e(l);t(16,i,o,1,l,!1,(function(t,e){var a=o.getAttribute("data-rater-postid"),s=o.getAttribute("data-rater-setid"),i=o.getAttribute("data-rater-set-field-id");t=t.toFixed(1);var l=parseInt(t);this.setRating(l),r={postid:a,setid:s,field:i,rating:l},n.push(r),e()}))}}(s);jQuery(".yasr-send-visitor-multiset").on("click",(function(){var t=this.getAttribute("data-postid"),e=this.getAttribute("data-setid"),a=this.getAttribute("data-nonce");jQuery("#yasr-send-visitor-multiset-"+t+"-"+e).hide(),jQuery("#yasr-loader-multiset-visitor-"+t+"-"+e).show();var r={action:"yasr_visitor_multiset_field_vote",nonce:a,post_id:t,rating:n,set_id:e};jQuery.post(yasrCommonData.ajaxurl,r,(function(a){var r;r=(a=JSON.parse(a)).text,jQuery("#yasr-loader-multiset-visitor-"+t+"-"+e).text(r)}))}))}(r))}var s,o,i=wp.i18n.__;function l(t){if(t.length>0&&(function(t){for(var a=0;a<t.length;a++)!function(a){if(!1===t.item(a).classList.contains("yasr-star-rating")){var r=t.item(a),n=r.getAttribute("data-rating"),s=r.getAttribute("data-readonly-attribute"),o=r.getAttribute("data-rater-readonly");null===s&&(s=!1),s=e(s),o=e(o),!0===s&&(o=!0);var l=r.getAttribute("data-rater-postid"),u=r.id,d=u.replace("yasr-visitor-votes-rater-",""),m=parseInt(r.getAttribute("data-rater-starsize")),g=r.getAttribute("data-rater-nonce"),y=r.getAttribute("data-issingular"),v="yasr-vv-votes-number-container-"+d,f="yasr-vv-average-container-"+d,p="yasr-vv-bottom-container-"+d,h="yasr-vv-loader-"+d,_=document.getElementById(v),b=document.getElementById(f),E=document.getElementById(p),R=document.getElementById(h);if("yes"===yasrCommonData.ajaxEnabled){null!==R&&(R.innerHTML=yasrCommonData.loaderHtml);var k={action:"yasr_load_vv",post_id:l};jQuery.get(yasrCommonData.ajaxurl,k).done((function(t){var e,a=JSON.parse(t);e=!0===s||a.yasr_visitor_votes.stars_attributes.read_only,n=(n=a.yasr_visitor_votes.number_of_votes>0?a.yasr_visitor_votes.sum_votes/a.yasr_visitor_votes.number_of_votes:0).toFixed(1),n=parseFloat(n),c(m,n,l,e,u,0,g,y,_,b,R,E),!0!==s&&(null!==_&&(_.innerHTML=a.yasr_visitor_votes.number_of_votes),null!==b&&(b.innerHTML=n),!1!==a.yasr_visitor_votes.stars_attributes.span_bottom&&null!==E&&(E.innerHTML=a.yasr_visitor_votes.stars_attributes.span_bottom,E.style.display=""))})).fail((function(t,e,a,r){console.info(i("YASR ajax call failed. Showing ratings from html","yet-another-stars-rating")),c(m,n,l,o,u,0,g,y,_,b,R,E),!0!==s&&(E.style.display="")}))}else c(m,n,l,o,u,0,g,y,_,b,R,E)}}(a)}(t),"yes"===yasrCommonData.visitorStatsEnabled)){var a=document.getElementsByClassName("yasr-dashicons-visitor-stats");a&&function(t){for(var e,a,r=!1,n=0;n<t.length;n++)!function(n){var s="#"+t.item(n).id,o=t.item(n).getAttribute("data-postid");0===n&&null!==(e=document.getElementsByClassName("yasr-vv-text-container"))&&(a=window.getComputedStyle(e[0],null).getPropertyValue("color")),a&&(document.getElementById(t.item(n).id).style.fill=a);var i={action:"yasr_stats_visitors_votes",post_id:o};tippy(s,{allowHTML:!0,content:'<span style="color: #0a0a0a">Loading...</span>',theme:"yasr",arrow:!0,arrowType:"round",onShow:function(t){s!==r&&jQuery.post(yasrCommonData.ajaxurl,i,(function(e){e=JSON.parse(e),t.setContent(u(e))}))},onHidden:function(){r=s}})}(n)}(a)}}function c(a,r,n,s,o,i,l,c,u,d,m,g){r=parseFloat(r),s=e(s);var y=document.getElementById(o);null!==m&&(m.innerHTML=""),t(a,o,y,1,s,r,(function(t,e){null!==m&&(m.innerHTML=yasrCommonData.loaderHtml);var a={action:"yasr_send_visitor_rating",rating:t,post_id:n,nonce_visitor:l,is_singular:c};this.setRating(t),this.disable(),jQuery.post(yasrCommonData.ajaxurl,a,(function(t){var e,a,r;"success"===(t=JSON.parse(t)).status?(e=t.number_of_votes,a=t.average_rating,r=t.rating_saved_text,null!==u&&(u.innerHTML=e),null!==d&&(d.innerHTML=a)):r=t.text,null!==g&&(g.innerHTML=r,g.style.display=""),null!==m&&(m.innerHTML="")})),e()}))}function u(t){var e=t.medium_rating;delete t.medium_rating;for(var a=0,r=1;r<=5;r++)(1===r||t[r].n_of_votes>a)&&(a=t[r].n_of_votes);var n=Math.log(a)*Math.LOG10E+1|0,s="5%";n<=3&&(s="5%"),n>3&&n<=5&&(s="10%"),n>5&&(s="15%");var o='<div class="yasr-visitors-stats-tooltip">';o+='<span id="yasr-medium-rating-tooltip">'+e+" "+i("out of 5 stars","yet-another-stars-rating")+"</span>",o+='<div class="yasr-progress-bars-container">';for(var l=i("stars","yet-another-stars-rating"),c=0,u=0,d=5;d>0;d--)1===d&&(l=i("star","yet-another-stars-rating")),void 0!==t[d]&&(c=t[d].progressbar,u=t[d].n_of_votes),o+="<div class='yasr-progress-bar-row-container yasr-w3-container'>\n <div class='yasr-progress-bar-name'>".concat(d," ").concat(l,"</div> \n <div class='yasr-single-progress-bar-container'> \n <div class='yasr-w3-border'> \n <div class='yasr-w3-amber' style='height:17px;width:").concat(c,"'></div> \n </div>\n </div> \n <div class='yasr-progress-bar-votes-count' style=\"flex-basis:").concat(s,' ">').concat(u,"</div>\n </div>");return o+"</div></div>"}l(document.getElementsByClassName("yasr-rater-stars-vv"));var d=new Uint8Array(16);function m(){if(!o&&!(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(d)}const g=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,y=function(t){return"string"==typeof t&&g.test(t)};for(var v=[],f=0;f<256;++f)v.push((f+256).toString(16).substr(1));const p=function(t,e,a){var r=(t=t||{}).random||(t.rng||m)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){a=a||0;for(var n=0;n<16;++n)e[a+n]=r[n];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(v[t[e+0]]+v[t[e+1]]+v[t[e+2]]+v[t[e+3]]+"-"+v[t[e+4]]+v[t[e+5]]+"-"+v[t[e+6]]+v[t[e+7]]+"-"+v[t[e+8]]+v[t[e+9]]+"-"+v[t[e+10]]+v[t[e+11]]+v[t[e+12]]+v[t[e+13]]+v[t[e+14]]+v[t[e+15]]).toLowerCase();if(!y(a))throw TypeError("Stringified UUID is invalid");return a}(r)};function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var a=0;a<e.length;a++){var r=e[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function E(t,e){return!e||"object"!==h(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var k=wp.i18n.__,I=wp.element.render;function w(e){var a="yasr-ranking-element-"+p(),r=document.getElementById(e.tableId).dataset.rankingSize;return React.createElement("div",{id:a,ref:function(){return t(r,a,!1,.1,!0,e.rating)}})}function C(t){if(void 0!==t.post.number_of_votes)return React.createElement("span",{className:"yasr-most-rated-text"},"[",k("Total:","yet-another-stars-rating")," ",t.post.number_of_votes," ",k("Average:","yet-another-stars-rating")," ",t.post.rating,"]");var e=t.text;return React.createElement("span",{className:"yasr-highest-rated-text"},e," ",t.post.rating)}function x(t){return React.createElement("td",{className:t.colClass},React.createElement("a",{href:t.post.link},function(t){if("string"!=typeof t||-1===t.indexOf("&"))return t;void 0===s&&(s=document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument("").createElement("textarea"):document.createElement("textarea")),s.innerHTML=t;var e=s.textContent;return s.innerHTML="",e}(t.post.title)))}function L(t){var e="after",a=k("Rating:","yet-another-stars-rating"),r=new URLSearchParams(t.rankingParams);return null!==r.get("text_position")&&(e=r.get("text_position")),null!==r.get("custom_txt")&&(a=r.get("custom_txt")),"before"===e?React.createElement("td",{className:t.colClass},React.createElement(C,{post:t.post,tableId:t.tableId,text:a}),React.createElement(w,{rating:t.post.rating,tableId:t.tableId})):React.createElement("td",{className:t.colClass},React.createElement(w,{rating:t.post.rating,tableId:t.tableId}),React.createElement(C,{post:t.post,tableId:t.tableId,text:a}))}function B(t){var e="",a="";return"author_ranking"===t.source?(e="yasr-top-10-overall-left",a="yasr-top-10-overall-right"):"visitor_votes"===t.source&&(e="yasr-top-10-most-highest-left",a="yasr-top-10-most-highest-right"),React.createElement("tr",{className:t.trClass},React.createElement(x,{colClass:e,post:t.post}),React.createElement(L,{colClass:a,post:t.post,tableId:t.tableId,rankingParams:t.rankingParams}))}function T(t){return React.createElement("tbody",{id:t.tBodyId,style:{display:t.show}},t.data.map((function(e,a){var r="yasr-rankings-td-colored";return"author_ranking"===t.source&&(r="yasr-rankings-td-white"),a%2==0&&(r="yasr-rankings-td-white","author_ranking"===t.source&&(r="yasr-rankings-td-colored")),React.createElement(B,{key:e.post_id,source:t.source,tableId:t.tableId,rankingParams:t.rankingParams,post:e,trClass:r})})))}var S=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(o,React.Component);var e,a,r,n,s=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=R(r);if(n){var a=R(this).constructor;t=Reflect.construct(e,arguments,a)}else t=e.apply(this,arguments);return E(this,t)});function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=s.call(this,t)).state={error:null,isLoaded:!1,data:[],tableId:t.tableId,source:t.source,rankingParams:t.params,nonce:t.nonce},e}return e=o,(a=[{key:"componentDidMount",value:function(){var t=this,e=JSON.parse(document.getElementById(this.state.tableId).dataset.rankingData),a={};if("yes"!==yasrCommonData.ajaxEnabled)console.info(k("Ajax Disabled, getting data from source","yet-another-stars-rating")),this.setState({isLoaded:!0,data:e});else if(this.state.source){var r=this.returnRestUrl();Promise.all(r.map((function(t){return fetch(t).then((function(t){return!0===t.ok?t.json():(console.info(k("Ajax Call Failed. Getting data from source")),"KO")})).then((function(t){"KO"===t?a=e:"overall_rating"===t.source||"author_multi"===t.source?a="overall_rating"===t.source?t.data_overall:t.data_mv:a[t.show]=t.data_vv})).catch((function(t){a=e,console.info(k(t))}))}))).then((function(e){t.setState({isLoaded:!0,data:a})})).catch((function(e){console.info(k(e)),t.setState({isLoaded:!0,data:a})}))}else this.setState({error:k("Invalid Data Source","yet-another-stars-rating")})}},{key:"returnRestUrl",value:function(){var t,e=""!==this.state.rankingParams?this.state.rankingParams:"",a=this.state.source,r="&nonce_rankings="+this.state.nonce,n="";if(""!==e&&!1!==e){var s=new URLSearchParams(e);null!==s.get("order_by")&&(n+="order_by="+s.get("order_by")),null!==s.get("limit")&&(n+="&limit="+s.get("limit")),null!==s.get("start_date")&&"0"!==s.get("start_date")&&(n+="&start_date="+s.get("start_date")),null!==s.get("end_date")&&"0"!==s.get("end_date")&&(n+="&end_date="+s.get("end_date")),null!==s.get("ctg")?n+="&ctg="+s.get("ctg"):null!==s.get("cpt")&&(n+="&cpt="+s.get("cpt")),""!==n&&(n="&"+(n=n.replace(/\s+/g,""))),"visitor_multi"!==a&&"author_multi"!==a||null!==s.get("setid")&&(n+="&setid="+s.get("setid"))}else n="";if("author_ranking"===a||"author_multi"===a)t=[yasrCommonData.ajaxurl+"?action=yasr_load_rankings&source="+a+n+r];else{var o="",i="";if(""!==e){var l=new URLSearchParams(e);null!==l.get("required_votes[most]")&&(o="&required_votes="+l.get("required_votes[most]")),null!==l.get("required_votes[highest]")&&(i="&required_votes="+l.get("required_votes[highest]"))}t=[yasrCommonData.ajaxurl+"?action=yasr_load_rankings&show=most&source="+a+n+o+r,yasrCommonData.ajaxurl+"?action=yasr_load_rankings&show=highest&source="+a+n+i+r]}return t}},{key:"rankingTableHead",value:function(t,e){var a=this.state.tableId,r="link-most-rated-posts-"+a,n="link-highest-rated-posts-"+a;if("author_ranking"!==t){var s=React.createElement("span",null,React.createElement("span",{id:r},k("Most Rated","yet-another-stars-rating"))," | ",React.createElement("a",{href:"#",id:n,onClick:this.switchTBody.bind(this)},k("Highest Rated","yet-another-stars-rating")));return"highest"===e&&(s=React.createElement("span",null,React.createElement("span",{id:n},k("Highest Rated","yet-another-stars-rating"))," | ",React.createElement("a",{href:"#",id:r,onClick:this.switchTBody.bind(this)},k("Most Rated","yet-another-stars-rating")))),React.createElement("thead",null,React.createElement("tr",{className:"yasr-rankings-td-colored yasr-rankings-heading"},React.createElement("th",null,k("Post","yet-another-stars-rating")),React.createElement("th",null,k("Order By","yet-another-stars-rating"),": ",s)))}return React.createElement(React.Fragment,null)}},{key:"switchTBody",value:function(t){t.preventDefault();var e=t.target.id,a=this.state.tableId,r="link-most-rated-posts-"+a,n="link-highest-rated-posts-"+a,s="most-rated-posts-"+a,o="highest-rated-posts-"+a,i=document.getElementById(e),l=document.createElement("span");l.innerHTML=i.innerHTML,l.id=i.id,i.parentNode.replaceChild(l,i),e===r&&(document.getElementById(o).style.display="none",document.getElementById(s).style.display="",l=document.getElementById(n),i.innerHTML=l.innerHTML,i.id=l.id,l.parentNode.replaceChild(i,l)),e===n&&(document.getElementById(s).style.display="none",document.getElementById(o).style.display="",l=document.getElementById(r),i.innerHTML=l.innerHTML,i.id=l.id,l.parentNode.replaceChild(i,l))}},{key:"rankingTableBody",value:function(){var t=this.state,e=t.data,a=t.source,r=t.rankingParams;if("overall_rating"===a||"author_multi"===a)return React.createElement(T,{data:e,tableId:this.state.tableId,tBodyId:"overall_"+this.state.tableId,rankingParams:r,show:"table-row-group",source:a});var n=e.most,s=e.highest,o="table-row-group",i="none",l="most",c=o,u=i,d=new URLSearchParams(r);return null!==d.get("view")&&(l=d.get("view")),"highest"===l&&(c=i,u=o),React.createElement(React.Fragment,null,this.rankingTableHead(a,l),React.createElement(T,{data:n,tableId:this.state.tableId,tBodyId:"most-rated-posts-"+this.state.tableId,rankingParams:r,show:c,source:a}),React.createElement(T,{data:s,tableId:this.state.tableId,tBodyId:"highest-rated-posts-"+this.state.tableId,rankingParams:r,show:u,source:a}))}},{key:"render",value:function(){var t=this.state,e=t.error,a=t.isLoaded;return e?React.createElement("tbody",null,React.createElement("tr",null,React.createElement("td",null,console.log(e),"Error"))):!1===a?React.createElement("tbody",null,React.createElement("tr",null,React.createElement("td",null,k("Loading Charts","yet-another-stars-rating")))):React.createElement(React.Fragment,null,this.rankingTableBody())}}])&&_(e.prototype,a),o}();function j(){var t=document.getElementsByClassName("yasr-stars-rankings");if(t.length>0)for(var e=0;e<t.length;e++){var a=t.item(e).id,r=JSON.parse(t.item(e).dataset.rankingSource),n=JSON.parse(t.item(e).dataset.rankingParams),s=JSON.parse(t.item(e).dataset.rankingNonce),o=document.getElementById(a);I(React.createElement(S,{source:r,tableId:a,params:n,nonce:s}),o)}}j(),jQuery(document).ajaxComplete((function(t,e,a){var r=yasrCommonData.siteUrl+"/page/";a.url.includes(r)&&(function(){for(var t=["yasr-rater-stars","yasr-multiset-visitors-rater"],e=0;e<t.length;e++)n(t[e])}(),l(document.getElementsByClassName("yasr-rater-stars-vv")),j())}))})();
|
includes/js/shortcodes/visitorVotes.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{"use strict";function t(t){return null!=t&&""!==t||(t=!0),"true"!==t&&"1"!==t||(t=!0),"false"!==t&&"0"!==t||(t=!1),t}const{__:e}=wp.i18n,a=document.
|
1 |
+
(()=>{"use strict";function t(t){return null!=t&&""!==t||(t=!0),"true"!==t&&"1"!==t||(t=!0),"false"!==t&&"0"!==t||(t=!1),t}const{__:e}=wp.i18n;function a(e,a,s,r,n,o,i,l,d,u,y,v){a=parseFloat(a),r=t(r);const c=document.getElementById(n);null!==y&&(y.innerHTML=""),function(t,e,a=!1,s=.1,r=!0,n=!1,o=!1){let i;i=a||document.getElementById(e),t=parseInt(t),raterJs({starSize:t,showToolTip:!1,element:i,step:s,readOnly:r,rating:n,rateCallback:o})}(e,n,c,1,r,a,(function(t,e){null!==y&&(y.innerHTML=yasrCommonData.loaderHtml);var a={action:"yasr_send_visitor_rating",rating:t,post_id:s,nonce_visitor:i,is_singular:l};this.setRating(t),this.disable(),jQuery.post(yasrCommonData.ajaxurl,a,(function(t){let e,a,s;"success"===(t=JSON.parse(t)).status?(e=t.number_of_votes,a=t.average_rating,s=t.rating_saved_text,null!==d&&(d.innerHTML=e),null!==u&&(u.innerHTML=a)):s=t.text,null!==v&&(v.innerHTML=s,v.style.display=""),null!==y&&(y.innerHTML="")})),e()}))}function s(t){const a=t.medium_rating;delete t.medium_rating;let s=0;for(let e=1;e<=5;e++)(1===e||t[e].n_of_votes>s)&&(s=t[e].n_of_votes);let r=Math.log(s)*Math.LOG10E+1|0,n="5%";r<=3&&(n="5%"),r>3&&r<=5&&(n="10%"),r>5&&(n="15%");let o='<div class="yasr-visitors-stats-tooltip">';o+='<span id="yasr-medium-rating-tooltip">'+a+" "+e("out of 5 stars","yet-another-stars-rating")+"</span>",o+='<div class="yasr-progress-bars-container">';let i=e("stars","yet-another-stars-rating"),l=0,d=0;for(let a=5;a>0;a--)1===a&&(i=e("star","yet-another-stars-rating")),void 0!==t[a]&&(l=t[a].progressbar,d=t[a].n_of_votes),o+=`<div class='yasr-progress-bar-row-container yasr-w3-container'>\n <div class='yasr-progress-bar-name'>${a} ${i}</div> \n <div class='yasr-single-progress-bar-container'> \n <div class='yasr-w3-border'> \n <div class='yasr-w3-amber' style='height:17px;width:${l}'></div> \n </div>\n </div> \n <div class='yasr-progress-bar-votes-count' style="flex-basis:${n} ">${d}</div>\n </div>`;return o+="</div></div>",o}!function(r){if(r.length>0&&(function(s){for(let r=0;r<s.length;r++)!function(r){if(!1!==s.item(r).classList.contains("yasr-star-rating"))return;const n=s.item(r);let o=n.getAttribute("data-rating"),i=n.getAttribute("data-readonly-attribute"),l=n.getAttribute("data-rater-readonly");null===i&&(i=!1),i=t(i),l=t(l),!0===i&&(l=!0);let d=n.getAttribute("data-rater-postid"),u=n.id,y=u.replace("yasr-visitor-votes-rater-",""),v=parseInt(n.getAttribute("data-rater-starsize")),c=n.getAttribute("data-rater-nonce"),m=n.getAttribute("data-issingular"),g="yasr-vv-votes-number-container-"+y,_="yasr-vv-average-container-"+y,p="yasr-vv-bottom-container-"+y,f="yasr-vv-loader-"+y;const b=document.getElementById(g),h=document.getElementById(_),w=document.getElementById(p),H=document.getElementById(f);if("yes"===yasrCommonData.ajaxEnabled){null!==H&&(H.innerHTML=yasrCommonData.loaderHtml);let t={action:"yasr_load_vv",post_id:d};jQuery.get(yasrCommonData.ajaxurl,t).done((function(t){let e,s=JSON.parse(t);e=!0===i||s.yasr_visitor_votes.stars_attributes.read_only,o=s.yasr_visitor_votes.number_of_votes>0?s.yasr_visitor_votes.sum_votes/s.yasr_visitor_votes.number_of_votes:0,o=o.toFixed(1),o=parseFloat(o),a(v,o,d,e,u,0,c,m,b,h,H,w),!0!==i&&(null!==b&&(b.innerHTML=s.yasr_visitor_votes.number_of_votes),null!==h&&(h.innerHTML=o),!1!==s.yasr_visitor_votes.stars_attributes.span_bottom&&null!==w&&(w.innerHTML=s.yasr_visitor_votes.stars_attributes.span_bottom,w.style.display=""))})).fail((function(t,s,r,n){console.info(e("YASR ajax call failed. Showing ratings from html","yet-another-stars-rating")),a(v,o,d,l,u,0,c,m,b,h,H,w),!0!==i&&(w.style.display="")}))}else a(v,o,d,l,u,0,c,m,b,h,H,w)}(r)}(r),"yes"===yasrCommonData.visitorStatsEnabled)){let t=document.getElementsByClassName("yasr-dashicons-visitor-stats");t&&function(t){let e,a,r=!1;for(let n=0;n<t.length;n++)!function(n){let o="#"+t.item(n).id,i=t.item(n).getAttribute("data-postid");0===n&&(e=document.getElementsByClassName("yasr-vv-text-container"),null!==e&&(a=window.getComputedStyle(e[0],null).getPropertyValue("color"))),a&&(document.getElementById(t.item(n).id).style.fill=a);let l={action:"yasr_stats_visitors_votes",post_id:i};tippy(o,{allowHTML:!0,content:'<span style="color: #0a0a0a">Loading...</span>',theme:"yasr",arrow:!0,arrowType:"round",onShow:function(t){o!==r&&jQuery.post(yasrCommonData.ajaxurl,l,(function(e){e=JSON.parse(e),t.setContent(s(e))}))},onHidden:function(){r=o}})}(n)}(t)}}(document.getElementsByClassName("yasr-rater-stars-vv"))})();
|
includes/js/src/catch-inifite-scroll.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This file is for add support to catch infinite scroll
|
3 |
+
* @since 2.9.3
|
4 |
+
*/
|
5 |
+
|
6 |
+
import {yasrSearchStarsDom} from "./shortcodes/overall-multiset";
|
7 |
+
import {yasrSearchVVInDom} from "./shortcodes/visitorVotes";
|
8 |
+
import {yasrDrawRankings} from "./shortcodes/ranking";
|
9 |
+
|
10 |
+
jQuery( document ).ajaxComplete(function( event, xhr, settings ) {
|
11 |
+
let acceptedUrl = yasrCommonData.siteUrl + '/page/';
|
12 |
+
if(settings.url.includes(acceptedUrl)) {
|
13 |
+
yasrCisOvMulti();
|
14 |
+
yasrCisVV();
|
15 |
+
yasrDrawRankings()
|
16 |
+
}
|
17 |
+
});
|
18 |
+
|
19 |
+
function yasrCisOvMulti () {
|
20 |
+
const arrayClasses = ['yasr-rater-stars', 'yasr-multiset-visitors-rater'];
|
21 |
+
|
22 |
+
for (let i=0; i<arrayClasses.length; i++) {
|
23 |
+
//Search and set all div with class yasr-multiset-visitors-rater
|
24 |
+
yasrSearchStarsDom(arrayClasses[i]);
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
function yasrCisVV () {
|
29 |
+
const yasrRaterInDom = document.getElementsByClassName('yasr-rater-stars-vv');
|
30 |
+
|
31 |
+
yasrSearchVVInDom (yasrRaterInDom);
|
32 |
+
}
|
includes/js/src/modules/yasrSetRaterValue.js
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
//this is the function that print the overall rating shortcode, get overall rating and starsize
|
2 |
-
export function yasrSetRaterValue (starSize,
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
let domElement;
|
5 |
if(element) {
|
6 |
domElement = element;
|
1 |
//this is the function that print the overall rating shortcode, get overall rating and starsize
|
2 |
+
export function yasrSetRaterValue (starSize,
|
3 |
+
htmlId,
|
4 |
+
element=false,
|
5 |
+
step=0.1,
|
6 |
+
readonly=true,
|
7 |
+
rating=false,
|
8 |
+
rateCallback=false
|
9 |
+
) {
|
10 |
let domElement;
|
11 |
if(element) {
|
12 |
domElement = element;
|
includes/js/src/shortcodes/overall-multiset.js
CHANGED
@@ -16,7 +16,7 @@ for (let i=0; i<arrayClasses.length; i++) {
|
|
16 |
/**
|
17 |
* Search for divs with defined classname
|
18 |
*/
|
19 |
-
function yasrSearchStarsDom (starsClass) {
|
20 |
//At pageload, check if there is some shortcode with class yasr-rater-stars
|
21 |
const yasrRaterInDom = document.getElementsByClassName(starsClass);
|
22 |
//If so, call the function to set the rating
|
16 |
/**
|
17 |
* Search for divs with defined classname
|
18 |
*/
|
19 |
+
export function yasrSearchStarsDom (starsClass) {
|
20 |
//At pageload, check if there is some shortcode with class yasr-rater-stars
|
21 |
const yasrRaterInDom = document.getElementsByClassName(starsClass);
|
22 |
//If so, call the function to set the rating
|
includes/js/src/shortcodes/visitorVotes.js
CHANGED
@@ -4,12 +4,16 @@ import {yasrTrueFalseStringConvertion} from "../modules/yasrTrueFalseStringConve
|
|
4 |
|
5 |
const yasrRaterInDom = document.getElementsByClassName('yasr-rater-stars-vv');
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
}
|
15 |
}
|
4 |
|
5 |
const yasrRaterInDom = document.getElementsByClassName('yasr-rater-stars-vv');
|
6 |
|
7 |
+
yasrSearchVVInDom(yasrRaterInDom);
|
8 |
+
|
9 |
+
export function yasrSearchVVInDom(yasrRaterInDom) {
|
10 |
+
if (yasrRaterInDom.length > 0) {
|
11 |
+
yasrVisitorVotesFront(yasrRaterInDom);
|
12 |
+
if (yasrCommonData.visitorStatsEnabled === 'yes') {
|
13 |
+
let yasrStatsInDom = document.getElementsByClassName('yasr-dashicons-visitor-stats');
|
14 |
+
if (yasrStatsInDom) {
|
15 |
+
yasrVvStats (yasrStatsInDom);
|
16 |
+
}
|
17 |
}
|
18 |
}
|
19 |
}
|
includes/shortcodes/classes/YasrVisitorVotes.php
CHANGED
@@ -30,7 +30,7 @@ class YasrVisitorVotes extends YasrShortcode {
|
|
30 |
protected $is_singular;
|
31 |
protected $unique_id;
|
32 |
protected $ajax_nonce_visitor;
|
33 |
-
protected
|
34 |
|
35 |
public function __construct($atts, $shortcode_name) {
|
36 |
parent::__construct($atts, $shortcode_name);
|
@@ -44,7 +44,7 @@ class YasrVisitorVotes extends YasrShortcode {
|
|
44 |
$this->unique_id = str_shuffle(uniqid());
|
45 |
$this->ajax_nonce_visitor = wp_create_nonce("yasr_nonce_vv");
|
46 |
|
47 |
-
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -93,7 +93,7 @@ class YasrVisitorVotes extends YasrShortcode {
|
|
93 |
public function loadVVScripts() {
|
94 |
$array_dep = array('jquery', 'rater', 'wp-i18n');
|
95 |
|
96 |
-
if(
|
97 |
$array_dep[] = 'tippy';
|
98 |
}
|
99 |
|
@@ -121,7 +121,7 @@ class YasrVisitorVotes extends YasrShortcode {
|
|
121 |
true
|
122 |
);
|
123 |
|
124 |
-
|
125 |
}
|
126 |
|
127 |
/**
|
@@ -473,4 +473,18 @@ class YasrVisitorVotes extends YasrShortcode {
|
|
473 |
define('YASR_VV_ATTRIBUTES', json_encode($yasr_vv_attributes));
|
474 |
}
|
475 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
}
|
30 |
protected $is_singular;
|
31 |
protected $unique_id;
|
32 |
protected $ajax_nonce_visitor;
|
33 |
+
protected static $tippy_loaded;
|
34 |
|
35 |
public function __construct($atts, $shortcode_name) {
|
36 |
parent::__construct($atts, $shortcode_name);
|
44 |
$this->unique_id = str_shuffle(uniqid());
|
45 |
$this->ajax_nonce_visitor = wp_create_nonce("yasr_nonce_vv");
|
46 |
|
47 |
+
self::$tippy_loaded = false;
|
48 |
}
|
49 |
|
50 |
/**
|
93 |
public function loadVVScripts() {
|
94 |
$array_dep = array('jquery', 'rater', 'wp-i18n');
|
95 |
|
96 |
+
if(self::$tippy_loaded === true) {
|
97 |
$array_dep[] = 'tippy';
|
98 |
}
|
99 |
|
121 |
true
|
122 |
);
|
123 |
|
124 |
+
self::$tippy_loaded = true;
|
125 |
}
|
126 |
|
127 |
/**
|
473 |
define('YASR_VV_ATTRIBUTES', json_encode($yasr_vv_attributes));
|
474 |
}
|
475 |
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Returns tippy status
|
479 |
+
*
|
480 |
+
* @author Dario Curvino <@dudo>
|
481 |
+
* @since 2.9.3
|
482 |
+
* @return bool
|
483 |
+
*/
|
484 |
+
public static function tippyLoaded() {
|
485 |
+
if(self::$tippy_loaded === true) {
|
486 |
+
return true;
|
487 |
+
}
|
488 |
+
return false;
|
489 |
+
}
|
490 |
}
|
includes/yasr-includes-functions.php
CHANGED
@@ -36,6 +36,7 @@ function yasr_add_scripts_includes() {
|
|
36 |
' <img src="' . esc_url(YASR_IMG_DIR . 'loader.gif').'" title="yasr-loader" alt="yasr-loader"></div>';
|
37 |
|
38 |
$yasr_common_data = json_encode(array(
|
|
|
39 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
40 |
'visitorStatsEnabled' => YASR_VISITORS_STATS,
|
41 |
'ajaxEnabled' => YASR_ENABLE_AJAX,
|
@@ -146,10 +147,23 @@ function yasr_enqueue_includes_js_scripts() {
|
|
146 |
true
|
147 |
);
|
148 |
|
149 |
-
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
|
|
153 |
|
154 |
/****** Translating YASR ******/
|
155 |
add_action('init', 'yasr_translate');
|
@@ -394,5 +408,17 @@ function yasr_is_supported_schema ($item_type) {
|
|
394 |
return true;
|
395 |
}
|
396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
return false;
|
398 |
}
|
36 |
' <img src="' . esc_url(YASR_IMG_DIR . 'loader.gif').'" title="yasr-loader" alt="yasr-loader"></div>';
|
37 |
|
38 |
$yasr_common_data = json_encode(array(
|
39 |
+
'siteUrl' => site_url(),
|
40 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
41 |
'visitorStatsEnabled' => YASR_VISITORS_STATS,
|
42 |
'ajaxEnabled' => YASR_ENABLE_AJAX,
|
147 |
true
|
148 |
);
|
149 |
|
150 |
+
if(defined('YASR_CATCH_INFINITE_SCROLL_INSTALLED') && YASR_CATCH_INFINITE_SCROLL_INSTALLED === true) {
|
151 |
+
$array_dep = array('jquery', 'rater', 'wp-i18n', 'yasr-global-data', 'wp-element');
|
152 |
+
//laod tippy only if the shortcode has loaded it
|
153 |
+
if(YasrVisitorVotes::tippyLoaded() === true) {
|
154 |
+
$array_dep[] = 'tippy';
|
155 |
+
}
|
156 |
+
wp_enqueue_script(
|
157 |
+
'yasr_catch_infinite',
|
158 |
+
YASR_JS_DIR_INCLUDES .
|
159 |
+
'catch-inifite-scroll.js',
|
160 |
+
$array_dep,
|
161 |
+
YASR_VERSION_NUM,
|
162 |
+
true
|
163 |
+
);
|
164 |
+
}
|
165 |
|
166 |
+
}
|
167 |
|
168 |
/****** Translating YASR ******/
|
169 |
add_action('init', 'yasr_translate');
|
408 |
return true;
|
409 |
}
|
410 |
|
411 |
+
return false;
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* @author Dario Curvino <@dudo>
|
416 |
+
* @since 2.9.3
|
417 |
+
* @return bool
|
418 |
+
*/
|
419 |
+
function yasr_is_catch_infinite_sroll_installed () {
|
420 |
+
if (is_plugin_active('catch-infinite-scroll/catch-infinite-scroll.php')) {
|
421 |
+
return true;
|
422 |
+
}
|
423 |
return false;
|
424 |
}
|
includes/yasr-includes-init.php
CHANGED
@@ -299,7 +299,6 @@ define('YASR_SUPPORTED_SCHEMA_TYPES_ADDITIONAL_FIELDS', $array_item_type_info);
|
|
299 |
|
300 |
//run includes filters
|
301 |
$yasr_includes_filter = new YasrIncludesFilters();
|
302 |
-
|
303 |
$yasr_includes_filter->filterCustomTexts($yasr_stored_options);
|
304 |
|
305 |
//support for caching plugins
|
@@ -308,5 +307,9 @@ $yasr_includes_filter->cachingPluginSupport();
|
|
308 |
$init_ajax = new YasrShortcodesAjax();
|
309 |
$init_ajax->init();
|
310 |
|
|
|
|
|
|
|
|
|
311 |
//Load rest API
|
312 |
require YASR_ABSOLUTE_PATH_INCLUDES . '/rest/yasr-rest.php';
|
299 |
|
300 |
//run includes filters
|
301 |
$yasr_includes_filter = new YasrIncludesFilters();
|
|
|
302 |
$yasr_includes_filter->filterCustomTexts($yasr_stored_options);
|
303 |
|
304 |
//support for caching plugins
|
307 |
$init_ajax = new YasrShortcodesAjax();
|
308 |
$init_ajax->init();
|
309 |
|
310 |
+
add_action('plugins_loaded', static function () {
|
311 |
+
define ('YASR_CATCH_INFINITE_SCROLL_INSTALLED', yasr_is_catch_infinite_sroll_installed());
|
312 |
+
});
|
313 |
+
|
314 |
//Load rest API
|
315 |
require YASR_ABSOLUTE_PATH_INCLUDES . '/rest/yasr-rest.php';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: rating, rate post, rate page, star rating, google rating, votes
|
|
4 |
Requires at least: 5.0
|
5 |
Contributors: Dudo
|
6 |
Tested up to: 5.9
|
7 |
-
Stable tag: 2.9.
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
@@ -197,6 +197,9 @@ Yes, YASR is 100% fully compatible with PHP 8
|
|
197 |
|
198 |
The full changelog can be found in the plugin's directory. Recent entries:
|
199 |
|
|
|
|
|
|
|
200 |
= 2.9.2 =
|
201 |
* FIXED: rich snippets error that could occur in some circumstances
|
202 |
* FIXED: css fix
|
4 |
Requires at least: 5.0
|
5 |
Contributors: Dudo
|
6 |
Tested up to: 5.9
|
7 |
+
Stable tag: 2.9.3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
197 |
|
198 |
The full changelog can be found in the plugin's directory. Recent entries:
|
199 |
|
200 |
+
= 2.9.3 =
|
201 |
+
* TWEAKED: Added support for Catch Infinite Scroll
|
202 |
+
|
203 |
= 2.9.2 =
|
204 |
* FIXED: rich snippets error that could occur in some circumstances
|
205 |
* FIXED: css fix
|
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: Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
7 |
-
* Version: 2.9.
|
8 |
* Requires at least: 5.6
|
9 |
* Requires PHP: 5.4
|
10 |
* Author: Dario Curvino
|
@@ -78,7 +78,7 @@ if ( !function_exists( 'yasr_fs' ) ) {
|
|
78 |
yasr_fs();
|
79 |
// Signal that SDK was initiated.
|
80 |
do_action( 'yasr_fs_loaded' );
|
81 |
-
define( 'YASR_VERSION_NUM', '2.9.
|
82 |
//Plugin absolute path
|
83 |
//e.g. /var/www/html/plugin_development/wp-content/plugins/yet-another-stars-rating
|
84 |
define( 'YASR_ABSOLUTE_PATH', __DIR__ );
|
4 |
* Plugin Name: Yet Another Stars Rating
|
5 |
* Plugin URI: http://wordpress.org/plugins/yet-another-stars-rating/
|
6 |
* Description: Boost the way people interact with your site with an easy WordPress stars rating system! With schema.org rich snippets YASR will improve your SEO
|
7 |
+
* Version: 2.9.3
|
8 |
* Requires at least: 5.6
|
9 |
* Requires PHP: 5.4
|
10 |
* Author: Dario Curvino
|
78 |
yasr_fs();
|
79 |
// Signal that SDK was initiated.
|
80 |
do_action( 'yasr_fs_loaded' );
|
81 |
+
define( 'YASR_VERSION_NUM', '2.9.3' );
|
82 |
//Plugin absolute path
|
83 |
//e.g. /var/www/html/plugin_development/wp-content/plugins/yet-another-stars-rating
|
84 |
define( 'YASR_ABSOLUTE_PATH', __DIR__ );
|