Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram - Version 1.10.7

Version Description

Added more templates in Gallery

Download this release

Release Info

Developer Icegram
Plugin Icon 128x128 Popups, Welcome Bar, Optins and Lead Generation Plugin – Icegram
Version 1.10.7
Comparing to
See all releases

Code changes from version 1.10.6 to 1.10.7

assets/js/gallery.min.js CHANGED
@@ -1 +1 @@
1
- window.wp=window.wp||{},function(a){var b,c;b=wp.themes=wp.themes||{},b.data=_wpThemeSettings,c=b.data.l10n,b.isInstall=!!b.data.settings.isInstall,b.isInstall=!0,b.url="//www.icegram.com/gallery/wp-json/wp/v2/galleryitem",_.extend(b,{model:{},view:{},routes:{},router:{},template:wp.template}),b.Model=Backbone.Model.extend({initialize:function(){var a;-1!==_.indexOf(b.data.installedThemes,this.get("slug"))&&this.set({installed:!0}),this.set({id:this.get("id")}),this.has("sections")&&(a=this.get("sections").description,this.set({description:a}))}}),b.view.Appearance=wp.Backbone.View.extend({el:"#wpbody-content .wrap .theme-browser",window:a(window),page:0,initialize:function(a){_.bindAll(this,"scroller"),this.SearchView=a.SearchView?a.SearchView:b.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(){this.view=new b.view.Themes({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.empty().append(this.view.el).addClass("rendered"),this.$el.append('<br class="clear"/>')},searchContainer:a("#wpbody h1:first"),search:function(){var d,e=this;1!==b.data.themes.length&&(d=new this.SearchView({collection:e.collection,parent:this}),d.render(),this.searchContainer.append(a.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+c.search+"</label>")).append(d.el))},scroller:function(){var a,b,c=this;a=this.window.scrollTop()+c.window.height(),b=c.$el.offset().top+c.$el.outerHeight(!1)-c.window.height(),b=Math.round(.9*b),a>b&&this.trigger("theme:scroll")}}),b.Collection=Backbone.Collection.extend({model:b.Model,terms:"",doSearch:function(c){this.terms!==c&&(this.terms=c,this.terms.length>0&&this.search(this.terms),""===this.terms&&(this.reset(b.data.themes),a("body").removeClass("no-results")),this.trigger("update"))},search:function(c){var d,e,f,g,h,i;this.reset(b.data.themes,{silent:!0}),c=c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),c=c.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+c+").+","i"),e=this.filter(function(a){return g=a.get("name").replace(/(<([^>]+)>)/gi,""),h=a.get("description").replace(/(<([^>]+)>)/gi,""),i=a.get("author").replace(/(<([^>]+)>)/gi,""),f=_.union(g,a.get("id"),h,i,a.get("tags")),d.test(a.get("author"))&&c.length>2&&a.set("displayAuthor",!0),d.test(f)}),0===e.length?this.trigger("query:empty"):a("body").removeClass("no-results"),this.reset(e)},paginate:function(a){var b=this;return a=a||0,b=_(b.rest(20*a)),b=_(b.first(20))},count:!1,query:function(c){var d,e,f,g=this.queries,h=this;if(this.currentQuery.request=c,d=_.find(g,function(a){return _.isEqual(a.request,c)}),e=_.has(c,"page"),e||(this.currentQuery.page=1),d||e){if(e)return this.apiCall(c,e).then(function(a){h.add(a.themes),h.trigger("query:success"),h.loadingThemes=!1}).fail(function(){h.trigger("query:fail")});0===d.themes.length?h.trigger("query:empty"):a("body").removeClass("no-results"),_.isNumber(d.total)&&(this.count=d.total),this.reset(d.themes),d.total||(this.count=this.length),this.trigger("update"),this.trigger("query:success",this.count)}else d=this.apiCall(c).then(function(a,d){var e=jQuery.merge([],a[0]);e=jQuery.merge(e,d[0]),b.data.themes=e,e&&(h.reset(e),f=e.length,g.push({themes:e,request:c,total:f})),h.trigger("update"),h.trigger("query:success",f),e.themes&&0===e.themes.length&&h.trigger("query:empty")}).fail(function(){h.trigger("query:fail")})},queries:[],currentQuery:{page:1,request:{}},apiCall:function(a,c){var d=b.url;if(!a||"undefined"==typeof a.id){var e=d+"?per_page=39&page=1",f=d+"?per_page=5&page=2",g=jQuery.when(jQuery.getJSON(e),jQuery.getJSON(f));return g}d=d+"/"+a.id},loadingThemes:!1}),b.view.Theme=wp.Backbone.View.extend({className:"theme",state:"grid",html:b.template("theme"),events:{click:b.isInstall?"preview":"expand",keydown:b.isInstall?"preview":"expand",touchend:b.isInstall?"preview":"expand",keyup:"addFocus",touchmove:"preventExpand"},touchDrag:!1,render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)).attr({tabindex:0}),this.model.get("displayAuthor")&&this.$el.addClass("display-author"),this.model.get("installed")&&this.$el.addClass("is-installed")},activeTheme:function(){this.model.get("active")&&this.$el.addClass("active")},addFocus:function(){var b=a(":focus").hasClass("theme")?a(":focus"):a(":focus").parents(".theme");a(".theme.focus").removeClass("focus"),b.addClass("focus")},expand:function(c){var d=this;return c=c||window.event,"keydown"!==c.type||13===c.which||32===c.which?this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).is(".theme-actions a")||(b.focusedTheme=this.$el,this.trigger("theme:expand",d.model.cid))):void 0},preventExpand:function(){this.touchDrag=!0},preview:function(c){var d,e,f=this;return c=c||window.event,this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).hasClass("button-primary")||"keydown"===c.type&&13!==c.which&&32!==c.which||"keydown"===c.type&&13!==c.which&&a(":focus").hasClass("button")||(c.preventDefault(),c=c||window.event,b.focusedTheme=this.$el,e=new b.view.Preview({model:this.model}),e.render(),this.setNavButtonsState(),1===this.model.collection.length?e.$el.addClass("no-navigation"):e.$el.removeClass("no-navigation"),a("div.wrap").append(e.el),this.listenTo(e,"theme:next",function(){return d=f.model,_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)+1),_.isUndefined(f.current)?(f.options.parent.parent.trigger("theme:end"),f.current=d):(e.model=f.current,e.render(),this.setNavButtonsState(),void a(".next-theme").focus())}).listenTo(e,"theme:previous",function(){d=f.model,0!==f.model.collection.indexOf(f.current)&&(_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)-1),_.isUndefined(f.current)||(e.model=f.current,e.render(),this.setNavButtonsState(),a(".previous-theme").focus()))}),this.listenTo(e,"preview:close",function(){f.current=f.model})))},setNavButtonsState:function(){var b=a(".theme-install-overlay"),c=_.isUndefined(this.current)?this.model:this.current;0===this.model.collection.indexOf(c)&&b.find(".previous-theme").addClass("disabled"),_.isUndefined(this.model.collection.at(this.model.collection.indexOf(c)+1))&&b.find(".next-theme").addClass("disabled")}}),b.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-theme":"deleteTheme","click .left":"previousTheme","click .right":"nextTheme"},html:b.template("theme-single"),render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)),this.activeTheme(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeTheme:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(b){var c;_.delay(function(){a(".theme-wrap a.button-primary:visible").focus()},500),b.on("keydown.wp-themes",function(d){9===d.which&&(c=a(d.target),c.is("button.left")&&d.shiftKey?(b.find(".theme-actions a:last-child").focus(),d.preventDefault()):c.is(".theme-actions a:last-child")&&(b.find("button.left").focus(),d.preventDefault()))})},collapse:function(c){var d,e=this;c=c||window.event,1!==b.data.themes.length&&(a(c.target).is(".theme-backdrop")||a(c.target).is(".close")||27===c.keyCode)&&(a("body").addClass("closing-overlay"),this.$el.fadeOut(130,function(){a("body").removeClass("closing-overlay"),e.closeOverlay(),d=document.body.scrollTop,b.router.navigate(b.router.baseUrl("")),document.body.scrollTop=d,b.focusedTheme&&b.focusedTheme.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled"),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled")},closeOverlay:function(){a("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("theme:collapse")},deleteTheme:function(){return confirm(b.data.settings.confirmDelete)},nextTheme:function(){var a=this;return a.trigger("theme:next",a.model.cid),!1},previousTheme:function(){var a=this;return a.trigger("theme:previous",a.model.cid),!1},screenshotCheck:function(a){var b,c;b=a.find(".screenshot img"),c=new Image,c.src=b.attr("src"),c.width&&c.width<=300&&a.addClass("small-screenshot")}}),b.view.Preview=b.view.Details.extend({className:"wp-full-overlay expanded",el:".theme-install-overlay",events:{"click .close-full-overlay":"close","click .collapse-sidebar":"collapse","click .previous-theme":"previousTheme","click .next-theme":"nextTheme",keyup:"keyEvent"},html:b.template("theme-preview"),render:function(){var c=this,d=this.model.toJSON();this.$el.removeClass("iframe-ready").html(this.html(d)),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.get("id")),{replace:!0}),this.$el.fadeIn(200,function(){a("body").addClass("theme-installer-active full-overlay-active"),a(".close-full-overlay").focus()}),this.$el.find("iframe").one("load",function(){c.iframeLoaded()}),d.plan<=b.data.settings.ig_plan?this.$el.find(".theme-install").show():this.$el.find(".ig-get-pro").show()},iframeLoaded:function(){this.$el.addClass("iframe-ready")},close:function(){return this.$el.fadeOut(200,function(){a("body").removeClass("theme-installer-active full-overlay-active"),b.focusedTheme&&b.focusedTheme.focus()}).removeClass("iframe-ready"),b.router.navigate(b.router.baseUrl("")),this.trigger("preview:close"),this.undelegateEvents(),this.unbind(),!1},collapse:function(b){var d=a(b.currentTarget);return"true"===d.attr("aria-expanded")?d.attr({"aria-expanded":"false","aria-label":c.expandSidebar}):d.attr({"aria-expanded":"true","aria-label":c.collapseSidebar}),this.$el.toggleClass("collapsed").toggleClass("expanded"),!1},keyEvent:function(a){27===a.keyCode&&(this.undelegateEvents(),this.close()),39===a.keyCode&&_.once(this.nextTheme()),37===a.keyCode&&this.previousTheme()}}),b.view.Themes=wp.Backbone.View.extend({className:"themes",$overlay:a("div.theme-overlay"),index:0,count:a(".wp-core-ui .theme-count"),liveThemeCount:0,initialize:function(b){var c=this;this.parent=b.parent,this.setView("grid"),c.currentTheme(),this.listenTo(c.collection,"update",function(){c.parent.page=0,c.currentTheme(),c.render(this)}),this.listenTo(c.collection,"query:success",function(a){_.isNumber(a)?(c.count.text(a),c.announceSearchResults(a)):(c.count.text(c.collection.length),c.announceSearchResults(c.collection.length))}),this.listenTo(c.collection,"query:empty",function(){a("body").addClass("no-results")}),this.listenTo(this.parent,"theme:scroll",function(){c.renderThemes(c.parent.page)}),this.listenTo(this.parent,"theme:close",function(){c.overlay&&c.overlay.closeOverlay()}),a("body").on("keyup",function(a){c.overlay&&(39===a.keyCode&&c.overlay.nextTheme(),37===a.keyCode&&c.overlay.previousTheme(),27===a.keyCode&&c.overlay.collapse(a))})},render:function(){this.$el.empty(),1===b.data.themes.length&&(this.singleTheme=new b.view.Details({model:this.collection.models[0]}),this.singleTheme.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleTheme.el)),this.options.collection.size()>0&&this.renderThemes(this.parent.page),this.liveThemeCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveThemeCount),this.announceSearchResults(this.liveThemeCount)},renderThemes:function(d){var e=this;return e.instance=e.collection.paginate(d),0===e.instance.size()?void this.parent.trigger("theme:end"):(!b.isInstall&&d>=1&&a(".add-new-theme").remove(),e.instance.each(function(a){e.theme=new b.view.Theme({model:a,parent:e}),e.theme.render(),e.$el.append(e.theme.el),e.listenTo(e.theme,"theme:expand",e.expand,e)}),!b.isInstall&&b.data.settings.canInstall&&this.$el.append('<div class="theme add-new-theme"><a href="'+b.data.settings.installURI+'"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">'+c.addNew+"</h2></a></div>"),void this.parent.page++)},currentTheme:function(){var a,b=this;a=b.collection.findWhere({active:!0}),a&&(b.collection.remove(a),b.collection.add(a,{at:0}))},setView:function(a){return a},expand:function(c){var d=this;this.model=d.collection.get(c),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.id)),this.setView("detail"),a("body").addClass("modal-open"),this.overlay=new b.view.Details({model:d.model}),this.overlay.render(),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"theme:next",function(){d.next([d.model.cid])}).listenTo(this.overlay,"theme:previous",function(){d.previous([d.model.cid])})},next:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)+1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},previous:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)-1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},announceSearchResults:function(a){0===a?wp.a11y.speak(c.noThemesFound):wp.a11y.speak(c.themesFound.replace("%d",a))}}),b.view.Search=wp.Backbone.View.extend({tagName:"input",className:"wp-filter-search",id:"wp-filter-search-input",searching:!1,attributes:{placeholder:c.searchPlaceholder,type:"search","aria-describedby":"live-search-desc"},events:{input:"search",keyup:"search",blur:"pushState"},initialize:function(a){this.parent=a.parent,this.listenTo(this.parent,"theme:close",function(){this.searching=!1})},search:function(a){"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a)},doSearch:_.debounce(function(a){var c={};this.collection.doSearch(a.target.value),this.searching&&13!==a.which?c.replace=!0:this.searching=!0,a.target.value?b.router.navigate(b.router.baseUrl(b.router.searchPath+a.target.value),c):b.router.navigate(b.router.baseUrl(""))},500),pushState:function(a){var c=b.router.baseUrl("");a.target.value&&(c=b.router.baseUrl(b.router.searchPath+a.target.value)),this.searching=!1,b.router.navigate(c)}}),b.Router=Backbone.Router.extend({routes:{"edit.php?post_type=ig_campaign&page=icegram-gallery&theme=:id":"theme","edit.php?post_type=ig_campaign&page=icegram-gallery&search=:query":"search","edit.php?post_type=ig_campaign&page=icegram-gallery&s=:query":"search","edit.php?post_type=ig_campaign&page=icegram-gallery":"themes","":"themes"},baseUrl:function(a){return"themes.php"+a},themePath:"?theme=",searchPath:"?search=",search:function(b){a(".wp-filter-search").val(b)},themes:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.view.InstallerSearch=b.view.Search.extend({events:{input:"search",keyup:"search"},search:function(a){("keyup"!==a.type||9!==a.which&&16!==a.which)&&(this.collection=this.options.parent.view.collection,"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a.target.value))},doSearch:_.debounce(function(c){var d,e,f,g,h,i;if(a(".filter-links li > a.current").removeClass("current"),a("body").removeClass("show-filters filters-applied show-favorites-form"),this.collection.reset(b.data.themes,{silent:!0}),term=c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),term=term.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+term+").+","i"),e=this.collection.filter(function(a){return g=a.get("description"),h=a.get("content").rendered.replace(/(<([^>]+)>)/gi,""),h=h.replace(/\n/g,""),i=a.get("message_type"),f=i+h+g,d.test(f)})){this.collection.reset(e);var j=this.collection.length}this.collection.trigger("update"),this.collection.trigger("query:success",j),b.router.navigate(b.router.baseUrl(b.router.searchPath+c),{replace:!0})},500)}),b.view.Installer=b.view.Appearance.extend({el:"#wpbody-content .wrap",events:{"click .filter-links li > a":"onSort","click .theme-filter":"onFilter","click .drawer-toggle":"moreFilters","click .filter-drawer .apply-filters":"applyFilters",'click .filter-group [type="checkbox"]':"addFilter","click .filter-drawer .clear-filters":"clearFilters","click .filtered-by":"backToFilters","click .favorites-form-submit":"saveUsername","keyup #wporg-username-input":"saveUsername"},render:function(){var d=this;this.search(),this.uploader(),this.collection=new b.Collection,this.listenTo(this,"theme:end",function(){d.collection.loadingThemes||(d.collection.loadingThemes=!0,d.collection.currentQuery.page++,_.extend(d.collection.currentQuery.request,{page:d.collection.currentQuery.page}),d.collection.query(d.collection.currentQuery.request))}),this.listenTo(this.collection,"query:success",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove()}),this.listenTo(this.collection,"query:fail",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove(),a(".theme-browser").find("div.themes").before('<div class="error"><p>'+c.error+"</p></div>")}),this.view&&this.view.remove(),this.view=new b.view.Themes({collection:this.collection,parent:this}),this.page=0,this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},browse:function(a){if(this.collection.length<=0&&this.collection.query({browse:a}),"featured"==a||"all"==a)this.collection.query({browse:a});else{var b;if(b=this.collection.filter(function(b){var c=_.invert(b.attributes.tags);return c.hasOwnProperty(a)?!0:void 0})){this.collection.reset(b);var c=this.collection.length}}this.collection.trigger("update"),this.collection.trigger("query:success",c)},onSort:function(c){var d=a(c.target),e=d.data("sort");c.preventDefault(),a("body").removeClass("filters-applied show-filters"),d.hasClass(this.activeClass)||(this.collection.reset(b.data.themes,{silent:!0}),this.sort(e),b.router.navigate(b.router.baseUrl(b.router.browsePath+e)))},sort:function(b){this.clearSearch(),a(".filter-links li > a, .theme-filter").removeClass(this.activeClass),a('[data-sort="'+b+'"]').addClass(this.activeClass),"favorites"===b?a("body").addClass("show-favorites-form"):a("body").removeClass("show-favorites-form"),this.browse(b)},onFilter:function(b){var c,d=a(b.target),e=d.data("filter");d.hasClass(this.activeClass)||(a(".filter-links li > a, .theme-section").removeClass(this.activeClass),d.addClass(this.activeClass),e&&(e=_.union(e,this.filtersChecked()),c={tag:[e]},this.collection.query(c)))},addFilter:function(){this.filtersChecked()},applyFilters:function(b){var c,d=this.filtersChecked(),e={tag:d},f=a(".filtered-by .tags");b&&b.preventDefault(),a("body").addClass("filters-applied"),a(".filter-links li > a.current").removeClass("current"),f.empty(),_.each(d,function(b){c=a('label[for="filter-id-'+b+'"]').text(),f.append('<span class="tag">'+c+"</span>")}),this.collection.query(e)},saveUsername:function(b){var c=a("#wporg-username-input").val(),d={browse:"favorites",user:c},e=this;return b&&b.preventDefault(),"keyup"!==b.type||13===b.which?wp.ajax.send("save-wporg-username",{data:{username:c},success:function(){e.collection.query(d)}}):void 0},filtersChecked:function(){var b=a(".filter-group").find(":checkbox"),c=[];return _.each(b.filter(":checked"),function(b){c.push(a(b).prop("value"))}),0===c.length?(a(".filter-drawer .apply-filters").find("span").text(""),a(".filter-drawer .clear-filters").hide(),a("body").removeClass("filters-applied"),!1):(a(".filter-drawer .apply-filters").find("span").text(c.length),a(".filter-drawer .clear-filters").css("display","inline-block"),c)},activeClass:"current",searchContainer:a(".wp-filter .search-form"),uploader:function(){a("a.upload").on("click",function(c){c.preventDefault(),a("body").addClass("show-upload-theme"),b.router.navigate(b.router.baseUrl("?upload"),{replace:!0})}),a("a.browse-themes").on("click",function(c){c.preventDefault(),a("body").removeClass("show-upload-theme"),b.router.navigate(b.router.baseUrl(""),{replace:!0})})},moreFilters:function(c){return c.preventDefault(),a("body").hasClass("filters-applied")?this.backToFilters():a("body").hasClass("show-filters")&&this.filtersChecked()?this.addFilter():(this.clearSearch(),b.router.navigate(b.router.baseUrl("")),void a("body").toggleClass("show-filters"))},clearFilters:function(b){var c=a(".filter-group").find(":checkbox"),d=this;b.preventDefault(),_.each(c.filter(":checked"),function(b){return a(b).prop("checked",!1),d.filtersChecked()})},backToFilters:function(b){b&&b.preventDefault(),a("body").removeClass("filters-applied")},clearSearch:function(){a("#wp-filter-search-input").val("")}}),b.InstallerRouter=Backbone.Router.extend({routes:{"edit.php?post_type=ig_campaign&page=icegram-gallery&item=:id":"preview","edit.php?post_type=ig_campaign&page=icegram-gallery&browse=:sort":"sort","edit.php?post_type=ig_campaign&page=icegram-gallery":"sort","post-new.php?post_type=ig_campaign":"sort","edit.php?post_type=ig_campaign&page=icegram-gallery&search=:query":"search"},baseUrl:function(a){return"edit.php?post_type=ig_campaign&page=icegram-gallery"+a},themePath:"&item=",browsePath:"&browse=",searchPath:"&search=",search:function(b){a(".wp-filter-search").val(b)},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.RunInstaller={init:function(){this.view=new b.view.Installer({section:"featured",SearchView:b.view.InstallerSearch}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this,d={};b.router=new b.InstallerRouter,b.router.on("route:preview",function(a){d.id=a,c.view.collection.query(d),c.view.collection.once("update",function(){c.view.view.theme.preview()})}),b.router.on("route:sort",function(a){a||(a="featured"),c.view.sort(a),c.view.trigger("theme:close")}),b.router.on("route:upload",function(){a("a.upload").trigger("click")}),b.router.on("route:search",function(){a(".wp-filter-search").focus().trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},a(document).ready(function(){b.isInstall&&b.RunInstaller.init(),a(".broken-themes .delete-theme").on("click",function(){return confirm(_wpThemeSettings.settings.confirmDelete)})})}(jQuery);var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>1040?1040:c,f=0;a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"}))},a(window).resize(function(){tb_position()})});
1
+ window.wp=window.wp||{},function(a){var b,c;b=wp.themes=wp.themes||{},b.data=_wpThemeSettings,c=b.data.l10n,b.isInstall=!!b.data.settings.isInstall,b.isInstall=!0,b.url="//www.icegram.com/gallery/wp-json/wp/v2/galleryitem",_.extend(b,{model:{},view:{},routes:{},router:{},template:wp.template}),b.Model=Backbone.Model.extend({initialize:function(){var a;-1!==_.indexOf(b.data.installedThemes,this.get("slug"))&&this.set({installed:!0}),this.set({id:this.get("id")}),this.has("sections")&&(a=this.get("sections").description,this.set({description:a}))}}),b.view.Appearance=wp.Backbone.View.extend({el:"#wpbody-content .wrap .theme-browser",window:a(window),page:0,initialize:function(a){_.bindAll(this,"scroller"),this.SearchView=a.SearchView?a.SearchView:b.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(){this.view=new b.view.Themes({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.empty().append(this.view.el).addClass("rendered"),this.$el.append('<br class="clear"/>')},searchContainer:a("#wpbody h1:first"),search:function(){var d,e=this;1!==b.data.themes.length&&(d=new this.SearchView({collection:e.collection,parent:this}),d.render(),this.searchContainer.append(a.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+c.search+"</label>")).append(d.el))},scroller:function(){var a,b,c=this;a=this.window.scrollTop()+c.window.height(),b=c.$el.offset().top+c.$el.outerHeight(!1)-c.window.height(),b=Math.round(.9*b),a>b&&this.trigger("theme:scroll")}}),b.Collection=Backbone.Collection.extend({model:b.Model,terms:"",doSearch:function(c){this.terms!==c&&(this.terms=c,this.terms.length>0&&this.search(this.terms),""===this.terms&&(this.reset(b.data.themes),a("body").removeClass("no-results")),this.trigger("update"))},search:function(c){var d,e,f,g,h,i;this.reset(b.data.themes,{silent:!0}),c=c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),c=c.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+c+").+","i"),e=this.filter(function(a){return g=a.get("name").replace(/(<([^>]+)>)/gi,""),h=a.get("description").replace(/(<([^>]+)>)/gi,""),i=a.get("author").replace(/(<([^>]+)>)/gi,""),f=_.union(g,a.get("id"),h,i,a.get("tags")),d.test(a.get("author"))&&c.length>2&&a.set("displayAuthor",!0),d.test(f)}),0===e.length?this.trigger("query:empty"):a("body").removeClass("no-results"),this.reset(e)},paginate:function(a){var b=this;return a=a||0,b=_(b.rest(20*a)),b=_(b.first(20))},count:!1,query:function(b){var c,d,e,f=this.queries,g=this;if(this.currentQuery.request=b,c=_.find(f,function(a){return _.isEqual(a.request,b)}),d=_.has(b,"page"),d||(this.currentQuery.page=1),c||d){if(d)return this.apiCall(b,d).then(function(a){g.add(a.themes),g.trigger("query:success"),g.loadingThemes=!1}).fail(function(){g.trigger("query:fail")});0===c.themes.length?g.trigger("query:empty"):a("body").removeClass("no-results"),_.isNumber(c.total)&&(this.count=c.total),this.reset(c.themes),c.total||(this.count=this.length),this.trigger("update"),this.trigger("query:success",this.count)}else c=this.apiCall(b).done(function(a){if(a){g.reset(a);var c=_.sortBy(g.models,function(a){return a.attributes.modified});g.reset(c.reverse()),e=a.length,f.push({themes:a,request:b,total:e})}g.trigger("update"),g.trigger("query:success",e),a.themes&&0===a.themes.length&&g.trigger("query:empty")}).fail(function(){g.trigger("query:fail")})},queries:[],currentQuery:{page:1,request:{}},apiCall:function(a,c){var d=b.url;if(a&&"undefined"!=typeof a.id)return d=d+"/"+a.id,jQuery.getJSON(d,function(a){});var e,f=d+"?per_page=100&page=1",g=d+"?per_page=1&page=2";return jQuery.getJSON(f,function(a){e=a.contents,jQuery.getJSON(g,function(a){jQuery.extend(e,a.contents)})})},loadingThemes:!1}),b.view.Theme=wp.Backbone.View.extend({className:"theme",state:"grid",html:b.template("theme"),events:{click:b.isInstall?"preview":"expand",keydown:b.isInstall?"preview":"expand",touchend:b.isInstall?"preview":"expand",keyup:"addFocus",touchmove:"preventExpand"},touchDrag:!1,render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)).attr({tabindex:0}),this.model.get("displayAuthor")&&this.$el.addClass("display-author"),this.model.get("installed")&&this.$el.addClass("is-installed")},activeTheme:function(){this.model.get("active")&&this.$el.addClass("active")},addFocus:function(){var b=a(":focus").hasClass("theme")?a(":focus"):a(":focus").parents(".theme");a(".theme.focus").removeClass("focus"),b.addClass("focus")},expand:function(c){var d=this;return c=c||window.event,"keydown"!==c.type||13===c.which||32===c.which?this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).is(".theme-actions a")||(b.focusedTheme=this.$el,this.trigger("theme:expand",d.model.cid))):void 0},preventExpand:function(){this.touchDrag=!0},preview:function(c){var d,e,f=this;return c=c||window.event,this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).hasClass("button-primary")||"keydown"===c.type&&13!==c.which&&32!==c.which||"keydown"===c.type&&13!==c.which&&a(":focus").hasClass("button")||(c.preventDefault(),c=c||window.event,b.focusedTheme=this.$el,e=new b.view.Preview({model:this.model}),e.render(),this.setNavButtonsState(),1===this.model.collection.length?e.$el.addClass("no-navigation"):e.$el.removeClass("no-navigation"),a("div.wrap").append(e.el),this.listenTo(e,"theme:next",function(){return d=f.model,_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)+1),_.isUndefined(f.current)?(f.options.parent.parent.trigger("theme:end"),f.current=d):(e.model=f.current,e.render(),this.setNavButtonsState(),void a(".next-theme").focus())}).listenTo(e,"theme:previous",function(){d=f.model,0!==f.model.collection.indexOf(f.current)&&(_.isUndefined(f.current)||(d=f.current),f.current=f.model.collection.at(f.model.collection.indexOf(d)-1),_.isUndefined(f.current)||(e.model=f.current,e.render(),this.setNavButtonsState(),a(".previous-theme").focus()))}),this.listenTo(e,"preview:close",function(){f.current=f.model})))},setNavButtonsState:function(){var b=a(".theme-install-overlay"),c=_.isUndefined(this.current)?this.model:this.current;0===this.model.collection.indexOf(c)&&b.find(".previous-theme").addClass("disabled"),_.isUndefined(this.model.collection.at(this.model.collection.indexOf(c)+1))&&b.find(".next-theme").addClass("disabled")}}),b.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-theme":"deleteTheme","click .left":"previousTheme","click .right":"nextTheme"},html:b.template("theme-single"),render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)),this.activeTheme(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeTheme:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(b){var c;_.delay(function(){a(".theme-wrap a.button-primary:visible").focus()},500),b.on("keydown.wp-themes",function(d){9===d.which&&(c=a(d.target),c.is("button.left")&&d.shiftKey?(b.find(".theme-actions a:last-child").focus(),d.preventDefault()):c.is(".theme-actions a:last-child")&&(b.find("button.left").focus(),d.preventDefault()))})},collapse:function(c){var d,e=this;c=c||window.event,1!==b.data.themes.length&&(a(c.target).is(".theme-backdrop")||a(c.target).is(".close")||27===c.keyCode)&&(a("body").addClass("closing-overlay"),this.$el.fadeOut(130,function(){a("body").removeClass("closing-overlay"),e.closeOverlay(),d=document.body.scrollTop,b.router.navigate(b.router.baseUrl("")),document.body.scrollTop=d,b.focusedTheme&&b.focusedTheme.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled"),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled")},closeOverlay:function(){a("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("theme:collapse")},deleteTheme:function(){return confirm(b.data.settings.confirmDelete)},nextTheme:function(){var a=this;return a.trigger("theme:next",a.model.cid),!1},previousTheme:function(){var a=this;return a.trigger("theme:previous",a.model.cid),!1},screenshotCheck:function(a){var b,c;b=a.find(".screenshot img"),c=new Image,c.src=b.attr("src"),c.width&&c.width<=300&&a.addClass("small-screenshot")}}),b.view.Preview=b.view.Details.extend({className:"wp-full-overlay expanded",el:".theme-install-overlay",events:{"click .close-full-overlay":"close","click .collapse-sidebar":"collapse","click .previous-theme":"previousTheme","click .next-theme":"nextTheme",keyup:"keyEvent"},html:b.template("theme-preview"),render:function(){var c=this,d=this.model.toJSON();this.$el.removeClass("iframe-ready").html(this.html(d)),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.get("id")),{replace:!0}),this.$el.fadeIn(200,function(){a("body").addClass("theme-installer-active full-overlay-active"),a(".close-full-overlay").focus()}),this.$el.find("iframe").one("load",function(){c.iframeLoaded()}),d.plan<=b.data.settings.ig_plan?this.$el.find(".theme-install").show():this.$el.find(".ig-get-pro").show()},iframeLoaded:function(){this.$el.addClass("iframe-ready")},close:function(){return this.$el.fadeOut(200,function(){a("body").removeClass("theme-installer-active full-overlay-active"),b.focusedTheme&&b.focusedTheme.focus()}).removeClass("iframe-ready"),b.router.navigate(b.router.baseUrl("")),this.trigger("preview:close"),this.undelegateEvents(),this.unbind(),!1},collapse:function(b){var d=a(b.currentTarget);return"true"===d.attr("aria-expanded")?d.attr({"aria-expanded":"false","aria-label":c.expandSidebar}):d.attr({"aria-expanded":"true","aria-label":c.collapseSidebar}),this.$el.toggleClass("collapsed").toggleClass("expanded"),!1},keyEvent:function(a){27===a.keyCode&&(this.undelegateEvents(),this.close()),39===a.keyCode&&_.once(this.nextTheme()),37===a.keyCode&&this.previousTheme()}}),b.view.Themes=wp.Backbone.View.extend({className:"themes",$overlay:a("div.theme-overlay"),index:0,count:a(".wp-core-ui .theme-count"),liveThemeCount:0,initialize:function(b){var c=this;this.parent=b.parent,this.setView("grid"),c.currentTheme(),this.listenTo(c.collection,"update",function(){c.parent.page=0,c.currentTheme(),c.render(this)}),this.listenTo(c.collection,"query:success",function(a){_.isNumber(a)?(c.count.text(a),c.announceSearchResults(a)):(c.count.text(c.collection.length),c.announceSearchResults(c.collection.length))}),this.listenTo(c.collection,"query:empty",function(){a("body").addClass("no-results")}),this.listenTo(this.parent,"theme:scroll",function(){c.renderThemes(c.parent.page)}),this.listenTo(this.parent,"theme:close",function(){c.overlay&&c.overlay.closeOverlay()}),a("body").on("keyup",function(a){c.overlay&&(39===a.keyCode&&c.overlay.nextTheme(),37===a.keyCode&&c.overlay.previousTheme(),27===a.keyCode&&c.overlay.collapse(a))})},render:function(){this.$el.empty(),1===b.data.themes.length&&(this.singleTheme=new b.view.Details({model:this.collection.models[0]}),this.singleTheme.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleTheme.el)),this.options.collection.size()>0&&this.renderThemes(this.parent.page),this.liveThemeCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveThemeCount),this.announceSearchResults(this.liveThemeCount)},renderThemes:function(d){var e=this;return e.instance=e.collection.paginate(d),0===e.instance.size()?void this.parent.trigger("theme:end"):(!b.isInstall&&d>=1&&a(".add-new-theme").remove(),e.instance.each(function(a){e.theme=new b.view.Theme({model:a,parent:e}),e.theme.render(),e.$el.append(e.theme.el),e.listenTo(e.theme,"theme:expand",e.expand,e)}),!b.isInstall&&b.data.settings.canInstall&&this.$el.append('<div class="theme add-new-theme"><a href="'+b.data.settings.installURI+'"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">'+c.addNew+"</h2></a></div>"),void this.parent.page++)},currentTheme:function(){var a,b=this;a=b.collection.findWhere({active:!0}),a&&(b.collection.remove(a),b.collection.add(a,{at:0}))},setView:function(a){return a},expand:function(c){var d=this;this.model=d.collection.get(c),b.router.navigate(b.router.baseUrl(b.router.themePath+this.model.id)),this.setView("detail"),a("body").addClass("modal-open"),this.overlay=new b.view.Details({model:d.model}),this.overlay.render(),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"theme:next",function(){d.next([d.model.cid])}).listenTo(this.overlay,"theme:previous",function(){d.previous([d.model.cid])})},next:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)+1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},previous:function(a){var b,c,d=this;b=d.collection.get(a[0]),c=d.collection.at(d.collection.indexOf(b)-1),void 0!==c&&(this.overlay.closeOverlay(),d.theme.trigger("theme:expand",c.cid))},announceSearchResults:function(a){0===a?wp.a11y.speak(c.noThemesFound):wp.a11y.speak(c.themesFound.replace("%d",a))}}),b.view.Search=wp.Backbone.View.extend({tagName:"input",className:"wp-filter-search",id:"wp-filter-search-input",searching:!1,attributes:{placeholder:c.searchPlaceholder,type:"search","aria-describedby":"live-search-desc"},events:{input:"search",keyup:"search",blur:"pushState"},initialize:function(a){this.parent=a.parent,this.listenTo(this.parent,"theme:close",function(){this.searching=!1})},search:function(a){"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a)},doSearch:_.debounce(function(a){var c={};this.collection.doSearch(a.target.value),this.searching&&13!==a.which?c.replace=!0:this.searching=!0,a.target.value?b.router.navigate(b.router.baseUrl(b.router.searchPath+a.target.value),c):b.router.navigate(b.router.baseUrl(""))},500),pushState:function(a){var c=b.router.baseUrl("");a.target.value&&(c=b.router.baseUrl(b.router.searchPath+a.target.value)),this.searching=!1,b.router.navigate(c)}}),b.Router=Backbone.Router.extend({routes:{"edit.php?post_type=ig_campaign&page=icegram-gallery&theme=:id":"theme","edit.php?post_type=ig_campaign&page=icegram-gallery&search=:query":"search","edit.php?post_type=ig_campaign&page=icegram-gallery&s=:query":"search","edit.php?post_type=ig_campaign&page=icegram-gallery":"themes","":"themes"},baseUrl:function(a){return"themes.php"+a},themePath:"?theme=",searchPath:"?search=",search:function(b){a(".wp-filter-search").val(b)},themes:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.view.InstallerSearch=b.view.Search.extend({events:{input:"search",keyup:"search"},search:function(a){("keyup"!==a.type||9!==a.which&&16!==a.which)&&(this.collection=this.options.parent.view.collection,"keyup"===a.type&&27===a.which&&(a.target.value=""),this.doSearch(a.target.value))},doSearch:_.debounce(function(c){var d,e,f,g,h,i;if(a(".filter-links li > a.current").removeClass("current"),a("body").removeClass("show-filters filters-applied show-favorites-form"),this.collection.reset(b.data.themes,{silent:!0}),term=c.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),term=term.replace(/ /g,")(?=.*"),d=new RegExp("^(?=.*"+term+").+","i"),e=this.collection.filter(function(a){return g=a.get("description"),h=a.get("content").rendered.replace(/(<([^>]+)>)/gi,""),h=h.replace(/\n/g,""),i=a.get("message_type"),f=i+h+g,d.test(f)})){this.collection.reset(e);var j=this.collection.length}this.collection.trigger("update"),this.collection.trigger("query:success",j),b.router.navigate(b.router.baseUrl(b.router.searchPath+c),{replace:!0})},500)}),b.view.Installer=b.view.Appearance.extend({el:"#wpbody-content .wrap",events:{"click .filter-links li > a":"onSort","click .theme-filter":"onFilter","click .drawer-toggle":"moreFilters","click .filter-drawer .apply-filters":"applyFilters",'click .filter-group [type="checkbox"]':"addFilter","click .filter-drawer .clear-filters":"clearFilters","click .filtered-by":"backToFilters","click .favorites-form-submit":"saveUsername","keyup #wporg-username-input":"saveUsername"},render:function(){var d=this;this.search(),this.uploader(),this.collection=new b.Collection,this.listenTo(this,"theme:end",function(){d.collection.loadingThemes||(d.collection.loadingThemes=!0,d.collection.currentQuery.page++,_.extend(d.collection.currentQuery.request,{page:d.collection.currentQuery.page}),d.collection.query(d.collection.currentQuery.request))}),this.listenTo(this.collection,"query:success",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove()}),this.listenTo(this.collection,"query:fail",function(){a("body").removeClass("loading-content"),a(".theme-browser").find("div.error").remove(),a(".theme-browser").find("div.themes").before('<div class="error"><p>'+c.error+"</p></div>")}),this.view&&this.view.remove(),this.view=new b.view.Themes({collection:this.collection,parent:this}),this.page=0,this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},browse:function(a){if(this.collection.length<=0&&this.collection.query({browse:a}),"featured"==a||"all"==a)this.collection.query({browse:a});else{var b;if(b=this.collection.filter(function(b){var c=_.invert(b.attributes.tags);return c.hasOwnProperty(a)?!0:void 0})){this.collection.reset(b);var c=this.collection.length}}this.collection.trigger("update"),this.collection.trigger("query:success",c)},onSort:function(c){var d=a(c.target),e=d.data("sort");c.preventDefault(),a("body").removeClass("filters-applied show-filters"),d.hasClass(this.activeClass)||(this.collection.reset(b.data.themes,{silent:!0}),this.sort(e),b.router.navigate(b.router.baseUrl(b.router.browsePath+e)))},sort:function(b){this.clearSearch(),a(".filter-links li > a, .theme-filter").removeClass(this.activeClass),a('[data-sort="'+b+'"]').addClass(this.activeClass),"favorites"===b?a("body").addClass("show-favorites-form"):a("body").removeClass("show-favorites-form"),this.browse(b)},onFilter:function(b){var c,d=a(b.target),e=d.data("filter");d.hasClass(this.activeClass)||(a(".filter-links li > a, .theme-section").removeClass(this.activeClass),d.addClass(this.activeClass),e&&(e=_.union(e,this.filtersChecked()),c={tag:[e]},this.collection.query(c)))},addFilter:function(){this.filtersChecked()},applyFilters:function(b){var c,d=this.filtersChecked(),e={tag:d},f=a(".filtered-by .tags");b&&b.preventDefault(),a("body").addClass("filters-applied"),a(".filter-links li > a.current").removeClass("current"),f.empty(),_.each(d,function(b){c=a('label[for="filter-id-'+b+'"]').text(),f.append('<span class="tag">'+c+"</span>")}),this.collection.query(e)},saveUsername:function(b){var c=a("#wporg-username-input").val(),d={browse:"favorites",user:c},e=this;return b&&b.preventDefault(),"keyup"!==b.type||13===b.which?wp.ajax.send("save-wporg-username",{data:{username:c},success:function(){e.collection.query(d)}}):void 0},filtersChecked:function(){var b=a(".filter-group").find(":checkbox"),c=[];return _.each(b.filter(":checked"),function(b){c.push(a(b).prop("value"))}),0===c.length?(a(".filter-drawer .apply-filters").find("span").text(""),a(".filter-drawer .clear-filters").hide(),a("body").removeClass("filters-applied"),!1):(a(".filter-drawer .apply-filters").find("span").text(c.length),a(".filter-drawer .clear-filters").css("display","inline-block"),c)},activeClass:"current",searchContainer:a(".wp-filter .search-form"),uploader:function(){a("a.upload").on("click",function(c){c.preventDefault(),a("body").addClass("show-upload-theme"),b.router.navigate(b.router.baseUrl("?upload"),{replace:!0})}),a("a.browse-themes").on("click",function(c){c.preventDefault(),a("body").removeClass("show-upload-theme"),b.router.navigate(b.router.baseUrl(""),{replace:!0})})},moreFilters:function(c){return c.preventDefault(),a("body").hasClass("filters-applied")?this.backToFilters():a("body").hasClass("show-filters")&&this.filtersChecked()?this.addFilter():(this.clearSearch(),b.router.navigate(b.router.baseUrl("")),void a("body").toggleClass("show-filters"))},clearFilters:function(b){var c=a(".filter-group").find(":checkbox"),d=this;b.preventDefault(),_.each(c.filter(":checked"),function(b){return a(b).prop("checked",!1),d.filtersChecked()})},backToFilters:function(b){b&&b.preventDefault(),a("body").removeClass("filters-applied")},clearSearch:function(){a("#wp-filter-search-input").val("")}}),b.InstallerRouter=Backbone.Router.extend({routes:{"edit.php?post_type=ig_campaign&page=icegram-gallery&item=:id":"preview","edit.php?post_type=ig_campaign&page=icegram-gallery&browse=:sort":"sort","edit.php?post_type=ig_campaign&page=icegram-gallery":"sort","post-new.php?post_type=ig_campaign":"sort","edit.php?post_type=ig_campaign&page=icegram-gallery&search=:query":"search"},baseUrl:function(a){return"edit.php?post_type=ig_campaign&page=icegram-gallery"+a},themePath:"&item=",browsePath:"&browse=",searchPath:"&search=",search:function(b){a(".wp-filter-search").val(b)},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.RunInstaller={init:function(){this.view=new b.view.Installer({section:"featured",SearchView:b.view.InstallerSearch}),this.render()},render:function(){this.view.render(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this,d={};b.router=new b.InstallerRouter,b.router.on("route:preview",function(a){d.id=a,c.view.collection.query(d),c.view.collection.once("update",function(){c.view.view.theme.preview()})}),b.router.on("route:sort",function(a){a||(a="featured"),c.view.sort(a),c.view.trigger("theme:close")}),b.router.on("route:upload",function(){a("a.upload").trigger("click")}),b.router.on("route:search",function(){a(".wp-filter-search").focus().trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},a(document).ready(function(){b.isInstall&&b.RunInstaller.init(),a(".broken-themes .delete-theme").on("click",function(){return confirm(_wpThemeSettings.settings.confirmDelete)})})}(jQuery);var tb_position;jQuery(document).ready(function(a){tb_position=function(){var b=a("#TB_window"),c=a(window).width(),d=a(window).height(),e=c>1040?1040:c,f=0;a("#wpadminbar").length&&(f=parseInt(a("#wpadminbar").css("height"),10)),b.size()&&(b.width(e-50).height(d-45-f),a("#TB_iframeContent").width(e-50).height(d-75-f),b.css({"margin-left":"-"+parseInt((e-50)/2,10)+"px"}),"undefined"!=typeof document.body.style.maxWidth&&b.css({top:20+f+"px","margin-top":"0"}))},a(window).resize(function(){tb_position()})});
classes/class-icegram-campaign-admin.php CHANGED
@@ -95,7 +95,7 @@ if ( !class_exists( 'Icegram_Campaign_Admin' ) ) {
95
  display:block;
96
  }
97
  </style>";
98
- echo '<h1 class="wp-heading-inline gallery-heading">'. __('Import From beautiful design Templates OR', 'icegram'). '<a href="#" class="page-title-action" id="ig-add-new-campaign">'. __('Add New Campaign', 'icegram'). '</a></h1>';
99
  Icegram::gallery_screen();
100
  }
101
 
95
  display:block;
96
  }
97
  </style>";
98
+ echo '<h1 class="wp-heading-inline gallery-heading">'. __('Import from beautiful design templates - or', 'icegram'). '<a href="#" class="page-title-action" id="ig-add-new-campaign">'. __('Add New Campaign', 'icegram'). '</a></h1>';
99
  Icegram::gallery_screen();
100
  }
101
 
gallery.php CHANGED
@@ -43,7 +43,7 @@
43
  }
44
  </style>
45
  <div class="wrap ig-gallery-wrap">
46
- <h2><?php esc_html_e( 'Gallery items' ); ?><span class="title-count theme-count"></span></h2>
47
  <div class="ig-gal-description"><?php _e('Here\'s a collection of some ','icegram') ?><strong><?php _e('beautiful, powerful ready-to-use Icegram Campaigns.','icegram') ?></strong></div>
48
  <div><?php _e('No coding or special skills required. Simply click to ' ,'icegram')?><strong><?php _e(' Use This ','icegram')?></strong><?php _e('and the campaign will automatically appear in your Icegram dashboard.','icegram')?></div>
49
  <br/>
@@ -54,7 +54,7 @@
54
 
55
  <ul class="filter-links">
56
  <li><a href="#" data-sort="all"><?php _ex( 'All', 'themes' ); ?></a></li>
57
- <li><a href="#" data-sort="17"><?php _ex( 'Subscription', 'themes' ); ?></a></li>
58
  <li><a href="#" data-sort="19"><?php _ex( 'Offer', 'themes' ); ?></a></li>
59
  <li><a href="#" data-sort="20"><?php _ex( 'Social', 'themes' ); ?></a></li>
60
  </ul>
@@ -119,6 +119,8 @@
119
  <# } #>
120
  <div class="theme-version"><?php printf( __( 'Version: %s' ), '{{ data.version }}' ); ?></div> -->
121
  <div class="theme-description">{{{ data.description }}}</div>
 
 
122
  </div>
123
  </div>
124
  </div>
43
  }
44
  </style>
45
  <div class="wrap ig-gallery-wrap">
46
+ <h2><?php esc_html_e( 'Icegram design templates' ); ?></h2>
47
  <div class="ig-gal-description"><?php _e('Here\'s a collection of some ','icegram') ?><strong><?php _e('beautiful, powerful ready-to-use Icegram Campaigns.','icegram') ?></strong></div>
48
  <div><?php _e('No coding or special skills required. Simply click to ' ,'icegram')?><strong><?php _e(' Use This ','icegram')?></strong><?php _e('and the campaign will automatically appear in your Icegram dashboard.','icegram')?></div>
49
  <br/>
54
 
55
  <ul class="filter-links">
56
  <li><a href="#" data-sort="all"><?php _ex( 'All', 'themes' ); ?></a></li>
57
+ <li><a href="#" data-sort="17"><?php _ex( 'Optin', 'themes' ); ?></a></li>
58
  <li><a href="#" data-sort="19"><?php _ex( 'Offer', 'themes' ); ?></a></li>
59
  <li><a href="#" data-sort="20"><?php _ex( 'Social', 'themes' ); ?></a></li>
60
  </ul>
119
  <# } #>
120
  <div class="theme-version"><?php printf( __( 'Version: %s' ), '{{ data.version }}' ); ?></div> -->
121
  <div class="theme-description">{{{ data.description }}}</div>
122
+ <!-- <div class="theme-info">Liked this template? <br/>Here's how you can customize it further </div> -->
123
+ <div class="theme-info" style="padding:0.2em"><?php _e( 'Want to personalize this template to fit your brand?', 'icegram' );?><br/> <a href="https://www.icegram.com/documentation/customize-icegrams-gallery-templates/?utm_source=ig_gallery&utm_medium=ig_inapp_promo&utm_campaign=ig_custom_css" target="_blank" class="button button-primary" style="margin-top:0.4em"><?php _e( 'Personalize It Now' , 'icegram'); ?></a></div>
124
  </div>
125
  </div>
126
  </div>
icegram.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: http://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
- * Version: 1.10.6
7
  * Author: icegram
8
  * Author URI: http://www.icegram.com/
9
  * Copyright (c) 2014-16 Icegram
@@ -34,7 +34,7 @@ class Icegram {
34
 
35
  function __construct() {
36
 
37
- $this->version = "1.10.6";
38
  $this->shortcode_instances = array();
39
  $this->mode = 'local';
40
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
3
  * Plugin Name: Icegram - Popups, Optins, CTAs & lot more...
4
  * Plugin URI: http://www.icegram.com/
5
  * Description: All in one solution to inspire, convert and engage your audiences. Action bars, Popup windows, Messengers, Toast notifications and more. Awesome themes and powerful rules.
6
+ * Version: 1.10.7
7
  * Author: icegram
8
  * Author URI: http://www.icegram.com/
9
  * Copyright (c) 2014-16 Icegram
34
 
35
  function __construct() {
36
 
37
+ $this->version = "1.10.7";
38
  $this->shortcode_instances = array();
39
  $this->mode = 'local';
40
  $this->plugin_url = untrailingslashit( plugins_url( '/', __FILE__ ) );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.icegram.com/
4
  Tags: popup, optin-popup, hellobar, optin, lead capture, form, marketing, Exit-popup, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
- Stable tag: 1.10.6
8
  License: GPLv3
9
 
10
  The best WP popup plugin that let's you create a popup within seconds. Customize, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
@@ -208,6 +208,9 @@ Contact Us, provide as much detail of the problem as you can. We will try to sol
208
  5. Target your Icegram message using these display rules
209
 
210
  == Upgrade Notice ==
 
 
 
211
  = 1.10.6 =
212
  Search bar, filters added to Icegram's Gallery
213
 
@@ -381,6 +384,10 @@ Initial Release
381
 
382
 
383
  == Changelog ==
 
 
 
 
384
  = 1.10.6 =
385
  * Enhancement: Search bar, filters added to Icegram's Gallery
386
 
4
  Tags: popup, optin-popup, hellobar, optin, lead capture, form, marketing, Exit-popup, notification, messenger, targeting, monster, ninja ,wordpress lead generation, wordpress lightbox optin, wordpress lightbox optin form, wordpress lightbox optins, wordpress mobile optin forms, wordpress mobile popup, wordpress mobile popups, wordpress optin form, wordpress overlay popup, wordpress popup, wordpress popup form, wordpress popup plugin, wordpress popup solution, wordpress popups , popups, subscribe, wp popups, optin bars, action grabber, promotion, popup message, leads, lists, builder, action bar, floating bar, footer bar, hellobar alternative, pop over, Popup plugin, aweber, campaign monitor, constant contact, email list, exit-intent, onclick popup, analytics, Hubspot, popup ads, pop-up, Mailing list pop-up, re-targeting, Animation,Popups with Animation ,Responsive Popup, split testing, AB testing
5
  Requires at least: 3.9
6
  Tested up to: 4.8
7
+ Stable tag: 1.10.7
8
  License: GPLv3
9
 
10
  The best WP popup plugin that let's you create a popup within seconds. Customize, target popups to show offers, email signups, social buttons etc and instantly increase conversions on your website.
208
  5. Target your Icegram message using these display rules
209
 
210
  == Upgrade Notice ==
211
+ = 1.10.7 =
212
+ Added more templates in Gallery
213
+
214
  = 1.10.6 =
215
  Search bar, filters added to Icegram's Gallery
216
 
384
 
385
 
386
  == Changelog ==
387
+ = 1.10.7 =
388
+ * New: Added new templates to Icegram's Gallery
389
+ * Fix: Single gallery template was not getting load on refresh
390
+
391
  = 1.10.6 =
392
  * Enhancement: Search bar, filters added to Icegram's Gallery
393