Instagram Gallery - Version 3.1.2

Version Description

  • Fix. save feed button
Download this release

Release Info

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

Code changes from version 3.1.1 to 3.1.2

assets/backend/js/admin.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-serializejson', 'underscore', 'wp-color-picker-alpha', 'wp-util'), 'version' => 'e502cf2a05d85ff29baddda6e2c1f686');
1
+ <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-serializejson', 'underscore', 'wp-color-picker-alpha', 'wp-util'), 'version' => '53a13ded04b6f9903b09898c90a84ca4');
assets/backend/js/admin.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.jQuery}()},function(e,t,n){"use strict";n.r(t);var o=n(0),i=n.n(o);n(2),n(3),n(4),n(5),n(6);!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:""}}),n=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(){this.$el.html(this.templates.window(this.model.attributes))},updateModel:function(e){e.preventDefault();var t=this.$el.find("form"),n=_.getFormData(t);this.model.set(n)},enable:function(t){e(".media-modal-submit").removeProp("disabled"),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 n=this,o=n.$el.find("#qligg_modal"),i=o.find(".settings-save-status .spinner"),a=o.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:"qligg_add_account",nonce:qligg_account.nonce.qligg_add_account,account_data:n.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?(o.addClass("reload"),a.addClass("is-active"),_.delay((function(){a.removeClass("is-active")}),5e3),n.close(t),window.location.reload()):alert(e.data)}}),!1}}),o=Backbone.View.extend({initialize:function(e){var o=new t;o.set({access_token:""}),new n({model:o})}});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 n=e(t.target).closest("[data-account_id]").data("account_id"),o=e(t.target).closest("td").find(".spinner");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_delete_account",account_id:n,nonce:qligg_account.nonce.qligg_delete_account},beforeSend:function(){o.addClass("is-active")},success:function(e){e.success?setTimeout((function(){window.location.reload()}),300):alert(e.data)},complete:function(){o.removeClass("is-active")},error:function(e,t){console.log(t)}})})),e(document).on("click","[data-qligg-renew-token]",(function(t){t.preventDefault();var n=e(t.target).closest("[data-account_id]").data("account_id"),o=e(t.target).closest("td").find(".spinner");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_renew_access_token",account_id:n,nonce:qligg_account.nonce.qligg_renew_access_token},beforeSend:function(){o.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(){o.removeClass("is-active")},error:function(e,t){console.log(t)}})})),e("#qligg-add-token").on("click",(function(e){e.preventDefault(),new o(e)}))}(i.a)},function(e,t){!function(){e.exports=this.wp.util}()},function(e,t){!function(){e.exports=this.window.Backbone}()},function(e,t){!function(){e.exports=this._["."]}()},function(e,t){!function(){e.exports=this.window.serializeJSON}()},function(e,t){!function(){e.exports=this.window.wpColorPicker}()}]);
1
+ !function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.jQuery}()},function(e,t,n){"use strict";n.r(t);var o=n(0),i=n.n(o);n(2),n(3),n(4),n(5),n(6);!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:""}}),n=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(){this.$el.html(this.templates.window(this.model.attributes))},updateModel:function(e){e.preventDefault();var t=this.$el.find("form"),n=_.getFormData(t);this.model.set(n)},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 n=this,o=n.$el.find("#qligg_modal"),i=o.find(".settings-save-status .spinner"),a=o.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:"qligg_add_account",nonce:qligg_account.nonce.qligg_add_account,account_data:n.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?(o.addClass("reload"),a.addClass("is-active"),_.delay((function(){a.removeClass("is-active")}),5e3),n.close(t),window.location.reload()):alert(e.data)}}),!1}}),o=Backbone.View.extend({initialize:function(e){var o=new t;o.set({access_token:""}),new n({model:o})}});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 n=e(t.target).closest("[data-account_id]").data("account_id"),o=e(t.target).closest("td").find(".spinner");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_delete_account",account_id:n,nonce:qligg_account.nonce.qligg_delete_account},beforeSend:function(){o.addClass("is-active")},success:function(e){e.success?setTimeout((function(){window.location.reload()}),300):alert(e.data)},complete:function(){o.removeClass("is-active")},error:function(e,t){console.log(t)}})})),e(document).on("click","[data-qligg-renew-token]",(function(t){t.preventDefault();var n=e(t.target).closest("[data-account_id]").data("account_id"),o=e(t.target).closest("td").find(".spinner");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_renew_access_token",account_id:n,nonce:qligg_account.nonce.qligg_renew_access_token},beforeSend:function(){o.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(){o.removeClass("is-active")},error:function(e,t){console.log(t)}})})),e("#qligg-add-token").on("click",(function(e){e.preventDefault(),new o(e)}))}(i.a)},function(e,t){!function(){e.exports=this.wp.util}()},function(e,t){!function(){e.exports=this.window.Backbone}()},function(e,t){!function(){e.exports=this._["."]}()},function(e,t){!function(){e.exports=this.window.serializeJSON}()},function(e,t){!function(){e.exports=this.window.wpColorPicker}()}]);
assets/backend/js/feed.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-serializejson', 'underscore', 'wp-color-picker-alpha', 'wp-util'), 'version' => 'df2cce8238a779e22d323802f429e85a');
1
+ <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-serializejson', 'underscore', 'wp-color-picker-alpha', 'wp-util'), 'version' => 'ab23c5bb6664cfea610b24e54e04e5df');
assets/backend/js/feed.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.jQuery}()},function(e,t,n){"use strict";n.r(t);var a=n(0),i=n.n(a);n(2),n(3),n(4),n(5),n(6);!function(e){var t,n=0,a=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 i=Backbone.Model.extend({defaults:qligg_feed.args}),o=Backbone.View.extend({initialize:function(t){var n=e(t.target).closest("[data-feed_position]").data("feed_id"),a=new i;Object.keys(qligg_feed.accounts).length?(a.set({id:n}),n||a.set({username:Object.keys(qligg_feed.accounts)[0]}),new l({model:a}).render()):confirm(qligg_feed.message.confirm_username)&&(window.location.href=qligg_feed.redirect.accounts)}}),l=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"),n=_.getFormData(t);this.model.set(n)},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").removeProp("disabled"),this.updateModel(t)},disableSave:function(t){e(".media-modal-submit").prop("disabled",!0)},tab:function(t){t.preventDefault();var n=this.$el.find("#qligg_modal"),a=e(t.currentTarget),i=n.find("ul.qligg-tabs"),o=a.find("a").attr("href").replace("#","");i.find(".active").removeClass("active"),a.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 r({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(){a()}),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)),a()},error:function(){alert("Error!")},success:function(e){e.success?(t.model.set(e.data),t.render()):alert(e.data)}})},edit:function(a){a.preventDefault();var i=this,o=e(a.target),l=parseInt(e("#qligg_feeds_table tr[data-feed_id]").length),r=parseInt(e("#qligg_feeds_table tr[data-feed_id="+i.model.get("id")+"]").data("feed_position"));n++,t&&clearTimeout(t),t=setTimeout((function(){r=o.hasClass("media-modal-next")?Math.min(r+n,l):Math.max(r-n,1),i.model.set({id:parseInt(e("#qligg_feeds_table tr[data-feed_position="+r+"]").data("feed_id"))}),n=0,i.load()}),300)},submit:function(t){t.preventDefault();var n=this,a=n.$el.find("#qligg_modal"),i=a.find(".settings-save-status .spinner"),o=a.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(n.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==n.model.attributes.id&&(a.addClass("reload"),n.reload(t),n.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)}}),r=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,n){console.log("wpColorPicker"),e(t.target).trigger("qligg.color.change")}})}))})),e("#qligg-add-feed").on("click",(function(e){e.preventDefault(),new o(e)}));var s=!1;e(".qligg_edit_feed").on("click",(function(e){e.preventDefault(),s||(new o(e),s=!0)})),e(".qligg_delete_feed").on("click",(function(t){if(t.preventDefault(),!confirm(qligg_feed.message.confirm_delete))return!1;var n=e(t.target),a=n.parent().find(".spinner"),i=n.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(){a.addClass("is-active")},complete:function(){a.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 n=e(t.target),a=n.parent().find(".spinner"),i=n.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(){a.addClass("is-active")},success:function(e){e.success?setTimeout((function(){a.removeClass("is-active")}),300):alert(e.data)},complete:function(){setTimeout((function(){a.removeClass("is-active")}),600)},error:function(e,t){console.log(t)}})})),e(document).on("click",".upload_image_button",(function(t){t.preventDefault();var n=wp.media.editor.send.attachment,a=e(this);return wp.media.editor.send.attachment=function(t,i){e(a).parent().prev().attr("src",i.url),e(a).prev().val(i.url).trigger("change"),wp.media.editor.send.attachment=n},wp.media.editor.open(a),!1})),e(document).on("click",".remove_image_button",(function(t){t.preventDefault();var n=e(this).parent().prev().attr("data-src");return e(this).parent().prev().attr("src",n),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")}))}(i.a)},function(e,t){!function(){e.exports=this._["."]}()},function(e,t){!function(){e.exports=this.window.serializeJSON}()},function(e,t){!function(){e.exports=this.window.wpColorPicker}()},function(e,t){!function(){e.exports=this.wp.util}()},function(e,t){!function(){e.exports=this.window.Backbone}()}]);
1
+ !function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.jQuery}()},function(e,t,n){"use strict";n.r(t);var a=n(0),i=n.n(a);n(2),n(3),n(4),n(5),n(6);!function(e){var t,n=0,a=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 i=Backbone.Model.extend({defaults:qligg_feed.args}),o=Backbone.View.extend({initialize:function(t){var n=e(t.target).closest("[data-feed_position]").data("feed_id"),a=new i;Object.keys(qligg_feed.accounts).length?(a.set({id:n}),n||a.set({username:Object.keys(qligg_feed.accounts)[0]}),new l({model:a}).render()):confirm(qligg_feed.message.confirm_username)&&(window.location.href=qligg_feed.redirect.accounts)}}),l=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"),n=_.getFormData(t);this.model.set(n)},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 n=this.$el.find("#qligg_modal"),a=e(t.currentTarget),i=n.find("ul.qligg-tabs"),o=a.find("a").attr("href").replace("#","");i.find(".active").removeClass("active"),a.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 r({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(){a()}),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)),a()},error:function(){alert("Error!")},success:function(e){e.success?(t.model.set(e.data),t.render()):alert(e.data)}})},edit:function(a){a.preventDefault();var i=this,o=e(a.target),l=parseInt(e("#qligg_feeds_table tr[data-feed_id]").length),r=parseInt(e("#qligg_feeds_table tr[data-feed_id="+i.model.get("id")+"]").data("feed_position"));n++,t&&clearTimeout(t),t=setTimeout((function(){r=o.hasClass("media-modal-next")?Math.min(r+n,l):Math.max(r-n,1),i.model.set({id:parseInt(e("#qligg_feeds_table tr[data-feed_position="+r+"]").data("feed_id"))}),n=0,i.load()}),300)},submit:function(t){t.preventDefault();var n=this,a=n.$el.find("#qligg_modal"),i=a.find(".settings-save-status .spinner"),o=a.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(n.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==n.model.attributes.id&&(a.addClass("reload"),n.reload(t),n.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)}}),r=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,n){console.log("wpColorPicker"),e(t.target).trigger("qligg.color.change")}})}))})),e("#qligg-add-feed").on("click",(function(e){e.preventDefault(),new o(e)}));var s=!1;e(".qligg_edit_feed").on("click",(function(e){e.preventDefault(),s||(new o(e),s=!0)})),e(".qligg_delete_feed").on("click",(function(t){if(t.preventDefault(),!confirm(qligg_feed.message.confirm_delete))return!1;var n=e(t.target),a=n.parent().find(".spinner"),i=n.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(){a.addClass("is-active")},complete:function(){a.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 n=e(t.target),a=n.parent().find(".spinner"),i=n.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(){a.addClass("is-active")},success:function(e){e.success?setTimeout((function(){a.removeClass("is-active")}),300):alert(e.data)},complete:function(){setTimeout((function(){a.removeClass("is-active")}),600)},error:function(e,t){console.log(t)}})})),e(document).on("click",".upload_image_button",(function(t){t.preventDefault();var n=wp.media.editor.send.attachment,a=e(this);return wp.media.editor.send.attachment=function(t,i){e(a).parent().prev().attr("src",i.url),e(a).prev().val(i.url).trigger("change"),wp.media.editor.send.attachment=n},wp.media.editor.open(a),!1})),e(document).on("click",".remove_image_button",(function(t){t.preventDefault();var n=e(this).parent().prev().attr("data-src");return e(this).parent().prev().attr("src",n),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")}))}(i.a)},function(e,t){!function(){e.exports=this._["."]}()},function(e,t){!function(){e.exports=this.window.serializeJSON}()},function(e,t){!function(){e.exports=this.window.wpColorPicker}()},function(e,t){!function(){e.exports=this.wp.util}()},function(e,t){!function(){e.exports=this.window.Backbone}()}]);
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.1
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.1');
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.2
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.2');
23
  }
24
  if (!defined('QLIGG_PLUGIN_FILE')) {
25
  define('QLIGG_PLUGIN_FILE', __FILE__);
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: quadlayers
3
  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.5.3
7
- Stable tag: 3.1.1
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.1 =
109
  * Fix. instagram token fail notification
110
 
3
  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.0
7
+ Stable tag: 3.1.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
105
 
106
  == Changelog ==
107
 
108
+ = 3.1.2 =
109
+ * Fix. save feed button
110
+
111
  = 3.1.1 =
112
  * Fix. instagram token fail notification
113