Instagram Gallery - Version 3.1.5

Version Description

  • New. instagram gutenberg block
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 Instagram Gallery
Version 3.1.5
Comparing to
See all releases

Code changes from version 3.1.4 to 3.1.5

assets/backend/js/gutenberg.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('jquery', 'lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'cf97e452ac58a043a790c540b9bcf2dc');
1
+ <?php return array('dependencies' => array('jquery', 'lodash', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'e1399b42c7801716679bbbe787cb2d81');
assets/backend/js/gutenberg.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)&&n.length){var o=l.apply(null,n);o&&e.push(o)}else if("object"===r)for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){function a(t,n){return e.exports=a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(t,n)}e.exports=a},function(e,t){function a(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=a=function(e){return typeof e}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(t)}e.exports=a},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var a=[],n=!0,l=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done)&&(a.push(o.value),!t||a.length!==t);n=!0);}catch(e){l=!0,r=e}finally{try{n||null==i.return||i.return()}finally{if(l)throw r}}return a}}},function(e,t,a){var n=a(22);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,a){"use strict";a.r(t);a(25);var n=a(9),l=a.n(n),r=a(10),o=a.n(r),i=a(7),c=a.n(i),s=a(11),u=a.n(s),g=a(12),p=a.n(g),b=a(8),d=a.n(b),m=a(1),f=a(6),y=a(4),_=a.n(y),h=a(13),O=a.n(h),j=a(0),v=a(2),C=a(3),x=a.n(C),k=a(14),E=a.n(k),w=a(15),P=a.n(w),I=a(5);function q(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function T(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?q(Object(a),!0).forEach((function(t){x()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):q(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var B=function(e){var t=e.attributes,a=e.setAttributes,n=Object(m.useState)({name:!0,biography:!0,picture:!0}),l=E()(n,2),r=l[0],o=l[1],i=qligg_gutenberg.image_url,c=qligg_gutenberg.accounts;return Object(m.createElement)(I.InspectorControls,{key:"inspector"},Object(m.createElement)(v.PanelBody,{initialOpen:!0,title:Object(j.__)("General","insta-gallery")},Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Account","insta-gallery"),help:Object(j.__)("Please select Instagram account","insta-gallery"),value:t.username,onChange:function(e){return a({username:e})},options:Object(f.map)(c,(function(e,t){return{value:e.id,label:Object(j.__)(e.name,"insta-gallery")}}))}),Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Feed","insta-gallery"),value:t.type,onChange:function(e){return a({type:e})},options:[{value:"tag",label:Object(j.__)("Tag","insta-gallery")},{value:"username",label:Object(j.__)("Username","insta-gallery")}]}),"tag"==t.type&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.TextControl,{label:Object(j.__)("Tag","insta-gallery"),help:Object(j.__)("Please enter Instagram tag","insta-gallery"),value:t.tag,onChange:function(e){return a({tag:e})}}),Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Order by","insta-gallery"),help:Object(j.__)("Please enter Instagram tag order","insta-gallery"),value:t.order_by,onChange:function(e){return a({order_by:e})},options:[{value:"recend_media",label:Object(j.__)("Recent (Within 24 hours)","insta-gallery")},{value:"top_media",label:Object(j.__)("Top (Most popular first)","insta-gallery")}]})),Object(m.createElement)(m.Fragment,null,Object(m.createElement)("ul",{className:"qligg-list-videos"},Object(f.map)(["carousel","gallery","masonry","highlight"],(function(e,n){return Object(m.createElement)("li",{className:P()("qligg-modal-image",t.layout==e&&"active","carousel"!==e&&"gallery"!==e&&"qligg-premium-field"),onClick:function(){return a({layout:e})}},Object(m.createElement)("span",null,e.replace("-"," ")),Object(m.createElement)("img",{src:"".concat(i,"/").concat(e,".png")}))})))),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Limit","insta-gallery"),help:Object(j.__)("Number of videos to display","insta-gallery"),value:t.limit,onChange:function(e){a({limit:e})},min:1,max:33}),"carousel"!=t.layout&&Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Columns","insta-gallery"),help:Object(j.__)("Number of videos in a row","insta-gallery"),value:t.columns,onChange:function(e){return a({columns:e})},min:1,max:20}),"highlight"==t.layout&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.TextControl,{label:Object(j.__)(" highlight by tag","insta-gallery"),help:Object(j.__)("highlightfeeds items with this tags","insta-gallery"),value:t.highlight.tag,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"tag",e))})}}),Object(m.createElement)(v.TextControl,{label:Object(j.__)(" highlight by id","insta-gallery"),help:Object(j.__)(" highlight by id","insta-gallery"),value:t.highlight.id,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"id",e))})}}),Object(m.createElement)(v.TextControl,{label:Object(j.__)(" highlight by position","insta-gallery"),help:Object(j.__)("highlightfeeds items in this positions","insta-gallery"),value:t.highlight.position,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"position",e))})}}))),"carousel"==t.layout&&Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Carousel","insta-gallery")},Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Slides per view","insta-gallery"),help:Object(j.__)("Number of images per slide","insta-gallery"),value:t.carousel.slidespv,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"slidespv",e))})},min:1,max:100}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Autoplay","insta-gallery"),help:Object(j.__)("Autoplay carousel items","insta-gallery"),checked:!!t.carousel.autoplay,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"autoplay",e))})}}),t.carousel.autoplay&&Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Autoplay Interval","insta-gallery"),help:Object(j.__)("Moves to next picture after specified time interval","insta-gallery"),value:t.carousel.autoplay_interval,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"autoplay_interval",e))})},min:1,max:1e4}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Navigation","insta-gallery"),help:Object(j.__)("Display navigation arrows","insta-gallery"),checked:!!t.carousel.navarrows,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"navarrows",e))})}}),t.carousel.navarrows&&Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Navigation color","insta-gallery"),help:Object(j.__)("Change navigation arrows color","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.carousel.navarrows_color,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"navarrows_color",e))})}})),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Pagination","insta-gallery"),help:Object(j.__)("Display pagination dots","insta-gallery"),checked:!!t.carousel.pagination,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"pagination",e))})}}),t.carousel.pagination&&Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Pagination color","insta-gallery"),help:Object(j.__)("Change pagination dots color","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.carousel.pagination_color,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"pagination_color",e))})}}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Profile","insta-gallery")},Object(m.createElement)(v.TextControl,{label:Object(j.__)("Full name","insta-gallery"),help:Object(j.__)("Feed profile full name","insta-gallery"),value:!t.profile.name&&r.name&&c[t.username].name||t.profile.name,onChange:function(e){o(T(T({},r),{},x()({},"name",!1))),a({profile:T(T({},t.profile),{},x()({},"name",e))})}}),Object(m.createElement)(v.TextareaControl,{label:Object(j.__)("Biography","insta-gallery"),help:Object(j.__)("Feed profile biography","insta-gallery"),value:!t.profile.biography&&r.biography&&c[t.username].biography||t.profile.biography,onChange:function(e){o(T(T({},r),{},x()({},"biography",!1))),a({profile:T(T({},t.profile),{},x()({},"biography",e))})}}),Object(m.createElement)(m.Fragment,null,Object(m.createElement)("img",{style:{objectFit:"cover",width:"230px",height:"230px"},src:!t.profile.profile_picture_url&&r.picture&&c[t.username].profile_picture_url||t.profile.profile_picture_url}),Object(m.createElement)(I.MediaUpload,{onSelect:function(e){o(T(T({},r),{},x()({},"picture",!1))),a({profile:T(T({},t.profile),{},x()({},"profile_picture_url",e.url))})},allowedTypes:["image"],value:t.profile.profile_picture_url,render:function(e){var t=e.open;return Object(m.createElement)(v.Button,{onClick:t},Object(j.__)("Upload","insta-gallery"))}}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Box","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Box","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display the Instagram Feed inside a customizable box","insta-gallery"),checked:!!t.box.display,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"display",e))})}}),t.box.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Box padding","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Add padding to the Instagram Feed","insta-gallery"),value:t.box.padding,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"padding",e))})},min:1,max:100}),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Border Radius","insta-gallery"),help:Object(j.__)("Add radius to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.box.radius,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"radius",e))})},min:0,max:100}),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Box background","insta-gallery"),help:Object(j.__)("Color which is displayed on box background","insta-gallery"),className:"qligg-premium-field"},Object(m.createElement)(I.ColorPalette,{value:t.box.background,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"background",e))})}})),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Box text color","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color which is displayed on box text","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.box.color_text,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"color_text",e))})}})),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Profile","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display user profile or tag info","insta-gallery"),checked:!!t.box.profile,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"profile",e))})}}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image","insta-gallery")},Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Account","insta-gallery"),value:t.resolution,onChange:function(e){return a({resolution:e})},options:[{value:"madium",label:Object(j.__)("Medium (320 x auto)","insta-gallery")},{value:"small",label:Object(j.__)("Small (150 x 150)","insta-gallery")}]}),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Images spacing","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),value:t.spacing,onChange:function(e){return a({spacing:e})},min:0,max:100}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images lazy load","insta-gallery"),help:Object(j.__)("Defers feed images loading","insta-gallery"),checked:!!t.lazy,onChange:function(e){return a({lazy:e})}})),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image card","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images card","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display card gallery by clicking on image","insta-gallery"),checked:!!t.card.display,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"display",e))})}}),t.card.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Card radius","insta-gallery"),help:Object(j.__)("Add radius to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.card.radius,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"radius",e))})},min:0,max:100}),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Card font size","insta-gallery"),help:Object(j.__)("Add font-size to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.card.font_size,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"font_size",e))})},min:0,max:100}),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Card background","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color which is displayed when over images","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.card.background,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"background",e))})}})),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Card text color","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color Text","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.card.text_color,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"text_color",e))})}})),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Card padding","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),className:"qligg-premium-field",value:t.card.padding,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"padding",e))})},min:0,max:100}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Card info","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display likes count of images","insta-gallery"),checked:!!t.card.info,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"info",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Card caption","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display caption count of images","insta-gallery"),checked:!!t.card.caption,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"caption",e))})}}),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Card length","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),className:"qligg-premium-field",value:t.card.length,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"length",e))})},min:0,max:100}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image mask","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask","insta-gallery"),help:Object(j.__)("Image mouseover effect","insta-gallery"),checked:!!t.mask.display,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"display",e))})}}),t.mask.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Images mask color","insta-gallery"),help:Object(j.__)("Image mask background color","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.mask.background,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"background",e))})}})),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask likes","insta-gallery"),help:Object(j.__)("Display likes count of images","insta-gallery"),checked:!!t.mask.likes,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"likes",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask comments","insta-gallery"),help:Object(j.__)("Display comments count of images","insta-gallery"),checked:!!t.mask.comments,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"comments",e))})}}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image popup","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup","insta-gallery"),help:Object(j.__)("Display popup gallery by clicking on image","insta-gallery"),checked:!!t.popup.display,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"display",e))})}}),t.popup.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup profile","insta-gallery"),help:Object(j.__)("Display user profile or tag info","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.profile,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"profile",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup caption","insta-gallery"),help:Object(j.__)("Display caption in the popup","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.caption,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"caption",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup likes","insta-gallery"),help:Object(j.__)("Display likes count of images","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.likes,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"likes",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup comments","insta-gallery"),help:Object(j.__)("Display comments count of images","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.comments,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"comments",e))})}}),Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Images popup align","insta-gallery"),help:Object(j.__)("Align item description in popup","insta-gallery"),className:"qligg-premium-field",value:t.popup.align,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"align",e))})},options:[{value:"left",label:Object(j.__)("Left","insta-gallery")},{value:"right",label:Object(j.__)("Right","insta-gallery")},{value:"bottom",label:Object(j.__)("Bottom","insta-gallery")},{value:"top",label:Object(j.__)("Top","insta-gallery")}]}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Botton","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Instagram button","insta-gallery"),help:Object(j.__)("Display the button to open Instagram site link","insta-gallery"),checked:!!t.button.display,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"display",e))})}}),t.button.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.TextControl,{label:Object(j.__)("Instagram button text","insta-gallery"),help:Object(j.__)("Instagram button text here","insta-gallery"),value:t.button.text,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"text",e))})}}),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button background","insta-gallery"),help:Object(j.__)("Color which is displayed on button background","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.button.background,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"background",e))})}})),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button hover background","insta-gallery"),help:Object(j.__)("Color which is displayed when hovered over button","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.button.background_hover,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"background_hover",e))})}})))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Botton load more","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Instagram button","insta-gallery"),help:Object(j.__)("Display the button to open Instagram site link","insta-gallery"),className:"qligg-premium-field",checked:!!t.button_load.display,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"display",e))})}}),t.button_load.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.TextControl,{label:Object(j.__)("Instagram button text","insta-gallery"),help:Object(j.__)("Instagram button text here","insta-gallery"),className:"qligg-premium-field",value:t.button_load.text,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"text",e))})}}),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button background","insta-gallery"),help:Object(j.__)("Color which is displayed on button background","insta-gallery"),className:"qligg-premium-field"},Object(m.createElement)(I.ColorPalette,{value:t.button_load.background,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"background",e))})}})),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button hover background","insta-gallery"),help:Object(j.__)("Color which is displayed when hovered over button","insta-gallery"),className:"qligg-premium-field"},Object(m.createElement)(I.ColorPalette,{value:t.button_load.background_hover,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"background_hover",e))})}})))))},S=(a(27),0),N={};function D(e,t){var a=_()(".insta-gallery-list",e),n=_()(".insta-gallery-spinner",e),l=e.data("feed");_.a.ajax({url:qligg.ajax_url,type:"post",timeout:3e4,data:{action:"qligg_load_item_images",next_max_id:t,feed:JSON.stringify(l)},beforeSend:function(){n.show()},success:function(e){if(!0!==e.success)return a.append(_()(e.data)),void n.hide();var t=_()(e.data);a.append(t).trigger("qligg.loaded",[t])},complete:function(){},error:function(e,t){n.hide()}})}function A(){_()(".insta-gallery-feed").on("qligg.loaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".insta-gallery-list",a),l=_()(".insta-gallery-spinner",a),r=_()(".insta-gallery-button.load",a),o=a.data("feed"),i=_()(t).length,c=0;i&&n.find(".insta-gallery-image").on("load loadstart",(function(e){++c>=i&&n.trigger("qligg.imagesLoaded",[t])})),i<o.limit&&(l.hide(),setTimeout((function(){r.fadeOut()}),300))})),_()(".insta-gallery-feed").on("qligg.imagesLoaded",(function(e){var t=_()(e.delegateTarget);_()(".insta-gallery-spinner",t).hide()})),_()(".insta-gallery-feed[data-feed_layout=gallery]").on("qligg.imagesLoaded",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){setTimeout((function(){_()(t).addClass("ig-image-loaded")}),150+30*e)}))})),_()(".insta-gallery-feed[data-feed_layout=carousel]").on("qligg.imagesLoaded",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){_()(t).addClass("ig-image-loaded")}))})),_()(".insta-gallery-feed[data-feed_layout=carousel]").on("qligg.imagesLoaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".swiper-container",a),l=a.data("feed");l.carousel.slides=l.carousel.slidespv,S++,N[S]=new Swiper(n,{loop:!0,autoHeight:!0,observer:!0,observeParents:!0,slidesPerView:1,spaceBetween:2,autoplay:!!l.carousel.autoplay&&{delay:parseInt(l.carousel.autoplay_interval)},pagination:{el:".swiper-pagination",dynamicBullets:!0,clickable:!0,type:"bullets"},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},breakpoints:{320:{slidesPerView:1,spaceBetween:1},480:{spaceBetween:parseInt(l.spacing),slidesPerView:Math.min(2,parseInt(l.carousel.slides))},768:{spaceBetween:parseInt(l.spacing),slidesPerView:Math.min(3,parseInt(l.carousel.slides))},1024:{spaceBetween:parseInt(l.spacing),slidesPerView:parseInt(l.carousel.slides)}}})})),_()(".insta-gallery-feed[data-feed_layout=masonry]").on("qligg.imagesLoaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".insta-gallery-list",a);n.data("masonry")?n.masonry("appended",t,!1):n.masonry({itemSelector:".insta-gallery-item",isResizable:!0,isAnimated:!1,transitionDuration:0,percentPosition:!0,columnWidth:".insta-gallery-item:last-child"})})),_()(".insta-gallery-feed[data-feed_layout=masonry]").on("layoutComplete",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){_()(t.element).addClass("ig-image-loaded")}))})),_()(".insta-gallery-feed").on("qligg.loaded",(function(e){var t=_()(e.delegateTarget),a=_()(".insta-gallery-list",t),n=t.data("feed");_()(".insta-gallery-item .insta-gallery-icon.qligg-icon-instagram",a).on("click",(function(e){e.stopPropagation()})),n.popup.display&&_()(".insta-gallery-item",a).magnificPopup({type:"inline",callbacks:{beforeOpen:function(){this.st.mainClass=this.st.mainClass+" qligg-mfp-wrap"},elementParse:function(e){var t,l="",r="",o="",i="",c="",s="",u="";l=e.el.data("item").type&&"video"==e.el.data("item").type?'\n <video autoplay>\n <source src="'+e.el.data("item").videos.standard+'" type="video/mp4">\n </video>':'<img src="'+e.el.data("item").images.standard+'"/>',t='<div class="mfp-icons"><div class="mfp-counter">'+(e.index+1)+" / "+_()(".insta-gallery-item",a).length+'</div><a class="mfp-link" href="'+e.el.data("item").link+'" target="_blank" rel="noopener"><i class="qligg-icon-instagram"></i>Instagram</a></div>',n.popup.profile&&(r='<div class="mfp-user"><img src="'+n.profile.profile_picture_url+'"><a href="https://www.instagram.com/'+n.profile.username+'" title="'+n.profile.name+'" target="_blank" rel="noopener">'+n.profile.username+"</a></div>"),n.popup.caption&&(o='<div class="mfp-caption">'+e.el.data("item").caption+"</div>"),e.el.data("item").date&&(s='<div class="mfp-date">'+e.el.data("item").date+"</div>"),e.el.data("item").comments&&n.popup.comments&&(u='<div class="mfp-comments"><i class="qligg-icon-comment"></i>'+e.el.data("item").comments+"</div>"),e.el.data("item").likes&&n.popup.likes&&(c='<div class="mfp-likes"><i class="qligg-icon-heart"></i>'+e.el.data("item").likes+"</div>"),(n.popup.likes||n.popup.comments)&&(i='<div class="mfp-info">'+c+u+s+"</div>"),e.src='<div class="mfp-figure '+n.popup.align+'">'+l+'<div class="mfp-close"></div><div class="mfp-bottom-bar"><div class="mfp-title">'+r+t+o+i+"</div></div></div>"}},gallery:{enabled:!0}})})),_()(".insta-gallery-feed").on("click",".insta-gallery-button.load",(function(e){e.preventDefault();var t=_()(e.delegateTarget);if(!t.hasClass("loaded"))return!1;D(t,_()(".insta-gallery-list .insta-gallery-item:last-child",t).data("item").i)})),_()(".insta-gallery-feed").each((function(e,t){var a=_()(t);if(a.hasClass("loaded"))return!1;D(a,0)}))}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=d()(e);if(t){var l=d()(this).constructor;a=Reflect.construct(n,arguments,l)}else a=n.apply(this,arguments);return p()(this,a)}}A(),-1!=navigator.appVersion.indexOf("MSIE 8.")&&(document.body.className+=" instagal-ie-8"),-1!=navigator.appVersion.indexOf("MSIE 9.")&&(document.body.className+=" instagal-ie-9");var R=function(e){u()(a,e);var t=F(a);function a(e){var n;return l()(this,a),(n=t.call(this,e)).method=Object(f.debounce)(n.method.bind(c()(n)),1e3),n}return o()(a,[{key:"method",value:function(){this.initLayout()}},{key:"initLayout",value:function(){var e=!1,t=setInterval((function(){_()(".tiktok-feed-feed")&&(A(),e=!0),e&&clearInterval(t)}),3e3)}},{key:"componentDidMount",value:function(){this.initLayout()}},{key:"debounceOnChange",value:function(e){var t=this,a=Object(f.debounce)((function(e){t.initLayout()}),350);a(e)}},{key:"componentDidUpdate",value:function(){this.method()}},{key:"render",value:function(){var e=this.props,t=e.attributes,a=e.setAttributes,n=qligg_gutenberg.accounts;return n&&0!=n.length?n[t.username]?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(B,this.props),Object(m.createElement)("div",{className:"tiktok-site-render"}),Object(m.createElement)(O.a,{onChange:function(e){return console.log(e)},block:"qligg/box",attributes:t})):Object(m.createElement)("div",null,Object(m.createElement)(v.Placeholder,{label:Object(j.__)("Please select account","insta-gallery"),instructions:Object(m.createElement)(v.RadioControl,{value:t.username,onChange:function(e){return a({username:e})},options:Object(f.map)(n,(function(e,t){return{value:e.id,label:Object(j.__)(e.name,"insta-gallery")}}))})})):Object(m.createElement)("div",null,Object(m.createElement)(v.Placeholder,{label:Object(j.__)("Please create access token","insta-gallery"),instructions:Object(m.createElement)(m.Fragment,null,Object(j.__)("Before start creating feeds, you have to create an access token. Please go to","insta-gallery")," ",Object(m.createElement)("a",{href:qligg_gutenberg.create_account,target:"_blank"},Object(j.__)("the account tab","insta-gallery")),Object(j.__)(" to connect your Instagram account and then reload this page.","insta-gallery"))}))}}]),a}(m.Component),M=a(16);Object(M.registerBlockType)("qligg/box",{title:Object(j.__)("Social Feed Gallery","insta-gallery"),description:Object(j.__)("Display beautiful and responsive galleries on your website from your Instagram feed account.","insta-gallery"),icon:"awards",category:"insta-gallery",keywords:[Object(j.__)("qligg","insta-gallery"),Object(j.__)("instagram","insta-gallery"),Object(j.__)("quadlayers","insta-gallery")],attributes:qligg_gutenberg.attributes,edit:R})},function(e,t){},,function(e,t){}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)&&n.length){var o=l.apply(null,n);o&&e.push(o)}else if("object"===r)for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){function a(t,n){return e.exports=a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(t,n)}e.exports=a},function(e,t){function a(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=a=function(e){return typeof e}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(t)}e.exports=a},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var a=[],n=!0,l=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done)&&(a.push(o.value),!t||a.length!==t);n=!0);}catch(e){l=!0,r=e}finally{try{n||null==i.return||i.return()}finally{if(l)throw r}}return a}}},function(e,t,a){var n=a(22);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,a){"use strict";a.r(t);a(25);var n=a(9),l=a.n(n),r=a(10),o=a.n(r),i=a(7),c=a.n(i),s=a(11),u=a.n(s),g=a(12),p=a.n(g),b=a(8),m=a.n(b),d=a(1),f=a(6),y=a(4),_=a.n(y),h=a(13),O=a.n(h),j=a(0),v=a(2),C=a(3),x=a.n(C),k=a(14),E=a.n(k),w=a(15),P=a.n(w),I=a(5);function q(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function T(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?q(Object(a),!0).forEach((function(t){x()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):q(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var B=function(e){var t=e.attributes,a=e.setAttributes,n=Object(d.useState)({name:!0,biography:!0,picture:!0}),l=E()(n,2),r=l[0],o=l[1],i=qligg_gutenberg.image_url,c=qligg_gutenberg.accounts;return Object(d.createElement)(I.InspectorControls,{key:"inspector"},Object(d.createElement)(v.PanelBody,{initialOpen:!0,title:Object(j.__)("General","insta-gallery")},Object(d.createElement)(v.SelectControl,{label:Object(j.__)("Account","insta-gallery"),help:Object(j.__)("Please select Instagram account","insta-gallery"),value:t.username,onChange:function(e){return a({username:e})},options:Object(f.map)(c,(function(e,t){return{value:e.id,label:Object(j.__)(e.name,"insta-gallery")}}))}),Object(d.createElement)(v.SelectControl,{label:Object(j.__)("Feed","insta-gallery"),value:t.type,onChange:function(e){return a({type:e})},options:[{value:"tag",label:Object(j.__)("Tag","insta-gallery")},{value:"username",label:Object(j.__)("Username","insta-gallery")}]}),"tag"==t.type&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(v.TextControl,{label:Object(j.__)("Tag","insta-gallery"),help:Object(j.__)("Please enter Instagram tag","insta-gallery"),value:t.tag,onChange:function(e){return a({tag:e})}}),Object(d.createElement)(v.SelectControl,{label:Object(j.__)("Order by","insta-gallery"),help:Object(j.__)("Please enter Instagram tag order","insta-gallery"),value:t.order_by,onChange:function(e){return a({order_by:e})},options:[{value:"recend_media",label:Object(j.__)("Recent (Within 24 hours)","insta-gallery")},{value:"top_media",label:Object(j.__)("Top (Most popular first)","insta-gallery")}]})),Object(d.createElement)(d.Fragment,null,Object(d.createElement)("ul",{className:"qligg-list-videos"},Object(f.map)(["carousel","gallery","masonry","highlight"],(function(e,n){return Object(d.createElement)("li",{className:P()("qligg-modal-image",t.layout==e&&"active","carousel"!==e&&"gallery"!==e&&"qligg-premium-field"),onClick:function(){return a({layout:e})}},Object(d.createElement)("span",null,e.replace("-"," ")),Object(d.createElement)("img",{src:"".concat(i,"/").concat(e,".png")}))})))),Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Limit","insta-gallery"),help:Object(j.__)("Number of videos to display","insta-gallery"),value:t.limit,onChange:function(e){a({limit:e})},min:1,max:33}),"carousel"!=t.layout&&Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Columns","insta-gallery"),help:Object(j.__)("Number of videos in a row","insta-gallery"),value:t.columns,onChange:function(e){return a({columns:e})},min:1,max:20}),"highlight"==t.layout&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(v.TextControl,{label:Object(j.__)(" highlight by tag","insta-gallery"),help:Object(j.__)("highlightfeeds items with this tags","insta-gallery"),value:t.highlight.tag,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"tag",e))})}}),Object(d.createElement)(v.TextControl,{label:Object(j.__)(" highlight by id","insta-gallery"),help:Object(j.__)(" highlight by id","insta-gallery"),value:t.highlight.id,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"id",e))})}}),Object(d.createElement)(v.TextControl,{label:Object(j.__)(" highlight by position","insta-gallery"),help:Object(j.__)("highlightfeeds items in this positions","insta-gallery"),value:t.highlight.position,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"position",e))})}}))),"carousel"==t.layout&&Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Carousel","insta-gallery")},Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Slides per view","insta-gallery"),help:Object(j.__)("Number of images per slide","insta-gallery"),value:t.carousel.slidespv,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"slidespv",e))})},min:1,max:100}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Autoplay","insta-gallery"),help:Object(j.__)("Autoplay carousel items","insta-gallery"),checked:!!t.carousel.autoplay,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"autoplay",e))})}}),t.carousel.autoplay&&Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Autoplay Interval","insta-gallery"),help:Object(j.__)("Moves to next picture after specified time interval","insta-gallery"),value:t.carousel.autoplay_interval,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"autoplay_interval",e))})},min:1,max:1e4}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Navigation","insta-gallery"),help:Object(j.__)("Display navigation arrows","insta-gallery"),checked:!!t.carousel.navarrows,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"navarrows",e))})}}),t.carousel.navarrows&&Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Navigation color","insta-gallery"),help:Object(j.__)("Change navigation arrows color","insta-gallery")},Object(d.createElement)(I.ColorPalette,{value:t.carousel.navarrows_color,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"navarrows_color",e))})}})),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Pagination","insta-gallery"),help:Object(j.__)("Display pagination dots","insta-gallery"),checked:!!t.carousel.pagination,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"pagination",e))})}}),t.carousel.pagination&&Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Pagination color","insta-gallery"),help:Object(j.__)("Change pagination dots color","insta-gallery")},Object(d.createElement)(I.ColorPalette,{value:t.carousel.pagination_color,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"pagination_color",e))})}}))),Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Profile","insta-gallery")},Object(d.createElement)(v.TextControl,{label:Object(j.__)("Full name","insta-gallery"),help:Object(j.__)("Feed profile full name","insta-gallery"),value:!t.profile.name&&r.name&&c[t.username].name||t.profile.name,onChange:function(e){o(T(T({},r),{},x()({},"name",!1))),a({profile:T(T({},t.profile),{},x()({},"name",e))})}}),Object(d.createElement)(v.TextareaControl,{label:Object(j.__)("Biography","insta-gallery"),help:Object(j.__)("Feed profile biography","insta-gallery"),value:!t.profile.biography&&r.biography&&c[t.username].biography||t.profile.biography,onChange:function(e){o(T(T({},r),{},x()({},"biography",!1))),a({profile:T(T({},t.profile),{},x()({},"biography",e))})}}),Object(d.createElement)(d.Fragment,null,Object(d.createElement)("img",{style:{objectFit:"cover",width:"230px",height:"230px"},src:!t.profile.profile_picture_url&&r.picture&&c[t.username].profile_picture_url||t.profile.profile_picture_url}),Object(d.createElement)(I.MediaUpload,{onSelect:function(e){o(T(T({},r),{},x()({},"picture",!1))),a({profile:T(T({},t.profile),{},x()({},"profile_picture_url",e.url))})},allowedTypes:["image"],value:t.profile.profile_picture_url,render:function(e){var t=e.open;return Object(d.createElement)(v.Button,{onClick:t},Object(j.__)("Upload","insta-gallery"))}}))),Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Box","insta-gallery")},Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Box","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display the Instagram Feed inside a customizable box","insta-gallery"),checked:!!t.box.display,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"display",e))})}}),t.box.display&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Box padding","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Add padding to the Instagram Feed","insta-gallery"),value:t.box.padding,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"padding",e))})},min:1,max:100}),Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Border Radius","insta-gallery"),help:Object(j.__)("Add radius to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.box.radius,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"radius",e))})},min:0,max:100}),Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Box background","insta-gallery"),help:Object(j.__)("Color which is displayed on box background","insta-gallery"),className:"qligg-premium-field"},Object(d.createElement)(I.ColorPalette,{value:t.box.background,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"background",e))})}})),Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Box text color","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color which is displayed on box text","insta-gallery")},Object(d.createElement)(I.ColorPalette,{value:t.box.color_text,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"color_text",e))})}})),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Profile","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display user profile or tag info","insta-gallery"),checked:!!t.box.profile,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"profile",e))})}}))),Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image","insta-gallery")},Object(d.createElement)(v.SelectControl,{label:Object(j.__)("Account","insta-gallery"),value:t.resolution,onChange:function(e){return a({resolution:e})},options:[{value:"madium",label:Object(j.__)("Medium (320 x auto)","insta-gallery")},{value:"small",label:Object(j.__)("Small (150 x 150)","insta-gallery")}]}),Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Images spacing","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),value:t.spacing,onChange:function(e){return a({spacing:e})},min:0,max:100}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images lazy load","insta-gallery"),help:Object(j.__)("Defers feed images loading","insta-gallery"),checked:!!t.lazy,onChange:function(e){return a({lazy:e})}})),Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image card","insta-gallery")},Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images card","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display card gallery by clicking on image","insta-gallery"),checked:!!t.card.display,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"display",e))})}}),t.card.display&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Card radius","insta-gallery"),help:Object(j.__)("Add radius to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.card.radius,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"radius",e))})},min:0,max:100}),Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Card font size","insta-gallery"),help:Object(j.__)("Add font-size to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.card.font_size,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"font_size",e))})},min:0,max:100}),Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Card background","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color which is displayed when over images","insta-gallery")},Object(d.createElement)(I.ColorPalette,{value:t.card.background,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"background",e))})}})),Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Card text color","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color Text","insta-gallery")},Object(d.createElement)(I.ColorPalette,{value:t.card.text_color,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"text_color",e))})}})),Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Card padding","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),className:"qligg-premium-field",value:t.card.padding,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"padding",e))})},min:0,max:100}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Card info","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display likes count of images","insta-gallery"),checked:!!t.card.info,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"info",e))})}}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Card caption","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display caption count of images","insta-gallery"),checked:!!t.card.caption,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"caption",e))})}}),Object(d.createElement)(v.RangeControl,{label:Object(j.__)("Card length","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),className:"qligg-premium-field",value:t.card.length,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"length",e))})},min:0,max:100}))),Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image mask","insta-gallery")},Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask","insta-gallery"),help:Object(j.__)("Image mouseover effect","insta-gallery"),checked:!!t.mask.display,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"display",e))})}}),t.mask.display&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Images mask color","insta-gallery"),help:Object(j.__)("Image mask background color","insta-gallery")},Object(d.createElement)(I.ColorPalette,{value:t.mask.background,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"background",e))})}})),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask likes","insta-gallery"),help:Object(j.__)("Display likes count of images","insta-gallery"),checked:!!t.mask.likes,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"likes",e))})}}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask comments","insta-gallery"),help:Object(j.__)("Display comments count of images","insta-gallery"),checked:!!t.mask.comments,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"comments",e))})}}))),Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image popup","insta-gallery")},Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup","insta-gallery"),help:Object(j.__)("Display popup gallery by clicking on image","insta-gallery"),checked:!!t.popup.display,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"display",e))})}}),t.popup.display&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup profile","insta-gallery"),help:Object(j.__)("Display user profile or tag info","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.profile,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"profile",e))})}}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup caption","insta-gallery"),help:Object(j.__)("Display caption in the popup","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.caption,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"caption",e))})}}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup likes","insta-gallery"),help:Object(j.__)("Display likes count of images","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.likes,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"likes",e))})}}),Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup comments","insta-gallery"),help:Object(j.__)("Display comments count of images","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.comments,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"comments",e))})}}),Object(d.createElement)(v.SelectControl,{label:Object(j.__)("Images popup align","insta-gallery"),help:Object(j.__)("Align item description in popup","insta-gallery"),className:"qligg-premium-field",value:t.popup.align,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"align",e))})},options:[{value:"left",label:Object(j.__)("Left","insta-gallery")},{value:"right",label:Object(j.__)("Right","insta-gallery")},{value:"bottom",label:Object(j.__)("Bottom","insta-gallery")},{value:"top",label:Object(j.__)("Top","insta-gallery")}]}))),Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Botton","insta-gallery")},Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Instagram button","insta-gallery"),help:Object(j.__)("Display the button to open Instagram site link","insta-gallery"),checked:!!t.button.display,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"display",e))})}}),t.button.display&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(v.TextControl,{label:Object(j.__)("Instagram button text","insta-gallery"),help:Object(j.__)("Instagram button text here","insta-gallery"),value:t.button.text,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"text",e))})}}),Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button background","insta-gallery"),help:Object(j.__)("Color which is displayed on button background","insta-gallery")},Object(d.createElement)(I.ColorPalette,{value:t.button.background,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"background",e))})}})),Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button hover background","insta-gallery"),help:Object(j.__)("Color which is displayed when hovered over button","insta-gallery")},Object(d.createElement)(I.ColorPalette,{value:t.button.background_hover,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"background_hover",e))})}})))),Object(d.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Botton load more","insta-gallery")},Object(d.createElement)(v.ToggleControl,{label:Object(j.__)("Instagram button","insta-gallery"),help:Object(j.__)("Display the button to open Instagram site link","insta-gallery"),className:"qligg-premium-field",checked:!!t.button_load.display,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"display",e))})}}),t.button_load.display&&Object(d.createElement)(d.Fragment,null,Object(d.createElement)(v.TextControl,{label:Object(j.__)("Instagram button text","insta-gallery"),help:Object(j.__)("Instagram button text here","insta-gallery"),className:"qligg-premium-field",value:t.button_load.text,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"text",e))})}}),Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button background","insta-gallery"),help:Object(j.__)("Color which is displayed on button background","insta-gallery"),className:"qligg-premium-field"},Object(d.createElement)(I.ColorPalette,{value:t.button_load.background,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"background",e))})}})),Object(d.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button hover background","insta-gallery"),help:Object(j.__)("Color which is displayed when hovered over button","insta-gallery"),className:"qligg-premium-field"},Object(d.createElement)(I.ColorPalette,{value:t.button_load.background_hover,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"background_hover",e))})}})))))},S=(a(27),0),N={};function D(e,t){var a=_()(".insta-gallery-list",e),n=_()(".insta-gallery-spinner",e),l=e.data("feed");_.a.ajax({url:qligg.ajax_url,type:"post",timeout:3e4,data:{action:"qligg_load_item_images",next_max_id:t,feed:JSON.stringify(l)},beforeSend:function(){n.show()},success:function(e){if(!0!==e.success)return a.append(_()(e.data)),void n.hide();var t=_()(e.data);a.append(t).trigger("qligg.loaded",[t])},complete:function(){},error:function(e,t){n.hide()}})}function A(){_()(".insta-gallery-feed").on("qligg.loaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".insta-gallery-list",a),l=_()(".insta-gallery-spinner",a),r=_()(".insta-gallery-button.load",a),o=a.data("feed"),i=_()(t).length,c=0;i&&n.find(".insta-gallery-image").on("load loadstart",(function(e){++c>=i&&n.trigger("qligg.imagesLoaded",[t])})),i<o.limit&&(l.hide(),setTimeout((function(){r.fadeOut()}),300))})),_()(".insta-gallery-feed").on("qligg.imagesLoaded",(function(e){var t=_()(e.delegateTarget);_()(".insta-gallery-spinner",t).hide()})),_()(".insta-gallery-feed[data-feed_layout=gallery]").on("qligg.imagesLoaded",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){setTimeout((function(){_()(t).addClass("ig-image-loaded")}),150+30*e)}))})),_()(".insta-gallery-feed[data-feed_layout=carousel]").on("qligg.imagesLoaded",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){_()(t).addClass("ig-image-loaded")}))})),_()(".insta-gallery-feed[data-feed_layout=carousel]").on("qligg.imagesLoaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".swiper-container",a),l=a.data("feed");l.carousel.slides=l.carousel.slidespv,S++,N[S]=new Swiper(n,{loop:!0,autoHeight:!0,observer:!0,observeParents:!0,slidesPerView:1,spaceBetween:2,autoplay:!!l.carousel.autoplay&&{delay:parseInt(l.carousel.autoplay_interval)},pagination:{el:".swiper-pagination",dynamicBullets:!0,clickable:!0,type:"bullets"},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},breakpoints:{320:{slidesPerView:1,spaceBetween:1},480:{spaceBetween:parseInt(l.spacing),slidesPerView:Math.min(2,parseInt(l.carousel.slides))},768:{spaceBetween:parseInt(l.spacing),slidesPerView:Math.min(3,parseInt(l.carousel.slides))},1024:{spaceBetween:parseInt(l.spacing),slidesPerView:parseInt(l.carousel.slides)}}})})),_()(".insta-gallery-feed[data-feed_layout=masonry]").on("qligg.imagesLoaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".insta-gallery-list",a);n.data("masonry")?n.masonry("appended",t,!1):n.masonry({itemSelector:".insta-gallery-item",isResizable:!0,isAnimated:!1,transitionDuration:0,percentPosition:!0,columnWidth:".insta-gallery-item:last-child"})})),_()(".insta-gallery-feed[data-feed_layout=masonry]").on("layoutComplete",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){_()(t.element).addClass("ig-image-loaded")}))})),_()(".insta-gallery-feed").on("qligg.loaded",(function(e){var t=_()(e.delegateTarget),a=_()(".insta-gallery-list",t),n=t.data("feed");_()(".insta-gallery-item .insta-gallery-icon.qligg-icon-instagram",a).on("click",(function(e){e.stopPropagation()})),n.popup.display&&_()(".insta-gallery-item",a).magnificPopup({type:"inline",callbacks:{beforeOpen:function(){this.st.mainClass=this.st.mainClass+" qligg-mfp-wrap"},elementParse:function(e){var t,l="",r="",o="",i="",c="",s="",u="";l=e.el.data("item").type&&"video"==e.el.data("item").type?'\n <video autoplay>\n <source src="'+e.el.data("item").videos.standard+'" type="video/mp4">\n </video>':'<img src="'+e.el.data("item").images.standard+'"/>',t='<div class="mfp-icons"><div class="mfp-counter">'+(e.index+1)+" / "+_()(".insta-gallery-item",a).length+'</div><a class="mfp-link" href="'+e.el.data("item").link+'" target="_blank" rel="noopener"><i class="qligg-icon-instagram"></i>Instagram</a></div>',n.popup.profile&&(r='<div class="mfp-user"><img src="'+n.profile.profile_picture_url+'"><a href="https://www.instagram.com/'+n.profile.username+'" title="'+n.profile.name+'" target="_blank" rel="noopener">'+n.profile.username+"</a></div>"),n.popup.caption&&(o='<div class="mfp-caption">'+e.el.data("item").caption+"</div>"),e.el.data("item").date&&(s='<div class="mfp-date">'+e.el.data("item").date+"</div>"),e.el.data("item").comments&&n.popup.comments&&(u='<div class="mfp-comments"><i class="qligg-icon-comment"></i>'+e.el.data("item").comments+"</div>"),e.el.data("item").likes&&n.popup.likes&&(c='<div class="mfp-likes"><i class="qligg-icon-heart"></i>'+e.el.data("item").likes+"</div>"),(n.popup.likes||n.popup.comments)&&(i='<div class="mfp-info">'+c+u+s+"</div>"),e.src='<div class="mfp-figure '+n.popup.align+'">'+l+'<div class="mfp-close"></div><div class="mfp-bottom-bar"><div class="mfp-title">'+r+t+o+i+"</div></div></div>"}},gallery:{enabled:!0}})})),_()(".insta-gallery-feed").on("click",".insta-gallery-button.load",(function(e){e.preventDefault();var t=_()(e.delegateTarget);if(!t.hasClass("loaded"))return!1;D(t,_()(".insta-gallery-list .insta-gallery-item:last-child",t).data("item").i)})),_()(".insta-gallery-feed").each((function(e,t){var a=_()(t);if(a.hasClass("loaded"))return!1;D(a,0)}))}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=m()(e);if(t){var l=m()(this).constructor;a=Reflect.construct(n,arguments,l)}else a=n.apply(this,arguments);return p()(this,a)}}A(),-1!=navigator.appVersion.indexOf("MSIE 8.")&&(document.body.className+=" instagal-ie-8"),-1!=navigator.appVersion.indexOf("MSIE 9.")&&(document.body.className+=" instagal-ie-9");var R=function(e){u()(a,e);var t=F(a);function a(e){var n;return l()(this,a),(n=t.call(this,e)).method=Object(f.debounce)(n.method.bind(c()(n)),1e3),n}return o()(a,[{key:"method",value:function(){this.initLayout()}},{key:"initLayout",value:function(){var e=!1,t=setInterval((function(){_()(".tiktok-feed-feed")&&(A(),e=!0),e&&clearInterval(t)}),3e3)}},{key:"componentDidMount",value:function(){this.initLayout()}},{key:"debounceOnChange",value:function(e){var t=this,a=Object(f.debounce)((function(e){t.initLayout()}),350);a(e)}},{key:"componentDidUpdate",value:function(){this.method()}},{key:"render",value:function(){var e=this.props,t=e.attributes,a=e.setAttributes,n=qligg_gutenberg.accounts;return console.log("accounts",n),n&&0!=n.length?n[t.username]?Object(d.createElement)(d.Fragment,null,Object(d.createElement)(B,this.props),Object(d.createElement)("div",{className:"tiktok-site-render"}),Object(d.createElement)(O.a,{onChange:function(e){return console.log(e)},block:"qligg/box",attributes:t})):Object(d.createElement)("div",null,Object(d.createElement)(v.Placeholder,{label:Object(j.__)("Please select account","insta-gallery"),instructions:Object(d.createElement)(v.RadioControl,{value:t.username,onChange:function(e){return a({username:e})},options:Object(f.map)(n,(function(e,t){return{value:e.id,label:e.name||e.username}}))})})):Object(d.createElement)("div",null,Object(d.createElement)(v.Placeholder,{label:Object(j.__)("Please create access token","insta-gallery"),instructions:Object(d.createElement)(d.Fragment,null,Object(j.__)("Before start creating feeds, you have to create an access token. Please go to","insta-gallery")," ",Object(d.createElement)("a",{href:qligg_gutenberg.create_account,target:"_blank"},Object(j.__)("the account tab","insta-gallery")),Object(j.__)(" to connect your Instagram account and then reload this page.","insta-gallery"))}))}}]),a}(d.Component),M=a(16);Object(M.registerBlockType)("qligg/box",{title:Object(j.__)("Social Feed Gallery","insta-gallery"),description:Object(j.__)("Display beautiful and responsive galleries on your website from your Instagram feed account.","insta-gallery"),icon:"awards",category:"insta-gallery",keywords:[Object(j.__)("qligg","insta-gallery"),Object(j.__)("instagram","insta-gallery"),Object(j.__)("quadlayers","insta-gallery")],attributes:qligg_gutenberg.attributes,edit:R})},function(e,t){},,function(e,t){}]);
includes/compatibility.php CHANGED
@@ -3,11 +3,24 @@
3
  include_once(QLIGG_PLUGIN_DIR . 'includes/models/Token.php');
4
  include_once(QLIGG_PLUGIN_DIR . 'includes/models/Feed.php');
5
 
6
- class QLIGG_Compatibility {
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  protected static $instance;
9
 
10
- function premium_compatibility() {
 
11
 
12
  global $qligg, $qligg_token;
13
 
@@ -23,7 +36,8 @@ class QLIGG_Compatibility {
23
  $qligg = $setting_model->get_settings();
24
  }
25
 
26
- function rename_insta_gallery_token($token = array()) {
 
27
 
28
  if (isset($token['access_token'])) {
29
 
@@ -39,7 +53,8 @@ class QLIGG_Compatibility {
39
  return $token;
40
  }
41
 
42
- function rename_insta_gallery_items_223($instagram_feeds = array()) {
 
43
 
44
  $token_model = new QLIGG_Token();
45
  $tokens = $token_model->get_tokens();
@@ -138,7 +153,8 @@ class QLIGG_Compatibility {
138
 
139
  // Backward compatibility v2.6.6 to 2.6.8
140
  // -----------------------------------------------------------------------
141
- function rename_insta_gallery_items_266($new_instagram_feeds = array()) {
 
142
 
143
  // if dosent exists return
144
  if (!$old_instagram_feeds = get_option('insta_gallery_items')) {
@@ -306,7 +322,8 @@ class QLIGG_Compatibility {
306
 
307
  // Backward compatibility v2.7.1 to 2.8.0
308
  // -----------------------------------------------------------------------
309
- function rename_insta_gallery_token_271($new_accounts = array()) {
 
310
 
311
  // if dosent exists return
312
  if (!$old_accounts = get_option('insta_gallery_token')) {
@@ -325,7 +342,8 @@ class QLIGG_Compatibility {
325
  return $new_accounts;
326
  }
327
 
328
- function init() {
 
329
  add_filter('option_insta_gallery_iac ', array($this, 'rename_insta_gallery_token'), 10);
330
  add_filter('option_insta_gallery_token', array($this, 'rename_insta_gallery_token'), 10);
331
  add_filter('option_insta_gallery_items', array($this, 'rename_insta_gallery_items_223'), 10);
@@ -334,7 +352,8 @@ class QLIGG_Compatibility {
334
  add_action('init', array($this, 'premium_compatibility'));
335
  }
336
 
337
- public static function instance() {
 
338
  if (!isset(self::$instance)) {
339
  self::$instance = new self();
340
  //self::$instance->defaults();
@@ -342,14 +361,14 @@ class QLIGG_Compatibility {
342
  }
343
  return self::$instance;
344
  }
345
-
346
  }
347
 
348
  QLIGG_Compatibility::instance();
349
 
350
  // Get user feed
351
  // -----------------------------------------------------------------------------
352
- function qligg_get_user_items_old($user_id = null, $limit = 12, $next_max_id = null, $max_id = null) {
 
353
 
354
  global $qliggAPI;
355
 
@@ -401,23 +420,24 @@ function qligg_get_user_items_old($user_id = null, $limit = 12, $next_max_id = n
401
 
402
  if (!class_exists('QLIGG_Settings')) {
403
 
404
- class QLIGG_Settings {
 
405
 
406
  protected static $instance;
407
 
408
  // fix required header in license tab
409
- function settings_header() {
 
410
  global $submenu;
411
  include(QLIGG_PLUGIN_DIR . '/includes/view/backend/pages/parts/header.php');
412
  }
413
 
414
- public static function instance() {
 
415
  if (!isset(self::$instance)) {
416
  self::$instance = new self();
417
  }
418
  return self::$instance;
419
  }
420
-
421
  }
422
-
423
  }
3
  include_once(QLIGG_PLUGIN_DIR . 'includes/models/Token.php');
4
  include_once(QLIGG_PLUGIN_DIR . 'includes/models/Feed.php');
5
 
6
+ // php compatibility
7
+ if (!function_exists('array_key_first')) {
8
+ function array_key_first(array $arr)
9
+ {
10
+ foreach ($arr as $key => $unused) {
11
+ return $key;
12
+ }
13
+ return NULL;
14
+ }
15
+ }
16
+
17
+ class QLIGG_Compatibility
18
+ {
19
 
20
  protected static $instance;
21
 
22
+ function premium_compatibility()
23
+ {
24
 
25
  global $qligg, $qligg_token;
26
 
36
  $qligg = $setting_model->get_settings();
37
  }
38
 
39
+ function rename_insta_gallery_token($token = array())
40
+ {
41
 
42
  if (isset($token['access_token'])) {
43
 
53
  return $token;
54
  }
55
 
56
+ function rename_insta_gallery_items_223($instagram_feeds = array())
57
+ {
58
 
59
  $token_model = new QLIGG_Token();
60
  $tokens = $token_model->get_tokens();
153
 
154
  // Backward compatibility v2.6.6 to 2.6.8
155
  // -----------------------------------------------------------------------
156
+ function rename_insta_gallery_items_266($new_instagram_feeds = array())
157
+ {
158
 
159
  // if dosent exists return
160
  if (!$old_instagram_feeds = get_option('insta_gallery_items')) {
322
 
323
  // Backward compatibility v2.7.1 to 2.8.0
324
  // -----------------------------------------------------------------------
325
+ function rename_insta_gallery_token_271($new_accounts = array())
326
+ {
327
 
328
  // if dosent exists return
329
  if (!$old_accounts = get_option('insta_gallery_token')) {
342
  return $new_accounts;
343
  }
344
 
345
+ function init()
346
+ {
347
  add_filter('option_insta_gallery_iac ', array($this, 'rename_insta_gallery_token'), 10);
348
  add_filter('option_insta_gallery_token', array($this, 'rename_insta_gallery_token'), 10);
349
  add_filter('option_insta_gallery_items', array($this, 'rename_insta_gallery_items_223'), 10);
352
  add_action('init', array($this, 'premium_compatibility'));
353
  }
354
 
355
+ public static function instance()
356
+ {
357
  if (!isset(self::$instance)) {
358
  self::$instance = new self();
359
  //self::$instance->defaults();
361
  }
362
  return self::$instance;
363
  }
 
364
  }
365
 
366
  QLIGG_Compatibility::instance();
367
 
368
  // Get user feed
369
  // -----------------------------------------------------------------------------
370
+ function qligg_get_user_items_old($user_id = null, $limit = 12, $next_max_id = null, $max_id = null)
371
+ {
372
 
373
  global $qliggAPI;
374
 
420
 
421
  if (!class_exists('QLIGG_Settings')) {
422
 
423
+ class QLIGG_Settings
424
+ {
425
 
426
  protected static $instance;
427
 
428
  // fix required header in license tab
429
+ function settings_header()
430
+ {
431
  global $submenu;
432
  include(QLIGG_PLUGIN_DIR . '/includes/view/backend/pages/parts/header.php');
433
  }
434
 
435
+ public static function instance()
436
+ {
437
  if (!isset(self::$instance)) {
438
  self::$instance = new self();
439
  }
440
  return self::$instance;
441
  }
 
442
  }
 
443
  }
includes/frontend.php CHANGED
@@ -92,7 +92,7 @@ if (!class_exists('QLIGG_Frontend')) {
92
  $instagram_feed['likes'] = $feed['mask']['likes'];
93
  $instagram_feed['comments'] = $feed['mask']['comments'];
94
 
95
- include(QLIGG_Frontend::template_path('item/item.php'));
96
 
97
  $i++;
98
 
@@ -106,12 +106,12 @@ if (!class_exists('QLIGG_Frontend')) {
106
 
107
  $messages = $qliggAPI->FEED->getMessages();
108
 
109
- include(QLIGG_Frontend::template_path('alert.php'));
110
 
111
  wp_send_json_error(ob_get_clean());
112
  }
113
 
114
- static function template_path($template_name, $template_file = false)
115
  {
116
 
117
  if (file_exists(QLIGG_PLUGIN_DIR . "templates/{$template_name}")) {
@@ -126,7 +126,7 @@ if (!class_exists('QLIGG_Frontend')) {
126
  }
127
 
128
 
129
- static function create_shortcut($feed, $content = null)
130
  {
131
  if (isset($feed['type'])) {
132
 
@@ -248,7 +248,7 @@ if (!class_exists('QLIGG_Frontend')) {
248
  ?>
249
  </style>
250
  <?php
251
- if ($template_file = QLIGG_Frontend::template_path("{$feed['layout']}.php")) {
252
  include($template_file);
253
  return ob_get_clean();
254
  }
@@ -257,7 +257,7 @@ if (!class_exists('QLIGG_Frontend')) {
257
  sprintf(esc_html__('The layout %s is not a available.', 'insta-gallery'), $feed['layout'])
258
  );
259
 
260
- include(QLIGG_Frontend::template_path('alert.php'));
261
 
262
  return ob_get_clean();
263
  }
92
  $instagram_feed['likes'] = $feed['mask']['likes'];
93
  $instagram_feed['comments'] = $feed['mask']['comments'];
94
 
95
+ include(self::template_path('item/item.php'));
96
 
97
  $i++;
98
 
106
 
107
  $messages = $qliggAPI->FEED->getMessages();
108
 
109
+ include(self::template_path('alert.php'));
110
 
111
  wp_send_json_error(ob_get_clean());
112
  }
113
 
114
+ public static function template_path($template_name, $template_file = false)
115
  {
116
 
117
  if (file_exists(QLIGG_PLUGIN_DIR . "templates/{$template_name}")) {
126
  }
127
 
128
 
129
+ public static function create_shortcut($feed, $content = null)
130
  {
131
  if (isset($feed['type'])) {
132
 
248
  ?>
249
  </style>
250
  <?php
251
+ if ($template_file = self::template_path("{$feed['layout']}.php")) {
252
  include($template_file);
253
  return ob_get_clean();
254
  }
257
  sprintf(esc_html__('The layout %s is not a available.', 'insta-gallery'), $feed['layout'])
258
  );
259
 
260
+ include(self::template_path('alert.php'));
261
 
262
  return ob_get_clean();
263
  }
insta-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Social Feed Gallery
5
  * Plugin URI: https://quadlayers.com/portfolio/instagram-feed-gallery/
6
  * Description: Display beautiful and responsive galleries on your website from your Instagram feed account.
7
- * Version: 3.1.4
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
@@ -19,7 +19,7 @@ if (!defined('QLIGG_PLUGIN_NAME')) {
19
  define('QLIGG_PLUGIN_NAME', 'Social Feed Gallery');
20
  }
21
  if (!defined('QLIGG_PLUGIN_VERSION')) {
22
- define('QLIGG_PLUGIN_VERSION', '3.1.4');
23
  }
24
  if (!defined('QLIGG_PLUGIN_FILE')) {
25
  define('QLIGG_PLUGIN_FILE', __FILE__);
4
  * Plugin Name: Social Feed Gallery
5
  * Plugin URI: https://quadlayers.com/portfolio/instagram-feed-gallery/
6
  * Description: Display beautiful and responsive galleries on your website from your Instagram feed account.
7
+ * Version: 3.1.5
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
19
  define('QLIGG_PLUGIN_NAME', 'Social Feed Gallery');
20
  }
21
  if (!defined('QLIGG_PLUGIN_VERSION')) {
22
+ define('QLIGG_PLUGIN_VERSION', '3.1.5');
23
  }
24
  if (!defined('QLIGG_PLUGIN_FILE')) {
25
  define('QLIGG_PLUGIN_FILE', __FILE__);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/portfolio/instagram-gallery/
4
  Tags: Instagram, Instagram feed, Instagram gallery, Instagram photos, Instagram widget, Instagram pictures
5
  Requires at least: 3.4
6
  Tested up to: 5.6
7
- Stable tag: 3.1.4
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -105,6 +105,9 @@ There may be some other plugins(like: fancybox, elementor) which also uses image
105
 
106
  == Changelog ==
107
 
 
 
 
108
  = 3.1.4 =
109
  * New. instagram gutenberg block
110
 
4
  Tags: Instagram, Instagram feed, Instagram gallery, Instagram photos, Instagram widget, Instagram pictures
5
  Requires at least: 3.4
6
  Tested up to: 5.6
7
+ Stable tag: 3.1.5
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
105
 
106
  == Changelog ==
107
 
108
+ = 3.1.5 =
109
+ * New. instagram gutenberg block
110
+
111
  = 3.1.4 =
112
  * New. instagram gutenberg block
113