Yasr – Yet Another Stars Rating - Version 3.0.1

Version Description

  • Minor changes and new pricing page.
Download this release

Release Info

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

Code changes from version 3.0.0 to 3.0.1

admin/css/yasr-pricing-page.css CHANGED
@@ -13,6 +13,7 @@
13
  }
14
 
15
  #yasr-pricing-table {
 
16
  --nb-items: 3;
17
  color: #434446;
18
  font-family: sans-serif;
@@ -26,7 +27,7 @@
26
  }
27
 
28
  .yasr-pricing-table-item {
29
- --primary: #F34A4E;
30
  display: flex;
31
  flex-direction: column;
32
  flex-grow: 1;
@@ -53,7 +54,7 @@
53
  }
54
 
55
  .yasr-pricing-table-item.is-highlighted {
56
- --primary: #1FA19C;
57
  transform: scale(1.05);
58
  }
59
 
@@ -71,6 +72,11 @@
71
  .yasr-pricing-table-heading {
72
  background: var(--primary);
73
  }
 
 
 
 
 
74
  .yasr-pricing-table-title, .yasr-pricing-table-subtitle {
75
  text-align: center;
76
  color: white;
@@ -122,8 +128,8 @@
122
  font-weight: bold;
123
  text-decoration: none;
124
  color: white;
125
- border: 2px solid #F34A4EFF;
126
- background: #F34A4EFF;
127
  }
128
 
129
  a.yasr-buy-button{
@@ -136,9 +142,9 @@ a.yasr-buy-button:active, a.yasr-buy-button:focus {
136
  }
137
 
138
  .is-highlighted .yasr-buy-button {
139
- background: #1FA19CFF;
140
  color: white;
141
- border: 2px solid #1FA19CFF;
142
  }
143
 
144
  /** Customize Radio cycle **/
@@ -163,12 +169,12 @@ a.yasr-buy-button:active, a.yasr-buy-button:focus {
163
  }
164
 
165
  #yasr-radio-billing-cycle label:hover {
166
- background-color: #1FA19C;
167
  color: #FFF;
168
  }
169
 
170
  #yasr-radio-billing-cycle input[type="radio"]:checked + label {
171
- background-color: #1FA19C;
172
  color: #FFF;
173
  }
174
 
@@ -210,7 +216,7 @@ a.yasr-buy-button:active, a.yasr-buy-button:focus {
210
  left: 0;
211
  right: 0;
212
  bottom: 0;
213
- background-color: #1FA19C;
214
  -webkit-transition: .4s;
215
  transition: .4s;
216
  }
13
  }
14
 
15
  #yasr-pricing-table {
16
+ --gap: 24px;
17
  --nb-items: 3;
18
  color: #434446;
19
  font-family: sans-serif;
27
  }
28
 
29
  .yasr-pricing-table-item {
30
+ --primary: #212f30;
31
  display: flex;
32
  flex-direction: column;
33
  flex-grow: 1;
54
  }
55
 
56
  .yasr-pricing-table-item.is-highlighted {
57
+ --primary: #166f03;
58
  transform: scale(1.05);
59
  }
60
 
72
  .yasr-pricing-table-heading {
73
  background: var(--primary);
74
  }
75
+
76
+ .yasr-pricing-table-features {
77
+ width: 290px;
78
+ }
79
+
80
  .yasr-pricing-table-title, .yasr-pricing-table-subtitle {
81
  text-align: center;
82
  color: white;
128
  font-weight: bold;
129
  text-decoration: none;
130
  color: white;
131
+ border: 2px solid #212f30FF;
132
+ background: #212f30FF;
133
  }
134
 
135
  a.yasr-buy-button{
142
  }
143
 
144
  .is-highlighted .yasr-buy-button {
145
+ background: #166f03;
146
  color: white;
147
+ border: 2px solid #166f03FF;
148
  }
149
 
150
  /** Customize Radio cycle **/
169
  }
170
 
171
  #yasr-radio-billing-cycle label:hover {
172
+ background-color: #166f03;
173
  color: #FFF;
174
  }
175
 
176
  #yasr-radio-billing-cycle input[type="radio"]:checked + label {
177
+ background-color: #166f03;
178
  color: #FFF;
179
  }
180
 
216
  left: 0;
217
  right: 0;
218
  bottom: 0;
219
+ background-color: #166f03;
220
  -webkit-transition: .4s;
221
  transition: .4s;
222
  }
admin/js/src/yasr-pricing-page.js CHANGED
@@ -52,7 +52,7 @@ function YasrPricingPrintFeatures(props) {
52
  numberOfSites = ' 30 websites'
53
  }
54
  return (
55
- <ul className="PT-Features">
56
  {props.cycle === 'annual' && (
57
  <li className="yasr-pricing-table-feature"><strong>1 year</strong> of supports and updates <br/>for
58
  <strong>{numberOfSites}</strong>
52
  numberOfSites = ' 30 websites'
53
  }
54
  return (
55
+ <ul className="yasr-pricing-table-features">
56
  {props.cycle === 'annual' && (
57
  <li className="yasr-pricing-table-feature"><strong>1 year</strong> of supports and updates <br/>for
58
  <strong>{numberOfSites}</strong>
admin/js/yasr-pricing-page.js CHANGED
@@ -1 +1 @@
1
- (()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var c=0;c<t.length;c++){var a=t[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function a(t,c){if(c&&("object"===e(c)||"function"==typeof c))return c;if(void 0!==c)throw new TypeError("Derived constructors may only return object or undefined");return r(t)}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function l(e){var t="$";return"eur"===e.name&&(t="€"),React.createElement("small",null,t," ")}function i(e){var t="/year";return"monthly"===e.name&&(t="/month"),"lifetime"===e.name&&(t=""),React.createElement("small",null,t)}function s(e){var t=" 1 website";return"plus"===e.license&&(t=" 5 websites"),"enterprise"===e.license&&(t=" 30 websites"),React.createElement("ul",{className:"PT-Features"},"annual"===e.cycle&&React.createElement("li",{className:"yasr-pricing-table-feature"},React.createElement("strong",null,"1 year")," of supports and updates ",React.createElement("br",null),"for",React.createElement("strong",null,t)),"monthly"===e.cycle&&React.createElement("li",{className:"yasr-pricing-table-feature"},React.createElement("strong",null,"1 month")," of supports and updates ",React.createElement("br",null),"for",React.createElement("strong",null,t)),"lifetime"===e.cycle&&React.createElement("li",{className:"yasr-pricing-table-feature"},React.createElement("strong",null,"Lifetime")," updates and support",React.createElement("br",null),"for",React.createElement("strong",null,t)),React.createElement("li",{className:"yasr-pricing-table-feature"},"User reviews"),React.createElement("li",{className:"yasr-pricing-table-feature"},"Custom rankings"),React.createElement("li",{className:"yasr-pricing-table-feature"},"20 + ready to use themes"),React.createElement("li",{className:"yasr-pricing-table-feature"},"Upload your own theme"),React.createElement("li",{className:"yasr-pricing-table-feature"},"Add fake ratings"),React.createElement("li",{className:"yasr-pricing-table-feature"},"Direct email support"),"lifetime"===e.cycle&&React.createElement("li",{className:"yasr-pricing-table-feature"},"We setup the plugin for free ",React.createElement("br",null),"(only lifetime plans)"))}function u(e){var t="",c=1,a="";return"single"===e.license?(a="eur"===e.currency?5399:1933,t="monthly"===e.cycle?"eur"===e.currency?"4.49":"4.99":"lifetime"===e.cycle?"eur"===e.currency?"129.99":"149.99":"eur"===e.currency?"41.99":"47.88"):"plus"===e.license?(c=5,a="eur"===e.currency?5400:1935,t="monthly"===e.cycle?"eur"===e.currency?"8.99":"9.99":"lifetime"===e.cycle?"eur"===e.currency?"249.99":"289.99":"eur"===e.currency?"83.88":"95.88"):"enterprise"===e.license&&(c=30,a="eur"===e.currency?5550:5549,t="monthly"===e.cycle?"eur"===e.currency?"12.99":"14.99":"lifetime"===e.cycle?"eur"===e.currency?"359.99":"439.99":"eur"===e.currency?"119.88":"143.88"),React.createElement("div",{className:"yasr-pring-table-price"},React.createElement(l,{name:e.currency}),React.createElement("span",null,t),React.createElement(i,{name:e.cycle}),React.createElement(o,{cycle:e.cycle,currency:e.currency,license:e.license}),React.createElement("p",{className:"PT-CTA"},React.createElement("a",{href:"#",className:"yasr-buy-button",onClick:function(t){!function(e,t,c,a){var r={plugin_id:256,billing_cycle:e,pricing_id:a,licenses:t,id:"yasr_checkout",page:"yasr_settings_page-pricing",checkout:"true",plan_id:"2778",plan_name:"yasrpro",disable_licenses_selector:!0,hide_billing_cycles:!0,currency:c},n=[];for(var l in r){var i=encodeURIComponent(l),s=encodeURIComponent(r[l]);n.push(i+"="+s)}n=n.join("&");var u=yasrCommonData.adminUrl+"admin.php?"+n;window.open(u,"_self")}(e.cycle,c,e.currency,a),t.preventDefault()}},"Buy YASR ")))}function o(e){if("annual"===e.cycle){var t;return t="plus"===e.license?"eur"===e.currency?"6.99":"7.99":"enterprise"===e.license?"eur"===e.currency?"9.99":"11.99":"eur"===e.currency?"3.49":"3.99",React.createElement("p",{className:"yasr-pricing-table-price-desc"},React.createElement(l,{name:e.currency}),t," /month")}return React.createElement(React.Fragment,null)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(p,React.Component);var l,i,o,y,m=(o=p,y=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(e){return!1}}(),function(){var e,t=n(o);if(y){var c=n(this).constructor;e=Reflect.construct(t,arguments,c)}else e=t.apply(this,arguments);return a(this,e)});function p(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(t=m.call(this,e)).state={currencyName:"usd",cycle:"annual"},t.updateCurrency=t.updateCurrency.bind(r(t)),t.updateCycle=t.updateCycle.bind(r(t)),t}return l=p,(i=[{key:"updateCurrency",value:function(e){var t=e.target;!0===("checkbox"===t.type?t.checked:t.value)?this.setState({currencyName:"eur"}):this.setState({currencyName:"usd"})}},{key:"updateCycle",value:function(e){this.setState({cycle:e.target.value})}},{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{id:"yasr-radio-billing-cycle"},React.createElement("input",{type:"radio",id:"yasr-billing-cycle-monthly",name:"billing-cycle",value:"monthly",onChange:this.updateCycle,checked:"monthly"===this.state.cycle}),React.createElement("label",{htmlFor:"yasr-billing-cycle-monthly"},"Monthly"),React.createElement("input",{type:"radio",id:"yasr-billing-cycle-annual",name:"billing-cycle",value:"annual",onChange:this.updateCycle,checked:"annual"===this.state.cycle}),React.createElement("label",{htmlFor:"yasr-billing-cycle-annual"},"Annual"),React.createElement("input",{type:"radio",id:"yasr-billing-cycle-lifetime",name:"billing-cycle",value:"lifetime",onChange:this.updateCycle,checked:"lifetime"===this.state.cycle}),React.createElement("label",{htmlFor:"yasr-billing-cycle-lifetime"},"Lifetime")),React.createElement("div",{id:"yasr-pricing-table"},React.createElement("div",{className:"yasr-pricing-table-item"},React.createElement("header",{className:"yasr-pricing-table-heading"},React.createElement("h2",{className:"yasr-pricing-table-title"},"Plus"),React.createElement("p",{className:"yasr-pricing-table-subtitle"},"5 websites")),React.createElement(s,{cycle:this.state.cycle,license:"plus"}),React.createElement("div",{className:"yasr-pricing-table-footer"},React.createElement(u,{cycle:this.state.cycle,currency:this.state.currencyName,license:"plus"}))),React.createElement("div",{className:"yasr-pricing-table-item is-highlighted"},React.createElement("header",{className:"yasr-pricing-table-heading"},React.createElement("h2",{className:"yasr-pricing-table-title"},"Single"),React.createElement("p",{className:"yasr-pricing-table-subtitle"}," 1 website")),React.createElement(s,{cycle:this.state.cycle,license:"single"}),React.createElement("div",{className:"yasr-pricing-table-footer"},React.createElement(u,{cycle:this.state.cycle,currency:this.state.currencyName,license:"single"}))),React.createElement("div",{className:"yasr-pricing-table-item"},React.createElement("header",{className:"yasr-pricing-table-heading"},React.createElement("h2",{className:"yasr-pricing-table-title"},"Enterprise"),React.createElement("p",{className:"yasr-pricing-table-subtitle"}," 30 websites")),React.createElement(s,{cycle:this.state.cycle,license:"enterprise"}),React.createElement("div",{className:"yasr-pricing-table-footer"},React.createElement(u,{cycle:this.state.cycle,currency:this.state.currencyName,license:"enterprise"})))),React.createElement("div",{id:"switch-container"},React.createElement("span",{className:"yasr-pricing-text-switcher"}," Display Prices In US $ "),React.createElement("label",{className:"yasr-pricing-switch"},React.createElement("input",{type:"checkbox",onChange:this.updateCurrency}),React.createElement("span",{className:"yasr-pricing-slider"})),React.createElement("span",{className:"yasr-pricing-text-switcher"}," €")))}}])&&t(l.prototype,i),Object.defineProperty(l,"prototype",{writable:!1}),p}();ReactDOM.render(React.createElement(y,null),document.getElementById("yasr-table-container"));var m=document.getElementById("yasr-link-policy"),p=document.getElementById("yasr-link-policy-faq"),f=document.getElementById("yasr-refund-policy"),d=document.getElementById("yasr-close-modal-policy");m.addEventListener("click",(function(){f.style.display="block",document.body.style.backgroundColor="rgba(0,0,0,0.7)"})),p.addEventListener("click",(function(){f.style.display="block",document.body.style.backgroundColor="rgba(0,0,0,0.7)"})),d.onclick=function(){f.style.display="none",document.body.style.backgroundColor="#f1f1f1"}})();
1
+ (()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var c=0;c<t.length;c++){var a=t[c];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function c(e,t){return c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},c(e,t)}function a(t,c){if(c&&("object"===e(c)||"function"==typeof c))return c;if(void 0!==c)throw new TypeError("Derived constructors may only return object or undefined");return r(t)}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function l(e){var t="$";return"eur"===e.name&&(t="€"),React.createElement("small",null,t," ")}function i(e){var t="/year";return"monthly"===e.name&&(t="/month"),"lifetime"===e.name&&(t=""),React.createElement("small",null,t)}function s(e){var t=" 1 website";return"plus"===e.license&&(t=" 5 websites"),"enterprise"===e.license&&(t=" 30 websites"),React.createElement("ul",{className:"yasr-pricing-table-features"},"annual"===e.cycle&&React.createElement("li",{className:"yasr-pricing-table-feature"},React.createElement("strong",null,"1 year")," of supports and updates ",React.createElement("br",null),"for",React.createElement("strong",null,t)),"monthly"===e.cycle&&React.createElement("li",{className:"yasr-pricing-table-feature"},React.createElement("strong",null,"1 month")," of supports and updates ",React.createElement("br",null),"for",React.createElement("strong",null,t)),"lifetime"===e.cycle&&React.createElement("li",{className:"yasr-pricing-table-feature"},React.createElement("strong",null,"Lifetime")," updates and support",React.createElement("br",null),"for",React.createElement("strong",null,t)),React.createElement("li",{className:"yasr-pricing-table-feature"},"User reviews"),React.createElement("li",{className:"yasr-pricing-table-feature"},"Custom rankings"),React.createElement("li",{className:"yasr-pricing-table-feature"},"20 + ready to use themes"),React.createElement("li",{className:"yasr-pricing-table-feature"},"Upload your own theme"),React.createElement("li",{className:"yasr-pricing-table-feature"},"Add fake ratings"),React.createElement("li",{className:"yasr-pricing-table-feature"},"Direct email support"),"lifetime"===e.cycle&&React.createElement("li",{className:"yasr-pricing-table-feature"},"We setup the plugin for free ",React.createElement("br",null),"(only lifetime plans)"))}function u(e){var t="",c=1,a="";return"single"===e.license?(a="eur"===e.currency?5399:1933,t="monthly"===e.cycle?"eur"===e.currency?"4.49":"4.99":"lifetime"===e.cycle?"eur"===e.currency?"129.99":"149.99":"eur"===e.currency?"41.99":"47.88"):"plus"===e.license?(c=5,a="eur"===e.currency?5400:1935,t="monthly"===e.cycle?"eur"===e.currency?"8.99":"9.99":"lifetime"===e.cycle?"eur"===e.currency?"249.99":"289.99":"eur"===e.currency?"83.88":"95.88"):"enterprise"===e.license&&(c=30,a="eur"===e.currency?5550:5549,t="monthly"===e.cycle?"eur"===e.currency?"12.99":"14.99":"lifetime"===e.cycle?"eur"===e.currency?"359.99":"439.99":"eur"===e.currency?"119.88":"143.88"),React.createElement("div",{className:"yasr-pring-table-price"},React.createElement(l,{name:e.currency}),React.createElement("span",null,t),React.createElement(i,{name:e.cycle}),React.createElement(o,{cycle:e.cycle,currency:e.currency,license:e.license}),React.createElement("p",{className:"PT-CTA"},React.createElement("a",{href:"#",className:"yasr-buy-button",onClick:function(t){!function(e,t,c,a){var r={plugin_id:256,billing_cycle:e,pricing_id:a,licenses:t,id:"yasr_checkout",page:"yasr_settings_page-pricing",checkout:"true",plan_id:"2778",plan_name:"yasrpro",disable_licenses_selector:!0,hide_billing_cycles:!0,currency:c},n=[];for(var l in r){var i=encodeURIComponent(l),s=encodeURIComponent(r[l]);n.push(i+"="+s)}n=n.join("&");var u=yasrCommonData.adminUrl+"admin.php?"+n;window.open(u,"_self")}(e.cycle,c,e.currency,a),t.preventDefault()}},"Buy YASR ")))}function o(e){if("annual"===e.cycle){var t;return t="plus"===e.license?"eur"===e.currency?"6.99":"7.99":"enterprise"===e.license?"eur"===e.currency?"9.99":"11.99":"eur"===e.currency?"3.49":"3.99",React.createElement("p",{className:"yasr-pricing-table-price-desc"},React.createElement(l,{name:e.currency}),t," /month")}return React.createElement(React.Fragment,null)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(p,React.Component);var l,i,o,y,m=(o=p,y=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(e){return!1}}(),function(){var e,t=n(o);if(y){var c=n(this).constructor;e=Reflect.construct(t,arguments,c)}else e=t.apply(this,arguments);return a(this,e)});function p(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(t=m.call(this,e)).state={currencyName:"usd",cycle:"annual"},t.updateCurrency=t.updateCurrency.bind(r(t)),t.updateCycle=t.updateCycle.bind(r(t)),t}return l=p,(i=[{key:"updateCurrency",value:function(e){var t=e.target;!0===("checkbox"===t.type?t.checked:t.value)?this.setState({currencyName:"eur"}):this.setState({currencyName:"usd"})}},{key:"updateCycle",value:function(e){this.setState({cycle:e.target.value})}},{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{id:"yasr-radio-billing-cycle"},React.createElement("input",{type:"radio",id:"yasr-billing-cycle-monthly",name:"billing-cycle",value:"monthly",onChange:this.updateCycle,checked:"monthly"===this.state.cycle}),React.createElement("label",{htmlFor:"yasr-billing-cycle-monthly"},"Monthly"),React.createElement("input",{type:"radio",id:"yasr-billing-cycle-annual",name:"billing-cycle",value:"annual",onChange:this.updateCycle,checked:"annual"===this.state.cycle}),React.createElement("label",{htmlFor:"yasr-billing-cycle-annual"},"Annual"),React.createElement("input",{type:"radio",id:"yasr-billing-cycle-lifetime",name:"billing-cycle",value:"lifetime",onChange:this.updateCycle,checked:"lifetime"===this.state.cycle}),React.createElement("label",{htmlFor:"yasr-billing-cycle-lifetime"},"Lifetime")),React.createElement("div",{id:"yasr-pricing-table"},React.createElement("div",{className:"yasr-pricing-table-item"},React.createElement("header",{className:"yasr-pricing-table-heading"},React.createElement("h2",{className:"yasr-pricing-table-title"},"Plus"),React.createElement("p",{className:"yasr-pricing-table-subtitle"},"5 websites")),React.createElement(s,{cycle:this.state.cycle,license:"plus"}),React.createElement("div",{className:"yasr-pricing-table-footer"},React.createElement(u,{cycle:this.state.cycle,currency:this.state.currencyName,license:"plus"}))),React.createElement("div",{className:"yasr-pricing-table-item is-highlighted"},React.createElement("header",{className:"yasr-pricing-table-heading"},React.createElement("h2",{className:"yasr-pricing-table-title"},"Single"),React.createElement("p",{className:"yasr-pricing-table-subtitle"}," 1 website")),React.createElement(s,{cycle:this.state.cycle,license:"single"}),React.createElement("div",{className:"yasr-pricing-table-footer"},React.createElement(u,{cycle:this.state.cycle,currency:this.state.currencyName,license:"single"}))),React.createElement("div",{className:"yasr-pricing-table-item"},React.createElement("header",{className:"yasr-pricing-table-heading"},React.createElement("h2",{className:"yasr-pricing-table-title"},"Enterprise"),React.createElement("p",{className:"yasr-pricing-table-subtitle"}," 30 websites")),React.createElement(s,{cycle:this.state.cycle,license:"enterprise"}),React.createElement("div",{className:"yasr-pricing-table-footer"},React.createElement(u,{cycle:this.state.cycle,currency:this.state.currencyName,license:"enterprise"})))),React.createElement("div",{id:"switch-container"},React.createElement("span",{className:"yasr-pricing-text-switcher"}," Display Prices In US $ "),React.createElement("label",{className:"yasr-pricing-switch"},React.createElement("input",{type:"checkbox",onChange:this.updateCurrency}),React.createElement("span",{className:"yasr-pricing-slider"})),React.createElement("span",{className:"yasr-pricing-text-switcher"}," €")))}}])&&t(l.prototype,i),Object.defineProperty(l,"prototype",{writable:!1}),p}();ReactDOM.render(React.createElement(y,null),document.getElementById("yasr-table-container"));var m=document.getElementById("yasr-link-policy"),p=document.getElementById("yasr-link-policy-faq"),f=document.getElementById("yasr-refund-policy"),d=document.getElementById("yasr-close-modal-policy");m.addEventListener("click",(function(){f.style.display="block",document.body.style.backgroundColor="rgba(0,0,0,0.7)"})),p.addEventListener("click",(function(){f.style.display="block",document.body.style.backgroundColor="rgba(0,0,0,0.7)"})),d.onclick=function(){f.style.display="none",document.body.style.backgroundColor="#f1f1f1"}})();
admin/settings/yasr-pricing-page.php CHANGED
@@ -98,7 +98,7 @@ if (!defined('ABSPATH')) {
98
  <p>All plans are month-to-month unless you subscribe for an annual or lifetime plan.</p>
99
 
100
  <h3>Do you offer any discounted plans?</h3>
101
- <p>Yes, as you can see in the table!.</p>
102
 
103
  <h3>Can I change my plan later on?</h3>
104
  <p>Absolutely! You can upgrade or downgrade your plan at any time.</p>
98
  <p>All plans are month-to-month unless you subscribe for an annual or lifetime plan.</p>
99
 
100
  <h3>Do you offer any discounted plans?</h3>
101
+ <p>Yes, as you can see in the table!</p>
102
 
103
  <h3>Can I change my plan later on?</h3>
104
  <p>Absolutely! You can upgrade or downgrade your plan at any time.</p>
admin/yasr-admin-functions.php CHANGED
@@ -56,23 +56,20 @@ add_action('admin_enqueue_scripts', 'yasr_add_admin_scripts');
56
  function yasr_add_admin_scripts($hook) {
57
  global $yasr_settings_page;
58
 
59
- /*if ($hook === 'yet-another-stars-rating_page_yasr_pricing_page'
60
  || $hook === 'yet-another-stars-rating_page_yasr_settings_page-pricing') {
61
- wp_enqueue_style(
62
- 'yasrcss-pricing',
63
- YASR_CSS_DIR_ADMIN . 'yasr-pricing-page.css',
64
- false,
65
- YASR_VERSION_NUM
66
- );
67
 
68
- wp_enqueue_script(
69
- 'yasrjs-pricing',
70
- YASR_JS_DIR_ADMIN . 'yasr-pricing-page.js',
71
- array('wp-element', 'yasradmin'),
72
- YASR_VERSION_NUM,
73
- true
74
- );
75
- }*/
 
 
 
76
 
77
  if ($hook === 'index.php'
78
  || $hook === 'edit.php'
@@ -181,9 +178,9 @@ function yasr_add_pages() {
181
  );
182
 
183
  //Filter the pricing page only if trial is not set
184
- //if(isset($_GET['page']) && $_GET['page'] === 'yasr_settings_page-pricing' && !isset($_GET['trial'])) {
185
- //yasr_fs()->add_filter( 'templates/pricing.php', 'yasr_pricing_page_callback' );
186
- //}
187
 
188
  if (yasr_fs()->is_free_plan() && !yasr_fs()->is_trial()) {
189
  global $submenu;
56
  function yasr_add_admin_scripts($hook) {
57
  global $yasr_settings_page;
58
 
59
+ if ($hook === 'yet-another-stars-rating_page_yasr_pricing_page'
60
  || $hook === 'yet-another-stars-rating_page_yasr_settings_page-pricing') {
 
 
 
 
 
 
61
 
62
+ if(!isset($_GET['trial'])) {
63
+ wp_enqueue_style(
64
+ 'yasrcss-pricing', YASR_CSS_DIR_ADMIN . 'yasr-pricing-page.css', false, YASR_VERSION_NUM
65
+ );
66
+
67
+ wp_enqueue_script(
68
+ 'yasrjs-pricing', YASR_JS_DIR_ADMIN . 'yasr-pricing-page.js', array('wp-element', 'yasradmin'),
69
+ YASR_VERSION_NUM, true
70
+ );
71
+ }
72
+ }
73
 
74
  if ($hook === 'index.php'
75
  || $hook === 'edit.php'
178
  );
179
 
180
  //Filter the pricing page only if trial is not set
181
+ if(isset($_GET['page']) && $_GET['page'] === 'yasr_settings_page-pricing' && !isset($_GET['trial'])) {
182
+ yasr_fs()->add_filter( 'templates/pricing.php', 'yasr_pricing_page_callback' );
183
+ }
184
 
185
  if (yasr_fs()->is_free_plan() && !yasr_fs()->is_trial()) {
186
  global $submenu;
includes/shortcodes/classes/YasrShortcodesAjax.php CHANGED
@@ -79,7 +79,11 @@ class YasrShortcodesAjax {
79
 
80
  $nonce_response = self::validNonce($nonce_visitor, 'yasr_nonce_vv');
81
  if($nonce_response !== true) {
82
- die ($nonce_response);
 
 
 
 
83
  }
84
 
85
  if ($rating < 1) {
@@ -516,11 +520,11 @@ class YasrShortcodesAjax {
516
 
517
  $stats = $wpdb->get_results(
518
  $wpdb->prepare(
519
- "SELECT ROUND(vote, 0) as vote,
520
  COUNT(vote) as n_of_votes
521
  FROM " . YASR_LOG_TABLE . "
522
  WHERE post_id=%d
523
- AND vote > 0
524
  AND vote <= 5
525
  GROUP BY vote
526
  ORDER BY vote DESC
@@ -723,4 +727,4 @@ class YasrShortcodesAjax {
723
  return $data_to_return;
724
 
725
  }
726
- }
79
 
80
  $nonce_response = self::validNonce($nonce_visitor, 'yasr_nonce_vv');
81
  if($nonce_response !== true) {
82
+ die($nonce_response);
83
+ }
84
+
85
+ if(YASR_ALLOWED_USER === 'logged_only' && !is_user_logged_in()) {
86
+ die(esc_html__('Only logged in user can rate', 'yet-anothter-stars-rating'));
87
  }
88
 
89
  if ($rating < 1) {
520
 
521
  $stats = $wpdb->get_results(
522
  $wpdb->prepare(
523
+ "SELECT ROUND(vote, 0) as vote,
524
  COUNT(vote) as n_of_votes
525
  FROM " . YASR_LOG_TABLE . "
526
  WHERE post_id=%d
527
+ AND vote > 0
528
  AND vote <= 5
529
  GROUP BY vote
530
  ORDER BY vote DESC
727
  return $data_to_return;
728
 
729
  }
730
+ }
includes/yasr-includes-functions.php CHANGED
@@ -37,6 +37,7 @@ function yasr_add_scripts_includes() {
37
 
38
  $yasr_common_data = array(
39
  'siteUrl' => site_url(),
 
40
  'ajaxurl' => admin_url('admin-ajax.php'),
41
  'visitorStatsEnabled' => YASR_VISITORS_STATS,
42
  'ajaxEnabled' => YASR_ENABLE_AJAX,
37
 
38
  $yasr_common_data = array(
39
  'siteUrl' => site_url(),
40
+ 'adminUrl' => admin_url(), //keep this for pricing page
41
  'ajaxurl' => admin_url('admin-ajax.php'),
42
  'visitorStatsEnabled' => YASR_VISITORS_STATS,
43
  'ajaxEnabled' => YASR_ENABLE_AJAX,
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: 3.0.0
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
@@ -203,6 +203,9 @@ Yes, YASR is 100% fully compatible with PHP 8
203
 
204
  The full changelog can be found in the plugin's directory. Recent entries:
205
 
 
 
 
206
  = 3.0.0 =
207
  * Fix for an authenticated XSS vulnerability if 'Load results with AJAX?' is enabled
208
 
@@ -222,10 +225,12 @@ The full changelog can be found in the plugin's directory. Recent entries:
222
  * TWEAKED: "Stats" page is now renamed in "Manage Ratings"
223
  * TWEAKED: below the editor is now easier to manage Multi Sets
224
 
 
225
  = 2.9.6 =
226
  * FIXED: support for wp_template and wp_template_part CPT, used by FSE
227
  * FIXED: html tags in custom texts didn't work
228
 
 
229
  = 2.9.5 =
230
  * NEW FEATURE: In the settings, is now possible to customize the text when a rating is saved / updated
231
  * minor fixes
@@ -245,4 +250,4 @@ The full changelog can be found in the plugin's directory. Recent entries:
245
  * FIXED: if shortcode exists for a post or page, but there are no ratings, wrong rich snippets are returned
246
 
247
  = Additional Info =
248
- See credits.txt file
4
  Requires at least: 5.0
5
  Contributors: Dudo
6
  Tested up to: 5.9
7
+ Stable tag: 3.0.1
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
203
 
204
  The full changelog can be found in the plugin's directory. Recent entries:
205
 
206
+ = 3.0.1 =
207
+ * Minor changes and new pricing page.
208
+
209
  = 3.0.0 =
210
  * Fix for an authenticated XSS vulnerability if 'Load results with AJAX?' is enabled
211
 
225
  * TWEAKED: "Stats" page is now renamed in "Manage Ratings"
226
  * TWEAKED: below the editor is now easier to manage Multi Sets
227
 
228
+
229
  = 2.9.6 =
230
  * FIXED: support for wp_template and wp_template_part CPT, used by FSE
231
  * FIXED: html tags in custom texts didn't work
232
 
233
+
234
  = 2.9.5 =
235
  * NEW FEATURE: In the settings, is now possible to customize the text when a rating is saved / updated
236
  * minor fixes
250
  * FIXED: if shortcode exists for a post or page, but there are no ratings, wrong rich snippets are returned
251
 
252
  = Additional Info =
253
+ See credits.txt file
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: 3.0.0
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', '3.0.0' );
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: 3.0.1
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', '3.0.1' );
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__ );