Instagram Gallery - Version 3.4.6

Version Description

  • Fix. Instagram Feed modal settings
Download this release

Release Info

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

Code changes from version 3.4.5 to 3.4.6

build/backend/js/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-serializejson', 'underscore', 'wp-color-picker-alpha', 'wp-util'), 'version' => 'ced57a0f8e41b34db83f');
1
+ <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-serializejson', 'underscore', 'wp-color-picker-alpha', 'wp-util'), 'version' => 'bb5d39d98b8c9ace301d');
build/backend/js/index.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var e={n:function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,{a:a}),a},d:function(t,a){for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.jQuery,a=e.n(t);window.wp.util,window.window.Backbone,window._["."],window.window.serializeJSON,window.wp.wpColorPickerAlpha,function(e){_.mixin({escapeHtml:function(e){return e.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function(e){return e.serializeJSON()}});var t=Backbone.Model.extend({defaults:{access_token:""}}),a=Backbone.View.extend({events:{"change input":"enable","click .media-modal-close":"close","submit .media-modal-form":"submit"},templates:{},initialize:function(){_.bindAll(this,"open","render","close","enable","submit"),this.init(),this.open()},init:function(){this.templates.window=wp.template("qligg-modal-account-main")},render:function(){var e=this;e.$el.html(e.templates.window(e.model.attributes))},updateModel:function(e){e.preventDefault();var t=this.$el.find("form"),a=_.getFormData(t);this.model.set(a)},enable:function(t){e(".media-modal-submit").prop("disabled",!1),this.updateModel(t)},open:function(t){this.render(),e("body").addClass("modal-open").append(this.$el)},close:function(t){t.preventDefault(),this.undelegateEvents(),e(document).off("focusin"),e("body").removeClass("modal-open"),this.remove()},submit:function(t){t.preventDefault();var a=this,n=a.$el.find("#qligg_modal"),i=n.find(".settings-save-status .spinner"),o=n.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:"qligg_add_account",nonce:qligg_account.nonce.qligg_add_account,account_data:a.model.attributes},dataType:"json",type:"POST",beforeSend:function(){e(".media-modal-submit").prop("disabled",!0),i.addClass("is-active")},complete:function(){i.removeClass("is-active")},error:function(e){alert("Error!")},success:function(e){e.success?(n.addClass("reload"),o.addClass("is-active"),_.delay((function(){o.removeClass("is-active")}),5e3),a.close(t),window.location.reload()):alert(e.data)}}),!1}}),n=Backbone.View.extend({initialize:function(e){var n=new t;n.set({access_token:""}),new a({model:n})}});e(document).on("click","[data-qligg-copy-token]",(function(t){t.preventDefault(),e(e(this).data("qligg-copy-token")).select(),document.execCommand("copy")})),e(document).on("click","[data-qligg-delete-token]",(function(t){if(t.preventDefault(),!confirm(qligg_account.message.confirm_delete))return!1;var a=e(t.target).closest("[data-account_id]").data("account_id"),n=e(t.target).closest("td").find(".spinner");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_delete_account",account_id:a,nonce:qligg_account.nonce.qligg_delete_account},beforeSend:function(){n.addClass("is-active")},success:function(e){e.success?setTimeout((function(){window.location.reload()}),300):alert(e.data)},complete:function(){n.removeClass("is-active")},error:function(e,t){console.log(t)}})})),e(document).on("click","[data-qligg-renew-token]",(function(t){t.preventDefault();var a=e(t.target).closest("[data-account_id]").data("account_id"),n=e(t.target).closest("td").find(".spinner");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_renew_access_token",account_id:a,nonce:qligg_account.nonce.qligg_renew_access_token},beforeSend:function(){n.addClass("is-active")},success:function(e){alert(e.data),e.success?(setTimeout((function(){window.location.reload()}),300),console.log(e)):alert(e.data)},complete:function(){n.removeClass("is-active")},error:function(e,t){console.log(t)}})})),e("#qligg-add-token").on("click",(function(e){e.preventDefault(),new n(e)}))}(a()),function(e){var t,a,n=0,i=function(){e("#qligg_modal").removeClass("processing")};_.mixin({escapeHtml:function(e){return e.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function(e){return e.serializeJSON({checkboxUncheckedValue:"false",parseBooleans:!0,parseNulls:!0})}});var o=Backbone.Model.extend({defaults:null===(t=window.qligg_feed)||void 0===t?void 0:t.args}),l=Backbone.View.extend({initialize:function(t){var a=e(t.target).closest("[data-feed_position]").data("feed_id"),n=new o;Object.keys(qligg_feed.accounts).length?(n.set({id:a}),a||n.set({username:Object.keys(qligg_feed.accounts)[0]}),new s({model:n}).render()):confirm(qligg_feed.message.confirm_username)&&(window.location.href=qligg_feed.redirect.accounts)}}),s=Backbone.View.extend({events:{"change input":"enableSave","change textarea":"enableSave","change select":"enableSave","click .media-modal-image":"setLayout","click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","click .media-modal-tab":"tab","change .media-modal-render-tabs":"renderTabs","change .media-modal-render-panels":"renderPanels","submit .media-modal-form":"submit","qligg.color.change input":"enableSave"},templates:{},initialize:function(){_.bindAll(this,"open","tab","edit","load","render","close","submit"),this.init(),this.open()},init:function(){this.templates.window=wp.template("qligg-modal-main")},assign:function(e,t){e.setElement(this.$(t)).render()},updateModel:function(e){e&&e.preventDefault();var t=this.$el.find("#qligg_modal").find("form"),a=_.getFormData(t);this.model.set(a)},reload:function(e){this.$el.find("#qligg_modal").hasClass("reload")?location.reload():this.remove()},close:function(t){t.preventDefault(),this.undelegateEvents(),e(document).off("focusin"),e("body").removeClass("modal-open"),this.$el.find("#qligg_modal").addClass("reload"),this.reload(t)},enableSave:function(t){e(".media-modal-submit").prop("disabled",!1),this.updateModel(t)},disableSave:function(t){e(".media-modal-submit").prop("disabled",!0)},tab:function(t){t.preventDefault();var a=this.$el.find("#qligg_modal"),n=e(t.currentTarget),i=a.find("ul.qligg-tabs"),o=n.find("a").attr("href").replace("#","");i.find(".active").removeClass("active"),n.addClass("active"),this.model.attributes.panel=o,this.model.changed.panel=o,this.renderPanels(t)},renderTabs:function(e){this.renderPanels(e),this.tabs.render()},renderPanels:function(e){this.updateModel(e),this.panels.render()},render:function(){var e=this;e.$el.html(e.templates.window(e.model.attributes)),this.tabs=new c({model:e.model}),this.panels=new d({model:e.model}),this.assign(this.tabs,"#qligg-modal-tabs"),this.assign(this.panels,"#qligg-modal-panels"),_.delay((function(){e.$el.trigger("qligg-enhanced-color")}),100)},open:function(t){e("body").addClass("modal-open").append(this.$el),this.load()},load:function(){var t=this;if(null==t.model.attributes.id)return t.render(),void _.delay((function(){i()}),300);e.ajax({url:ajaxurl,data:{action:"qligg_edit_feed",nonce:qligg_feed.nonce.qligg_edit_feed,feed_id:this.model.attributes.id},dataType:"json",type:"POST",complete:function(){qligg_feed.accounts[t.model.attributes.username]||(t.enableSave(),alert(qligg_feed.message.save)),i()},error:function(){alert("Error!")},success:function(e){e.success?(t.model.set(e.data),t.render()):alert(e.data)}})},edit:function(t){t.preventDefault();var i=this,o=e(t.target),l=parseInt(e("#qligg_feeds_table tr[data-feed_id]").length),s=parseInt(e("#qligg_feeds_table tr[data-feed_id="+i.model.get("id")+"]").data("feed_position"));n++,a&&clearTimeout(a),a=setTimeout((function(){s=o.hasClass("media-modal-next")?Math.min(s+n,l):Math.max(s-n,1),i.model.set({id:parseInt(e("#qligg_feeds_table tr[data-feed_position="+s+"]").data("feed_id"))}),n=0,i.load()}),300)},submit:function(t){t.preventDefault();var a=this,n=a.$el.find("#qligg_modal"),i=n.find(".settings-save-status .spinner"),o=n.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:"qligg_save_feed",nonce:qligg_feed.nonce.qligg_save_feed,feed:JSON.stringify(a.model.attributes)},dataType:"json",type:"POST",beforeSend:function(){e(".media-modal-submit").prop("disabled",!0),i.addClass("is-active")},complete:function(){o.addClass("is-active"),i.removeClass("is-active"),_.delay((function(){o.removeClass("is-active")}),1e3)},error:function(e){alert("Error!")},success:function(e){console.log(e),e.success?null==a.model.attributes.id&&(n.addClass("reload"),a.reload(t),a.close(t)):alert(e.data)}}),!1},setLayout:function(t){t.preventDefault(),t.stopPropagation(),e(t.target).find("input[type=radio]").prop("checked",!0),e(t.target).siblings().find("input[type=radio]").prop("checked",!1),this.updateModel(t),this.renderPanels(t),this.renderTabs(t),this.enableSave(t)}}),c=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("qligg-modal-tabs")},render:function(){this.model.attributes.panel="tab_panel_feed",this.$el.html(this.templates.window(this.model.attributes))}}),d=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("qligg-modal-panels")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("qligg-enhanced-color")}});e(document).on("qligg-enhanced-color",(function(t){e(".color-picker").filter(":not(.enhanced)").each((function(){e(this).is("[readonly]")&&e(this).parent(".form-field").addClass("disabled-field"),e(this).wpColorPicker({change:function(t,a){console.log("wpColorPicker"),e(t.target).trigger("qligg.color.change")}})}))})),e("#qligg-add-feed").on("click",(function(e){e.preventDefault(),new l(e)}));var r=!1;e(".qligg_edit_feed").on("click",(function(e){e.preventDefault(),r||(new l(e),r=!0)})),e(".qligg_delete_feed").on("click",(function(t){if(t.preventDefault(),!confirm(qligg_feed.message.confirm_delete))return!1;var a=e(t.target),n=a.parent().find(".spinner"),i=a.closest("[data-feed_id]").data("feed_id");e.ajax({url:ajaxurl,data:{action:"qligg_delete_feed",nonce:qligg_feed.nonce.qligg_delete_feed,feed_id:i},dataType:"json",type:"POST",beforeSend:function(){n.addClass("is-active")},complete:function(){n.removeClass("is-active")},error:function(e){},success:function(e){e.data?(console.log(e.data),location.reload()):alert(e.data)}})})),e(".qligg_clear_cache").on("click",(function(t){if(t.preventDefault(),!confirm(qligg_feed.message.confirm_clear_cache))return!1;var a=e(t.target),n=a.parent().find(".spinner"),i=a.closest("[data-feed_id]").data("feed_id");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_clear_cache",feed_id:i,nonce:qligg_feed.nonce.qligg_clear_cache},beforeSend:function(){n.addClass("is-active")},success:function(e){e.success?setTimeout((function(){n.removeClass("is-active")}),300):alert(e.data)},complete:function(){setTimeout((function(){n.removeClass("is-active")}),600)},error:function(e,t){console.log(t)}})})),e(document).on("click",".upload_image_button",(function(t){t.preventDefault();var a=wp.media.editor.send.attachment,n=e(this);return wp.media.editor.send.attachment=function(t,i){e(n).parent().prev().attr("src",i.url),e(n).prev().val(i.url).trigger("change"),wp.media.editor.send.attachment=a},wp.media.editor.open(n),!1})),e(document).on("click",".remove_image_button",(function(t){t.preventDefault();var a=e(this).parent().prev().attr("data-src");return e(this).parent().prev().attr("src",a),e(this).prev().prev().val("").trigger("change"),!1})),e(document).on("click","[data-qligg-copy-feed-shortcode]",(function(t){t.preventDefault(),e(e(this).data("qligg-copy-feed-shortcode")).select(),document.execCommand("copy")}))}(a()),function(e){function t(t){if(t){if(e("#qligg-save-settings .insta-gallery-spinner img").length)e("#qligg-save-settings .insta-gallery-spinner img").attr("src",t);else{var a='<img src="'+t+'" class="ig-spin" />';e("#qligg-save-settings .insta-gallery-spinner").append(a)}e("#qligg-save-settings .insta-gallery-spinner .ig-spin").hide(),e("#qligg-save-settings .insta-gallery-spinner img").show()}else e("#qligg-save-settings .insta-gallery-spinner .ig-spin").show(),e("#qligg-save-settings .insta-gallery-spinner img").remove()}_.mixin({escapeHtml:function(e){return e.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function(e){return e.serializeJSON()}});var a=e("input[name=insta_spinner_image_id]"),n=e("#ig-spinner-reset");e("#qligg-save-settings").on("submit",(function(t){t.preventDefault();var a=e(this),n=a.find(".spinner");e.ajax({url:ajaxurl,type:"post",dataType:"JSON",data:{action:"qligg_save_settings",nonce:qligg_settings.nonce.qligg_save_settings,settings_data:a.serialize()},beforeSend:function(){n.addClass("is-active")},success:function(e){},complete:function(){n.removeClass("is-active")},error:function(e,t){console.log(t)}})})),n.on("click",(function(){a.val(""),t(),e(this).hide()})),""==a.val()&&n.hide(),""!=a.data("misrc")&&t(a.data("misrc")),e("#ig-spinner-upload").on("click",(function(e){var i;e.preventDefault(),i&&i.open(),(i=wp.media({title:"Select Media",multiple:!1,library:{type:"image"}})).on("close",(function(){var e=i.state().get("selection");if(e.length){var o,l=new Array,s=0;e.each((function(e){l[s]=e.id,o=e.attributes.url,s++}));var c=l.join(",");a.val(c),t(o)}""==a.val()?n.hide():n.show()})),i.on("open",(function(){var e=i.state().get("selection");a.val().split(",").forEach((function(t){attachment=wp.media.attachment(t),attachment.fetch(),e.add(attachment?[attachment]:[])}))})),i.open()}))}(a())}();
1
+ !function(){"use strict";var e={n:function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,{a:a}),a},d:function(t,a){for(var n in a)e.o(a,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:a[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.jQuery,a=e.n(t);window.wp.util,window.window.Backbone,window._["."],window.window.serializeJSON,window.wp.wpColorPickerAlpha,function(e){_.mixin({escapeHtml:function(e){return e.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function(e){return e.serializeJSON()}});var t=Backbone.Model.extend({defaults:{access_token:""}}),a=Backbone.View.extend({events:{"change input":"enable","click .media-modal-close":"close","submit .media-modal-form":"submit"},templates:{},initialize:function(){_.bindAll(this,"open","render","close","enable","submit"),this.init(),this.open()},init:function(){this.templates.window=wp.template("qligg-modal-account-main")},render:function(){var e=this;e.$el.html(e.templates.window(e.model.attributes))},updateModel:function(e){e.preventDefault();var t=this.$el.find("form"),a=_.getFormData(t);this.model.set(a)},enable:function(t){e(".media-modal-submit").prop("disabled",!1),this.updateModel(t)},open:function(t){this.render(),e("body").addClass("modal-open").append(this.$el)},close:function(t){t.preventDefault(),this.undelegateEvents(),e(document).off("focusin"),e("body").removeClass("modal-open"),this.remove()},submit:function(t){t.preventDefault();var a=this,n=a.$el.find("#qligg_modal"),i=n.find(".settings-save-status .spinner"),o=n.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:"qligg_add_account",nonce:qligg_account.nonce.qligg_add_account,account_data:a.model.attributes},dataType:"json",type:"POST",beforeSend:function(){e(".media-modal-submit").prop("disabled",!0),i.addClass("is-active")},complete:function(){i.removeClass("is-active")},error:function(e){alert("Error!")},success:function(e){e.success?(n.addClass("reload"),o.addClass("is-active"),_.delay((function(){o.removeClass("is-active")}),5e3),a.close(t),window.location.reload()):alert(e.data)}}),!1}}),n=Backbone.View.extend({initialize:function(e){var n=new t;n.set({access_token:""}),new a({model:n})}});e(document).on("click","[data-qligg-copy-token]",(function(t){t.preventDefault(),e(e(this).data("qligg-copy-token")).select(),document.execCommand("copy")})),e(document).on("click","[data-qligg-delete-token]",(function(t){if(t.preventDefault(),!confirm(qligg_account.message.confirm_delete))return!1;var a=e(t.target).closest("[data-account_id]").data("account_id"),n=e(t.target).closest("td").find(".spinner");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_delete_account",account_id:a,nonce:qligg_account.nonce.qligg_delete_account},beforeSend:function(){n.addClass("is-active")},success:function(e){e.success?setTimeout((function(){window.location.reload()}),300):alert(e.data)},complete:function(){n.removeClass("is-active")},error:function(e,t){console.log(t)}})})),e(document).on("click","[data-qligg-renew-token]",(function(t){t.preventDefault();var a=e(t.target).closest("[data-account_id]").data("account_id"),n=e(t.target).closest("td").find(".spinner");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_renew_access_token",account_id:a,nonce:qligg_account.nonce.qligg_renew_access_token},beforeSend:function(){n.addClass("is-active")},success:function(e){alert(e.data),e.success?(setTimeout((function(){window.location.reload()}),300),console.log(e)):alert(e.data)},complete:function(){n.removeClass("is-active")},error:function(e,t){console.log(t)}})})),e("#qligg-add-token").on("click",(function(e){e.preventDefault(),new n(e)}))}(a()),function(e){var t,a,n=0,i=function(){e("#qligg_modal").removeClass("processing")};_.mixin({escapeHtml:function(e){return e.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormDataFix:function(e){return e.serializeJSON({checkboxUncheckedValue:"false",parseBooleans:!0,parseNulls:!0})}});var o=Backbone.Model.extend({defaults:null===(t=window.qligg_feed)||void 0===t?void 0:t.args}),l=Backbone.View.extend({initialize:function(t){var a=e(t.target).closest("[data-feed_position]").data("feed_id"),n=new o;Object.keys(qligg_feed.accounts).length?(n.set({id:a}),a||n.set({username:Object.keys(qligg_feed.accounts)[0]}),new s({model:n}).render()):confirm(qligg_feed.message.confirm_username)&&(window.location.href=qligg_feed.redirect.accounts)}}),s=Backbone.View.extend({events:{"change input":"enableSave","change textarea":"enableSave","change select":"enableSave","click .media-modal-image":"setLayout","click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","click .media-modal-tab":"tab","change .media-modal-render-tabs":"renderTabs","change .media-modal-render-panels":"renderPanels","submit .media-modal-form":"submit","qligg.color.change input":"enableSave"},templates:{},initialize:function(){_.bindAll(this,"open","tab","edit","load","render","close","submit"),this.init(),this.open()},init:function(){this.templates.window=wp.template("qligg-modal-main")},assign:function(e,t){e.setElement(this.$(t)).render()},updateModel:function(e){e&&e.preventDefault();var t=this.$el.find("#qligg_modal").find("form"),a=_.getFormDataFix(t);this.model.set(a)},reload:function(e){this.$el.find("#qligg_modal").hasClass("reload")?location.reload():this.remove()},close:function(t){t.preventDefault(),this.undelegateEvents(),e(document).off("focusin"),e("body").removeClass("modal-open"),this.$el.find("#qligg_modal").addClass("reload"),this.reload(t)},enableSave:function(t){e(".media-modal-submit").prop("disabled",!1),this.updateModel(t)},disableSave:function(t){e(".media-modal-submit").prop("disabled",!0)},tab:function(t){t.preventDefault();var a=this.$el.find("#qligg_modal"),n=e(t.currentTarget),i=a.find("ul.qligg-tabs"),o=n.find("a").attr("href").replace("#","");i.find(".active").removeClass("active"),n.addClass("active"),this.model.attributes.panel=o,this.model.changed.panel=o,this.renderPanels(t)},renderTabs:function(e){this.renderPanels(e),this.tabs.render()},renderPanels:function(e){this.updateModel(e),this.panels.render()},render:function(){var e=this;e.$el.html(e.templates.window(e.model.attributes)),this.tabs=new c({model:e.model}),this.panels=new d({model:e.model}),this.assign(this.tabs,"#qligg-modal-tabs"),this.assign(this.panels,"#qligg-modal-panels"),_.delay((function(){e.$el.trigger("qligg-enhanced-color")}),100)},open:function(t){e("body").addClass("modal-open").append(this.$el),this.load()},load:function(){var t=this;if(null==t.model.attributes.id)return t.render(),void _.delay((function(){i()}),300);e.ajax({url:ajaxurl,data:{action:"qligg_edit_feed",nonce:qligg_feed.nonce.qligg_edit_feed,feed_id:this.model.attributes.id},dataType:"json",type:"POST",complete:function(){qligg_feed.accounts[t.model.attributes.username]||(t.enableSave(),alert(qligg_feed.message.save)),i()},error:function(){alert("Error!")},success:function(e){e.success?(t.model.set(e.data),t.render()):alert(e.data)}})},edit:function(t){t.preventDefault();var i=this,o=e(t.target),l=parseInt(e("#qligg_feeds_table tr[data-feed_id]").length),s=parseInt(e("#qligg_feeds_table tr[data-feed_id="+i.model.get("id")+"]").data("feed_position"));n++,a&&clearTimeout(a),a=setTimeout((function(){s=o.hasClass("media-modal-next")?Math.min(s+n,l):Math.max(s-n,1),i.model.set({id:parseInt(e("#qligg_feeds_table tr[data-feed_position="+s+"]").data("feed_id"))}),n=0,i.load()}),300)},submit:function(t){t.preventDefault();var a=this,n=a.$el.find("#qligg_modal"),i=n.find(".settings-save-status .spinner"),o=n.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:"qligg_save_feed",nonce:qligg_feed.nonce.qligg_save_feed,feed:JSON.stringify(a.model.attributes)},dataType:"json",type:"POST",beforeSend:function(){e(".media-modal-submit").prop("disabled",!0),i.addClass("is-active")},complete:function(){o.addClass("is-active"),i.removeClass("is-active"),_.delay((function(){o.removeClass("is-active")}),1e3)},error:function(e){alert("Error!")},success:function(e){console.log(e),e.success?null==a.model.attributes.id&&(n.addClass("reload"),a.reload(t),a.close(t)):alert(e.data)}}),!1},setLayout:function(t){t.preventDefault(),t.stopPropagation(),e(t.target).find("input[type=radio]").prop("checked",!0),e(t.target).siblings().find("input[type=radio]").prop("checked",!1),this.updateModel(t),this.renderPanels(t),this.renderTabs(t),this.enableSave(t)}}),c=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("qligg-modal-tabs")},render:function(){this.model.attributes.panel="tab_panel_feed",this.$el.html(this.templates.window(this.model.attributes))}}),d=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("qligg-modal-panels")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("qligg-enhanced-color")}});e(document).on("qligg-enhanced-color",(function(t){e(".color-picker").filter(":not(.enhanced)").each((function(){e(this).is("[readonly]")&&e(this).parent(".form-field").addClass("disabled-field"),e(this).wpColorPicker({change:function(t,a){console.log("wpColorPicker"),e(t.target).trigger("qligg.color.change")}})}))})),e("#qligg-add-feed").on("click",(function(e){e.preventDefault(),new l(e)}));var r=!1;e(".qligg_edit_feed").on("click",(function(e){e.preventDefault(),r||(new l(e),r=!0)})),e(".qligg_delete_feed").on("click",(function(t){if(t.preventDefault(),!confirm(qligg_feed.message.confirm_delete))return!1;var a=e(t.target),n=a.parent().find(".spinner"),i=a.closest("[data-feed_id]").data("feed_id");e.ajax({url:ajaxurl,data:{action:"qligg_delete_feed",nonce:qligg_feed.nonce.qligg_delete_feed,feed_id:i},dataType:"json",type:"POST",beforeSend:function(){n.addClass("is-active")},complete:function(){n.removeClass("is-active")},error:function(e){},success:function(e){e.data?(console.log(e.data),location.reload()):alert(e.data)}})})),e(".qligg_clear_cache").on("click",(function(t){if(t.preventDefault(),!confirm(qligg_feed.message.confirm_clear_cache))return!1;var a=e(t.target),n=a.parent().find(".spinner"),i=a.closest("[data-feed_id]").data("feed_id");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_clear_cache",feed_id:i,nonce:qligg_feed.nonce.qligg_clear_cache},beforeSend:function(){n.addClass("is-active")},success:function(e){e.success?setTimeout((function(){n.removeClass("is-active")}),300):alert(e.data)},complete:function(){setTimeout((function(){n.removeClass("is-active")}),600)},error:function(e,t){console.log(t)}})})),e(document).on("click",".upload_image_button",(function(t){t.preventDefault();var a=wp.media.editor.send.attachment,n=e(this);return wp.media.editor.send.attachment=function(t,i){e(n).parent().prev().attr("src",i.url),e(n).prev().val(i.url).trigger("change"),wp.media.editor.send.attachment=a},wp.media.editor.open(n),!1})),e(document).on("click",".remove_image_button",(function(t){t.preventDefault();var a=e(this).parent().prev().attr("data-src");return e(this).parent().prev().attr("src",a),e(this).prev().prev().val("").trigger("change"),!1})),e(document).on("click","[data-qligg-copy-feed-shortcode]",(function(t){t.preventDefault(),e(e(this).data("qligg-copy-feed-shortcode")).select(),document.execCommand("copy")}))}(a()),function(e){function t(t){if(t){if(e("#qligg-save-settings .insta-gallery-spinner img").length)e("#qligg-save-settings .insta-gallery-spinner img").attr("src",t);else{var a='<img src="'+t+'" class="ig-spin" />';e("#qligg-save-settings .insta-gallery-spinner").append(a)}e("#qligg-save-settings .insta-gallery-spinner .ig-spin").hide(),e("#qligg-save-settings .insta-gallery-spinner img").show()}else e("#qligg-save-settings .insta-gallery-spinner .ig-spin").show(),e("#qligg-save-settings .insta-gallery-spinner img").remove()}_.mixin({escapeHtml:function(e){return e.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function(e){return e.serializeJSON()}});var a=e("input[name=insta_spinner_image_id]"),n=e("#ig-spinner-reset");e("#qligg-save-settings").on("submit",(function(t){t.preventDefault();var a=e(this),n=a.find(".spinner");e.ajax({url:ajaxurl,type:"post",dataType:"JSON",data:{action:"qligg_save_settings",nonce:qligg_settings.nonce.qligg_save_settings,settings_data:a.serialize()},beforeSend:function(){n.addClass("is-active")},success:function(e){},complete:function(){n.removeClass("is-active")},error:function(e,t){console.log(t)}})})),n.on("click",(function(){a.val(""),t(),e(this).hide()})),""==a.val()&&n.hide(),""!=a.data("misrc")&&t(a.data("misrc")),e("#ig-spinner-upload").on("click",(function(e){var i;e.preventDefault(),i&&i.open(),(i=wp.media({title:"Select Media",multiple:!1,library:{type:"image"}})).on("close",(function(){var e=i.state().get("selection");if(e.length){var o,l=new Array,s=0;e.each((function(e){l[s]=e.id,o=e.attributes.url,s++}));var c=l.join(",");a.val(c),t(o)}""==a.val()?n.hide():n.show()})),i.on("open",(function(){var e=i.state().get("selection");a.val().split(",").forEach((function(t){attachment=wp.media.attachment(t),attachment.fetch(),e.add(attachment?[attachment]:[])}))})),i.open()}))}(a())}();
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.4.5
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
@@ -21,7 +21,7 @@ if ( ! defined( 'QLIGG_PLUGIN_NAME' ) ) {
21
  define( 'QLIGG_PLUGIN_NAME', 'Social Feed Gallery' );
22
  }
23
  if ( ! defined( 'QLIGG_PLUGIN_VERSION' ) ) {
24
- define( 'QLIGG_PLUGIN_VERSION', '3.4.5' );
25
  }
26
  if ( ! defined( 'QLIGG_PLUGIN_FILE' ) ) {
27
  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.4.6
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
21
  define( 'QLIGG_PLUGIN_NAME', 'Social Feed Gallery' );
22
  }
23
  if ( ! defined( 'QLIGG_PLUGIN_VERSION' ) ) {
24
+ define( 'QLIGG_PLUGIN_VERSION', '3.4.6' );
25
  }
26
  if ( ! defined( 'QLIGG_PLUGIN_FILE' ) ) {
27
  define( 'QLIGG_PLUGIN_FILE', __FILE__ );
package-lock.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "name": "insta-gallery",
3
- "lockfileVersion": 2,
4
- "requires": true,
5
- "packages": {}
6
- }
 
 
 
 
 
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Instagram, Instagram feed, Instagram gallery, Instagram photos, Instagram
5
  Requires at least: 3.4
6
  Requires PHP: 5.6
7
  Tested up to: 6.0
8
- Stable tag: 3.4.5
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -106,6 +106,9 @@ There may be some other plugins(like: fancybox, elementor) which also uses image
106
 
107
  == Changelog ==
108
 
 
 
 
109
  = 3.4.5 =
110
  * Fix. Instagram Feed missing media or thumbnail
111
 
5
  Requires at least: 3.4
6
  Requires PHP: 5.6
7
  Tested up to: 6.0
8
+ Stable tag: 3.4.6
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
106
 
107
  == Changelog ==
108
 
109
+ = 3.4.6 =
110
+ * Fix. Instagram Feed modal settings
111
+
112
  = 3.4.5 =
113
  * Fix. Instagram Feed missing media or thumbnail
114