Google Reviews Widget - Version 2.1.4

Version Description

  • New slider feature: speed option
  • Slider responsive bug
  • Translation fixes (for Dutch)
Download this release

Release Info

Developer richplugins
Plugin Icon 128x128 Google Reviews Widget
Version 2.1.4
Comparing to
See all releases

Code changes from version 2.1.3 to 2.1.4

assets/js/admin-main.js CHANGED
@@ -1,6 +1,6 @@
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">Chinese (Simplified)</option><option value="zh-Hant">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">Slider: text height<input type="text" name="slider_text_height" value="" placeholder="100px"></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="slider_hide_border" value="">Slider: hide border</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=&lt;PLACE_ID&gt;</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));
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">Chinese (Simplified)</option><option value="zh-Hant">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">Slider speed<input type="text" name="slider_speed" value="" placeholder="5 seconds"></div><div class="grw-builder-option">Slider: text height<input type="text" name="slider_text_height" value="" placeholder="100px"></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="slider_hide_border" value="">Slider: hide border</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=&lt;PLACE_ID&gt;</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));
assets/js/public-main.js CHANGED
@@ -3,16 +3,16 @@
3
  A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy)
4
  (c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
5
  */
6
- (function(a,b){"function"===typeof define&&define.amd?define(b):"object"===typeof exports?module.exports=b():a.Blazy=b()})(this,function(){function a(a){var k=a._util;k.elements=u(a.options);k.count=k.elements.length;k.destroyed&&(k.destroyed=!1,a.options.container&&t(a.options.container,function(a){r(a,"scroll",k.validateT)}),r(window,"resize",k.saveViewportOffsetT),r(window,"resize",k.validateT),r(window,"scroll",k.validateT));b(a)}function b(a){for(var k=a._util,c=0;c<k.count;c++){var b=k.elements[c];
7
- var e=b;var f=a.options;var g=e.getBoundingClientRect();f.container&&y&&(e=e.closest(f.containerClass))?(e=e.getBoundingClientRect(),f=d(e,p)?d(g,{top:e.top-f.offset,right:e.right+f.offset,bottom:e.bottom+f.offset,left:e.left-f.offset}):!1):f=d(g,p);if(f||m(b,a.options.successClass))a.load(b),k.elements.splice(c,1),k.count--,c--}0===k.count&&a.destroy()}function d(a,b){return a.right>=b.left&&a.bottom>=b.top&&a.left<=b.right&&a.top<=b.bottom}function e(a,b,c){if(!m(a,c.successClass)&&(b||c.loadInvisible||
8
- 0<a.offsetWidth&&0<a.offsetHeight))if(b=a.getAttribute(v)||a.getAttribute(c.src)){b=b.split(c.separator);var k=b[z&&1<b.length?1:0],d=a.getAttribute(c.srcset),e="img"===a.nodeName.toLowerCase(),w=(b=a.parentNode)&&"picture"===b.nodeName.toLowerCase();if(e||void 0===a.src){var q=new Image,p=function(){c.error&&c.error(a,"invalid");n(a,c.errorClass);h(q,"error",p);h(q,"load",l)},l=function(){e?w||g(a,k,d):a.style.backgroundImage='url("'+k+'")';f(a,c);h(q,"load",l);h(q,"error",p)};w&&(q=a,t(b.getElementsByTagName("source"),
9
- function(a){var b=c.srcset,k=a.getAttribute(b);k&&(a.setAttribute("srcset",k),a.removeAttribute(b))}));r(q,"error",p);r(q,"load",l);g(q,k,d)}else a.src=k,f(a,c)}else"video"===a.nodeName.toLowerCase()?(t(a.getElementsByTagName("source"),function(a){var b=c.src,k=a.getAttribute(b);k&&(a.setAttribute("src",k),a.removeAttribute(b))}),a.load(),f(a,c)):(c.error&&c.error(a,"missing"),n(a,c.errorClass))}function f(a,b){n(a,b.successClass);b.success&&b.success(a);a.removeAttribute(b.src);a.removeAttribute(b.srcset);
10
- t(b.breakpoints,function(b){a.removeAttribute(b.src)})}function g(a,b,c){c&&a.setAttribute("srcset",c);a.src=b}function m(a,b){return-1!==(" "+a.className+" ").indexOf(" "+b+" ")}function n(a,b){m(a,b)||(a.className+=" "+b)}function u(a){var b=[];a=a.root.querySelectorAll(a.selector);for(var c=a.length;c--;b.unshift(a[c]));return b}function l(a){p.bottom=(window.innerHeight||document.documentElement.clientHeight)+a;p.right=(window.innerWidth||document.documentElement.clientWidth)+a}function r(a,b,
11
- c){a.attachEvent?a.attachEvent&&a.attachEvent("on"+b,c):a.addEventListener(b,c,{capture:!1,passive:!0})}function h(a,b,c){a.detachEvent?a.detachEvent&&a.detachEvent("on"+b,c):a.removeEventListener(b,c,{capture:!1,passive:!0})}function t(a,b){if(a&&b)for(var c=a.length,d=0;d<c&&!1!==b(a[d],d);d++);}function q(a,b,c){var d=0;return function(){var e=+new Date;e-d<b||(d=e,a.apply(c,arguments))}}var v,p,z,y;return function(d){if(!document.querySelectorAll){var f=document.createStyleSheet();document.querySelectorAll=
12
- function(a,b,c,d,e){e=document.all;b=[];a=a.replace(/\[for\b/gi,"[htmlFor").split(",");for(c=a.length;c--;){f.addRule(a[c],"k:v");for(d=e.length;d--;)e[d].currentStyle.k&&b.push(e[d]);f.removeRule(0)}return b}}var c=this,g=c._util={};g.elements=[];g.destroyed=!0;c.options=d||{};c.options.error=c.options.error||!1;c.options.offset=c.options.offset||100;c.options.root=c.options.root||document;c.options.success=c.options.success||!1;c.options.selector=c.options.selector||".b-lazy";c.options.separator=
13
  c.options.separator||"|";c.options.containerClass=c.options.container;c.options.container=c.options.containerClass?document.querySelectorAll(c.options.containerClass):!1;c.options.errorClass=c.options.errorClass||"b-error";c.options.breakpoints=c.options.breakpoints||!1;c.options.loadInvisible=c.options.loadInvisible||!1;c.options.successClass=c.options.successClass||"b-loaded";c.options.validateDelay=c.options.validateDelay||25;c.options.saveViewportOffsetDelay=c.options.saveViewportOffsetDelay||
14
- 50;c.options.srcset=c.options.srcset||"data-srcset";c.options.src=v=c.options.src||"data-src";y=Element.prototype.closest;z=1<window.devicePixelRatio;p={};p.top=0-c.options.offset;p.left=0-c.options.offset;c.revalidate=function(){a(c)};c.load=function(a,b){var c=this.options;void 0===a.length?e(a,b,c):t(a,function(a){e(a,b,c)})};c.destroy=function(){var a=this._util;this.options.container&&t(this.options.container,function(b){h(b,"scroll",a.validateT)});h(window,"scroll",a.validateT);h(window,"resize",
15
- a.validateT);h(window,"resize",a.saveViewportOffsetT);a.count=0;a.elements.length=0;a.destroyed=!0};g.validateT=q(function(){b(c)},c.options.validateDelay,c);g.saveViewportOffsetT=q(function(){l(c.options.offset)},c.options.saveViewportOffsetDelay,c);l(c.options.offset);t(c.options.breakpoints,function(a){if(a.width>=window.screen.width)return v=a.src,!1});setTimeout(function(){a(c)})}});
16
  var WPacTime=WPacTime||{getTime:function(a,b,d){return"chat"==d?this.getChatTime(a,b||"en"):d?this.getFormatTime(a,d,b||"en"):this.getDefaultTime(a,b||"en")},getChatTime:function(a,b){var d=((new Date).getTime()-a)/1E3/60/60,e=d/24;return 24>d?this.getFormatTime(a,"HH:mm",b):365>e?this.getFormatTime(a,"dd.MM HH:mm",b):this.getFormatTime(a,"yyyy.MM.dd HH:mm",b)},getDefaultTime:function(a,b){return this.getTimeAgo(a,b)},getTimeAgo:function(a,b){a=((new Date).getTime()-a)/1E3;var d=a/60,e=d/60,f=e/24,
17
  g=f/365;b=WPacTime.Messages[b]?b:"en";return 45>a?WPacTime.Messages[b].second:90>a?WPacTime.Messages[b].minute:45>d?WPacTime.Messages[b].minutes(d):90>d?WPacTime.Messages[b].hour:24>e?WPacTime.Messages[b].hours(e):48>e?WPacTime.Messages[b].day:30>f?WPacTime.Messages[b].days(f):60>f?WPacTime.Messages[b].month:365>f?WPacTime.Messages[b].months(f):2>g?WPacTime.Messages[b].year:WPacTime.Messages[b].years(g)},getTime12:function(a,b){a=new Date(a);return(a.getHours()%12?a.getHours()%12:12)+":"+a.getMinutes()+
18
  (12<=a.getHours()?" PM":" AM")},getFormatTime:function(a,b,d){var e=new Date(a),f={SS:e.getMilliseconds(),ss:e.getSeconds(),mm:e.getMinutes(),HH:e.getHours(),hh:(e.getHours()%12?e.getHours()%12:12)+(12<=e.getHours()?"PM":"AM"),dd:e.getDate(),MM:e.getMonth()+1,yyyy:e.getFullYear(),yy:String(e.getFullYear()).toString().substr(2,2),ago:this.getTimeAgo(a,d),12:this.getTime12(a,d)};return b.replace(/(SS|ss|mm|HH|hh|DD|dd|MM|yyyy|yy|ago|12)/g,function(a,b){a=f[b];return 10>a?"0"+a:a})},declineNum:function(a,
@@ -69,8 +69,9 @@ function _rplg_lang(){var a=navigator;return(a.language||a.systemLanguage||a.use
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 _grw_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&&_grw_init_slider(a)}document.addEventListener("DOMContentLoaded",function(){grw_init()});
 
3
  A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy)
4
  (c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy
5
  */
6
+ (function(a,b){"function"===typeof define&&define.amd?define(b):"object"===typeof exports?module.exports=b():a.Blazy=b()})(this,function(){function a(a){var h=a._util;h.elements=n(a.options);h.count=h.elements.length;h.destroyed&&(h.destroyed=!1,a.options.container&&p(a.options.container,function(a){r(a,"scroll",h.validateT)}),r(window,"resize",h.saveViewportOffsetT),r(window,"resize",h.validateT),r(window,"scroll",h.validateT));b(a)}function b(a){for(var h=a._util,c=0;c<h.count;c++){var b=h.elements[c];
7
+ var e=b;var f=a.options;var g=e.getBoundingClientRect();f.container&&y&&(e=e.closest(f.containerClass))?(e=e.getBoundingClientRect(),f=d(e,l)?d(g,{top:e.top-f.offset,right:e.right+f.offset,bottom:e.bottom+f.offset,left:e.left-f.offset}):!1):f=d(g,l);if(f||u(b,a.options.successClass))a.load(b),h.elements.splice(c,1),h.count--,c--}0===h.count&&a.destroy()}function d(a,b){return a.right>=b.left&&a.bottom>=b.top&&a.left<=b.right&&a.top<=b.bottom}function e(a,b,c){if(!u(a,c.successClass)&&(b||c.loadInvisible||
8
+ 0<a.offsetWidth&&0<a.offsetHeight))if(b=a.getAttribute(v)||a.getAttribute(c.src)){b=b.split(c.separator);var h=b[z&&1<b.length?1:0],d=a.getAttribute(c.srcset),e="img"===a.nodeName.toLowerCase(),w=(b=a.parentNode)&&"picture"===b.nodeName.toLowerCase();if(e||void 0===a.src){var l=new Image,n=function(){c.error&&c.error(a,"invalid");q(a,c.errorClass);m(l,"error",n);m(l,"load",k)},k=function(){e?w||g(a,h,d):a.style.backgroundImage='url("'+h+'")';f(a,c);m(l,"load",k);m(l,"error",n)};w&&(l=a,p(b.getElementsByTagName("source"),
9
+ function(a){var b=c.srcset,h=a.getAttribute(b);h&&(a.setAttribute("srcset",h),a.removeAttribute(b))}));r(l,"error",n);r(l,"load",k);g(l,h,d)}else a.src=h,f(a,c)}else"video"===a.nodeName.toLowerCase()?(p(a.getElementsByTagName("source"),function(a){var b=c.src,h=a.getAttribute(b);h&&(a.setAttribute("src",h),a.removeAttribute(b))}),a.load(),f(a,c)):(c.error&&c.error(a,"missing"),q(a,c.errorClass))}function f(a,b){q(a,b.successClass);b.success&&b.success(a);a.removeAttribute(b.src);a.removeAttribute(b.srcset);
10
+ p(b.breakpoints,function(b){a.removeAttribute(b.src)})}function g(a,b,c){c&&a.setAttribute("srcset",c);a.src=b}function u(a,b){return-1!==(" "+a.className+" ").indexOf(" "+b+" ")}function q(a,b){u(a,b)||(a.className+=" "+b)}function n(a){var b=[];a=a.root.querySelectorAll(a.selector);for(var c=a.length;c--;b.unshift(a[c]));return b}function k(a){l.bottom=(window.innerHeight||document.documentElement.clientHeight)+a;l.right=(window.innerWidth||document.documentElement.clientWidth)+a}function r(a,b,
11
+ c){a.attachEvent?a.attachEvent&&a.attachEvent("on"+b,c):a.addEventListener(b,c,{capture:!1,passive:!0})}function m(a,b,c){a.detachEvent?a.detachEvent&&a.detachEvent("on"+b,c):a.removeEventListener(b,c,{capture:!1,passive:!0})}function p(a,b){if(a&&b)for(var c=a.length,d=0;d<c&&!1!==b(a[d],d);d++);}function t(a,b,c){var d=0;return function(){var e=+new Date;e-d<b||(d=e,a.apply(c,arguments))}}var v,l,z,y;return function(d){if(!document.querySelectorAll){var f=document.createStyleSheet();document.querySelectorAll=
12
+ function(a,b,c,d,e){e=document.all;b=[];a=a.replace(/\[for\b/gi,"[htmlFor").split(",");for(c=a.length;c--;){f.addRule(a[c],"k:v");for(d=e.length;d--;)e[d].currentStyle.k&&b.push(e[d]);f.removeRule(0)}return b}}var c=this,h=c._util={};h.elements=[];h.destroyed=!0;c.options=d||{};c.options.error=c.options.error||!1;c.options.offset=c.options.offset||100;c.options.root=c.options.root||document;c.options.success=c.options.success||!1;c.options.selector=c.options.selector||".b-lazy";c.options.separator=
13
  c.options.separator||"|";c.options.containerClass=c.options.container;c.options.container=c.options.containerClass?document.querySelectorAll(c.options.containerClass):!1;c.options.errorClass=c.options.errorClass||"b-error";c.options.breakpoints=c.options.breakpoints||!1;c.options.loadInvisible=c.options.loadInvisible||!1;c.options.successClass=c.options.successClass||"b-loaded";c.options.validateDelay=c.options.validateDelay||25;c.options.saveViewportOffsetDelay=c.options.saveViewportOffsetDelay||
14
+ 50;c.options.srcset=c.options.srcset||"data-srcset";c.options.src=v=c.options.src||"data-src";y=Element.prototype.closest;z=1<window.devicePixelRatio;l={};l.top=0-c.options.offset;l.left=0-c.options.offset;c.revalidate=function(){a(c)};c.load=function(a,b){var c=this.options;void 0===a.length?e(a,b,c):p(a,function(a){e(a,b,c)})};c.destroy=function(){var a=this._util;this.options.container&&p(this.options.container,function(b){m(b,"scroll",a.validateT)});m(window,"scroll",a.validateT);m(window,"resize",
15
+ a.validateT);m(window,"resize",a.saveViewportOffsetT);a.count=0;a.elements.length=0;a.destroyed=!0};h.validateT=t(function(){b(c)},c.options.validateDelay,c);h.saveViewportOffsetT=t(function(){k(c.options.offset)},c.options.saveViewportOffsetDelay,c);k(c.options.offset);p(c.options.breakpoints,function(a){if(a.width>=window.screen.width)return v=a.src,!1});setTimeout(function(){a(c)})}});
16
  var WPacTime=WPacTime||{getTime:function(a,b,d){return"chat"==d?this.getChatTime(a,b||"en"):d?this.getFormatTime(a,d,b||"en"):this.getDefaultTime(a,b||"en")},getChatTime:function(a,b){var d=((new Date).getTime()-a)/1E3/60/60,e=d/24;return 24>d?this.getFormatTime(a,"HH:mm",b):365>e?this.getFormatTime(a,"dd.MM HH:mm",b):this.getFormatTime(a,"yyyy.MM.dd HH:mm",b)},getDefaultTime:function(a,b){return this.getTimeAgo(a,b)},getTimeAgo:function(a,b){a=((new Date).getTime()-a)/1E3;var d=a/60,e=d/60,f=e/24,
17
  g=f/365;b=WPacTime.Messages[b]?b:"en";return 45>a?WPacTime.Messages[b].second:90>a?WPacTime.Messages[b].minute:45>d?WPacTime.Messages[b].minutes(d):90>d?WPacTime.Messages[b].hour:24>e?WPacTime.Messages[b].hours(e):48>e?WPacTime.Messages[b].day:30>f?WPacTime.Messages[b].days(f):60>f?WPacTime.Messages[b].month:365>f?WPacTime.Messages[b].months(f):2>g?WPacTime.Messages[b].year:WPacTime.Messages[b].years(g)},getTime12:function(a,b){a=new Date(a);return(a.getHours()%12?a.getHours()%12:12)+":"+a.getMinutes()+
18
  (12<=a.getHours()?" PM":" AM")},getFormatTime:function(a,b,d){var e=new Date(a),f={SS:e.getMilliseconds(),ss:e.getSeconds(),mm:e.getMinutes(),HH:e.getHours(),hh:(e.getHours()%12?e.getHours()%12:12)+(12<=e.getHours()?"PM":"AM"),dd:e.getDate(),MM:e.getMonth()+1,yyyy:e.getFullYear(),yy:String(e.getFullYear()).toString().substr(2,2),ago:this.getTimeAgo(a,d),12:this.getTime12(a,d)};return b.replace(/(SS|ss|mm|HH|hh|DD|dd|MM|yyyy|yy|ago|12)/g,function(a,b){a=f[b];return 10>a?"0"+a:a})},declineNum:function(a,
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 _grw_init_slider(a){function b(){q.className=510>q.offsetWidth?"grw-row grw-row-xs":750>q.offsetWidth?"grw-row grw-row-x":1100>q.offsetWidth?"grw-row grw-row-s":1450>q.offsetWidth?"grw-row grw-row-m":1800>q.offsetWidth?"grw-row grw-row-l":"grw-row grw-row-xl";k.length&&setTimeout(d,200)}function d(){var b=n.offsetWidth/k[0].offsetWidth,d=Math.ceil(k.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((n.scrollLeft+(n.scrollLeft+k[0].offsetWidth*b))/2*d/n.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 c=parseInt(this.getAttribute("data-index")),d=parseInt(this.getAttribute("data-visible"));b<c?e(d*Math.abs(c-b)):n.scrollBy(-k[0].offsetWidth*d*Math.abs(c-b),0);a.querySelector(".grw-slider-dot.active").className=
74
+ "grw-slider-dot";this.className="grw-slider-dot active";m&&clearInterval(m)}}}function e(a){n.scrollBy(k[0].offsetWidth*a,0)}function f(){var b=400,g=a.querySelector(".grw-slider-review:last-child"),k=g.getBoundingClientRect();g=g.parentNode.getBoundingClientRect();(2>Math.abs(g.left-k.left)||g.left<=k.left)&&k.left<g.right&&(2>Math.abs(g.right-k.right)||g.right>=k.right)&&k.right>g.left?(n.scrollBy(-n.scrollWidth,0),b=700):e(1);setTimeout(d,b);m=setTimeout(f,1E3*u.speed)}var g=a.querySelector(".grw-slider"),
75
+ u=JSON.parse(g.getAttribute("data-options")),q=a.querySelector(".grw-slider .grw-row"),n=a.querySelector(".grw-slider-reviews"),k=a.querySelectorAll(".grw-slider-review"),r=null,m=null,p=function(){(g.offsetWidth||g.offsetHeight||g.getClientRects().length)&&"hidden"!==window.getComputedStyle(g).visibility?(b(),_rplg_init_blazy(10),k.length&&setTimeout(f,300)):setTimeout(p,300)};p();window.addEventListener("resize",function(){clearTimeout(r);r=setTimeout(function(){b()},150)});var t=a.querySelector(".grw-slider-prev");
76
+ t&&(t.onclick=function(){n.scrollBy(-k[0].offsetWidth,0);setTimeout(d,200);m&&clearInterval(m)});if(t=a.querySelector(".grw-slider-next"))t.onclick=function(){e(1);setTimeout(d,200);m&&clearInterval(m)}}function grw_init(a,b){_rplg_timeago(document.querySelectorAll(".wpac [data-time]"));_rplg_read_more();_rplg_init_blazy(10);(a=_rplg_get_parent(a,"wp-gr"))&&"true"!=a.getAttribute("data-exec")&&"slider"==b&&(a.setAttribute("data-exec","true"),_grw_init_slider(a))}
77
+ document.addEventListener("DOMContentLoaded",function(){for(var a=document.querySelectorAll('.wp-gr[data-exec="false"]'),b=0;b<a.length;b++){var d=a[b];grw_init(d,d.getAttribute("data-layout"))}});
assets/src/js/admin-builder.js CHANGED
@@ -100,6 +100,11 @@ var GRW_HTML_CONTENT = '' +
100
  '</select>' +
101
  '</div>' +
102
 
 
 
 
 
 
103
  '<div class="grw-builder-option">' +
104
  'Slider: text height' +
105
  '<input type="text" name="slider_text_height" value="" placeholder="100px">' +
100
  '</select>' +
101
  '</div>' +
102
 
103
+ '<div class="grw-builder-option">' +
104
+ 'Slider speed' +
105
+ '<input type="text" name="slider_speed" value="" placeholder="5 seconds">' +
106
+ '</div>' +
107
+
108
  '<div class="grw-builder-option">' +
109
  'Slider: text height' +
110
  '<input type="text" name="slider_text_height" value="" placeholder="100px">' +
assets/src/js/public-main.js CHANGED
@@ -110,9 +110,9 @@ function _rplg_get_parent(el, cl) {
110
  }
111
 
112
  function _grw_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'),
117
  REVIEW_ELEMS = el.querySelectorAll('.grw-slider-review');
118
 
@@ -120,7 +120,7 @@ function _grw_init_slider(el) {
120
  swipeTimout = null;
121
 
122
  var init = function() {
123
- if (isVisible(el.querySelector('.grw-slider'))) {
124
  resize();
125
  _rplg_init_blazy(10);
126
  if (REVIEW_ELEMS.length) {
@@ -257,7 +257,7 @@ function _grw_init_slider(el) {
257
  scrollNext(1);
258
  }
259
  setTimeout(dotsinit, dt);
260
- swipeTimout = setTimeout(swipe, 5000);
261
  }
262
  }
263
 
@@ -265,11 +265,19 @@ function grw_init(el, layout) {
265
  _rplg_timeago(document.querySelectorAll('.wpac [data-time]'));
266
  _rplg_read_more();
267
  _rplg_init_blazy(10);
268
- if (el && layout == 'slider') {
 
 
 
269
  _grw_init_slider(el);
270
  }
271
  }
272
 
273
  document.addEventListener('DOMContentLoaded', function() {
274
- grw_init();
 
 
 
 
 
275
  });
110
  }
111
 
112
  function _grw_init_slider(el) {
113
+ const SLIDER_ELEM = el.querySelector('.grw-slider'),
114
+ SLIDER_OPTS = JSON.parse(SLIDER_ELEM.getAttribute('data-options')),
115
+ ROW_ELEM = el.querySelector('.grw-slider .grw-row'),
116
  REVIEWS_ELEM = el.querySelector('.grw-slider-reviews'),
117
  REVIEW_ELEMS = el.querySelectorAll('.grw-slider-review');
118
 
120
  swipeTimout = null;
121
 
122
  var init = function() {
123
+ if (isVisible(SLIDER_ELEM)) {
124
  resize();
125
  _rplg_init_blazy(10);
126
  if (REVIEW_ELEMS.length) {
257
  scrollNext(1);
258
  }
259
  setTimeout(dotsinit, dt);
260
+ swipeTimout = setTimeout(swipe, SLIDER_OPTS.speed * 1000);
261
  }
262
  }
263
 
265
  _rplg_timeago(document.querySelectorAll('.wpac [data-time]'));
266
  _rplg_read_more();
267
  _rplg_init_blazy(10);
268
+
269
+ el = _rplg_get_parent(el, 'wp-gr');
270
+ if (el && el.getAttribute('data-exec') != 'true' && layout == 'slider') {
271
+ el.setAttribute('data-exec', 'true');
272
  _grw_init_slider(el);
273
  }
274
  }
275
 
276
  document.addEventListener('DOMContentLoaded', function() {
277
+ var elems = document.querySelectorAll('.wp-gr[data-exec="false"]');
278
+ for (var i = 0; i < elems.length; i++) {
279
+ (function(elem) {
280
+ grw_init(elem, elem.getAttribute('data-layout'));
281
+ })(elems[i]);
282
+ }
283
  });
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.1.3
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.1.3');
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.1.4
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.1.4');
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/class-view.php CHANGED
@@ -32,7 +32,7 @@ class View {
32
  }
33
 
34
  ?>
35
- <div class="wp-gr wpac"<?php if ($style) { ?> style="<?php echo $style;?>"<?php } ?> data-id="<?php echo $feed_id; ?>">
36
  <?php
37
  switch ($options->view_mode) {
38
  case 'slider':
@@ -55,7 +55,12 @@ class View {
55
 
56
  private function render_slider($businesses, $reviews, $options, $is_admin = false) {
57
  ?>
58
- <div class="grw-slider<?php if ($options->dark_theme) { ?> wp-dark<?php } ?>">
 
 
 
 
 
59
  <div class="grw-row grw-row-m">
60
  <?php if (count($businesses) > 0) { ?>
61
  <div class="grw-slider-header">
@@ -377,7 +382,7 @@ class View {
377
  }
378
 
379
  private function js_loader($func, $data = '') {
380
- ?><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="js_loader" onload="(function(el, data) {var f = function() { window.<?php echo $func; ?> ? <?php echo $func; ?>(el, data) : setTimeout(f, 400) }; f() })(this<?php if (strlen($data) > 0) { ?>, <?php echo str_replace('"', '\'', $data); } ?>);" data-exec="false" width="1" height="1" style="display:none"><?php
381
  }
382
 
383
  function grw_trim_text($text, $size) {
32
  }
33
 
34
  ?>
35
+ <div class="wp-gr wpac"<?php if ($style) { ?> style="<?php echo $style;?>"<?php } ?> data-id="<?php echo $feed_id; ?>" data-layout="<?php echo $options->view_mode; ?>" data-exec="false">
36
  <?php
37
  switch ($options->view_mode) {
38
  case 'slider':
55
 
56
  private function render_slider($businesses, $reviews, $options, $is_admin = false) {
57
  ?>
58
+ <div class="grw-slider<?php if ($options->dark_theme) { ?> wp-dark<?php } ?>" data-options='<?php
59
+ echo json_encode(
60
+ array(
61
+ 'speed' => $options->slider_speed ? $options->slider_speed : 5
62
+ )
63
+ ); ?>'>
64
  <div class="grw-row grw-row-m">
65
  <?php if (count($businesses) > 0) { ?>
66
  <div class="grw-slider-header">
382
  }
383
 
384
  private function js_loader($func, $data = '') {
385
+ ?><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt="js_loader" onload="(function(el, data) {var f = function() { window.<?php echo $func; ?> ? <?php echo $func; ?>(el, data) : setTimeout(f, 400) }; f() })(this<?php if (strlen($data) > 0) { ?>, <?php echo str_replace('"', '\'', $data); } ?>);" width="1" height="1" style="display:none"><?php
386
  }
387
 
388
  function grw_trim_text($text, $size) {
includes/core/class-core.php CHANGED
@@ -18,6 +18,7 @@ class Core {
18
 
19
  'slider_hide_border' => false,
20
  'slider_text_height' => '',
 
21
 
22
  'header_merge_social' => false,
23
  'header_hide_social' => false,
18
 
19
  'slider_hide_border' => false,
20
  'slider_text_height' => '',
21
+ 'slider_speed' => 5,
22
 
23
  'header_merge_social' => false,
24
  'header_hide_social' => false,
languages/grw-nl_NL.mo CHANGED
Binary file
languages/grw-nl_NL.po CHANGED
@@ -28,3 +28,6 @@ msgstr "Volgende beoordelingen"
28
 
29
  msgid "Based on %s reviews"
30
  msgstr "Gebaseerd op %s recensies"
 
 
 
28
 
29
  msgid "Based on %s reviews"
30
  msgstr "Gebaseerd op %s recensies"
31
+
32
+ msgid "Ready to review?"
33
+ msgstr "Schrijf een review"
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.9
7
- Stable tag: 2.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -98,6 +98,11 @@ To find out more about who we are and what we do, here are some useful links:
98
 
99
  == Changelog ==
100
 
 
 
 
 
 
101
  = 2.1.3 =
102
  * New slider option: text height
103
  * New slider option: hide border
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.9
7
+ Stable tag: 2.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
98
 
99
  == Changelog ==
100
 
101
+ = 2.1.4 =
102
+ * New slider feature: speed option
103
+ * Slider responsive bug
104
+ * Translation fixes (for Dutch)
105
+
106
  = 2.1.3 =
107
  * New slider option: text height
108
  * New slider option: hide border