Instagram Widget by WPZOOM - Version 1.9.0

Version Description

  • Added a new Lightbox Feature
Download this release

Release Info

Developer WPZOOM
Plugin Icon 128x128 Instagram Widget by WPZOOM
Version 1.9.0
Comparing to
See all releases

Code changes from version 1.8.3 to 1.9.0

assets/backend/img/user-avatar.jpg ADDED
Binary file
assets/frontend/magnific-popup/jquery.magnific-popup.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /*! Magnific Popup - v1.1.0 - 2016-02-20
2
+ * http://dimsemenov.com/plugins/magnific-popup/
3
+ * Copyright (c) 2016 Dmitry Semenov; */
4
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
assets/frontend/magnific-popup/magnific-popup.css ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Magnific Popup CSS */
2
+ .mfp-bg {
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ z-index: 1042;
8
+ overflow: hidden;
9
+ position: fixed;
10
+ background: #0b0b0b;
11
+ opacity: 0.8; }
12
+
13
+ .mfp-wrap {
14
+ top: 0;
15
+ left: 0;
16
+ width: 100%;
17
+ height: 100%;
18
+ z-index: 1043;
19
+ position: fixed;
20
+ outline: none !important;
21
+ -webkit-backface-visibility: hidden; }
22
+
23
+ .mfp-container {
24
+ text-align: center;
25
+ position: absolute;
26
+ width: 100%;
27
+ height: 100%;
28
+ left: 0;
29
+ top: 0;
30
+ padding: 0 8px;
31
+ box-sizing: border-box; }
32
+
33
+ .mfp-container:before {
34
+ content: '';
35
+ display: inline-block;
36
+ height: 100%;
37
+ vertical-align: middle; }
38
+
39
+ .mfp-align-top .mfp-container:before {
40
+ display: none; }
41
+
42
+ .mfp-content {
43
+ position: relative;
44
+ display: inline-block;
45
+ vertical-align: middle;
46
+ margin: 0 auto;
47
+ text-align: left;
48
+ z-index: 1045; }
49
+
50
+ .mfp-inline-holder .mfp-content,
51
+ .mfp-ajax-holder .mfp-content {
52
+ width: 100%;
53
+ cursor: auto; }
54
+
55
+ .mfp-ajax-cur {
56
+ cursor: progress; }
57
+
58
+ .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
59
+ cursor: -moz-zoom-out;
60
+ cursor: -webkit-zoom-out;
61
+ cursor: zoom-out; }
62
+
63
+ .mfp-zoom {
64
+ cursor: pointer;
65
+ cursor: -webkit-zoom-in;
66
+ cursor: -moz-zoom-in;
67
+ cursor: zoom-in; }
68
+
69
+ .mfp-auto-cursor .mfp-content {
70
+ cursor: auto; }
71
+
72
+ .mfp-close,
73
+ .mfp-arrow,
74
+ .mfp-preloader,
75
+ .mfp-counter {
76
+ -webkit-user-select: none;
77
+ -moz-user-select: none;
78
+ user-select: none; }
79
+
80
+ .mfp-loading.mfp-figure {
81
+ display: none; }
82
+
83
+ .mfp-hide {
84
+ display: none !important; }
85
+
86
+ .mfp-preloader {
87
+ color: #CCC;
88
+ position: absolute;
89
+ top: 50%;
90
+ width: auto;
91
+ text-align: center;
92
+ margin-top: -0.8em;
93
+ left: 8px;
94
+ right: 8px;
95
+ z-index: 1044; }
96
+ .mfp-preloader a {
97
+ color: #CCC; }
98
+ .mfp-preloader a:hover {
99
+ color: #FFF; }
100
+
101
+ .mfp-s-ready .mfp-preloader {
102
+ display: none; }
103
+
104
+ .mfp-s-error .mfp-content {
105
+ display: none; }
106
+
107
+ button.mfp-close,
108
+ button.mfp-arrow {
109
+ overflow: visible;
110
+ cursor: pointer;
111
+ background: transparent;
112
+ border: 0;
113
+ -webkit-appearance: none;
114
+ display: block;
115
+ outline: none;
116
+ padding: 0;
117
+ z-index: 1046;
118
+ box-shadow: none;
119
+ touch-action: manipulation; }
120
+
121
+ button::-moz-focus-inner {
122
+ padding: 0;
123
+ border: 0; }
124
+
125
+ .mfp-close {
126
+ width: 44px;
127
+ height: 44px;
128
+ line-height: 44px;
129
+ position: absolute;
130
+ right: 0;
131
+ top: 0;
132
+ text-decoration: none;
133
+ text-align: center;
134
+ opacity: 0.65;
135
+ padding: 0 0 18px 10px;
136
+ color: #FFF;
137
+ font-style: normal;
138
+ font-size: 28px;
139
+ font-family: Arial, Baskerville, monospace; }
140
+ .mfp-close:hover,
141
+ .mfp-close:focus {
142
+ opacity: 1; }
143
+ .mfp-close:active {
144
+ top: 1px; }
145
+
146
+ .mfp-close-btn-in .mfp-close {
147
+ color: #333; }
148
+
149
+ .mfp-image-holder .mfp-close,
150
+ .mfp-iframe-holder .mfp-close {
151
+ color: #FFF;
152
+ right: -6px;
153
+ text-align: right;
154
+ padding-right: 6px;
155
+ width: 100%; }
156
+
157
+ .mfp-counter {
158
+ position: absolute;
159
+ top: 0;
160
+ right: 0;
161
+ color: #CCC;
162
+ font-size: 12px;
163
+ line-height: 18px;
164
+ white-space: nowrap; }
165
+
166
+ .mfp-arrow {
167
+ position: absolute;
168
+ opacity: 0.65;
169
+ margin: 0;
170
+ top: 50%;
171
+ margin-top: -55px;
172
+ padding: 0;
173
+ width: 90px;
174
+ height: 110px;
175
+ -webkit-tap-highlight-color: transparent; }
176
+ .mfp-arrow:active {
177
+ margin-top: -54px; }
178
+ .mfp-arrow:hover,
179
+ .mfp-arrow:focus {
180
+ opacity: 1; }
181
+ .mfp-arrow:before,
182
+ .mfp-arrow:after {
183
+ content: '';
184
+ display: block;
185
+ width: 0;
186
+ height: 0;
187
+ position: absolute;
188
+ left: 0;
189
+ top: 0;
190
+ margin-top: 35px;
191
+ margin-left: 35px;
192
+ border: medium inset transparent; }
193
+ .mfp-arrow:after {
194
+ border-top-width: 13px;
195
+ border-bottom-width: 13px;
196
+ top: 8px; }
197
+ .mfp-arrow:before {
198
+ border-top-width: 21px;
199
+ border-bottom-width: 21px;
200
+ opacity: 0.7; }
201
+
202
+ .mfp-arrow-left {
203
+ left: 0; }
204
+ .mfp-arrow-left:after {
205
+ border-right: 17px solid #FFF;
206
+ margin-left: 31px; }
207
+ .mfp-arrow-left:before {
208
+ margin-left: 25px;
209
+ border-right: 27px solid #3F3F3F; }
210
+
211
+ .mfp-arrow-right {
212
+ right: 0; }
213
+ .mfp-arrow-right:after {
214
+ border-left: 17px solid #FFF;
215
+ margin-left: 39px; }
216
+ .mfp-arrow-right:before {
217
+ border-left: 27px solid #3F3F3F; }
218
+
219
+ .mfp-iframe-holder {
220
+ padding-top: 40px;
221
+ padding-bottom: 40px; }
222
+ .mfp-iframe-holder .mfp-content {
223
+ line-height: 0;
224
+ width: 100%;
225
+ max-width: 900px; }
226
+ .mfp-iframe-holder .mfp-close {
227
+ top: -40px; }
228
+
229
+ .mfp-iframe-scaler {
230
+ width: 100%;
231
+ height: 0;
232
+ overflow: hidden;
233
+ padding-top: 56.25%; }
234
+ .mfp-iframe-scaler iframe {
235
+ position: absolute;
236
+ display: block;
237
+ top: 0;
238
+ left: 0;
239
+ width: 100%;
240
+ height: 100%;
241
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
242
+ background: #000; }
243
+
244
+ /* Main image in popup */
245
+ img.mfp-img {
246
+ width: auto;
247
+ max-width: 100%;
248
+ height: auto;
249
+ display: block;
250
+ line-height: 0;
251
+ box-sizing: border-box;
252
+ padding: 40px 0 40px;
253
+ margin: 0 auto; }
254
+
255
+ /* The shadow behind the image */
256
+ .mfp-figure {
257
+ line-height: 0; }
258
+ .mfp-figure:after {
259
+ content: '';
260
+ position: absolute;
261
+ left: 0;
262
+ top: 40px;
263
+ bottom: 40px;
264
+ display: block;
265
+ right: 0;
266
+ width: auto;
267
+ height: auto;
268
+ z-index: -1;
269
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
270
+ background: #444; }
271
+ .mfp-figure small {
272
+ color: #BDBDBD;
273
+ display: block;
274
+ font-size: 12px;
275
+ line-height: 14px; }
276
+ .mfp-figure figure {
277
+ margin: 0; }
278
+
279
+ .mfp-bottom-bar {
280
+ margin-top: -36px;
281
+ position: absolute;
282
+ top: 100%;
283
+ left: 0;
284
+ width: 100%;
285
+ cursor: auto; }
286
+
287
+ .mfp-title {
288
+ text-align: left;
289
+ line-height: 18px;
290
+ color: #F3F3F3;
291
+ word-wrap: break-word;
292
+ padding-right: 36px; }
293
+
294
+ .mfp-image-holder .mfp-content {
295
+ max-width: 100%; }
296
+
297
+ .mfp-gallery .mfp-image-holder .mfp-figure {
298
+ cursor: pointer; }
299
+
300
+ @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
301
+ /**
302
+ * Remove all paddings around the image on small screen
303
+ */
304
+ .mfp-img-mobile .mfp-image-holder {
305
+ padding-left: 0;
306
+ padding-right: 0; }
307
+ .mfp-img-mobile img.mfp-img {
308
+ padding: 0; }
309
+ .mfp-img-mobile .mfp-figure:after {
310
+ top: 0;
311
+ bottom: 0; }
312
+ .mfp-img-mobile .mfp-figure small {
313
+ display: inline;
314
+ margin-left: 5px; }
315
+ .mfp-img-mobile .mfp-bottom-bar {
316
+ background: rgba(0, 0, 0, 0.6);
317
+ bottom: 0;
318
+ margin: 0;
319
+ top: auto;
320
+ padding: 3px 5px;
321
+ position: fixed;
322
+ box-sizing: border-box; }
323
+ .mfp-img-mobile .mfp-bottom-bar:empty {
324
+ padding: 0; }
325
+ .mfp-img-mobile .mfp-counter {
326
+ right: 5px;
327
+ top: 3px; }
328
+ .mfp-img-mobile .mfp-close {
329
+ top: 0;
330
+ right: 0;
331
+ width: 35px;
332
+ height: 35px;
333
+ line-height: 35px;
334
+ background: rgba(0, 0, 0, 0.6);
335
+ position: fixed;
336
+ text-align: center;
337
+ padding: 0; } }
338
+
339
+ @media all and (max-width: 900px) {
340
+ .mfp-arrow {
341
+ -webkit-transform: scale(0.75);
342
+ transform: scale(0.75); }
343
+ .mfp-arrow-left {
344
+ -webkit-transform-origin: 0;
345
+ transform-origin: 0; }
346
+ .mfp-arrow-right {
347
+ -webkit-transform-origin: 100%;
348
+ transform-origin: 100%; }
349
+ .mfp-container {
350
+ padding-left: 6px;
351
+ padding-right: 6px; } }
class-wpzoom-instagram-image-uploader.php CHANGED
@@ -98,7 +98,7 @@ class WPZOOM_Instagram_Image_Uploader {
98
  * @return float|int
99
  */
100
  function get_transient_lifetime() {
101
- $options = Wpzoom_Instagram_Widget_Settings::$settings;
102
 
103
  $values = array(
104
  'minutes' => MINUTE_IN_SECONDS,
98
  * @return float|int
99
  */
100
  function get_transient_lifetime() {
101
+ $options = WPZOOM_Instagram_Widget_Settings::get_instance()->get_settings();
102
 
103
  $values = array(
104
  'minutes' => MINUTE_IN_SECONDS,
class-wpzoom-instagram-widget-api.php CHANGED
@@ -26,6 +26,13 @@ class Wpzoom_Instagram_Widget_API {
26
  */
27
  public $errors = array();
28
 
 
 
 
 
 
 
 
29
  /**
30
  * Instagram Access Token
31
  *
@@ -37,7 +44,7 @@ class Wpzoom_Instagram_Widget_API {
37
  * Class constructor
38
  */
39
  protected function __construct() {
40
- $options = Wpzoom_Instagram_Widget_Settings::$settings;
41
 
42
  $this->request_type = ! empty( $options['request-type'] ) ? $options['request-type'] : '';
43
  $this->access_token = ! empty( $options['basic-access-token'] ) ? $options['basic-access-token'] : '';
@@ -115,7 +122,7 @@ class Wpzoom_Instagram_Widget_API {
115
  global $current_user;
116
 
117
  if ( ! empty( $this->access_token ) ) {
118
- $stored_data = Wpzoom_Instagram_Widget_Settings::$settings;
119
  $request_url = add_query_arg(
120
  array(
121
  'grant_type' => 'ig_refresh_token',
@@ -170,7 +177,7 @@ class Wpzoom_Instagram_Widget_API {
170
  update_user_meta( $user_id, 'wpzoom_instagram_admin_notice', false );
171
  }
172
 
173
- return update_option( Wpzoom_Instagram_Widget_Settings::$option_name, $stored_data );
174
  }
175
 
176
  return false;
@@ -220,7 +227,8 @@ class Wpzoom_Instagram_Widget_API {
220
  $transient = $transient . '_' . $injected_username;
221
  }
222
 
223
- if ( false !== ( $data = json_decode( get_transient( $transient ) ) ) && is_object( $data ) && ! empty( $data->data ) ) {
 
224
  return $this->processing_response_data( $data, $image_width, $image_resolution, $image_limit, $disable_video_thumbs );
225
  }
226
 
@@ -230,7 +238,7 @@ class Wpzoom_Instagram_Widget_API {
230
  if ( ! empty( $this->access_token ) ) {
231
  $request_url = add_query_arg(
232
  array(
233
- 'fields' => 'media_url,media_type,caption,username,permalink,thumbnail_url',
234
  'access_token' => $this->access_token,
235
  ),
236
  'https://graph.instagram.com/me/media'
@@ -279,12 +287,25 @@ class Wpzoom_Instagram_Widget_API {
279
  public function processing_response_data( $data, $image_width, $image_resolution, $image_limit, $disable_video_thumbs = false ) {
280
  $result = array();
281
  $username = '';
 
 
 
 
 
 
 
 
 
 
 
282
 
283
  if ( empty( $image_resolution ) ) {
284
  $image_resolution = 'default_algorithm';
285
  }
286
 
287
  foreach ( $data->data as $key => $item ) {
 
 
288
  if ( empty( $username ) ) {
289
  $username = $item->user->username;
290
  }
@@ -306,6 +327,7 @@ class Wpzoom_Instagram_Widget_API {
306
  'image-url' => $image_url,
307
  'original-image-url' => $item->media_url,
308
  'type' => $item->type,
 
309
  'image-id' => ! empty( $item->id ) ? esc_attr( $item->id ) : '',
310
  'image-caption' => ! empty( $item->caption->text ) ? esc_attr( $item->caption->text ) : '',
311
  'likes_count' => ! empty( $item->likes->count ) ? esc_attr( $item->likes->count ) : 0,
@@ -453,6 +475,7 @@ class Wpzoom_Instagram_Widget_API {
453
  'likes' => null,
454
  'comments' => null,
455
  'created_time' => null,
 
456
  'link' => $item->permalink,
457
  'caption' => (object) array(
458
  'text' => isset( $item->caption ) ? $item->caption : '',
@@ -648,7 +671,7 @@ class Wpzoom_Instagram_Widget_API {
648
  $request_url = add_query_arg(
649
  array(
650
  'access_token' => $this->access_token,
651
- 'fields' => 'account_type,id,media_count,username',
652
  ),
653
  'https://graph.instagram.com/me'
654
  );
@@ -695,9 +718,9 @@ class Wpzoom_Instagram_Widget_API {
695
  function convert_user_info_to_old_structure( $user_info ) {
696
  $converted = new stdClass();
697
 
698
- $user_info_from_settings = Wpzoom_Instagram_Widget_Settings::$settings;
699
 
700
- $avatar = null;
701
 
702
  if ( ! empty( $user_info_from_settings['user-info-avatar'] ) ) {
703
  $img_src = wp_get_attachment_image_src( $user_info_from_settings['user-info-avatar'] );
@@ -836,3 +859,5 @@ class Wpzoom_Instagram_Widget_API {
836
  return true;
837
  }
838
  }
 
 
26
  */
27
  public $errors = array();
28
 
29
+ /**
30
+ * Instagram Settings
31
+ *
32
+ * @var array
33
+ */
34
+ public $settings;
35
+
36
  /**
37
  * Instagram Access Token
38
  *
44
  * Class constructor
45
  */
46
  protected function __construct() {
47
+ $options = WPZOOM_Instagram_Widget_Settings::get_instance()->get_settings();
48
 
49
  $this->request_type = ! empty( $options['request-type'] ) ? $options['request-type'] : '';
50
  $this->access_token = ! empty( $options['basic-access-token'] ) ? $options['basic-access-token'] : '';
122
  global $current_user;
123
 
124
  if ( ! empty( $this->access_token ) ) {
125
+ $stored_data = WPZOOM_Instagram_Widget_Settings::get_instance()->get_settings();
126
  $request_url = add_query_arg(
127
  array(
128
  'grant_type' => 'ig_refresh_token',
177
  update_user_meta( $user_id, 'wpzoom_instagram_admin_notice', false );
178
  }
179
 
180
+ return update_option( WPZOOM_Instagram_Widget_Settings::get_instance()->get_option_name(), $stored_data );
181
  }
182
 
183
  return false;
227
  $transient = $transient . '_' . $injected_username;
228
  }
229
 
230
+ $data = json_decode( get_transient( $transient ) );
231
+ if ( false !== $data && is_object( $data ) && ! empty( $data->data ) ) {
232
  return $this->processing_response_data( $data, $image_width, $image_resolution, $image_limit, $disable_video_thumbs );
233
  }
234
 
238
  if ( ! empty( $this->access_token ) ) {
239
  $request_url = add_query_arg(
240
  array(
241
+ 'fields' => 'media_url,media_type,caption,username,permalink,thumbnail_url,timestamp',
242
  'access_token' => $this->access_token,
243
  ),
244
  'https://graph.instagram.com/me/media'
287
  public function processing_response_data( $data, $image_width, $image_resolution, $image_limit, $disable_video_thumbs = false ) {
288
  $result = array();
289
  $username = '';
290
+ $defaults = array(
291
+ 'link' => '',
292
+ 'image-url' => '',
293
+ 'original-image-url' => '',
294
+ 'type' => '',
295
+ 'timestamp' => '',
296
+ 'image-id' => '',
297
+ 'image-caption' => '',
298
+ 'likes_count' => 0,
299
+ 'comments_count' => 0,
300
+ );
301
 
302
  if ( empty( $image_resolution ) ) {
303
  $image_resolution = 'default_algorithm';
304
  }
305
 
306
  foreach ( $data->data as $key => $item ) {
307
+ $item = (object) wp_parse_args( $item, $defaults );
308
+
309
  if ( empty( $username ) ) {
310
  $username = $item->user->username;
311
  }
327
  'image-url' => $image_url,
328
  'original-image-url' => $item->media_url,
329
  'type' => $item->type,
330
+ 'timestamp' => property_exists( $item, 'timestamp' ) && ! empty( $item->timestamp ) ? $item->timestamp : '',
331
  'image-id' => ! empty( $item->id ) ? esc_attr( $item->id ) : '',
332
  'image-caption' => ! empty( $item->caption->text ) ? esc_attr( $item->caption->text ) : '',
333
  'likes_count' => ! empty( $item->likes->count ) ? esc_attr( $item->likes->count ) : 0,
475
  'likes' => null,
476
  'comments' => null,
477
  'created_time' => null,
478
+ 'timestamp' => $item->timestamp,
479
  'link' => $item->permalink,
480
  'caption' => (object) array(
481
  'text' => isset( $item->caption ) ? $item->caption : '',
671
  $request_url = add_query_arg(
672
  array(
673
  'access_token' => $this->access_token,
674
+ 'fields' => 'account_type,id,media_count,username,profile_picture',
675
  ),
676
  'https://graph.instagram.com/me'
677
  );
718
  function convert_user_info_to_old_structure( $user_info ) {
719
  $converted = new stdClass();
720
 
721
+ $user_info_from_settings = WPZOOM_Instagram_Widget_Settings::get_instance()->get_settings();
722
 
723
+ $avatar = property_exists( $user_info, 'profile_picture' ) ? $user_info->profile_picture : null;
724
 
725
  if ( ! empty( $user_info_from_settings['user-info-avatar'] ) ) {
726
  $img_src = wp_get_attachment_image_src( $user_info_from_settings['user-info-avatar'] );
859
  return true;
860
  }
861
  }
862
+
863
+ Wpzoom_Instagram_Widget_API::getInstance();
class-wpzoom-instagram-widget-settings.php CHANGED
@@ -6,7 +6,14 @@ if ( ! defined( 'ABSPATH' ) ) {
6
  exit;
7
  }
8
 
9
- class Wpzoom_Instagram_Widget_Settings {
 
 
 
 
 
 
 
10
  /**
11
  * Stores settings options
12
  *
@@ -23,6 +30,22 @@ class Wpzoom_Instagram_Widget_Settings {
23
  */
24
  public static $option_name = 'wpzoom-instagram-widget-settings';
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  public function __construct() {
27
  self::$settings = get_option( 'wpzoom-instagram-widget-settings', wpzoom_instagram_get_default_settings() );
28
 
@@ -34,7 +57,7 @@ class Wpzoom_Instagram_Widget_Settings {
34
  add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ), 9 );
35
  }
36
 
37
- function add_action_links( $links, $file ) {
38
  if ( $file != plugin_basename( dirname( __FILE__ ) . '/instagram-widget-by-wpzoom.php' ) ) {
39
  return $links;
40
  }
@@ -314,7 +337,6 @@ class Wpzoom_Instagram_Widget_Settings {
314
  <?php
315
  }
316
 
317
-
318
  public function settings_field_username() {
319
  $settings = self::$settings;
320
  ?>
@@ -513,6 +535,26 @@ class Wpzoom_Instagram_Widget_Settings {
513
 
514
  return $result;
515
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
  }
517
 
518
- new Wpzoom_Instagram_Widget_Settings();
6
  exit;
7
  }
8
 
9
+ class WPZOOM_Instagram_Widget_Settings {
10
+ /**
11
+ * @var WPZOOM_Instagram_Widget_Settings The reference to *Singleton* instance of this class
12
+ *
13
+ * @since 1.8.4
14
+ */
15
+ private static $instance;
16
+
17
  /**
18
  * Stores settings options
19
  *
30
  */
31
  public static $option_name = 'wpzoom-instagram-widget-settings';
32
 
33
+ /**
34
+ * Returns the *Singleton* instance of this class.
35
+ *
36
+ * @return WPZOOM_Instagram_Widget_Settings The *Singleton* instance.
37
+ */
38
+ public static function get_instance() {
39
+ if ( null === self::$instance ) {
40
+ self::$instance = new self();
41
+ }
42
+
43
+ return self::$instance;
44
+ }
45
+
46
+ /**
47
+ * Construct.
48
+ */
49
  public function __construct() {
50
  self::$settings = get_option( 'wpzoom-instagram-widget-settings', wpzoom_instagram_get_default_settings() );
51
 
57
  add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ), 9 );
58
  }
59
 
60
+ public function add_action_links( $links, $file ) {
61
  if ( $file != plugin_basename( dirname( __FILE__ ) . '/instagram-widget-by-wpzoom.php' ) ) {
62
  return $links;
63
  }
337
  <?php
338
  }
339
 
 
340
  public function settings_field_username() {
341
  $settings = self::$settings;
342
  ?>
535
 
536
  return $result;
537
  }
538
+
539
+ /**
540
+ * Get settings
541
+ *
542
+ * @since 1.8.4
543
+ * @return array
544
+ */
545
+ public function get_settings() {
546
+ return self::$settings;
547
+ }
548
+
549
+ /**
550
+ * Get settings option name
551
+ *
552
+ * @since 1.8.4
553
+ * @return string
554
+ */
555
+ public function get_option_name() {
556
+ return self::$option_name;
557
+ }
558
  }
559
 
560
+ WPZOOM_Instagram_Widget_Settings::get_instance();
class-wpzoom-instagram-widget.php CHANGED
@@ -38,6 +38,7 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
38
  'lazy-load-images' => false,
39
  'disable-video-thumbs' => false,
40
  'display-media-type-icons' => false,
 
41
  'images-per-row' => 3,
42
  'image-width' => 120,
43
  'image-spacing' => 10,
@@ -81,6 +82,13 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
81
  array( 'dashicons' ),
82
  WPZOOM_INSTAGRAM_VERSION
83
  );
 
 
 
 
 
 
 
84
  }
85
 
86
  /**
@@ -96,6 +104,13 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
96
  strval( $file_mod_time ),
97
  true
98
  );
 
 
 
 
 
 
 
99
  wp_register_script(
100
  'zoom-instagram-widget',
101
  plugin_dir_url( __FILE__ ) . 'js/instagram-widget.js',
@@ -110,6 +125,7 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
110
  */
111
  public function enqueue_scripts() {
112
  wp_enqueue_script( 'zoom-instagram-widget-lazy-load' );
 
113
  wp_enqueue_script( 'zoom-instagram-widget' );
114
  }
115
 
@@ -140,9 +156,9 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
140
  if ( ! is_array( $items ) ) {
141
  $this->display_errors( $errors );
142
  } else {
143
- if ( ! empty( $instance['show-user-info'] ) ) {
144
- $user_info = $this->api->get_user_info( $instance['username'] );
145
 
 
146
  if (
147
  is_object( $user_info ) &&
148
  ! empty( $user_info ) &&
@@ -152,7 +168,7 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
152
  }
153
  }
154
 
155
- $this->display_items( $items['items'], $instance );
156
  $this->display_instagram_button( $instance, $items['username'] );
157
  }
158
 
@@ -282,19 +298,24 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
282
  return round( $num, 1 ) . $units[ $i ];
283
  }
284
 
285
- protected function display_items( $items, $instance ) {
286
  $count = 0;
287
  $show_overlay = wp_validate_boolean( $instance['show-counts-on-hover'] );
288
  $show_media_type_icons = wp_validate_boolean( $instance['display-media-type-icons'] );
289
  $small_class = ( ! empty( $instance['image-width'] ) && $instance['image-width'] <= 180 ) ? 'small' : '';
290
  $svg_icons = plugin_dir_url( __FILE__ ) . 'images/wpzoom-instagram-icons.svg';
 
 
 
 
291
  ?>
292
  <ul class="zoom-instagram-widget__items zoom-instagram-widget__items--no-js"
293
  data-images-per-row="<?php echo esc_attr( $instance['images-per-row'] ); ?>"
294
  data-image-width="<?php echo esc_attr( $instance['image-width'] ); ?>"
295
  data-image-spacing="<?php echo esc_attr( $instance['image-spacing'] ); ?>"
296
  data-image-resolution="<?php echo esc_attr( $instance['image-resolution'] ); ?>"
297
- data-image-lazy-loading="<?php echo esc_attr( $instance['lazy-load-images'] ); ?>">
 
298
 
299
  <?php foreach ( $items as $item ) : ?>
300
  <?php
@@ -334,7 +355,7 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
334
  $overwrite_src = true;
335
  }
336
 
337
- if ( $overwrite_src ) {
338
  $src = $item['original-image-url'];
339
  }
340
  ?>
@@ -380,6 +401,7 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
380
  <?php else : ?>
381
  <a class="zoom-instagram-link" data-src="<?php echo $src; ?>"
382
  style="<?php echo $inline_style; ?>"
 
383
  href="<?php echo $link; ?>" target="_blank" rel="noopener nofollow" title="<?php echo $alt; ?>"
384
  >
385
  <?php if ( $show_media_type_icons && ! empty( $type ) ) : ?>
@@ -389,6 +411,51 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
389
  <?php endif; ?>
390
  </a>
391
  <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
  </li>
393
 
394
  <?php
@@ -450,6 +517,7 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
450
  $instance['lazy-load-images'] = ! empty( $new_instance['lazy-load-images'] );
451
  $instance['disable-video-thumbs'] = ! empty( $new_instance['disable-video-thumbs'] );
452
  $instance['display-media-type-icons'] = ! empty( $new_instance['display-media-type-icons'] );
 
453
 
454
  return $instance;
455
  }
@@ -602,6 +670,12 @@ class Wpzoom_Instagram_Widget extends WP_Widget {
602
  name="<?php echo $this->get_field_name( 'lazy-load-images' ); ?>"/>
603
  <label for="<?php echo $this->get_field_id( 'lazy-load-images' ); ?>"><?php _e( 'Lazy Load <strong>images</strong>', 'instagram-widget-by-wpzoom' ); ?></label>
604
  </p>
 
 
 
 
 
 
605
  <p>
606
  <input class="checkbox" type="checkbox" <?php checked( $instance['disable-video-thumbs'] ); ?>
607
  id="<?php echo $this->get_field_id( 'disable-video-thumbs' ); ?>"
38
  'lazy-load-images' => false,
39
  'disable-video-thumbs' => false,
40
  'display-media-type-icons' => false,
41
+ 'lightbox' => true,
42
  'images-per-row' => 3,
43
  'image-width' => 120,
44
  'image-spacing' => 10,
82
  array( 'dashicons' ),
83
  WPZOOM_INSTAGRAM_VERSION
84
  );
85
+
86
+ wp_enqueue_style(
87
+ 'magnific-popup',
88
+ plugin_dir_url( __FILE__ ) . 'assets/frontend/magnific-popup/magnific-popup.css',
89
+ array( 'dashicons' ),
90
+ WPZOOM_INSTAGRAM_VERSION
91
+ );
92
  }
93
 
94
  /**
104
  strval( $file_mod_time ),
105
  true
106
  );
107
+ wp_register_script(
108
+ 'magnific-popup',
109
+ plugin_dir_url( __FILE__ ) . 'assets/frontend/magnific-popup/jquery.magnific-popup.min.js',
110
+ array( 'jquery', 'underscore', 'wp-util' ),
111
+ filemtime( plugin_dir_path( __FILE__ ) . 'assets/frontend/magnific-popup/jquery.magnific-popup.min.js' ),
112
+ true
113
+ );
114
  wp_register_script(
115
  'zoom-instagram-widget',
116
  plugin_dir_url( __FILE__ ) . 'js/instagram-widget.js',
125
  */
126
  public function enqueue_scripts() {
127
  wp_enqueue_script( 'zoom-instagram-widget-lazy-load' );
128
+ wp_enqueue_script( 'magnific-popup' );
129
  wp_enqueue_script( 'zoom-instagram-widget' );
130
  }
131
 
156
  if ( ! is_array( $items ) ) {
157
  $this->display_errors( $errors );
158
  } else {
159
+ $user_info = $this->api->get_user_info( $instance['username'] );
 
160
 
161
+ if ( ! empty( $instance['show-user-info'] ) ) {
162
  if (
163
  is_object( $user_info ) &&
164
  ! empty( $user_info ) &&
168
  }
169
  }
170
 
171
+ $this->display_items( $items['items'], $instance, $user_info );
172
  $this->display_instagram_button( $instance, $items['username'] );
173
  }
174
 
298
  return round( $num, 1 ) . $units[ $i ];
299
  }
300
 
301
+ protected function display_items( $items, $instance, $user_info ) {
302
  $count = 0;
303
  $show_overlay = wp_validate_boolean( $instance['show-counts-on-hover'] );
304
  $show_media_type_icons = wp_validate_boolean( $instance['display-media-type-icons'] );
305
  $small_class = ( ! empty( $instance['image-width'] ) && $instance['image-width'] <= 180 ) ? 'small' : '';
306
  $svg_icons = plugin_dir_url( __FILE__ ) . 'images/wpzoom-instagram-icons.svg';
307
+ $lightbox = isset( $instance['lightbox'] ) ? wp_validate_boolean( $instance['lightbox'] ) : true;
308
+ $user_nfo = is_object( $user_info ) && ! empty( $user_info ) && ! empty( $user_info->data ) ? $user_info->data : false;
309
+ $username = false !== $user_nfo ? $user_nfo->username : '';
310
+ $avatar = false !== $user_nfo && ! empty( $user_nfo->profile_picture ) ? $user_nfo->profile_picture : plugin_dir_url( __FILE__ ) . 'assets/backend/img/user-avatar.jpg';
311
  ?>
312
  <ul class="zoom-instagram-widget__items zoom-instagram-widget__items--no-js"
313
  data-images-per-row="<?php echo esc_attr( $instance['images-per-row'] ); ?>"
314
  data-image-width="<?php echo esc_attr( $instance['image-width'] ); ?>"
315
  data-image-spacing="<?php echo esc_attr( $instance['image-spacing'] ); ?>"
316
  data-image-resolution="<?php echo esc_attr( $instance['image-resolution'] ); ?>"
317
+ data-image-lazy-loading="<?php echo esc_attr( $instance['lazy-load-images'] ); ?>"
318
+ data-lightbox="<?php echo esc_attr( $lightbox ); ?>">
319
 
320
  <?php foreach ( $items as $item ) : ?>
321
  <?php
355
  $overwrite_src = true;
356
  }
357
 
358
+ if ( $overwrite_src || $lightbox ) {
359
  $src = $item['original-image-url'];
360
  }
361
  ?>
401
  <?php else : ?>
402
  <a class="zoom-instagram-link" data-src="<?php echo $src; ?>"
403
  style="<?php echo $inline_style; ?>"
404
+ data-mfp-src="#<?php echo $media_id; ?>"
405
  href="<?php echo $link; ?>" target="_blank" rel="noopener nofollow" title="<?php echo $alt; ?>"
406
  >
407
  <?php if ( $show_media_type_icons && ! empty( $type ) ) : ?>
411
  <?php endif; ?>
412
  </a>
413
  <?php endif; ?>
414
+
415
+ <?php if ( $lightbox ) : ?>
416
+ <div id="<?php echo $media_id; ?>" class="mfp-hide wpz-insta-lightbox-wrapper">
417
+ <div class="wpz-insta-lightbox">
418
+ <div class="image-wrapper">
419
+ <img src="<?php echo esc_url( $src ); ?>" alt="<?php echo $alt; ?>"/>
420
+ </div>
421
+ <div class="details-wrapper">
422
+ <div class="wpz-insta-header">
423
+ <div class="wpz-insta-avatar">
424
+ <img src="<?php echo esc_url( $avatar ); ?>" alt="<?php echo esc_attr( $user_info->data->full_name ); ?>" width="42" height="42"/>
425
+ </div>
426
+ <div class="wpz-insta-buttons">
427
+ <div class="wpz-insta-username">
428
+ <a rel="noopener" target="_blank" href="<?php printf( 'https://instagram.com/%s', esc_attr( $username ) ); ?>"><?php echo esc_html( $username ); ?></a>
429
+ </div>
430
+ <div>&bull;</div>
431
+ <div class="wpz-insta-follow">
432
+ <a target="_blank" rel="noopener"
433
+ href="<?php printf( 'https://instagram.com/%s?ref=badge', esc_attr( $username ) ); ?>">
434
+ <?php _e( 'Follow', 'wpzoom-instagram-widget' ); ?>
435
+ </a>
436
+ </div>
437
+ </div>
438
+ </div>
439
+ <?php if ( ! empty( $item['image-caption'] ) ) : ?>
440
+ <div class="wpz-insta-caption">
441
+ <?php echo esc_html( $item['image-caption'] ); ?>
442
+ </div>
443
+ <?php endif; ?>
444
+
445
+ <?php if ( ! empty( $item['timestamp'] ) ) : ?>
446
+ <div class="wpz-insta-date">
447
+ <?php printf( __( '%s ago' ), human_time_diff( strtotime( $item['timestamp'] ) ) ); ?>
448
+ </div>
449
+ <?php endif; ?>
450
+ <div class="view-post">
451
+ <a href="<?php echo esc_url( $link ); ?>" target="_blank" rel="noopener"><span class="dashicons dashicons-instagram"></span><?php _e( 'View on Instagram', 'wpzoom-instagram-widget' ); ?></a>
452
+ <span class="delimiter">|</span>
453
+ <div class="wpz-insta-pagination">1/10</div>
454
+ </div>
455
+ </div>
456
+ </div>
457
+ </div>
458
+ <?php endif; ?>
459
  </li>
460
 
461
  <?php
517
  $instance['lazy-load-images'] = ! empty( $new_instance['lazy-load-images'] );
518
  $instance['disable-video-thumbs'] = ! empty( $new_instance['disable-video-thumbs'] );
519
  $instance['display-media-type-icons'] = ! empty( $new_instance['display-media-type-icons'] );
520
+ $instance['lightbox'] = ! empty( $new_instance['lightbox'] );
521
 
522
  return $instance;
523
  }
670
  name="<?php echo $this->get_field_name( 'lazy-load-images' ); ?>"/>
671
  <label for="<?php echo $this->get_field_id( 'lazy-load-images' ); ?>"><?php _e( 'Lazy Load <strong>images</strong>', 'instagram-widget-by-wpzoom' ); ?></label>
672
  </p>
673
+ <p>
674
+ <input class="checkbox" type="checkbox" <?php checked( $instance['lightbox'] ); ?>
675
+ id="<?php echo $this->get_field_id( 'lightbox' ); ?>"
676
+ name="<?php echo $this->get_field_name( 'lightbox' ); ?>"/>
677
+ <label for="<?php echo $this->get_field_id( 'lightbox' ); ?>"><?php _e( 'Open items in a <strong>lightbox</strong>', 'instagram-widget-by-wpzoom' ); ?></label>
678
+ </p>
679
  <p>
680
  <input class="checkbox" type="checkbox" <?php checked( $instance['disable-video-thumbs'] ); ?>
681
  id="<?php echo $this->get_field_id( 'disable-video-thumbs' ); ?>"
css/instagram-widget.css CHANGED
@@ -24,7 +24,7 @@
24
 
25
  /* View on Instagram button */
26
  .ig-b- {
27
- display: inline-block;
28
  }
29
 
30
  a.ig-b-v-24 {
@@ -50,256 +50,430 @@ a.ig-b-v-24 {
50
  }
51
 
52
  a.ig-b-v-24:hover {
53
- background: #3897f0;
54
- border-color: #3897f0;
55
- color: #ffffff !important;
56
  }
57
  .zoom-instagram-widget__item .hover-controls{
58
- opacity: 0;
59
- z-index: 9;
60
- margin-top: -15px;
61
- position: absolute;
62
- top:40%;
63
- width: 100%;
64
- text-align: center;
65
- transition: opacity 0.25s ease-in-out;
66
- -moz-transition: opacity 0.25s ease-in-out;
67
- -webkit-transition: opacity 0.25s ease-in-out;
68
  }
69
  .zoom-instagram-widget__item .hover-controls ~ .zoom-instagram-icon-wrap{
70
- bottom: 10%;
71
  }
72
 
73
  .zoom-instagram-widget__item .hover-layout.small .hover-controls ~ .zoom-instagram-icon-wrap{
74
- bottom: 6%;
75
  }
76
 
77
  .zoom-instagram-widget__item .hover-layout.small .zoom-instagram-icon-wrap{
78
- bottom: calc(50% - 15px);
79
  }
80
 
81
  .zoom-instagram-widget__item .zoom-instagram-icon-wrap{
82
- bottom: calc(50% - 15px);
83
- height: 30px;
84
- width: 100%;
85
- position: absolute;
86
- z-index: 9;
87
- text-align: center;
88
  }
89
  .zoom-instagram-widget__item:hover .hover-controls{
90
- opacity: 1;
91
  }
92
  .zoom-instagram-widget__item .zoom-instagram-icon-wrap{
93
- opacity: 0;
94
- transition: opacity 0.25s ease-in-out;
95
- -moz-transition: opacity 0.25s ease-in-out;
96
- -webkit-transition: opacity 0.25s ease-in-out;
97
  }
98
  .zoom-instagram-widget__item:hover .zoom-instagram-icon-wrap{
99
- opacity: 1;
100
  }
101
  .zoom-instagram-widget__item .hover-controls .dashicons{
102
- font-size: 20px;
103
- width: 20px;
104
- height: 20px;
105
- color: #FFFFFF;
106
- vertical-align: middle;
107
  }
108
  .zoom-instagram-widget__item .hover-controls .counter{
109
- padding-left: 1px;
110
- padding-right: 12px;
111
- font-weight: 500;
112
- color: #FFFFFF;
113
- font-size: 14px;
114
- opacity: .8;
115
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
116
  }
117
 
118
  .zoom-instagram-widget__overlay {
119
- position: relative;
120
  }
121
 
122
  .zoom-instagram-widget__overlay:after {
123
- position: absolute;
124
- content:"";
125
- top:0;
126
- left:0;
127
- width:100%;
128
- height:100%;
129
- opacity:0;
130
- transition: opacity 0.25s ease-in-out;
131
- -moz-transition: opacity 0.25s ease-in-out;
132
- -webkit-transition: opacity 0.25s ease-in-out;
133
  }
134
 
135
  .zoom-instagram-widget__overlay:hover:after {
136
- opacity: 0.7;
137
- background-color: #000000;
138
  }
139
 
140
  .zoom-instagram-widget__black:after {
141
- background-color: #000000;
142
  }
143
 
144
  .zoom-svg-instagram-simple {
145
- display: inline-block;
146
- width: 30px;
147
- height: 30px;
148
- background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IgogICAgIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIKICAgICB2aWV3Qm94PSIwIDAgNTAgNTAiCiAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjsiPiAgICA8cGF0aCBzdHlsZT0ibGluZS1oZWlnaHQ6bm9ybWFsO3RleHQtaW5kZW50OjA7dGV4dC1hbGlnbjpzdGFydDt0ZXh0LWRlY29yYXRpb24tbGluZTpub25lO3RleHQtZGVjb3JhdGlvbi1zdHlsZTpzb2xpZDt0ZXh0LWRlY29yYXRpb24tY29sb3I6IzAwMDt0ZXh0LXRyYW5zZm9ybTpub25lO2Jsb2NrLXByb2dyZXNzaW9uOnRiO2lzb2xhdGlvbjphdXRvO21peC1ibGVuZC1tb2RlOm5vcm1hbCIgZD0iTSAxNiAzIEMgOC44MzI0ODM5IDMgMyA4LjgzMjQ4MzkgMyAxNiBMIDMgMzQgQyAzIDQxLjE2NzUxNiA4LjgzMjQ4MzkgNDcgMTYgNDcgTCAzNCA0NyBDIDQxLjE2NzUxNiA0NyA0NyA0MS4xNjc1MTYgNDcgMzQgTCA0NyAxNiBDIDQ3IDguODMyNDgzOSA0MS4xNjc1MTYgMyAzNCAzIEwgMTYgMyB6IE0gMTYgNSBMIDM0IDUgQyA0MC4wODY0ODQgNSA0NSA5LjkxMzUxNjEgNDUgMTYgTCA0NSAzNCBDIDQ1IDQwLjA4NjQ4NCA0MC4wODY0ODQgNDUgMzQgNDUgTCAxNiA0NSBDIDkuOTEzNTE2MSA0NSA1IDQwLjA4NjQ4NCA1IDM0IEwgNSAxNiBDIDUgOS45MTM1MTYxIDkuOTEzNTE2MSA1IDE2IDUgeiBNIDM3IDExIEEgMiAyIDAgMCAwIDM1IDEzIEEgMiAyIDAgMCAwIDM3IDE1IEEgMiAyIDAgMCAwIDM5IDEzIEEgMiAyIDAgMCAwIDM3IDExIHogTSAyNSAxNCBDIDE4LjkzNjcxMiAxNCAxNCAxOC45MzY3MTIgMTQgMjUgQyAxNCAzMS4wNjMyODggMTguOTM2NzEyIDM2IDI1IDM2IEMgMzEuMDYzMjg4IDM2IDM2IDMxLjA2MzI4OCAzNiAyNSBDIDM2IDE4LjkzNjcxMiAzMS4wNjMyODggMTQgMjUgMTQgeiBNIDI1IDE2IEMgMjkuOTgyNDA3IDE2IDM0IDIwLjAxNzU5MyAzNCAyNSBDIDM0IDI5Ljk4MjQwNyAyOS45ODI0MDcgMzQgMjUgMzQgQyAyMC4wMTc1OTMgMzQgMTYgMjkuOTgyNDA3IDE2IDI1IEMgMTYgMjAuMDE3NTkzIDIwLjAxNzU5MyAxNiAyNSAxNiB6IiBmb250LXdlaWdodD0iNDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgd2hpdGUtc3BhY2U9Im5vcm1hbCIgb3ZlcmZsb3c9InZpc2libGUiPjwvcGF0aD48L3N2Zz4=') 50% 50% no-repeat;
149
- background-size: 100%;
150
  }
151
 
152
  .zoom-svg-instagram-stroke {
153
- display: inline-block;
154
- width: 30px;
155
- height: 30px;
156
- background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IgogICAgIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIKICAgICB2aWV3Qm94PSIwIDAgMjUyIDI1MiIKICAgICBzdHlsZT0iZmlsbDojMDAwMDAwOyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMi4zOTQsMi4zOTQpIHNjYWxlKDAuOTgxLDAuOTgxKSI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJub256ZXJvIiBzdHJva2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SJtaXRlciI+PC9wYXRoPjxwYXRoIGQ9IiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIHN0cm9rZS1saW5lam9pbj0ibWl0ZXIiPjwvcGF0aD48L2c+PC9nPjwvc3ZnPg==') 50% 50% no-repeat;
157
- background-size: 100%;
158
  }
159
 
160
  .zoom-instagram-widget__item .hover-layout.small .hover-controls .dashicons{
161
- font-size: 15px;
162
- width: 15px;
163
- height: 15px;
164
  }
165
 
166
  .zoom-instagram-widget__item .hover-layout.small .zoom-instagram-icon-wrap .zoom-svg-instagram-stroke{
167
- width: 18px;
168
- height: 18px;
169
  }
170
 
171
  .zoom-instagram-widget__item .hover-layout.small .hover-controls .counter{
172
- padding-left: 1px;
173
- padding-right: 4px;
174
- font-size: 11px;
175
  }
176
 
177
  /** Instagram user info **/
178
 
179
  .zoom-instagram-widget-user-info {
180
- display: flex;
181
- padding: 0 0px 20px;
182
- /*justify-content: space-between;*/
183
  }
184
 
185
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-picture {
186
- flex: 1;
187
  }
188
 
189
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-picture img {
190
- border-radius: 50%;
191
  }
192
 
193
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-meta {
194
- display: flex;
195
- flex: 3;
196
- flex-direction: column;
197
- margin-left: 15px;
198
- text-align: left;
199
- justify-content: center;
200
  }
201
 
202
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-about-data {
203
 
204
- display: flex;
205
- justify-content: space-between;
206
- margin-bottom: 10px;
207
 
208
  }
209
 
210
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-stats{
211
- font-size: 14px;
212
- line-height: 1.2;
213
- justify-content: space-between;
214
- display: flex;
215
- text-align: center;
216
  }
217
 
218
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-follow-button {
219
- padding: 0px 24px;
220
- margin-top: 10px;
221
- background: #3897f0;
222
- color: #fff !important;
223
- font-size: 14px;
224
- font-weight: 600;
225
- line-height: 26px;
226
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
227
- text-transform: none;
228
- border-radius: 3px;
229
- outline: 0;
230
- overflow: hidden;
231
- text-overflow: ellipsis;
232
- display: block;
233
- border: none;
234
- box-shadow: none;
235
- text-decoration: none !important;
236
  }
237
 
238
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-follow-button:hover {
239
- color: #fff;
240
- opacity: .8;
241
- box-shadow: none;
242
- border: none;
243
- text-decoration: none;
244
  }
245
 
246
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-counts{
247
- font-weight: 600;
248
  }
249
 
250
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-counts-subhead{
251
- /*color: #999;*/
252
- opacity: .7;
253
- font-size: 14px;
254
  }
255
 
256
  .zoom-instagram-widget-user-info-grey-color{
257
- /*color: #b0b0b0;*/
258
  }
259
  .zoom-instagram-widget-user-info-middle-cell{
260
- padding: 0px 20px;
261
  }
262
 
263
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-fullname{
264
- font-weight: 600;
265
- font-size: 16px;
266
  }
267
 
268
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-names-wrapper{
269
- padding-right: 20px;
270
- word-break: break-word;
271
  }
272
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-username{
273
- font-size: 14px;
274
- font-weight: 600;
275
- word-break: break-all;
276
- opacity: .7;
277
  }
278
 
279
  .zoom-instagram-widget-user-info-bio {
280
- text-align: left;
281
- font-size: 14px;
282
- margin: 0 0 15px;
283
  }
284
 
285
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-fullname{
286
- /*color: #262626;*/
287
  }
288
 
289
- .zoom-instagram-widget__items .zoom-instagram-widget__item .zoom-instagram-link{
290
- display: block;
291
- background-size: cover;
292
- background-position: center center;
293
- background-repeat: no-repeat
294
  }
295
 
296
  .zoom-instagram-widget__items .svg-icon {
297
- position: absolute;
298
- width: 32px;
299
- padding: 8px;
300
- height: 32px;
301
- display: flex;
302
- top: 0;
303
- right: 0;
304
- z-index: 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  /* View on Instagram button */
26
  .ig-b- {
27
+ display: inline-block;
28
  }
29
 
30
  a.ig-b-v-24 {
50
  }
51
 
52
  a.ig-b-v-24:hover {
53
+ background: #3897f0;
54
+ border-color: #3897f0;
55
+ color: #ffffff !important;
56
  }
57
  .zoom-instagram-widget__item .hover-controls{
58
+ opacity: 0;
59
+ z-index: 9;
60
+ margin-top: -15px;
61
+ position: absolute;
62
+ top:40%;
63
+ width: 100%;
64
+ text-align: center;
65
+ transition: opacity 0.25s ease-in-out;
66
+ -moz-transition: opacity 0.25s ease-in-out;
67
+ -webkit-transition: opacity 0.25s ease-in-out;
68
  }
69
  .zoom-instagram-widget__item .hover-controls ~ .zoom-instagram-icon-wrap{
70
+ bottom: 10%;
71
  }
72
 
73
  .zoom-instagram-widget__item .hover-layout.small .hover-controls ~ .zoom-instagram-icon-wrap{
74
+ bottom: 6%;
75
  }
76
 
77
  .zoom-instagram-widget__item .hover-layout.small .zoom-instagram-icon-wrap{
78
+ bottom: calc(50% - 15px);
79
  }
80
 
81
  .zoom-instagram-widget__item .zoom-instagram-icon-wrap{
82
+ bottom: calc(50% - 15px);
83
+ height: 30px;
84
+ width: 100%;
85
+ position: absolute;
86
+ z-index: 9;
87
+ text-align: center;
88
  }
89
  .zoom-instagram-widget__item:hover .hover-controls{
90
+ opacity: 1;
91
  }
92
  .zoom-instagram-widget__item .zoom-instagram-icon-wrap{
93
+ opacity: 0;
94
+ transition: opacity 0.25s ease-in-out;
95
+ -moz-transition: opacity 0.25s ease-in-out;
96
+ -webkit-transition: opacity 0.25s ease-in-out;
97
  }
98
  .zoom-instagram-widget__item:hover .zoom-instagram-icon-wrap{
99
+ opacity: 1;
100
  }
101
  .zoom-instagram-widget__item .hover-controls .dashicons{
102
+ font-size: 20px;
103
+ width: 20px;
104
+ height: 20px;
105
+ color: #FFFFFF;
106
+ vertical-align: middle;
107
  }
108
  .zoom-instagram-widget__item .hover-controls .counter{
109
+ padding-left: 1px;
110
+ padding-right: 12px;
111
+ font-weight: 500;
112
+ color: #FFFFFF;
113
+ font-size: 14px;
114
+ opacity: .8;
115
+ font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
116
  }
117
 
118
  .zoom-instagram-widget__overlay {
119
+ position: relative;
120
  }
121
 
122
  .zoom-instagram-widget__overlay:after {
123
+ position: absolute;
124
+ content:"";
125
+ top:0;
126
+ left:0;
127
+ width:100%;
128
+ height:100%;
129
+ opacity:0;
130
+ transition: opacity 0.25s ease-in-out;
131
+ -moz-transition: opacity 0.25s ease-in-out;
132
+ -webkit-transition: opacity 0.25s ease-in-out;
133
  }
134
 
135
  .zoom-instagram-widget__overlay:hover:after {
136
+ opacity: 0.7;
137
+ background-color: #000000;
138
  }
139
 
140
  .zoom-instagram-widget__black:after {
141
+ background-color: #000000;
142
  }
143
 
144
  .zoom-svg-instagram-simple {
145
+ display: inline-block;
146
+ width: 30px;
147
+ height: 30px;
148
+ background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3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CAxNCAxOC45MzY3MTIgMTQgMjUgQyAxNCAzMS4wNjMyODggMTguOTM2NzEyIDM2IDI1IDM2IEMgMzEuMDYzMjg4IDM2IDM2IDMxLjA2MzI4OCAzNiAyNSBDIDM2IDE4LjkzNjcxMiAzMS4wNjMyODggMTQgMjUgMTQgeiBNIDI1IDE2IEMgMjkuOTgyNDA3IDE2IDM0IDIwLjAxNzU5MyAzNCAyNSBDIDM0IDI5Ljk4MjQwNyAyOS45ODI0MDcgMzQgMjUgMzQgQyAyMC4wMTc1OTMgMzQgMTYgMjkuOTgyNDA3IDE2IDI1IEMgMTYgMjAuMDE3NTkzIDIwLjAxNzU5MyAxNiAyNSAxNiB6IiBmb250LXdlaWdodD0iNDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgd2hpdGUtc3BhY2U9Im5vcm1hbCIgb3ZlcmZsb3c9InZpc2libGUiPjwvcGF0aD48L3N2Zz4=') 50% 50% no-repeat;
149
+ background-size: 100%;
150
  }
151
 
152
  .zoom-svg-instagram-stroke {
153
+ display: inline-block;
154
+ width: 30px;
155
+ height: 30px;
156
+ background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IgogICAgIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIKICAgICB2aWV3Qm94PSIwIDAgMjUyIDI1MiIKICAgICBzdHlsZT0iZmlsbDojMDAwMDAwOyI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMi4zOTQsMi4zOTQpIHNjYWxlKDAuOTgxLDAuOTgxKSI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJub256ZXJvIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0ibm9uZSIgc3Ryb2tlLWxpbmVjYXA9ImJ1dHQiIHN0cm9rZS1saW5lam9pbj0ibm9uZSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2U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PC9nPjwvc3ZnPg==') 50% 50% no-repeat;
157
+ background-size: 100%;
158
  }
159
 
160
  .zoom-instagram-widget__item .hover-layout.small .hover-controls .dashicons{
161
+ font-size: 15px;
162
+ width: 15px;
163
+ height: 15px;
164
  }
165
 
166
  .zoom-instagram-widget__item .hover-layout.small .zoom-instagram-icon-wrap .zoom-svg-instagram-stroke{
167
+ width: 18px;
168
+ height: 18px;
169
  }
170
 
171
  .zoom-instagram-widget__item .hover-layout.small .hover-controls .counter{
172
+ padding-left: 1px;
173
+ padding-right: 4px;
174
+ font-size: 11px;
175
  }
176
 
177
  /** Instagram user info **/
178
 
179
  .zoom-instagram-widget-user-info {
180
+ display: flex;
181
+ padding: 0 0px 20px;
182
+ /*justify-content: space-between;*/
183
  }
184
 
185
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-picture {
186
+ flex: 1;
187
  }
188
 
189
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-picture img {
190
+ border-radius: 50%;
191
  }
192
 
193
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-meta {
194
+ display: flex;
195
+ flex: 3;
196
+ flex-direction: column;
197
+ margin-left: 15px;
198
+ text-align: left;
199
+ justify-content: center;
200
  }
201
 
202
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-about-data {
203
 
204
+ display: flex;
205
+ justify-content: space-between;
206
+ margin-bottom: 10px;
207
 
208
  }
209
 
210
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-stats{
211
+ font-size: 14px;
212
+ line-height: 1.2;
213
+ justify-content: space-between;
214
+ display: flex;
215
+ text-align: center;
216
  }
217
 
218
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-follow-button {
219
+ padding: 0px 24px;
220
+ margin-top: 10px;
221
+ background: #3897f0;
222
+ color: #fff !important;
223
+ font-size: 14px;
224
+ font-weight: 600;
225
+ line-height: 26px;
226
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
227
+ text-transform: none;
228
+ border-radius: 3px;
229
+ outline: 0;
230
+ overflow: hidden;
231
+ text-overflow: ellipsis;
232
+ display: block;
233
+ border: none;
234
+ box-shadow: none;
235
+ text-decoration: none !important;
236
  }
237
 
238
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-follow-button:hover {
239
+ color: #fff;
240
+ opacity: .8;
241
+ box-shadow: none;
242
+ border: none;
243
+ text-decoration: none;
244
  }
245
 
246
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-counts{
247
+ font-weight: 600;
248
  }
249
 
250
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-counts-subhead{
251
+ /*color: #999;*/
252
+ opacity: .7;
253
+ font-size: 14px;
254
  }
255
 
256
  .zoom-instagram-widget-user-info-grey-color{
257
+ /*color: #b0b0b0;*/
258
  }
259
  .zoom-instagram-widget-user-info-middle-cell{
260
+ padding: 0px 20px;
261
  }
262
 
263
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-fullname{
264
+ font-weight: 600;
265
+ font-size: 16px;
266
  }
267
 
268
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-names-wrapper{
269
+ padding-right: 20px;
270
+ word-break: break-word;
271
  }
272
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-username{
273
+ font-size: 14px;
274
+ font-weight: 600;
275
+ word-break: break-all;
276
+ opacity: .7;
277
  }
278
 
279
  .zoom-instagram-widget-user-info-bio {
280
+ text-align: left;
281
+ font-size: 14px;
282
+ margin: 0 0 15px;
283
  }
284
 
285
  .zoom-instagram-widget-user-info .zoom-instagram-widget-user-info-fullname{
286
+ /*color: #262626;*/
287
  }
288
 
289
+ .zoom-instagram-widget__items .zoom-instagram-widget__item .zoom-instagram-link {
290
+ display: block;
291
+ background-size: cover !important;
292
+ background-position: center center !important;
293
+ background-repeat: no-repeat !important;
294
  }
295
 
296
  .zoom-instagram-widget__items .svg-icon {
297
+ position: absolute;
298
+ width: 32px;
299
+ padding: 8px;
300
+ height: 32px;
301
+ display: flex;
302
+ top: 0;
303
+ right: 0;
304
+ z-index: 1;
305
+ }
306
+
307
+ /** Lightbox **/
308
+ .wpz-insta-lightbox {
309
+ pointer-events: all;
310
+ display: flex;
311
+ flex-direction: row;
312
+ flex-wrap: wrap;
313
+ background-color: white;
314
+ }
315
+
316
+ .wpz-insta-lightbox-wrapper {
317
+ display: flex;
318
+ justify-content: center;
319
+ }
320
+
321
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper {
322
+ width: 335px;
323
+ }
324
+
325
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header {
326
+ display: flex;
327
+ align-items: center;
328
+ padding: 16px;
329
+ border-bottom: 1px solid #efefef;
330
+ }
331
+
332
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header .wpz-insta-avatar img {
333
+ width: 42px;
334
+ height: 42px;
335
+ border-radius: 50%;
336
+ }
337
+
338
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header .wpz-insta-username a,
339
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header .wpz-insta-follow a {
340
+ color: #262626;
341
+ font-weight: 600;
342
+ text-decoration: none;
343
+ font-size: 14px;
344
+ }
345
+
346
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header .wpz-insta-username a:hover {
347
+ text-decoration: underline;
348
+ }
349
+
350
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header .wpz-insta-follow a {
351
+ color: #0095f6;
352
+ }
353
+
354
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header > div {
355
+ margin-right: 13px;
356
+ }
357
+
358
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header .wpz-insta-buttons {
359
+ display: flex;
360
+ }
361
+
362
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-header .wpz-insta-buttons > div {
363
+ padding: 5px;
364
+ }
365
+
366
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-caption {
367
+ color: #262626;
368
+ line-height: 1.5;
369
+ font-size: 14px;
370
+ padding: 16px;
371
+ font-weight: normal;
372
+ overflow-y: scroll;
373
+ max-height: 384px;
374
+ border-bottom: 1px solid #efefef;
375
+ }
376
+
377
+ .wpzoom-lightbox.mfp-gallery {
378
+ z-index: 100000;
379
+ pointer-events: none;
380
+ }
381
+
382
+ .wpzoom-lightbox button.mfp-close {
383
+ pointer-events: all;
384
+ color: #fff;
385
+ font-size: 50px;
386
+ font-weight: 100;
387
+ margin-top: 25px;
388
+ margin-right: 15px;
389
+ }
390
+
391
+ .wpzoom-lightbox .mfp-prevent-close {
392
+ pointer-events: all;
393
+ }
394
+
395
+ .wpzoom-lightbox button.mfp-close:hover {
396
+ text-decoration: none;
397
+ }
398
+
399
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-date {
400
+ font-size: 12px;
401
+ padding: 16px;
402
+ color: #8e8e8e;
403
+ flex: 1;
404
+ }
405
+
406
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .image-wrapper img {
407
+ height: 100%;
408
+ object-fit: contain;
409
+ }
410
+
411
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .image-wrapper {
412
+ flex-grow: 1;
413
+ text-align: center;
414
+ height: 600px;
415
+ background: #000;
416
+ }
417
+
418
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper {
419
+ display: flex;
420
+ flex-direction: column;
421
+ flex-grow: 1;
422
+ }
423
+
424
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .view-post {
425
+ padding: 16px;
426
+ text-decoration: none;
427
+ font-size: 12px;
428
+ color: #262626;
429
+ font-weight: 400;
430
+ line-height: 20px;
431
+ display: flex;
432
+ border-top: 1px solid #efefef;
433
+ }
434
+
435
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .view-post a {
436
+ text-decoration: none;
437
+ font-size: 12px;
438
+ color: #262626;
439
+ font-weight: 400;
440
+ line-height: 20px;
441
+ text-align: center;
442
+ display: inline-block
443
+ }
444
+
445
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .view-post a span {
446
+ margin-right: 10px;
447
+ }
448
+
449
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .view-post .delimiter {
450
+ padding: 0px 10px;
451
  }
452
+
453
+
454
+ @media screen and (max-width: 860px) {
455
+
456
+ .wpz-insta-lightbox-wrapper {
457
+ display: block;
458
+ max-width: 76%;
459
+ margin-left: auto;
460
+ margin-right: auto;
461
+ }
462
+
463
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .image-wrapper {
464
+ height: auto;
465
+ max-height: 600px;
466
+ overflow: hidden;
467
+ }
468
+
469
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .image-wrapper img {
470
+ max-width: 100%;
471
+ height: auto;
472
+ }
473
+
474
+ .wpz-insta-lightbox-wrapper .wpz-insta-lightbox .details-wrapper .wpz-insta-caption {
475
+ font-size: 12px;
476
+ max-height: 134px;
477
+ }
478
+
479
+ }
instagram-widget-by-wpzoom.php CHANGED
@@ -2,8 +2,8 @@
2
  /**
3
  * Plugin Name: WPZOOM Instagram Widget
4
  * Plugin URI: https://www.wpzoom.com/plugins/instagram-widget/
5
- * Description: Simple and lightweight widget for WordPress to display your Instagram feed
6
- * Version: 1.8.3
7
  * Author: WPZOOM
8
  * Author URI: https://www.wpzoom.com/
9
  * Text Domain: instagram-widget-by-wpzoom
@@ -19,12 +19,12 @@ if ( ! defined( 'ABSPATH' ) ) {
19
  }
20
 
21
  if ( ! defined( 'WPZOOM_INSTAGRAM_VERSION' ) ) {
22
- define( 'WPZOOM_INSTAGRAM_VERSION', '1.8.3' );
23
  }
24
 
25
  require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-image-uploader.php';
26
- require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-widget-api.php';
27
  require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-widget-settings.php';
 
28
  require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-widget.php';
29
 
30
  add_action( 'widgets_init', 'zoom_instagram_widget_register' );
@@ -43,7 +43,7 @@ function wpzoom_instagram_admin_notice() {
43
  return;
44
  }
45
 
46
- $options = Wpzoom_Instagram_Widget_Settings::$settings;
47
 
48
  if ( ! isset( $options['basic-access-token'] ) || empty( $options['basic-access-token'] ) ) {
49
  $hide_notices_url = wpzoom_instagram_get_notice_dismiss_url();
@@ -55,7 +55,7 @@ function wpzoom_instagram_admin_notice() {
55
 
56
  $options['admin-notice-message'] = $notice_message;
57
 
58
- update_option( Wpzoom_Instagram_Widget_Settings::$option_name, $options );
59
  }
60
 
61
  /* Check that the user hasn't already clicked to ignore the message */
@@ -80,7 +80,7 @@ function wpzoom_instagram_admin_notice() {
80
 
81
  $options['refresh-access-token'] = '';
82
 
83
- update_option( Wpzoom_Instagram_Widget_Settings::$option_name, $options );
84
  }
85
  }
86
  }
@@ -110,6 +110,8 @@ function wpzoom_instagram_get_notice_dismiss_url() {
110
  wpzoom_instagram_get_current_admin_url() ? wpzoom_instagram_get_current_admin_url() : admin_url( 'options-general.php?page=wpzoom-instagram-widget' )
111
  )
112
  );
 
 
113
  }
114
 
115
  function wpzoom_instagram_get_default_settings() {
2
  /**
3
  * Plugin Name: WPZOOM Instagram Widget
4
  * Plugin URI: https://www.wpzoom.com/plugins/instagram-widget/
5
+ * Description: Simple and lightweight widget for WordPress to display your Instagram feed. Now with a Lightbox!
6
+ * Version: 1.9.0
7
  * Author: WPZOOM
8
  * Author URI: https://www.wpzoom.com/
9
  * Text Domain: instagram-widget-by-wpzoom
19
  }
20
 
21
  if ( ! defined( 'WPZOOM_INSTAGRAM_VERSION' ) ) {
22
+ define( 'WPZOOM_INSTAGRAM_VERSION', '1.9.0' );
23
  }
24
 
25
  require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-image-uploader.php';
 
26
  require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-widget-settings.php';
27
+ require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-widget-api.php';
28
  require_once plugin_dir_path( __FILE__ ) . 'class-wpzoom-instagram-widget.php';
29
 
30
  add_action( 'widgets_init', 'zoom_instagram_widget_register' );
43
  return;
44
  }
45
 
46
+ $options = WPZOOM_Instagram_Widget_Settings::get_instance()->get_settings();
47
 
48
  if ( ! isset( $options['basic-access-token'] ) || empty( $options['basic-access-token'] ) ) {
49
  $hide_notices_url = wpzoom_instagram_get_notice_dismiss_url();
55
 
56
  $options['admin-notice-message'] = $notice_message;
57
 
58
+ update_option( WPZOOM_Instagram_Widget_Settings::get_instance()->get_option_name(), $options );
59
  }
60
 
61
  /* Check that the user hasn't already clicked to ignore the message */
80
 
81
  $options['refresh-access-token'] = '';
82
 
83
+ update_option( WPZOOM_Instagram_Widget_Settings::get_instance()->get_option_name(), $options );
84
  }
85
  }
86
  }
110
  wpzoom_instagram_get_current_admin_url() ? wpzoom_instagram_get_current_admin_url() : admin_url( 'options-general.php?page=wpzoom-instagram-widget' )
111
  )
112
  );
113
+
114
+ return $hide_notices_url;
115
  }
116
 
117
  function wpzoom_instagram_get_default_settings() {
js/instagram-widget.js CHANGED
@@ -1,140 +1,162 @@
1
  jQuery(function ($) {
2
- var ticking = false;
3
-
4
- $.fn.zoomLoadAsyncImages = function () {
5
- return $(this).each(function () {
6
- var $list = $(this);
7
-
8
- var desiredItemWidth = $list.data('image-width');
9
- var imageResolution = $list.data('image-resolution');
10
-
11
- var delayedItems = $list.find('li').filter(function () {
12
- return $(this).data('media-id');
13
- }).map(function () {
14
- return {
15
- 'media-id': $(this).attr('data-media-id'),
16
- 'nonce': $(this).attr('data-nonce'),
17
- 'regenerate-thumbnails': $(this)[0].hasAttribute("data-regenerate-thumbnails")
18
- };
19
- });
20
-
21
- var getAsyncImages = function (images) {
22
-
23
- var isLastImage = images.length == 0;
24
-
25
- if (isLastImage) {
26
- return;
27
- }
28
-
29
- var image = images.shift();
30
-
31
- wp.ajax.post('wpzoom_instagram_get_image_async', {
32
- 'media-id': image['media-id'],
33
- nonce: image['nonce'],
34
- 'image-resolution': imageResolution,
35
- 'image-width': desiredItemWidth,
36
- 'regenerate-thumbnails': image['regenerate-thumbnails']
37
- }).done(function (data) {
38
- $list.find('li[data-media-id="' + image['media-id'] + '"] .zoom-instagram-link').css('background-image', 'url(' + data.image_src + ')');
39
- }).fail(function () {
40
- }).always(function () {
41
- getAsyncImages(images);
42
- });
43
- };
44
-
45
- if (delayedItems.length) {
46
- getAsyncImages(delayedItems.toArray());
47
- }
48
- });
49
- };
50
-
51
- $.fn.zoomInstagramWidget = function () {
52
- return $(this).each(function () {
53
- var $list = $(this);
54
-
55
- var minItemsPerRow = $list.data('images-per-row');
56
- var desiredItemWidth = $list.data('image-width');
57
- var itemSpacing = $list.data('image-spacing');
58
- var imageLazyLoading = $list.data('image-lazy-loading');
59
-
60
- var containerWidth = $list.width();
61
-
62
- var fitPerRow;
63
- var itemWidth;
64
-
65
- if (containerWidth / desiredItemWidth < minItemsPerRow) {
66
- fitPerRow = minItemsPerRow;
67
- itemWidth = Math.floor(((containerWidth - 1 - (minItemsPerRow - 1) * itemSpacing) / minItemsPerRow));
68
- } else {
69
- fitPerRow = Math.floor((containerWidth - 1) / desiredItemWidth);
70
- itemWidth = Math.floor(((containerWidth - 1 - (fitPerRow - 1) * itemSpacing) / fitPerRow));
71
- }
72
-
73
- $list.find('li').each(function (i) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  var loop = ++i;
75
  if (loop % fitPerRow == 1) {
76
  $(this).css('clear', 'left');
77
  } else {
78
  $(this).css('clear', 'none');
79
  }
80
- if (loop % fitPerRow == 0) {
81
- $(this).css('margin-right', '0');
82
- } else {
83
- $(this).css('margin-right', itemSpacing + 'px');
84
- $(this).css('margin-bottom', itemSpacing + 'px');
85
- }
86
- });
87
-
88
- $list.find('a.zoom-instagram-link').css({
89
- width: itemWidth,
90
- height: itemWidth
91
- });
92
-
93
- if (imageLazyLoading) {
94
- $list.find('a.zoom-instagram-link').lazy();
95
- }
96
-
97
- $list.removeClass('zoom-instagram-widget__items--no-js');
98
- });
99
- };
100
-
101
- function requestTick() {
102
- if (!ticking) {
103
- ticking = true;
104
- requestAnimationFrame()(update);
105
- }
106
- }
107
-
108
- function requestAnimationFrame() {
109
- return window.requestAnimationFrame ||
110
- window.webkitRequestAnimationFrame ||
111
- window.mozRequestAnimationFrame ||
112
- function (callback) {
113
- window.setTimeout(callback, 1000 / 60);
114
- };
115
- }
116
-
117
- function update() {
118
- $('.zoom-instagram-widget__items').zoomInstagramWidget();
119
- ticking = false;
120
- }
121
-
122
- $(window).on('resize orientationchange', requestTick);
123
- requestTick();
124
-
125
- $('.zoom-instagram-widget__items').zoomLoadAsyncImages();
126
-
127
-
128
- var siteOriginInit = function () {
129
- var $widgets = $('.zoom-instagram-widget__items');
130
- if ($widgets.length) {
131
- $('.zoom-instagram-widget__items').zoomInstagramWidget();
132
- $('.zoom-instagram-widget__items').zoomLoadAsyncImages();
133
- }
134
-
135
- };
136
-
137
- var debounceInit = _.debounce(siteOriginInit, 1500);
138
- $(document).on('panels_setup_preview', debounceInit);
139
 
140
  });
1
  jQuery(function ($) {
2
+ var ticking = false;
3
+
4
+ $.fn.zoomLoadAsyncImages = function () {
5
+ return $(this).each(function () {
6
+ var $list = $(this);
7
+
8
+ var desiredItemWidth = $list.data('image-width');
9
+ var imageResolution = $list.data('image-resolution');
10
+
11
+ var delayedItems = $list.find('li').filter(function () {
12
+ return $(this).data('media-id');
13
+ }).map(function () {
14
+ return {
15
+ 'media-id': $(this).attr('data-media-id'),
16
+ 'nonce': $(this).attr('data-nonce'),
17
+ 'regenerate-thumbnails': $(this)[0].hasAttribute("data-regenerate-thumbnails")
18
+ };
19
+ });
20
+
21
+ var getAsyncImages = function (images) {
22
+
23
+ var isLastImage = images.length == 0;
24
+
25
+ if (isLastImage) {
26
+ return;
27
+ }
28
+
29
+ var image = images.shift();
30
+
31
+ wp.ajax.post('wpzoom_instagram_get_image_async', {
32
+ 'media-id': image['media-id'],
33
+ nonce: image['nonce'],
34
+ 'image-resolution': imageResolution,
35
+ 'image-width': desiredItemWidth,
36
+ 'regenerate-thumbnails': image['regenerate-thumbnails']
37
+ }).done(function (data) {
38
+ $list.find('li[data-media-id="' + image['media-id'] + '"] .zoom-instagram-link').css('background-image', 'url(' + data.image_src + ')');
39
+ }).fail(function () {
40
+ }).always(function () {
41
+ getAsyncImages(images);
42
+ });
43
+ };
44
+
45
+ if (delayedItems.length) {
46
+ getAsyncImages(delayedItems.toArray());
47
+ }
48
+ });
49
+ };
50
+
51
+ $.fn.zoomLightbox = function () {
52
+ return $(this).each(function () {
53
+ $(this).find('.zoom-instagram-link').magnificPopup({
54
+ type: 'inline',
55
+ arrows: true,
56
+ closeBtnInside: false,
57
+ mainClass: 'wpzoom-lightbox',
58
+ midClick: true,
59
+ gallery: {
60
+ enabled: true,
61
+ },
62
+ callbacks: {
63
+ change: function () {
64
+ console.log('Content changed');
65
+ $(this.content).find('.details-wrapper .view-post .wpz-insta-pagination').html((this.index+1) + "/" + this.items.length)
66
+ }
67
+ },
68
+
69
+ });
70
+ });
71
+ };
72
+
73
+ $.fn.zoomInstagramWidget = function () {
74
+ return $(this).each(function () {
75
+ var $list = $(this);
76
+
77
+ var minItemsPerRow = $list.data('images-per-row');
78
+ var desiredItemWidth = $list.data('image-width');
79
+ var itemSpacing = $list.data('image-spacing');
80
+ var imageLazyLoading = $list.data('image-lazy-loading');
81
+
82
+ var containerWidth = $list.width();
83
+
84
+ var fitPerRow;
85
+ var itemWidth;
86
+
87
+ if (containerWidth / desiredItemWidth < minItemsPerRow) {
88
+ fitPerRow = minItemsPerRow;
89
+ itemWidth = Math.floor(((containerWidth - 1 - (minItemsPerRow - 1) * itemSpacing) / minItemsPerRow));
90
+ } else {
91
+ fitPerRow = Math.floor((containerWidth - 1) / desiredItemWidth);
92
+ itemWidth = Math.floor(((containerWidth - 1 - (fitPerRow - 1) * itemSpacing) / fitPerRow));
93
+ }
94
+
95
+ $list.find('li').each(function (i) {
96
  var loop = ++i;
97
  if (loop % fitPerRow == 1) {
98
  $(this).css('clear', 'left');
99
  } else {
100
  $(this).css('clear', 'none');
101
  }
102
+ if (loop % fitPerRow == 0) {
103
+ $(this).css('margin-right', '0');
104
+ } else {
105
+ $(this).css('margin-right', itemSpacing + 'px');
106
+ $(this).css('margin-bottom', itemSpacing + 'px');
107
+ }
108
+ });
109
+
110
+ $list.find('a.zoom-instagram-link').css({
111
+ width: itemWidth,
112
+ height: itemWidth
113
+ });
114
+
115
+ if (imageLazyLoading) {
116
+ $list.find('a.zoom-instagram-link').lazy();
117
+ }
118
+
119
+ $list.removeClass('zoom-instagram-widget__items--no-js');
120
+ });
121
+ };
122
+
123
+ function requestTick() {
124
+ if (!ticking) {
125
+ ticking = true;
126
+ requestAnimationFrame()(update);
127
+ }
128
+ }
129
+
130
+ function requestAnimationFrame() {
131
+ return window.requestAnimationFrame ||
132
+ window.webkitRequestAnimationFrame ||
133
+ window.mozRequestAnimationFrame ||
134
+ function (callback) {
135
+ window.setTimeout(callback, 1000 / 60);
136
+ };
137
+ }
138
+
139
+ function update() {
140
+ $('.zoom-instagram-widget__items').zoomInstagramWidget();
141
+ ticking = false;
142
+ }
143
+
144
+ $(window).on('resize orientationchange', requestTick);
145
+ requestTick();
146
+
147
+ $('.zoom-instagram-widget__items').zoomLoadAsyncImages();
148
+ $('.zoom-instagram-widget__items[data-lightbox="1"]').zoomLightbox();
149
+
150
+ var siteOriginInit = function () {
151
+ var $widgets = $('.zoom-instagram-widget__items');
152
+ if ($widgets.length) {
153
+ $('.zoom-instagram-widget__items').zoomInstagramWidget();
154
+ $('.zoom-instagram-widget__items').zoomLoadAsyncImages();
155
+ }
156
+
157
+ };
158
+
159
+ var debounceInit = _.debounce(siteOriginInit, 1500);
160
+ $(document).on('panels_setup_preview', debounceInit);
161
 
162
  });
readme.txt CHANGED
@@ -1,19 +1,19 @@
1
  === WPZOOM Social Feed Widget ===
2
- Contributors: WPZOOM, nvartolomei, ciorici
3
  Donate link: https://www.wpzoom.com/
4
  Tags: instagram, instagram feed, instagram gallery, instagram photos, instagram widget, instagram stories, widget, timeline, social network, latest images, feed, story, stories, insta
5
  Requires at least: 4.3
6
- Tested up to: 5.7
7
  Requires PHP: 5.6
8
  Stable tag: trunk
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- Formerly known as "Instagram Widget by WPZOOM". Fully customisable and responsive widget for WordPress to display your Instagram feed.
13
 
14
  == Description ==
15
 
16
- Formerly known as *Instagram Widget by WPZOOM*, **WPZOOM Social Feed Widget** is a fully customisable and responsive widget for WordPress to display your **Instagram feed**.
17
 
18
 
19
  **[View Demo](https://demo.wpzoom.com/instagram-widget/)**
@@ -22,12 +22,16 @@ Formerly known as *Instagram Widget by WPZOOM*, **WPZOOM Social Feed Widget** is
22
  > Did you find this plugin helpful? Please consider [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/instagram-widget-by-wpzoom).
23
 
24
 
25
- **WPZOOM Social Feed Widget** gives you a WordPress Widget that you can place anywhere you want and be able to fully customize it's design using CSS.
26
 
27
 
28
- = What's New in version 1.4? =
29
 
30
- You can now display a public feed limited to 12 photos of any Instagram account you want. You are no longer limited to display just your own feed.
 
 
 
 
31
 
32
 
33
  = Where I can view a Demo? =
@@ -67,6 +71,9 @@ Make sure to connect your Instagram account with the plugin. You can do that in
67
 
68
  == Changelog ==
69
 
 
 
 
70
  = 1.8.3 =
71
  * Fixed error 400 Bad Request
72
 
1
  === WPZOOM Social Feed Widget ===
2
+ Contributors: WPZOOM, nvartolomei, ciorici, vicolaspetru
3
  Donate link: https://www.wpzoom.com/
4
  Tags: instagram, instagram feed, instagram gallery, instagram photos, instagram widget, instagram stories, widget, timeline, social network, latest images, feed, story, stories, insta
5
  Requires at least: 4.3
6
+ Tested up to: 5.8
7
  Requires PHP: 5.6
8
  Stable tag: trunk
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ Formerly known as "Instagram Widget by WPZOOM". Simple and lightweight widget for WordPress to display your Instagram feed.
13
 
14
  == Description ==
15
 
16
+ Formerly known as *Instagram Widget by WPZOOM*, **WPZOOM Social Feed Widget** is a simple and lightweight widget for WordPress to display your **Instagram feed**.
17
 
18
 
19
  **[View Demo](https://demo.wpzoom.com/instagram-widget/)**
22
  > Did you find this plugin helpful? Please consider [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/instagram-widget-by-wpzoom).
23
 
24
 
25
+ **WPZOOM Social Feed Widget** gives you a WordPress Widget that you can place anywhere you want to display your Instagram Feed. Easy setup and configuration!
26
 
27
 
28
+ = Features =
29
 
30
+ * **Lightbox** 🆕
31
+ * Add your custom avatar and bio
32
+ * Supports Lazy Loading
33
+ * Lighweight plugin
34
+ * Works with the new WordPress 5.8 block-based widgets screen
35
 
36
 
37
  = Where I can view a Demo? =
71
 
72
  == Changelog ==
73
 
74
+ = 1.9.0 =
75
+ * Added a new Lightbox Feature
76
+
77
  = 1.8.3 =
78
  * Fixed error 400 Bad Request
79