Version Description
- Improve: added settings for manually db updates
- Bugfix: conflict with a business version
Download this release
Release Info
Developer | richplugins |
Plugin | Google Reviews Widget |
Version | 2.0.9 |
Comparing to | |
See all releases |
Code changes from version 2.0.8 to 2.0.9
- assets/js/admin-main.js +2 -2
- assets/js/public-main.js +4 -4
- assets/src/js/admin-builder.js +2 -2
- assets/src/js/public-main.js +4 -4
- grw.php +2 -2
- includes/admin/class-admin-notice.php +1 -0
- includes/class-activator.php +8 -4
- includes/class-debug-info.php +107 -99
- includes/class-plugin-settings.php +10 -0
- includes/class-plugin-support.php +6 -20
- includes/class-settings-save.php +7 -1
- includes/class-view.php +2 -2
- readme.txt +13 -9
assets/js/admin-main.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
jQuery(document).ready(function(a){a(".grw-admin-page a.nav-tab").on("click",function(c){var b=a(this),d=b.attr("href");a(d).show().siblings(".tab-content").hide();b.addClass("nav-tab-active").siblings().removeClass("nav-tab-active");c.preventDefault()})});
|
2 |
-
var
|
3 |
'&grw_tab=fig#place_id" target="_blank">how to find any Google Place ID</a>.</div></div><div class="grw-builder-option"><select class="grw-connect-lang"><option value="" selected="selected">Choose language if required</option><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="bn">Bengali</option><option value="ca">Catalan</option><option value="cs">Czech</option><option value="da">Danish</option><option value="de">German</option><option value="el">Greek</option><option value="en">English</option><option value="es">Spanish</option><option value="eu">Basque</option><option value="eu">Basque</option><option value="fa">Farsi</option><option value="fi">Finnish</option><option value="fil">Filipino</option><option value="fr">French</option><option value="gl">Galician</option><option value="gu">Gujarati</option><option value="hi">Hindi</option><option value="hr">Croatian</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="iw">Hebrew</option><option value="ja">Japanese</option><option value="kn">Kannada</option><option value="ko">Korean</option><option value="lt">Lithuanian</option><option value="lv">Latvian</option><option value="ml">Malayalam</option><option value="mr">Marathi</option><option value="nl">Dutch</option><option value="no">Norwegian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="pt-BR">Portuguese (Brazil)</option><option value="pt-PT">Portuguese (Portugal)</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="sr">Serbian</option><option value="sv">Swedish</option><option value="ta">Tamil</option><option value="te">Telugu</option><option value="th">Thai</option><option value="tl">Tagalog</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option><option value="zh-CN">Chinese (Simplified)</option><option value="zh-TW">Chinese (Traditional)</option></select></div><div class="grw-builder-option"><button class="grw-connect-btn">Connect Google</button><small class="grw-connect-error"></small></div></div><div class="grw-connections"></div></div><div class="grw-connect-options"><div class="grw-builder-inside"><div class="grw-builder-option">Layout<select id="view_mode" name="view_mode"><option value="slider" selected="selected">Slider</option><option value="list">List</option></select></div><div class="grw-builder-option">Pagination<input type="text" name="pagination" value=""></div><div class="grw-builder-option">Maximum characters before \'read more\' link<input type="text" name="text_size" value=""></div><div class="grw-builder-option">Maximum width<input type="text" name="max_width" value="" placeholder="for instance: 300px"></div><div class="grw-builder-option">Maximum height<input type="text" name="max_height" value="" placeholder="for instance: 500px"></div><div class="grw-builder-option"><label><input type="checkbox" name="header_hide_social" value="">Hide headers</label></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_based_on" value="">Hide \'Based on ... reviews\'</label></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_reviews" value="">Hide reviews, leave only rating header</label></div><div class="grw-builder-option"><label><input type="checkbox" name="centered" value="">Place by center (only if Width is set)</label></div><div class="grw-builder-option"><label><input type="checkbox" name="dark_theme">Dark background</label></div></div><div class="grw-builder-top grw-toggle">Advance Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option"><label><input type="checkbox" name="lazy_load_img" checked>Lazy load images</label></div><div class="grw-builder-option"><label><input type="checkbox" name="google_def_rev_link">Use default Google reviews link</label><span class="grw-quest grw-quest-top grw-toggle" title="Click to help">?</span><div class="grw-quest-help" style="display:none;">If the direct link to all reviews <b>https://search.google.com/local/reviews?placeid=<PLACE_ID></b> does not work with your Google place (leads to 404), please use this option to use the default reviews link to Google map.</div></div><div class="grw-builder-option"><label><input type="checkbox" name="open_link" checked>Open links in new Window</label></div><div class="grw-builder-option"><label><input type="checkbox" name="nofollow_link" checked>Use no follow links</label></div><div class="grw-builder-option">Reviewer avatar size<select name="reviewer_avatar_size"><option value="56" selected="selected">Small: 56px</option><option value="128">Medium: 128px</option><option value="256">Large: 256px</option></select></div><div class="grw-builder-option">Cache data<select name="cache"><option value="1">1 Hour</option><option value="3">3 Hours</option><option value="6">6 Hours</option><option value="12" selected="selected">12 Hours</option><option value="24">1 Day</option><option value="48">2 Days</option><option value="168">1 Week</option><option value="">Disable (NOT recommended)</option></select></div><div class="grw-builder-option">Reviews limit<input type="text" name="reviews_limit" value=""></div></div></div>';
|
4 |
-
function grw_builder_init(a,c){var b=document.querySelector(c.el);if(b){b.innerHTML=
|
5 |
b).unbind("click").click(function(){a(this).toggleClass("toggled");a(this).next().slideToggle()});a(".grw-connections").sortable&&(a(".grw-connections").sortable({stop:function(a,b){grw_serialize_connections()}}),a(".grw-connections").disableSelection());a(".wp-review-hide").click(function(){grw_review_hide(a(this));return!1});a("#grw_save").click(function(){grw_feed_save_ajax();return!1})}}
|
6 |
function grw_feed_save_ajax(a){if(!window.grw_title.value)return window.grw_title.focus(),!1;window.grw_save.innerText="Auto save, wait";window.grw_save.disabled=!0;jQuery.post(ajaxurl,{post_id:window.grw_post_id.value,title:window.grw_title.value,content:document.getElementById("grw-builder-connection").value,action:"grw_feed_save_ajax"},function(a){for(var b=document.querySelectorAll(".wp-gr"),c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);window.grw_collection_preview.innerHTML=a;jQuery(".wp-review-hide").unbind("click").click(function(){grw_review_hide(jQuery(this));
|
7 |
return!1});window.grw_post_id.value||(a=document.querySelector(".wp-gr").getAttribute("data-id"),window.grw_post_id.value=a,window.location.href=window.location.href+"&grw_feed_id="+a);window.grw_save.innerText="Save & Refresh";window.grw_save.disabled=!1})}
|
1 |
jQuery(document).ready(function(a){a(".grw-admin-page a.nav-tab").on("click",function(c){var b=a(this),d=b.attr("href");a(d).show().siblings(".tab-content").hide();b.addClass("nav-tab-active").siblings().removeClass("nav-tab-active");c.preventDefault()})});
|
2 |
+
var GRW_HTML_CONTENT='<div class="grw-builder-platforms grw-builder-inside"><div class="grw-toggle grw-builder-connect grw-connect-google">Connect Google</div><div class="grw-connect-google-inside" style="display:none"><div class="grw-builder-option"><input type="text" class="grw-connect-id" value="" placeholder="Place ID" /><span class="grw-quest grw-toggle" title="Click to help">?</span><div class="grw-quest-help">The standard way to find your Google Place ID is to go to <a href="https://developers.google.com/places/place-id" target="_blank">https://developers.google.com/places/place-id</a> and search for your company name.<br><br>But sometimes it may not work, in this case please see <a href="'+GRW_VARS.supportUrl+
|
3 |
'&grw_tab=fig#place_id" target="_blank">how to find any Google Place ID</a>.</div></div><div class="grw-builder-option"><select class="grw-connect-lang"><option value="" selected="selected">Choose language if required</option><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="bn">Bengali</option><option value="ca">Catalan</option><option value="cs">Czech</option><option value="da">Danish</option><option value="de">German</option><option value="el">Greek</option><option value="en">English</option><option value="es">Spanish</option><option value="eu">Basque</option><option value="eu">Basque</option><option value="fa">Farsi</option><option value="fi">Finnish</option><option value="fil">Filipino</option><option value="fr">French</option><option value="gl">Galician</option><option value="gu">Gujarati</option><option value="hi">Hindi</option><option value="hr">Croatian</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="iw">Hebrew</option><option value="ja">Japanese</option><option value="kn">Kannada</option><option value="ko">Korean</option><option value="lt">Lithuanian</option><option value="lv">Latvian</option><option value="ml">Malayalam</option><option value="mr">Marathi</option><option value="nl">Dutch</option><option value="no">Norwegian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="pt-BR">Portuguese (Brazil)</option><option value="pt-PT">Portuguese (Portugal)</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="sr">Serbian</option><option value="sv">Swedish</option><option value="ta">Tamil</option><option value="te">Telugu</option><option value="th">Thai</option><option value="tl">Tagalog</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option><option value="zh-CN">Chinese (Simplified)</option><option value="zh-TW">Chinese (Traditional)</option></select></div><div class="grw-builder-option"><button class="grw-connect-btn">Connect Google</button><small class="grw-connect-error"></small></div></div><div class="grw-connections"></div></div><div class="grw-connect-options"><div class="grw-builder-inside"><div class="grw-builder-option">Layout<select id="view_mode" name="view_mode"><option value="slider" selected="selected">Slider</option><option value="list">List</option></select></div><div class="grw-builder-option">Pagination<input type="text" name="pagination" value=""></div><div class="grw-builder-option">Maximum characters before \'read more\' link<input type="text" name="text_size" value=""></div><div class="grw-builder-option">Maximum width<input type="text" name="max_width" value="" placeholder="for instance: 300px"></div><div class="grw-builder-option">Maximum height<input type="text" name="max_height" value="" placeholder="for instance: 500px"></div><div class="grw-builder-option"><label><input type="checkbox" name="header_hide_social" value="">Hide headers</label></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_based_on" value="">Hide \'Based on ... reviews\'</label></div><div class="grw-builder-option"><label><input type="checkbox" name="hide_reviews" value="">Hide reviews, leave only rating header</label></div><div class="grw-builder-option"><label><input type="checkbox" name="centered" value="">Place by center (only if Width is set)</label></div><div class="grw-builder-option"><label><input type="checkbox" name="dark_theme">Dark background</label></div></div><div class="grw-builder-top grw-toggle">Advance Options</div><div class="grw-builder-inside" style="display:none"><div class="grw-builder-option"><label><input type="checkbox" name="lazy_load_img" checked>Lazy load images</label></div><div class="grw-builder-option"><label><input type="checkbox" name="google_def_rev_link">Use default Google reviews link</label><span class="grw-quest grw-quest-top grw-toggle" title="Click to help">?</span><div class="grw-quest-help" style="display:none;">If the direct link to all reviews <b>https://search.google.com/local/reviews?placeid=<PLACE_ID></b> does not work with your Google place (leads to 404), please use this option to use the default reviews link to Google map.</div></div><div class="grw-builder-option"><label><input type="checkbox" name="open_link" checked>Open links in new Window</label></div><div class="grw-builder-option"><label><input type="checkbox" name="nofollow_link" checked>Use no follow links</label></div><div class="grw-builder-option">Reviewer avatar size<select name="reviewer_avatar_size"><option value="56" selected="selected">Small: 56px</option><option value="128">Medium: 128px</option><option value="256">Large: 256px</option></select></div><div class="grw-builder-option">Cache data<select name="cache"><option value="1">1 Hour</option><option value="3">3 Hours</option><option value="6">6 Hours</option><option value="12" selected="selected">12 Hours</option><option value="24">1 Day</option><option value="48">2 Days</option><option value="168">1 Week</option><option value="">Disable (NOT recommended)</option></select></div><div class="grw-builder-option">Reviews limit<input type="text" name="reviews_limit" value=""></div></div></div>';
|
4 |
+
function grw_builder_init(a,c){var b=document.querySelector(c.el);if(b){b.innerHTML=GRW_HTML_CONTENT;c.conns&&grw_deserialize_connections(a,b,c.conns,c.opts);var d=b.querySelector(".grw-connect-google-inside");grw_connection(a,d,"google",c.authcode);a('.grw-connect-options input[type="text"],.grw-connect-options textarea').keyup(function(){grw_serialize_connections()});a('.grw-connect-options input[type="checkbox"],.grw-connect-options select').change(function(){grw_serialize_connections()});a(".grw-toggle",
|
5 |
b).unbind("click").click(function(){a(this).toggleClass("toggled");a(this).next().slideToggle()});a(".grw-connections").sortable&&(a(".grw-connections").sortable({stop:function(a,b){grw_serialize_connections()}}),a(".grw-connections").disableSelection());a(".wp-review-hide").click(function(){grw_review_hide(a(this));return!1});a("#grw_save").click(function(){grw_feed_save_ajax();return!1})}}
|
6 |
function grw_feed_save_ajax(a){if(!window.grw_title.value)return window.grw_title.focus(),!1;window.grw_save.innerText="Auto save, wait";window.grw_save.disabled=!0;jQuery.post(ajaxurl,{post_id:window.grw_post_id.value,title:window.grw_title.value,content:document.getElementById("grw-builder-connection").value,action:"grw_feed_save_ajax"},function(a){for(var b=document.querySelectorAll(".wp-gr"),c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);window.grw_collection_preview.innerHTML=a;jQuery(".wp-review-hide").unbind("click").click(function(){grw_review_hide(jQuery(this));
|
7 |
return!1});window.grw_post_id.value||(a=document.querySelector(".wp-gr").getAttribute("data-id"),window.grw_post_id.value=a,window.location.href=window.location.href+"&grw_feed_id="+a);window.grw_save.innerText="Save & Refresh";window.grw_save.disabled=!1})}
|
assets/js/public-main.js
CHANGED
@@ -68,9 +68,9 @@ function rplg_next_reviews(a,b){var d=this.parentNode,e=".wp-"+a+"-review.wp-"+a
|
|
68 |
function _rplg_lang(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()}function _rplg_popup(a,b,d,e,f,g){f=f||screen.height/2-d/2;g=g||screen.width/2-b/2;return window.open(a,"","location=1,status=1,resizable=yes,width="+b+",height="+d+",top="+f+",left="+g)}
|
69 |
function _rplg_timeago(a){for(var b=0;b<a.length;b++){var d=a[b].className;-1<d.indexOf("google")?(d=parseInt(a[b].getAttribute("data-time")),d*=1E3):d=-1<d.indexOf("facebook")?(new Date(a[b].getAttribute("data-time").replace(/\+\d+$/,""))).getTime():(new Date(a[b].getAttribute("data-time").replace(/ /,"T"))).getTime();a[b].innerHTML=WPacTime.getTime(d,_rplg_lang(),"ago")}}
|
70 |
function _rplg_init_blazy(a){window.Blazy?window.rplg_blazy=new Blazy({selector:"img.rplg-blazy"}):0<a&&setTimeout(function(){_rplg_init_blazy(a-1)},200)}function _rplg_read_more(){for(var a=document.querySelectorAll(".wp-more-toggle"),b=0;b<a.length;b++)(function(a){a.onclick=function(){a.parentNode.removeChild(a.previousSibling.previousSibling);a.previousSibling.className="";a.textContent=""}})(a[b])}
|
71 |
-
function _rplg_get_parent(a,b){b=b||"
|
72 |
function _rplg_init_slider(a){function b(){g.className=510>g.offsetWidth?"grw-row grw-row-xs":750>g.offsetWidth?"grw-row grw-row-x":1100>g.offsetWidth?"grw-row grw-row-s":1450>g.offsetWidth?"grw-row grw-row-m":1800>g.offsetWidth?"grw-row grw-row-l":"grw-row grw-row-xl";n.length&&setTimeout(d,200)}function d(){var b=m.offsetWidth/n[0].offsetWidth,d=Math.ceil(n.length/b),f=a.querySelector(".grw-slider-dots");f.innerHTML="";for(var g=0;g<d;g++){var h=document.createElement("div");h.className="grw-slider-dot";
|
73 |
x=Math.ceil((m.scrollLeft+(m.scrollLeft+n[0].offsetWidth*b))/2*d/m.scrollWidth);x==g+1&&(h.className="grw-slider-dot active");h.setAttribute("data-index",g+1);h.setAttribute("data-visible",b);f.appendChild(h);h.onclick=function(){var b=a.querySelector(".grw-slider-dot.active");b=parseInt(b.getAttribute("data-index"));var d=parseInt(this.getAttribute("data-index")),f=parseInt(this.getAttribute("data-visible"));b<d?e(f*Math.abs(d-b)):m.scrollBy(-n[0].offsetWidth*f*Math.abs(d-b),0);a.querySelector(".grw-slider-dot.active").className=
|
74 |
-
"grw-slider-dot";this.className="grw-slider-dot active";l&&clearInterval(l)}}}function e(a){m.scrollBy(n[0].offsetWidth*a,0)}function f(){var b=400,g=a.querySelector(".grw-slider-review:last-child"),h=g.getBoundingClientRect();g=g.parentNode.getBoundingClientRect();(2>Math.abs(g.left-h.left)||g.left<=h.left)&&h.left<g.right&&(2>Math.abs(g.right-h.right)||g.right>=h.right)&&h.right>g.left?(m.scrollBy(-m.scrollWidth,0),b=700):e(1);setTimeout(d,b);l=setTimeout(f,5E3)}a=_rplg_get_parent(a);var g=
|
75 |
-
m=a.querySelector(".grw-slider-reviews"),n=a.querySelectorAll(".grw-slider-review"),u=null,l=null,r=function(){var d=a.querySelector(".grw-slider");(d.offsetWidth||d.offsetHeight||d.getClientRects().length)&&"hidden"!==window.getComputedStyle(d).visibility?(b(),_rplg_init_blazy(10),n.length&&setTimeout(f,300)):setTimeout(r,300)};r();window.addEventListener("resize",function(){clearTimeout(u);u=setTimeout(function(){b()},150)});var h=a.querySelector(".grw-slider-prev");
|
76 |
-
0);setTimeout(d,200);l&&clearInterval(l)});if(h=a.querySelector(".grw-slider-next"))h.onclick=function(){e(1);setTimeout(d,200);l&&clearInterval(l)}}function
|
68 |
function _rplg_lang(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()}function _rplg_popup(a,b,d,e,f,g){f=f||screen.height/2-d/2;g=g||screen.width/2-b/2;return window.open(a,"","location=1,status=1,resizable=yes,width="+b+",height="+d+",top="+f+",left="+g)}
|
69 |
function _rplg_timeago(a){for(var b=0;b<a.length;b++){var d=a[b].className;-1<d.indexOf("google")?(d=parseInt(a[b].getAttribute("data-time")),d*=1E3):d=-1<d.indexOf("facebook")?(new Date(a[b].getAttribute("data-time").replace(/\+\d+$/,""))).getTime():(new Date(a[b].getAttribute("data-time").replace(/ /,"T"))).getTime();a[b].innerHTML=WPacTime.getTime(d,_rplg_lang(),"ago")}}
|
70 |
function _rplg_init_blazy(a){window.Blazy?window.rplg_blazy=new Blazy({selector:"img.rplg-blazy"}):0<a&&setTimeout(function(){_rplg_init_blazy(a-1)},200)}function _rplg_read_more(){for(var a=document.querySelectorAll(".wp-more-toggle"),b=0;b<a.length;b++)(function(a){a.onclick=function(){a.parentNode.removeChild(a.previousSibling.previousSibling);a.previousSibling.className="";a.textContent=""}})(a[b])}
|
71 |
+
function _rplg_get_parent(a,b){b=b||"rplg";if(0>a.className.split(" ").indexOf(b))for(;(a=a.parentElement)&&0>a.className.split(" ").indexOf(b););return a}
|
72 |
function _rplg_init_slider(a){function b(){g.className=510>g.offsetWidth?"grw-row grw-row-xs":750>g.offsetWidth?"grw-row grw-row-x":1100>g.offsetWidth?"grw-row grw-row-s":1450>g.offsetWidth?"grw-row grw-row-m":1800>g.offsetWidth?"grw-row grw-row-l":"grw-row grw-row-xl";n.length&&setTimeout(d,200)}function d(){var b=m.offsetWidth/n[0].offsetWidth,d=Math.ceil(n.length/b),f=a.querySelector(".grw-slider-dots");f.innerHTML="";for(var g=0;g<d;g++){var h=document.createElement("div");h.className="grw-slider-dot";
|
73 |
x=Math.ceil((m.scrollLeft+(m.scrollLeft+n[0].offsetWidth*b))/2*d/m.scrollWidth);x==g+1&&(h.className="grw-slider-dot active");h.setAttribute("data-index",g+1);h.setAttribute("data-visible",b);f.appendChild(h);h.onclick=function(){var b=a.querySelector(".grw-slider-dot.active");b=parseInt(b.getAttribute("data-index"));var d=parseInt(this.getAttribute("data-index")),f=parseInt(this.getAttribute("data-visible"));b<d?e(f*Math.abs(d-b)):m.scrollBy(-n[0].offsetWidth*f*Math.abs(d-b),0);a.querySelector(".grw-slider-dot.active").className=
|
74 |
+
"grw-slider-dot";this.className="grw-slider-dot active";l&&clearInterval(l)}}}function e(a){m.scrollBy(n[0].offsetWidth*a,0)}function f(){var b=400,g=a.querySelector(".grw-slider-review:last-child"),h=g.getBoundingClientRect();g=g.parentNode.getBoundingClientRect();(2>Math.abs(g.left-h.left)||g.left<=h.left)&&h.left<g.right&&(2>Math.abs(g.right-h.right)||g.right>=h.right)&&h.right>g.left?(m.scrollBy(-m.scrollWidth,0),b=700):e(1);setTimeout(d,b);l=setTimeout(f,5E3)}a=_rplg_get_parent(a,"wp-gr");var g=
|
75 |
+
a.querySelector(".grw-slider .grw-row"),m=a.querySelector(".grw-slider-reviews"),n=a.querySelectorAll(".grw-slider-review"),u=null,l=null,r=function(){var d=a.querySelector(".grw-slider");(d.offsetWidth||d.offsetHeight||d.getClientRects().length)&&"hidden"!==window.getComputedStyle(d).visibility?(b(),_rplg_init_blazy(10),n.length&&setTimeout(f,300)):setTimeout(r,300)};r();window.addEventListener("resize",function(){clearTimeout(u);u=setTimeout(function(){b()},150)});var h=a.querySelector(".grw-slider-prev");
|
76 |
+
h&&(h.onclick=function(){m.scrollBy(-n[0].offsetWidth,0);setTimeout(d,200);l&&clearInterval(l)});if(h=a.querySelector(".grw-slider-next"))h.onclick=function(){e(1);setTimeout(d,200);l&&clearInterval(l)}}function grw_init(a,b){_rplg_timeago(document.querySelectorAll(".wpac [data-time]"));_rplg_read_more();_rplg_init_blazy(10);a&&"slider"==b&&_rplg_init_slider(a)}document.addEventListener("DOMContentLoaded",function(){grw_init()});
|
assets/src/js/admin-builder.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var
|
2 |
|
3 |
'<div class="grw-builder-platforms grw-builder-inside">' +
|
4 |
|
@@ -219,7 +219,7 @@ function grw_builder_init($, data) {
|
|
219 |
var el = document.querySelector(data.el);
|
220 |
if (!el) return;
|
221 |
|
222 |
-
el.innerHTML =
|
223 |
|
224 |
if (data.conns) {
|
225 |
grw_deserialize_connections($, el, data.conns, data.opts);
|
1 |
+
var GRW_HTML_CONTENT = '' +
|
2 |
|
3 |
'<div class="grw-builder-platforms grw-builder-inside">' +
|
4 |
|
219 |
var el = document.querySelector(data.el);
|
220 |
if (!el) return;
|
221 |
|
222 |
+
el.innerHTML = GRW_HTML_CONTENT;
|
223 |
|
224 |
if (data.conns) {
|
225 |
grw_deserialize_connections($, el, data.conns, data.opts);
|
assets/src/js/public-main.js
CHANGED
@@ -100,7 +100,7 @@ function _rplg_read_more() {
|
|
100 |
}
|
101 |
|
102 |
function _rplg_get_parent(el, cl) {
|
103 |
-
cl = cl || '
|
104 |
if (el.className.split(' ').indexOf(cl) < 0) {
|
105 |
// the last semicolon (;) without braces ({}) in empty loop makes error in WP Faster Cache
|
106 |
//while ((el = el.parentElement) && el.className.split(' ').indexOf(cl) < 0);
|
@@ -110,7 +110,7 @@ function _rplg_get_parent(el, cl) {
|
|
110 |
}
|
111 |
|
112 |
function _rplg_init_slider(el) {
|
113 |
-
el = _rplg_get_parent(el);
|
114 |
|
115 |
const ROW_ELEM = el.querySelector('.grw-slider .grw-row'),
|
116 |
REVIEWS_ELEM = el.querySelector('.grw-slider-reviews'),
|
@@ -261,7 +261,7 @@ function _rplg_init_slider(el) {
|
|
261 |
}
|
262 |
}
|
263 |
|
264 |
-
function
|
265 |
_rplg_timeago(document.querySelectorAll('.wpac [data-time]'));
|
266 |
_rplg_read_more();
|
267 |
_rplg_init_blazy(10);
|
@@ -271,5 +271,5 @@ function rplg_init(el, layout) {
|
|
271 |
}
|
272 |
|
273 |
document.addEventListener('DOMContentLoaded', function() {
|
274 |
-
|
275 |
});
|
100 |
}
|
101 |
|
102 |
function _rplg_get_parent(el, cl) {
|
103 |
+
cl = cl || 'rplg';
|
104 |
if (el.className.split(' ').indexOf(cl) < 0) {
|
105 |
// the last semicolon (;) without braces ({}) in empty loop makes error in WP Faster Cache
|
106 |
//while ((el = el.parentElement) && el.className.split(' ').indexOf(cl) < 0);
|
110 |
}
|
111 |
|
112 |
function _rplg_init_slider(el) {
|
113 |
+
el = _rplg_get_parent(el, 'wp-gr');
|
114 |
|
115 |
const ROW_ELEM = el.querySelector('.grw-slider .grw-row'),
|
116 |
REVIEWS_ELEM = el.querySelector('.grw-slider-reviews'),
|
261 |
}
|
262 |
}
|
263 |
|
264 |
+
function grw_init(el, layout) {
|
265 |
_rplg_timeago(document.querySelectorAll('.wpac [data-time]'));
|
266 |
_rplg_read_more();
|
267 |
_rplg_init_blazy(10);
|
271 |
}
|
272 |
|
273 |
document.addEventListener('DOMContentLoaded', function() {
|
274 |
+
grw_init();
|
275 |
});
|
grw.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Widget for Google Reviews
|
4 |
Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
-
Version: 2.0.
|
7 |
Author: RichPlugins <support@richplugins.com>
|
8 |
Author URI: https://richplugins.com
|
9 |
Text Domain: widget-google-reviews
|
@@ -18,7 +18,7 @@ if (!defined('ABSPATH')) {
|
|
18 |
|
19 |
require(ABSPATH . 'wp-includes/version.php');
|
20 |
|
21 |
-
define('GRW_VERSION' , '2.0.
|
22 |
define('GRW_PLUGIN_FILE' , __FILE__);
|
23 |
define('GRW_PLUGIN_URL' , plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
|
24 |
define('GRW_ASSETS_URL' , GRW_PLUGIN_URL . '/assets/');
|
3 |
Plugin Name: Widget for Google Reviews
|
4 |
Plugin URI: https://richplugins.com/business-reviews-bundle-wordpress-plugin
|
5 |
Description: Instantly Google Places Reviews on your website to increase user confidence and SEO.
|
6 |
+
Version: 2.0.9
|
7 |
Author: RichPlugins <support@richplugins.com>
|
8 |
Author URI: https://richplugins.com
|
9 |
Text Domain: widget-google-reviews
|
18 |
|
19 |
require(ABSPATH . 'wp-includes/version.php');
|
20 |
|
21 |
+
define('GRW_VERSION' , '2.0.9');
|
22 |
define('GRW_PLUGIN_FILE' , __FILE__);
|
23 |
define('GRW_PLUGIN_URL' , plugins_url(basename(plugin_dir_path(__FILE__ )), basename(__FILE__)));
|
24 |
define('GRW_ASSETS_URL' , GRW_PLUGIN_URL . '/assets/');
|
includes/admin/class-admin-notice.php
CHANGED
@@ -14,6 +14,7 @@ class Admin_Notice {
|
|
14 |
'settings_reset_all' => 'All data including settings and reviews deleted successfully.',
|
15 |
'settings_debug_mode_0' => 'Debug mode disabled successfully.',
|
16 |
'settings_debug_mode_1' => 'Debug mode enabled successfully.',
|
|
|
17 |
);
|
18 |
|
19 |
public function register() {
|
14 |
'settings_reset_all' => 'All data including settings and reviews deleted successfully.',
|
15 |
'settings_debug_mode_0' => 'Debug mode disabled successfully.',
|
16 |
'settings_debug_mode_1' => 'Debug mode enabled successfully.',
|
17 |
+
'settings_update_db' => 'Database updated successfully.',
|
18 |
);
|
19 |
|
20 |
public function register() {
|
includes/class-activator.php
CHANGED
@@ -81,9 +81,14 @@ class Activator {
|
|
81 |
}
|
82 |
|
83 |
private function exist_install($current_version, $last_active_version) {
|
|
|
|
|
|
|
|
|
84 |
global $wpdb;
|
85 |
|
86 |
switch($last_active_version) {
|
|
|
87 |
case version_compare($last_active_version, '1.8.2', '<'):
|
88 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . Database::BUSINESS_TABLE . " ADD review_count INTEGER");
|
89 |
$place_ids = $wpdb->get_col("SELECT place_id FROM " . $wpdb->prefix . Database::BUSINESS_TABLE . " WHERE rating > 0 LIMIT 5");
|
@@ -91,6 +96,7 @@ class Activator {
|
|
91 |
//TODO: grw_refresh_reviews(array($place_id));
|
92 |
}
|
93 |
break;
|
|
|
94 |
case version_compare($last_active_version, '1.8.7', '<'):
|
95 |
$row = $wpdb->get_results(
|
96 |
"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS " .
|
@@ -100,14 +106,15 @@ class Activator {
|
|
100 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . Database::REVIEW_TABLE . " ADD hide VARCHAR(1) DEFAULT '' NOT NULL");
|
101 |
}
|
102 |
break;
|
|
|
103 |
case version_compare($last_active_version, '2.0.1', '<'):
|
104 |
$grw_auth_code = get_option('grw_auth_code');
|
105 |
if (!$grw_auth_code || strlen($grw_auth_code) == 0) {
|
106 |
update_option('grw_auth_code', $this->random_str(127));
|
107 |
}
|
108 |
break;
|
109 |
-
case version_compare($last_active_version, '2.0.2', '<'):
|
110 |
|
|
|
111 |
if (!function_exists('drop_index') || !function_exists('dbDelta')) {
|
112 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
113 |
}
|
@@ -130,7 +137,6 @@ class Activator {
|
|
130 |
return true;
|
131 |
}
|
132 |
}
|
133 |
-
|
134 |
if (drop_index($wpdb->prefix . Database::REVIEW_TABLE, 'grp_google_review_hash')) {
|
135 |
maybe_drop_column(
|
136 |
$wpdb->prefix . Database::REVIEW_TABLE,
|
@@ -138,7 +144,6 @@ class Activator {
|
|
138 |
"ALTER TABLE " . $wpdb->prefix . Database::REVIEW_TABLE . " DROP COLUMN hash"
|
139 |
);
|
140 |
}
|
141 |
-
|
142 |
$sql = "CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . "grp_google_stats (".
|
143 |
"id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,".
|
144 |
"google_place_id BIGINT(20) UNSIGNED NOT NULL,".
|
@@ -148,7 +153,6 @@ class Activator {
|
|
148 |
"PRIMARY KEY (`id`),".
|
149 |
"INDEX grp_google_place_id (`google_place_id`)".
|
150 |
") " . $wpdb->get_charset_collate() . ";";
|
151 |
-
|
152 |
dbDelta($sql);
|
153 |
break;
|
154 |
}
|
81 |
}
|
82 |
|
83 |
private function exist_install($current_version, $last_active_version) {
|
84 |
+
$this->update_db($last_active_version);
|
85 |
+
}
|
86 |
+
|
87 |
+
public function update_db($last_active_version) {
|
88 |
global $wpdb;
|
89 |
|
90 |
switch($last_active_version) {
|
91 |
+
|
92 |
case version_compare($last_active_version, '1.8.2', '<'):
|
93 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . Database::BUSINESS_TABLE . " ADD review_count INTEGER");
|
94 |
$place_ids = $wpdb->get_col("SELECT place_id FROM " . $wpdb->prefix . Database::BUSINESS_TABLE . " WHERE rating > 0 LIMIT 5");
|
96 |
//TODO: grw_refresh_reviews(array($place_id));
|
97 |
}
|
98 |
break;
|
99 |
+
|
100 |
case version_compare($last_active_version, '1.8.7', '<'):
|
101 |
$row = $wpdb->get_results(
|
102 |
"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS " .
|
106 |
$wpdb->query("ALTER TABLE " . $wpdb->prefix . Database::REVIEW_TABLE . " ADD hide VARCHAR(1) DEFAULT '' NOT NULL");
|
107 |
}
|
108 |
break;
|
109 |
+
|
110 |
case version_compare($last_active_version, '2.0.1', '<'):
|
111 |
$grw_auth_code = get_option('grw_auth_code');
|
112 |
if (!$grw_auth_code || strlen($grw_auth_code) == 0) {
|
113 |
update_option('grw_auth_code', $this->random_str(127));
|
114 |
}
|
115 |
break;
|
|
|
116 |
|
117 |
+
case version_compare($last_active_version, '2.0.2', '<'):
|
118 |
if (!function_exists('drop_index') || !function_exists('dbDelta')) {
|
119 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
120 |
}
|
137 |
return true;
|
138 |
}
|
139 |
}
|
|
|
140 |
if (drop_index($wpdb->prefix . Database::REVIEW_TABLE, 'grp_google_review_hash')) {
|
141 |
maybe_drop_column(
|
142 |
$wpdb->prefix . Database::REVIEW_TABLE,
|
144 |
"ALTER TABLE " . $wpdb->prefix . Database::REVIEW_TABLE . " DROP COLUMN hash"
|
145 |
);
|
146 |
}
|
|
|
147 |
$sql = "CREATE TABLE IF NOT EXISTS " . $wpdb->prefix . "grp_google_stats (".
|
148 |
"id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,".
|
149 |
"google_place_id BIGINT(20) UNSIGNED NOT NULL,".
|
153 |
"PRIMARY KEY (`id`),".
|
154 |
"INDEX grp_google_place_id (`google_place_id`)".
|
155 |
") " . $wpdb->get_charset_collate() . ";";
|
|
|
156 |
dbDelta($sql);
|
157 |
break;
|
158 |
}
|
includes/class-debug-info.php
CHANGED
@@ -1,99 +1,107 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WP_Rplg_Google_Reviews\Includes;
|
4 |
-
|
5 |
-
use WP_Rplg_Google_Reviews\Includes\Core\Database;
|
6 |
-
|
7 |
-
class Debug_Info {
|
8 |
-
|
9 |
-
public function __construct(Activator $activator) {
|
10 |
-
$this->activator = $activator;
|
11 |
-
}
|
12 |
-
|
13 |
-
public function render() {
|
14 |
-
global $wpdb;
|
15 |
-
global $wp_version;
|
16 |
-
|
17 |
-
?>
|
18 |
-
|
19 |
-
URL: <?php echo esc_url(get_option('siteurl')); ?>
|
20 |
-
|
21 |
-
PHP Version: <?php echo esc_html(phpversion()); ?>
|
22 |
-
|
23 |
-
WP Version: <?php echo esc_html($wp_version); ?>
|
24 |
-
|
25 |
-
Active Theme:
|
26 |
-
<?php
|
27 |
-
if (!function_exists('wp_get_theme')) {
|
28 |
-
$theme = get_theme(get_current_theme());
|
29 |
-
echo esc_html($theme['Name'] . ' ' . $theme['Version']);
|
30 |
-
} else {
|
31 |
-
$theme = wp_get_theme();
|
32 |
-
echo esc_html($theme->Name . ' ' . $theme->Version);
|
33 |
-
}
|
34 |
-
?>
|
35 |
-
|
36 |
-
Outgoing HTTPS requests: <?php
|
37 |
-
$res = wp_remote_get('https://app.trust.reviews/checkconn');
|
38 |
-
$body = wp_remote_retrieve_body($res);
|
39 |
-
echo ($body && $body == 'success') ? 1 : 'Outgoing HTTPS requests are closed'; ?>
|
40 |
-
|
41 |
-
Plugin Version: <?php echo esc_html(GRW_VERSION); ?>
|
42 |
-
|
43 |
-
Settings:
|
44 |
-
<?php foreach ($this->activator->options() as $opt) {
|
45 |
-
echo esc_html($opt.': '.get_option($opt)."\n");
|
46 |
-
}
|
47 |
-
?>
|
48 |
-
|
49 |
-
Widgets: <?php $widget = get_option('widget_grw_widget'); echo ($widget ? print_r($widget) : '')."\n"; ?>
|
50 |
-
|
51 |
-
Plugins:
|
52 |
-
<?php
|
53 |
-
foreach (get_plugins() as $key => $plugin) {
|
54 |
-
$isactive = "";
|
55 |
-
if (is_plugin_active($key)) {
|
56 |
-
$isactive = "(active)";
|
57 |
-
}
|
58 |
-
echo esc_html($plugin['Name'].' '.$plugin['Version'].' '.$isactive."\n");
|
59 |
-
}
|
60 |
-
?>
|
61 |
-
|
62 |
-
------------ Feeds ------------
|
63 |
-
|
64 |
-
<?php
|
65 |
-
$wp_query = new \WP_Query();
|
66 |
-
$wp_query->query(array(
|
67 |
-
'post_type' => Post_Types::FEED_POST_TYPE,
|
68 |
-
'fields' => array('ID', 'post_title', 'post_content'),
|
69 |
-
'posts_per_page' => 300,
|
70 |
-
'no_found_rows' => true,
|
71 |
-
));
|
72 |
-
$feeds = $wp_query->posts;
|
73 |
-
foreach ($feeds as $feed) {
|
74 |
-
echo $feed->ID . " " . $feed->post_title . ": " . $feed->post_content . "\r\n\r\n";
|
75 |
-
}
|
76 |
-
?>
|
77 |
-
|
78 |
-
<?php
|
79 |
-
$places
|
80 |
-
$places_error
|
81 |
-
$reviews
|
82 |
-
$reviews_error = $wpdb->last_error;
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
<?php
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
<?php
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WP_Rplg_Google_Reviews\Includes;
|
4 |
+
|
5 |
+
use WP_Rplg_Google_Reviews\Includes\Core\Database;
|
6 |
+
|
7 |
+
class Debug_Info {
|
8 |
+
|
9 |
+
public function __construct(Activator $activator) {
|
10 |
+
$this->activator = $activator;
|
11 |
+
}
|
12 |
+
|
13 |
+
public function render() {
|
14 |
+
global $wpdb;
|
15 |
+
global $wp_version;
|
16 |
+
|
17 |
+
?>
|
18 |
+
|
19 |
+
URL: <?php echo esc_url(get_option('siteurl')); ?>
|
20 |
+
|
21 |
+
PHP Version: <?php echo esc_html(phpversion()); ?>
|
22 |
+
|
23 |
+
WP Version: <?php echo esc_html($wp_version); ?>
|
24 |
+
|
25 |
+
Active Theme:
|
26 |
+
<?php
|
27 |
+
if (!function_exists('wp_get_theme')) {
|
28 |
+
$theme = get_theme(get_current_theme());
|
29 |
+
echo esc_html($theme['Name'] . ' ' . $theme['Version']);
|
30 |
+
} else {
|
31 |
+
$theme = wp_get_theme();
|
32 |
+
echo esc_html($theme->Name . ' ' . $theme->Version);
|
33 |
+
}
|
34 |
+
?>
|
35 |
+
|
36 |
+
Outgoing HTTPS requests: <?php
|
37 |
+
$res = wp_remote_get('https://app.trust.reviews/checkconn');
|
38 |
+
$body = wp_remote_retrieve_body($res);
|
39 |
+
echo ($body && $body == 'success') ? 1 : 'Outgoing HTTPS requests are closed'; ?>
|
40 |
+
|
41 |
+
Plugin Version: <?php echo esc_html(GRW_VERSION); ?>
|
42 |
+
|
43 |
+
Settings:
|
44 |
+
<?php foreach ($this->activator->options() as $opt) {
|
45 |
+
echo esc_html($opt.': '.get_option($opt)."\n");
|
46 |
+
}
|
47 |
+
?>
|
48 |
+
|
49 |
+
Widgets: <?php $widget = get_option('widget_grw_widget'); echo ($widget ? print_r($widget) : '')."\n"; ?>
|
50 |
+
|
51 |
+
Plugins:
|
52 |
+
<?php
|
53 |
+
foreach (get_plugins() as $key => $plugin) {
|
54 |
+
$isactive = "";
|
55 |
+
if (is_plugin_active($key)) {
|
56 |
+
$isactive = "(active)";
|
57 |
+
}
|
58 |
+
echo esc_html($plugin['Name'].' '.$plugin['Version'].' '.$isactive."\n");
|
59 |
+
}
|
60 |
+
?>
|
61 |
+
|
62 |
+
------------ Feeds ------------
|
63 |
+
|
64 |
+
<?php
|
65 |
+
$wp_query = new \WP_Query();
|
66 |
+
$wp_query->query(array(
|
67 |
+
'post_type' => Post_Types::FEED_POST_TYPE,
|
68 |
+
'fields' => array('ID', 'post_title', 'post_content'),
|
69 |
+
'posts_per_page' => 300,
|
70 |
+
'no_found_rows' => true,
|
71 |
+
));
|
72 |
+
$feeds = $wp_query->posts;
|
73 |
+
foreach ($feeds as $feed) {
|
74 |
+
echo $feed->ID . " " . $feed->post_title . ": " . $feed->post_content . "\r\n\r\n";
|
75 |
+
}
|
76 |
+
?>
|
77 |
+
|
78 |
+
<?php
|
79 |
+
$places = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . Database::BUSINESS_TABLE);
|
80 |
+
$places_error = $wpdb->last_error;
|
81 |
+
$reviews = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . Database::REVIEW_TABLE);
|
82 |
+
$reviews_error = $wpdb->last_error;
|
83 |
+
$stats = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . Database::STATS_TABLE);
|
84 |
+
$stats_error = $wpdb->last_error; ?>
|
85 |
+
|
86 |
+
------------ Places ------------
|
87 |
+
|
88 |
+
<?php if (isset($places_error) && strlen($places_error) > 0) { echo 'DB Places error: ' . $places_error; } ?>
|
89 |
+
|
90 |
+
<?php echo print_r($places); ?>
|
91 |
+
|
92 |
+
|
93 |
+
------------ Reviews ------------
|
94 |
+
|
95 |
+
<?php if (isset($reviews_error) && strlen($reviews_error) > 0) { echo 'DB Reviews error: ' . $reviews_error; } ?>
|
96 |
+
|
97 |
+
<?php echo print_r($reviews); ?>
|
98 |
+
|
99 |
+
------------ Stats ------------
|
100 |
+
|
101 |
+
<?php if (isset($stats_error) && strlen($stats_error) > 0) { echo 'DB Stats error: ' . $stats_error; } ?>
|
102 |
+
|
103 |
+
<?php echo print_r($stats);
|
104 |
+
|
105 |
+
}
|
106 |
+
|
107 |
+
}
|
includes/class-plugin-settings.php
CHANGED
@@ -133,6 +133,16 @@ class Plugin_Settings {
|
|
133 |
<input type="submit" name="debug_mode" class="button" value="<?php echo $grw_debug_mode ? 'Disable' : 'Enable'; ?>" />
|
134 |
</div>
|
135 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
</form>
|
137 |
</div>
|
138 |
|
133 |
<input type="submit" name="debug_mode" class="button" value="<?php echo $grw_debug_mode ? 'Disable' : 'Enable'; ?>" />
|
134 |
</div>
|
135 |
</div>
|
136 |
+
<div class="grw-field">
|
137 |
+
<div class="grw-field-label">
|
138 |
+
<label>Execute db update manually</label>
|
139 |
+
</div>
|
140 |
+
<div class="wp-review-field-option">
|
141 |
+
<?php wp_nonce_field('grw-wpnonce_update_db', 'grw-form_nonce_update_db'); ?>
|
142 |
+
<input type="submit" name="update_db" class="button" />
|
143 |
+
<input type="text" name="update_db_ver" style="width:94px;height:22px" placeholder="version" />
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
</form>
|
147 |
</div>
|
148 |
|
includes/class-plugin-support.php
CHANGED
@@ -54,28 +54,14 @@ class Plugin_Support {
|
|
54 |
</div>
|
55 |
<br>
|
56 |
<div class="grw-socials">
|
57 |
-
<
|
58 |
-
<
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
js.src = "//connect.facebook.net/en_EN/sdk.js#xfbml=1&version=v2.6&appId=1501100486852897";
|
63 |
-
fjs.parentNode.insertBefore(js, fjs);
|
64 |
-
}(document, 'script', 'facebook-jssdk'));</script>
|
65 |
<div class="fb-like" data-href="https://richplugins.com/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
|
|
|
66 |
<a href="https://twitter.com/richplugins?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-show-count="false">Follow @richplugins</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
67 |
-
<div class="g-plusone" data-size="medium" data-annotation="inline" data-width="200" data-href="https://plus.google.com/101080686931597182099"></div>
|
68 |
-
<script type="text/javascript">
|
69 |
-
window.___gcfg = { lang: 'en-US' };
|
70 |
-
(function () {
|
71 |
-
var po = document.createElement('script');
|
72 |
-
po.type = 'text/javascript';
|
73 |
-
po.async = true;
|
74 |
-
po.src = 'https://apis.google.com/js/plusone.js';
|
75 |
-
var s = document.getElementsByTagName('script')[0];
|
76 |
-
s.parentNode.insertBefore(po, s);
|
77 |
-
})();
|
78 |
-
</script>
|
79 |
</div>
|
80 |
</div>
|
81 |
<div class="grw-flex-col">
|
54 |
</div>
|
55 |
<br>
|
56 |
<div class="grw-socials">
|
57 |
+
<script src="https://apis.google.com/js/platform.js"></script>
|
58 |
+
<div class="g-ytsubscribe" data-channelid="UCfTAPWvWJkGRVhZ1AN5DtvA" data-layout="default" data-count="default"></div>
|
59 |
+
|
60 |
+
<div id="fb-root" style="display:inline-block"></div>
|
61 |
+
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v12.0&appId=276175796521349&autoLogAppEvents=1" nonce="MYsLkxjF"></script>
|
|
|
|
|
|
|
62 |
<div class="fb-like" data-href="https://richplugins.com/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
|
63 |
+
|
64 |
<a href="https://twitter.com/richplugins?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-show-count="false">Follow @richplugins</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
</div>
|
66 |
</div>
|
67 |
<div class="grw-flex-col">
|
includes/class-settings-save.php
CHANGED
@@ -78,6 +78,12 @@ class Settings_Save {
|
|
78 |
$notice_code = 'settings_debug_mode_' . $debug_mode;
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
$this->redirect_to_tab($notice_code);
|
82 |
}
|
83 |
|
@@ -102,7 +108,7 @@ class Settings_Save {
|
|
102 |
}
|
103 |
|
104 |
private function check_nonce() {
|
105 |
-
$nonce_actions = array('active', 'save', 'create_db', 'reset', 'reset_all', 'debug_mode');
|
106 |
$nonce_form_prefix = 'grw-form_nonce_';
|
107 |
$nonce_action_prefix = 'grw-wpnonce_';
|
108 |
foreach ($nonce_actions as $key => $value) {
|
78 |
$notice_code = 'settings_debug_mode_' . $debug_mode;
|
79 |
}
|
80 |
|
81 |
+
$update_db_ver = sanitize_text_field(wp_unslash($_POST['update_db_ver']));
|
82 |
+
if (isset($_POST['update_db']) && strlen($update_db_ver) > 0) {
|
83 |
+
$this->activator->update_db($update_db_ver);
|
84 |
+
$notice_code = 'settings_update_db';
|
85 |
+
}
|
86 |
+
|
87 |
$this->redirect_to_tab($notice_code);
|
88 |
}
|
89 |
|
108 |
}
|
109 |
|
110 |
private function check_nonce() {
|
111 |
+
$nonce_actions = array('active', 'save', 'create_db', 'reset', 'reset_all', 'debug_mode', 'update_db');
|
112 |
$nonce_form_prefix = 'grw-form_nonce_';
|
113 |
$nonce_action_prefix = 'grw-wpnonce_';
|
114 |
foreach ($nonce_actions as $key => $value) {
|
includes/class-view.php
CHANGED
@@ -98,7 +98,7 @@ class View {
|
|
98 |
</div>
|
99 |
<?php } ?>
|
100 |
</div>
|
101 |
-
<?php $this->js_loader('
|
102 |
</div>
|
103 |
<?php
|
104 |
}
|
@@ -138,7 +138,7 @@ class View {
|
|
138 |
</div>
|
139 |
<?php } ?>
|
140 |
</div>
|
141 |
-
<?php $this->js_loader('
|
142 |
}
|
143 |
|
144 |
private function render_badge($businesses, $reviews, $options) {
|
98 |
</div>
|
99 |
<?php } ?>
|
100 |
</div>
|
101 |
+
<?php $this->js_loader('grw_init', '\'slider\''); ?>
|
102 |
</div>
|
103 |
<?php
|
104 |
}
|
138 |
</div>
|
139 |
<?php } ?>
|
140 |
</div>
|
141 |
+
<?php $this->js_loader('grw_init');
|
142 |
}
|
143 |
|
144 |
private function render_badge($businesses, $reviews, $options) {
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Widget for Google Reviews ===
|
2 |
Contributors: richplugins
|
3 |
Donate link: https://richplugins.com/business-reviews-bundle-wordpress-plugin
|
4 |
-
Tags: google, google
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 5.8
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -24,11 +24,11 @@ By the way, with the <a href="https://richplugins.com/business-reviews-bundle-wo
|
|
24 |
|
25 |
### Free plugin features
|
26 |
|
27 |
-
*
|
28 |
-
*
|
|
|
|
|
29 |
* Slider don't fit? You can use a List layout or hide the reviews and show just a rating badge
|
30 |
-
* Create multiple widgets and connect **several Google places**, not just one like in other similar plugins
|
31 |
-
* Connected Google rating and reviews are automatically updated and most-helpful reviews will show without any actions
|
32 |
* Display the reviews through a shortcode, widget or any page builder: Gutenberg, Elementor, Page Origin, Beaver Builder, WPBakery, Divi and others
|
33 |
* Hide certain reviews from displaying, sometimes it may not only be a negatively rated review
|
34 |
* Upload your own Google business photo
|
@@ -37,15 +37,15 @@ By the way, with the <a href="https://richplugins.com/business-reviews-bundle-wo
|
|
37 |
* Works on a dark websites
|
38 |
* Multi language support
|
39 |
* Ability to customize layout with additional CSS
|
40 |
-
* Zero load time: SVG, lazy load images and the smallest size of assets (css
|
41 |
|
42 |
### Get More Features with Business version
|
43 |
|
44 |
[Upgrade to Business](https://richplugins.com/business-reviews-bundle-wordpress-plugin)
|
45 |
|
46 |
-
The business version of the plugin uses another Google API to show all reviews. It's also official and approved by Google like in the free plugin, but can uses only for business owners and show all reviews. To connect reviews, just log in through your GMB owner account and that's it.
|
47 |
|
48 |
-
* Shows ALL Google reviews with constant automatic updates
|
49 |
* Connecting and showing reviews is easier than ever, just log in through your GMB account
|
50 |
* Flash theme: increase user trust, social proof and sales via beautiful popups with your real recent reviews
|
51 |
* Ability to connect one, several or all your Google locations just through one log in
|
@@ -98,6 +98,10 @@ To find out more about who we are and what we do, here are some useful links:
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
101 |
= 2.0.8 =
|
102 |
* Bugfix: js errors if reviews are hidden in the slider
|
103 |
* Bugfix: slider is not responsive on some wp themes
|
1 |
=== Widget for Google Reviews ===
|
2 |
Contributors: richplugins
|
3 |
Donate link: https://richplugins.com/business-reviews-bundle-wordpress-plugin
|
4 |
+
Tags: google reviews, google, reviews, rating, widget, google business, testimonial, testimonials, google places reviews, map reviews, google my business
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 5.8
|
7 |
+
Stable tag: 2.0.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
24 |
|
25 |
### Free plugin features
|
26 |
|
27 |
+
* **Multiple widgets and Google places**, not just one like in other similar plugins
|
28 |
+
* All connected Google ratings and reviews are **automatically updated** without any manual actions
|
29 |
+
* Awesome, responsive and really cool slider which works anywhere - mobile, table, desktops and HD
|
30 |
+
* **Collect new Google Reviews** and increase your Google Rating with a 'Write a review' button
|
31 |
* Slider don't fit? You can use a List layout or hide the reviews and show just a rating badge
|
|
|
|
|
32 |
* Display the reviews through a shortcode, widget or any page builder: Gutenberg, Elementor, Page Origin, Beaver Builder, WPBakery, Divi and others
|
33 |
* Hide certain reviews from displaying, sometimes it may not only be a negatively rated review
|
34 |
* Upload your own Google business photo
|
37 |
* Works on a dark websites
|
38 |
* Multi language support
|
39 |
* Ability to customize layout with additional CSS
|
40 |
+
* Zero load time: SVG, lazy load images and **the smallest size of assets** (css: **3kb**, js: **8kb**)
|
41 |
|
42 |
### Get More Features with Business version
|
43 |
|
44 |
[Upgrade to Business](https://richplugins.com/business-reviews-bundle-wordpress-plugin)
|
45 |
|
46 |
+
The business version of the plugin uses another Google API to show all reviews. It's also official and approved by Google like in the free plugin, but can uses only for business owners and show all reviews. To connect reviews, just log in through your Google My Business (GMB) owner account and that's it.
|
47 |
|
48 |
+
* Shows **ALL Google reviews** with constant **automatic updates** through official Google My Business (GMB) API without any unofficial workarounds like crawling
|
49 |
* Connecting and showing reviews is easier than ever, just log in through your GMB account
|
50 |
* Flash theme: increase user trust, social proof and sales via beautiful popups with your real recent reviews
|
51 |
* Ability to connect one, several or all your Google locations just through one log in
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 2.0.9 =
|
102 |
+
* Improve: added settings for manually db updates
|
103 |
+
* Bugfix: conflict with a business version
|
104 |
+
|
105 |
= 2.0.8 =
|
106 |
* Bugfix: js errors if reviews are hidden in the slider
|
107 |
* Bugfix: slider is not responsive on some wp themes
|