ThemeGrill Demo Importer - Version 1.3.0

Version Description

  • Tweak - Suppor data update for nested siteorigin nested layoutbuilder.
  • Fix - Import button not working on firefox.
Download this release

Release Info

Developer ThemeGrill
Plugin Icon 128x128 ThemeGrill Demo Importer
Version 1.3.0
Comparing to
See all releases

Code changes from version 1.2.0 to 1.3.0

assets/images/flash/flash-construction-v2.jpg ADDED
Binary file
assets/images/flash/flash-food-v2.jpg ADDED
Binary file
assets/js/admin/demo-importer.js CHANGED
@@ -333,7 +333,7 @@ demos.view.Demo = wp.Backbone.View.extend({
333
  this.touchDrag = true;
334
  },
335
 
336
- importDemo: function() {
337
  var _this = this,
338
  $target = $( event.target );
339
  event.preventDefault();
@@ -493,7 +493,7 @@ demos.view.Details = wp.Backbone.View.extend({
493
  this.trigger( 'demo:collapse' );
494
  },
495
 
496
- importDemo: function() {
497
  var _this = this,
498
  $target = $( event.target );
499
  event.preventDefault();
333
  this.touchDrag = true;
334
  },
335
 
336
+ importDemo: function( event ) {
337
  var _this = this,
338
  $target = $( event.target );
339
  event.preventDefault();
493
  this.trigger( 'demo:collapse' );
494
  },
495
 
496
+ importDemo: function( event ) {
497
  var _this = this,
498
  $target = $( event.target );
499
  event.preventDefault();
assets/js/admin/demo-importer.min.js CHANGED
@@ -1 +1 @@
1
- window.wp=window.wp||{},function(a){var b,c;b=wp.demos=wp.demos||{},b.data=demoImporterLocalizeScript,c=b.data.l10n,b.isPreview=!!b.data.settings.isPreview,b.isInstall=!!b.data.settings.isInstall,_.extend(b,{model:{},view:{},routes:{},router:{},template:wp.template}),b.Model=Backbone.Model.extend({initialize:function(){var a;_.indexOf(b.data.installedDemos,this.get("slug"))!==-1&&this.set({installed:!0}),this.set({id:this.get("slug")||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.Demos({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.empty().append(this.view.el).addClass("rendered")},searchContainer:a("#wpbody h1:first"),search:function(){var d,e=this;1!==b.data.demos.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("demo:scroll")},initTipTip:function(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})}}),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.demos),a("body").removeClass("no-results")),this.trigger("demos:update"))},search:function(c){var d,e,f,g,h,i;this.reset(b.data.demos,{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))}}),b.view.Demo=wp.Backbone.View.extend({className:"theme",state:"grid",html:b.template(b.isPreview?"demo-preview":"demo"),events:{click:"expand",keydown:"expand",touchend:"expand",keyup:"addFocus",touchmove:"preventExpand","click .demo-import":"importDemo"},touchDrag:!1,initialize:function(){this.model.on("change",this.render,this)},render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)).attr({tabindex:0,"aria-describedby":a.id+"-action "+a.id+"-name","data-slug":a.id}),this.activeDemo(),this.model.get("displayAuthor")&&this.$el.addClass("display-author")},activeDemo: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;if(!b.isPreview&&(c=c||window.event,"keydown"!==c.type||13===c.which||32===c.which))return this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).is(".theme-actions a")||a(c.target).is(".theme-actions a, .update-message, .button-link, .notice-dismiss")||(b.focusedDemo=this.$el,this.trigger("demo:expand",d.model.cid)))},preventExpand:function(){this.touchDrag=!0},importDemo:function(){var b=this,c=a(event.target);event.preventDefault(),c.hasClass("disabled")||window.confirm(wp.demos.data.settings.confirmImport)&&(a(document).on("wp-demo-import-success",function(a,c){b.model.get("id")===c.slug&&b.model.set({imported:!0})}),wp.updates.importDemo({slug:c.data("slug")}))}}),b.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-demo":"deleteDemo","click .left":"previousDemo","click .right":"nextDemo","click .demo-import":"importDemo"},html:b.template("demo-single"),render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)),this.activeDemo(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeDemo:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(b){_.delay(function(){a(".theme-wrap a.button-primary:visible").focus()},100),b.on("keydown.wp-themes",function(a){var c=b.find(".theme-header button:not(.disabled)").first(),d=b.find(".theme-actions a:visible").last();9===a.which&&(c[0]===a.target&&a.shiftKey?(d.focus(),a.preventDefault()):d[0]!==a.target||a.shiftKey||(c.focus(),a.preventDefault()))})},collapse:function(c){var d,e=this;c=c||window.event,1!==b.data.demos.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.focusedDemo&&b.focusedDemo.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled").prop("disabled",!0),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled").prop("disabled",!0)},closeOverlay:function(){a("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("demo:collapse")},importDemo:function(){var b=this,c=a(event.target);event.preventDefault(),c.hasClass("disabled")||window.confirm(wp.demos.data.settings.confirmImport)&&(a(document).on("wp-demo-import-success",function(a,c){b.model.get("id")===c.slug&&b.model.set({imported:!0})}),a(document).on("wp-updates-queue-job",function(a,b){"import-demo"===b.action&&wp.updates.importDemo(b.data)}),wp.updates.importDemo({slug:c.data("slug")}))},deleteDemo:function(c){var d=this,e=this.model.collection,f=b;c.preventDefault(),window.confirm(wp.demos.data.settings.confirmDelete)&&(wp.updates.maybeRequestFilesystemCredentials(c),a(document).one("wp-demo-delete-success",function(b,c){d.$el.find(".close").trigger("click"),a('[data-slug="'+c.slug+'"').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){a(this).remove(),f.data.demos=_.without(f.data.demos,_.findWhere(f.data.demos,{id:c.slug})),a(".wp-filter-search").val(""),e.doSearch(""),e.remove(d.model),e.trigger("demos:update")})}),wp.updates.deleteDemo({slug:this.model.get("id")}))},nextDemo:function(){var a=this;return a.trigger("demo:next",a.model.cid),!1},previousDemo:function(){var a=this;return a.trigger("demo: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.Demos=wp.Backbone.View.extend({className:"themes wp-clearfix",$overlay:a("div.theme-overlay"),index:0,count:a(".wrap .demo-count"),liveDemoCount:0,initialize:function(b){var c=this;this.parent=b.parent,c.importedDemo(),this.setView("grid"),this.listenTo(c.collection,"demos:update",function(){c.parent.page=0,c.importedDemo(),c.render(this),c.parent.initTipTip()}),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,"demo:scroll",function(){c.renderDemos(c.parent.page)}),this.listenTo(this.parent,"demo:close",function(){c.overlay&&c.overlay.closeOverlay()}),a("body").on("keyup",function(b){c.overlay&&(a("#request-filesystem-credentials-dialog").is(":visible")||(39===b.keyCode&&c.overlay.nextDemo(),37===b.keyCode&&c.overlay.previousDemo(),27===b.keyCode&&c.overlay.collapse(b)))})},render:function(){this.$el.empty(),b.isPreview||1!==b.data.demos.length||(this.singleDemo=new b.view.Details({model:this.collection.models[0]}),this.singleDemo.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleDemo.el)),this.options.collection.size()>0&&this.renderDemos(this.parent.page),this.liveDemoCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveDemoCount)},renderDemos:function(a){var d=this;return d.instance=d.collection.paginate(a),0===d.instance.size()?void this.parent.trigger("demo:end"):(d.instance.each(function(a){d.demo=new b.view.Demo({model:a,parent:d}),d.demo.render(),d.$el.append(d.demo.el),d.listenTo(d.demo,"demo:expand",d.expand,d)}),!b.isPreview&&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++)},importedDemo: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,e,f=this;this.model=f.collection.get(c),b.router.navigate(b.router.baseUrl(b.router.demoPath+this.model.id)),this.setView("detail"),a("body").addClass("modal-open"),this.overlay=new b.view.Details({model:f.model}),this.overlay.render(),this.model.get("hasUpdate")&&(d=a('[data-slug="'+this.model.id+'"]'),e=a(this.overlay.el),d.find(".updating-message").length?(e.find(".notice-warning h3").remove(),e.find(".notice-warning").removeClass("notice-large").addClass("updating-message").find("p").text(wp.updates.l10n.updating)):d.find(".notice-error").length&&e.find(".notice-warning").remove()),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"demo:next",function(){f.next([f.model.cid])}).listenTo(this.overlay,"demo:previous",function(){f.previous([f.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.demo.trigger("demo: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.demo.trigger("demo:expand",c.cid))},announceSearchResults:function(a){0===a?wp.a11y.speak(c.noDemosFound):wp.a11y.speak(c.demosFound.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,"demo: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:{"themes.php?page=demo-importer&demo=:slug":"demo","themes.php?page=demo-importer&search=:query":"search","themes.php?page=demo-importer&s=:query":"search","themes.php?page=demo-importer":"demos","":"demos"},baseUrl:function(a){return"themes.php?page=demo-importer"+a},demoPath:"&demo=",searchPath:"&search=",search:function(b){a(".wp-filter-search").val(b)},demos:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.Run={init:function(){this.demos=new b.Collection(b.data.demos),this.view=new b.view.Appearance({collection:this.demos}),this.render()},render:function(){this.view.render(),this.view.initTipTip(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this;b.router=new b.Router,b.router.on("route:demo",function(a){c.view.view.expand(a)}),b.router.on("route:demos",function(){c.demos.doSearch(""),c.view.trigger("demo:close")}),b.router.on("route:search",function(){a(".wp-filter-search").trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},b.view.Installer=b.view.Appearance.extend({el:"#wpbody-content .wrap",render:function(){this.search(),this.uploader(),this.view=new b.view.Demos({collection:this.collection,parent:this}),this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},searchContainer:a(".wp-filter .search-form"),uploader:function(){var b=a(".upload-view-toggle"),c=a(document.body);b.on("click",function(){c.toggleClass("show-upload-view"),b.attr("aria-expanded",c.hasClass("show-upload-view"))})},clearSearch:function(){a("#wp-filter-search-input").val("")}}),b.InstallerRouter=Backbone.Router.extend({routes:{"themes.php?page=demo-importer&browse=uploads&demo=:slug":"demo","themes.php?page=demo-importer&browse=:sort&search=:query":"search","themes.php?page=demo-importer&browse=:sort&s=:query":"search","themes.php?page=demo-importer&browse=welcome":"sort","themes.php?page=demo-importer&browse=:sort":"demos","themes.php?page=demo-importer":"sort"},browse:function(){return b.isPreview?"preview":"uploads"},baseUrl:function(a){return"themes.php?page=demo-importer&browse="+this.browse()+a},demoPath:"&demo=",searchPath:"&search=",search:function(b,c){a(".wp-filter-search").val(c)},demos:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.RunInstaller={init:function(){this.demos=new b.Collection(b.data.demos),this.view=new b.view.Installer({collection:this.demos}),this.render()},render:function(){this.view.render(),this.view.initTipTip(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this;b.router=new b.InstallerRouter,b.router.on("route:demo",function(a){c.view.view.expand(a)}),b.router.on("route:demos",function(){c.demos.doSearch(""),c.view.trigger("demo:close")}),b.router.on("route:sort",function(b){b&&"welcome"!==b||a(".wp-filter-search").hide()}),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():b.Run.init(),a(".notice.is-dismissible").on("click",".notice-dismiss",function(c){var d=a(this);if(c.preventDefault(),"undefined"!==d.parent().attr("id"))return a.post(b.data.settings.ajaxUrl,{action:"dismiss-notice",notice_id:d.parent().data("notice_id")}),!1})})}(jQuery);
1
+ window.wp=window.wp||{},function(a){var b,c;b=wp.demos=wp.demos||{},b.data=demoImporterLocalizeScript,c=b.data.l10n,b.isPreview=!!b.data.settings.isPreview,b.isInstall=!!b.data.settings.isInstall,_.extend(b,{model:{},view:{},routes:{},router:{},template:wp.template}),b.Model=Backbone.Model.extend({initialize:function(){var a;_.indexOf(b.data.installedDemos,this.get("slug"))!==-1&&this.set({installed:!0}),this.set({id:this.get("slug")||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.Demos({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.empty().append(this.view.el).addClass("rendered")},searchContainer:a("#wpbody h1:first"),search:function(){var d,e=this;1!==b.data.demos.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("demo:scroll")},initTipTip:function(){a("#tiptip_holder").removeAttr("style"),a("#tiptip_arrow").removeAttr("style"),a(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})}}),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.demos),a("body").removeClass("no-results")),this.trigger("demos:update"))},search:function(c){var d,e,f,g,h,i;this.reset(b.data.demos,{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))}}),b.view.Demo=wp.Backbone.View.extend({className:"theme",state:"grid",html:b.template(b.isPreview?"demo-preview":"demo"),events:{click:"expand",keydown:"expand",touchend:"expand",keyup:"addFocus",touchmove:"preventExpand","click .demo-import":"importDemo"},touchDrag:!1,initialize:function(){this.model.on("change",this.render,this)},render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)).attr({tabindex:0,"aria-describedby":a.id+"-action "+a.id+"-name","data-slug":a.id}),this.activeDemo(),this.model.get("displayAuthor")&&this.$el.addClass("display-author")},activeDemo: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;if(!b.isPreview&&(c=c||window.event,"keydown"!==c.type||13===c.which||32===c.which))return this.touchDrag===!0?this.touchDrag=!1:void(a(c.target).is(".theme-actions a")||a(c.target).is(".theme-actions a, .update-message, .button-link, .notice-dismiss")||(b.focusedDemo=this.$el,this.trigger("demo:expand",d.model.cid)))},preventExpand:function(){this.touchDrag=!0},importDemo:function(b){var c=this,d=a(b.target);b.preventDefault(),d.hasClass("disabled")||window.confirm(wp.demos.data.settings.confirmImport)&&(a(document).on("wp-demo-import-success",function(a,b){c.model.get("id")===b.slug&&c.model.set({imported:!0})}),wp.updates.importDemo({slug:d.data("slug")}))}}),b.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-demo":"deleteDemo","click .left":"previousDemo","click .right":"nextDemo","click .demo-import":"importDemo"},html:b.template("demo-single"),render:function(){var a=this.model.toJSON();this.$el.html(this.html(a)),this.activeDemo(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeDemo:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(b){_.delay(function(){a(".theme-wrap a.button-primary:visible").focus()},100),b.on("keydown.wp-themes",function(a){var c=b.find(".theme-header button:not(.disabled)").first(),d=b.find(".theme-actions a:visible").last();9===a.which&&(c[0]===a.target&&a.shiftKey?(d.focus(),a.preventDefault()):d[0]!==a.target||a.shiftKey||(c.focus(),a.preventDefault()))})},collapse:function(c){var d,e=this;c=c||window.event,1!==b.data.demos.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.focusedDemo&&b.focusedDemo.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled").prop("disabled",!0),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled").prop("disabled",!0)},closeOverlay:function(){a("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("demo:collapse")},importDemo:function(b){var c=this,d=a(b.target);b.preventDefault(),d.hasClass("disabled")||window.confirm(wp.demos.data.settings.confirmImport)&&(a(document).on("wp-demo-import-success",function(a,b){c.model.get("id")===b.slug&&c.model.set({imported:!0})}),a(document).on("wp-updates-queue-job",function(a,b){"import-demo"===b.action&&wp.updates.importDemo(b.data)}),wp.updates.importDemo({slug:d.data("slug")}))},deleteDemo:function(c){var d=this,e=this.model.collection,f=b;c.preventDefault(),window.confirm(wp.demos.data.settings.confirmDelete)&&(wp.updates.maybeRequestFilesystemCredentials(c),a(document).one("wp-demo-delete-success",function(b,c){d.$el.find(".close").trigger("click"),a('[data-slug="'+c.slug+'"').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){a(this).remove(),f.data.demos=_.without(f.data.demos,_.findWhere(f.data.demos,{id:c.slug})),a(".wp-filter-search").val(""),e.doSearch(""),e.remove(d.model),e.trigger("demos:update")})}),wp.updates.deleteDemo({slug:this.model.get("id")}))},nextDemo:function(){var a=this;return a.trigger("demo:next",a.model.cid),!1},previousDemo:function(){var a=this;return a.trigger("demo: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.Demos=wp.Backbone.View.extend({className:"themes wp-clearfix",$overlay:a("div.theme-overlay"),index:0,count:a(".wrap .demo-count"),liveDemoCount:0,initialize:function(b){var c=this;this.parent=b.parent,c.importedDemo(),this.setView("grid"),this.listenTo(c.collection,"demos:update",function(){c.parent.page=0,c.importedDemo(),c.render(this),c.parent.initTipTip()}),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,"demo:scroll",function(){c.renderDemos(c.parent.page)}),this.listenTo(this.parent,"demo:close",function(){c.overlay&&c.overlay.closeOverlay()}),a("body").on("keyup",function(b){c.overlay&&(a("#request-filesystem-credentials-dialog").is(":visible")||(39===b.keyCode&&c.overlay.nextDemo(),37===b.keyCode&&c.overlay.previousDemo(),27===b.keyCode&&c.overlay.collapse(b)))})},render:function(){this.$el.empty(),b.isPreview||1!==b.data.demos.length||(this.singleDemo=new b.view.Details({model:this.collection.models[0]}),this.singleDemo.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleDemo.el)),this.options.collection.size()>0&&this.renderDemos(this.parent.page),this.liveDemoCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveDemoCount)},renderDemos:function(a){var d=this;return d.instance=d.collection.paginate(a),0===d.instance.size()?void this.parent.trigger("demo:end"):(d.instance.each(function(a){d.demo=new b.view.Demo({model:a,parent:d}),d.demo.render(),d.$el.append(d.demo.el),d.listenTo(d.demo,"demo:expand",d.expand,d)}),!b.isPreview&&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++)},importedDemo: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,e,f=this;this.model=f.collection.get(c),b.router.navigate(b.router.baseUrl(b.router.demoPath+this.model.id)),this.setView("detail"),a("body").addClass("modal-open"),this.overlay=new b.view.Details({model:f.model}),this.overlay.render(),this.model.get("hasUpdate")&&(d=a('[data-slug="'+this.model.id+'"]'),e=a(this.overlay.el),d.find(".updating-message").length?(e.find(".notice-warning h3").remove(),e.find(".notice-warning").removeClass("notice-large").addClass("updating-message").find("p").text(wp.updates.l10n.updating)):d.find(".notice-error").length&&e.find(".notice-warning").remove()),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"demo:next",function(){f.next([f.model.cid])}).listenTo(this.overlay,"demo:previous",function(){f.previous([f.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.demo.trigger("demo: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.demo.trigger("demo:expand",c.cid))},announceSearchResults:function(a){0===a?wp.a11y.speak(c.noDemosFound):wp.a11y.speak(c.demosFound.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,"demo: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:{"themes.php?page=demo-importer&demo=:slug":"demo","themes.php?page=demo-importer&search=:query":"search","themes.php?page=demo-importer&s=:query":"search","themes.php?page=demo-importer":"demos","":"demos"},baseUrl:function(a){return"themes.php?page=demo-importer"+a},demoPath:"&demo=",searchPath:"&search=",search:function(b){a(".wp-filter-search").val(b)},demos:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.Run={init:function(){this.demos=new b.Collection(b.data.demos),this.view=new b.view.Appearance({collection:this.demos}),this.render()},render:function(){this.view.render(),this.view.initTipTip(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this;b.router=new b.Router,b.router.on("route:demo",function(a){c.view.view.expand(a)}),b.router.on("route:demos",function(){c.demos.doSearch(""),c.view.trigger("demo:close")}),b.router.on("route:search",function(){a(".wp-filter-search").trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},b.view.Installer=b.view.Appearance.extend({el:"#wpbody-content .wrap",render:function(){this.search(),this.uploader(),this.view=new b.view.Demos({collection:this.collection,parent:this}),this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},searchContainer:a(".wp-filter .search-form"),uploader:function(){var b=a(".upload-view-toggle"),c=a(document.body);b.on("click",function(){c.toggleClass("show-upload-view"),b.attr("aria-expanded",c.hasClass("show-upload-view"))})},clearSearch:function(){a("#wp-filter-search-input").val("")}}),b.InstallerRouter=Backbone.Router.extend({routes:{"themes.php?page=demo-importer&browse=uploads&demo=:slug":"demo","themes.php?page=demo-importer&browse=:sort&search=:query":"search","themes.php?page=demo-importer&browse=:sort&s=:query":"search","themes.php?page=demo-importer&browse=welcome":"sort","themes.php?page=demo-importer&browse=:sort":"demos","themes.php?page=demo-importer":"sort"},browse:function(){return b.isPreview?"preview":"uploads"},baseUrl:function(a){return"themes.php?page=demo-importer&browse="+this.browse()+a},demoPath:"&demo=",searchPath:"&search=",search:function(b,c){a(".wp-filter-search").val(c)},demos:function(){a(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),b.RunInstaller={init:function(){this.demos=new b.Collection(b.data.demos),this.view=new b.view.Installer({collection:this.demos}),this.render()},render:function(){this.view.render(),this.view.initTipTip(),this.routes(),Backbone.history.start({root:b.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var c=this;b.router=new b.InstallerRouter,b.router.on("route:demo",function(a){c.view.view.expand(a)}),b.router.on("route:demos",function(){c.demos.doSearch(""),c.view.trigger("demo:close")}),b.router.on("route:sort",function(b){b&&"welcome"!==b||a(".wp-filter-search").hide()}),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():b.Run.init(),a(".notice.is-dismissible").on("click",".notice-dismiss",function(c){var d=a(this);if(c.preventDefault(),"undefined"!==d.parent().attr("id"))return a.post(b.data.settings.ajaxUrl,{action:"dismiss-notice",notice_id:d.parent().data("notice_id")}),!1})})}(jQuery);
includes/class-demo-importer.php CHANGED
@@ -780,129 +780,150 @@ class TG_Demo_Importer {
780
  return $data;
781
  }
782
 
783
- /**
784
- * Update siteorigin panel settings data.
785
- * @param string $demo_id
786
- * @param array $demo_data
787
- */
788
- public function update_siteorigin_data( $demo_id, $demo_data ) {
789
- if ( ! empty( $demo_data['siteorigin_panels_data_update'] ) ) {
790
- foreach ( $demo_data['siteorigin_panels_data_update'] as $data_type => $data_value ) {
791
- if ( ! empty( $data_value['post_title'] ) ) {
792
- $page = get_page_by_title( $data_value['post_title'] );
793
-
794
- if ( is_object( $page ) && $page->ID ) {
795
- $panels_data = get_post_meta( $page->ID, 'panels_data', true );
796
-
797
- if ( ! empty( $panels_data ) ) {
798
- foreach ( $panels_data as $panel_type => $panel_data ) {
799
- if ( ! in_array( $panel_type, array( 'grids', 'widgets' ) ) ) {
800
- continue;
801
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
802
 
803
- // Format the value based on panel type.
804
- switch ( $panel_type ) {
805
- case 'grids':
806
- foreach ( $panel_data as $instance_id => $grid_instance ) {
807
- if ( ! empty( $data_value['data_update']['grids_data'] ) ) {
808
- foreach ( $data_value['data_update']['grids_data'] as $grid_id => $grid_data ) {
809
- if ( ! empty( $grid_data['style'] ) && $instance_id === $grid_id ) {
810
- foreach ( $grid_data['style'] as $style_key => $style_value ) {
811
- if ( empty( $style_value ) ) {
812
- continue;
813
- }
814
-
815
- // Format the value based on style key.
816
- switch ( $style_key ) {
817
- case 'background_image_attachment':
818
- $attachment_id = tg_get_attachment_id( $style_value );
819
-
820
- if ( 0 !== $attachment_id ) {
821
- $grid_instance['style'][ $style_key ] = $attachment_id;
822
- }
823
- break;
824
- default:
825
- $grid_instance['style'][ $style_key ] = $style_value;
826
- break;
827
- }
828
- }
829
- }
830
- }
831
- }
832
-
833
- // Update panel grids data.
834
- $panels_data['grids'][ $instance_id ] = $grid_instance;
835
- }
836
- break;
837
- case 'widgets':
838
- foreach ( $panel_data as $instance_id => $widget_instance ) {
839
- if ( isset( $widget_instance['nav_menu'] ) && isset( $widget_instance['title'] ) ) {
840
- $nav_menu = wp_get_nav_menu_object( $widget_instance['title'] );
841
-
842
- if ( is_object( $nav_menu ) && $nav_menu->term_id ) {
843
- $widget_instance['nav_menu'] = $nav_menu->term_id;
844
- }
845
- } elseif ( ! empty( $data_value['data_update']['widgets_data'] ) ) {
846
- $instance_class = $widget_instance['panels_info']['class'];
847
-
848
- foreach ( $data_value['data_update']['widgets_data'] as $dropdown_type => $dropdown_data ) {
849
- if ( ! in_array( $dropdown_type, array( 'dropdown_pages', 'dropdown_categories' ) ) ) {
850
- continue;
851
- }
852
-
853
- // Format the value based on dropdown type.
854
- switch ( $dropdown_type ) {
855
- case 'dropdown_pages':
856
- foreach ( $dropdown_data as $widget_id => $widget_data ) {
857
- if ( ! empty( $widget_data[ $instance_id ] ) && $widget_id == $instance_class ) {
858
- foreach ( $widget_data[ $instance_id ] as $widget_key => $widget_value ) {
859
- $page = get_page_by_title( $widget_value );
860
-
861
- if ( is_object( $page ) && $page->ID ) {
862
- $widget_instance[ $widget_key ] = $page->ID;
863
- }
864
- }
865
- }
866
- }
867
- break;
868
- case 'dropdown_categories':
869
- foreach ( $dropdown_data as $taxonomy => $taxonomy_data ) {
870
- if ( ! taxonomy_exists( $taxonomy ) ) {
871
- continue;
872
- }
873
-
874
- foreach ( $taxonomy_data as $widget_id => $widget_data ) {
875
- if ( ! empty( $widget_data[ $instance_id ] ) && $widget_id == $instance_class ) {
876
- foreach ( $widget_data[ $instance_id ] as $widget_key => $widget_value ) {
877
- $term = get_term_by( 'name', $widget_value, $taxonomy );
878
-
879
- if ( is_object( $term ) && $term->term_id ) {
880
- $widget_instance[ $widget_key ] = $term->term_id;
881
- }
882
- }
883
- }
884
- }
885
- }
886
- break;
887
- }
888
- }
889
- }
890
-
891
- // Update panel widgets data.
892
- $panels_data['widgets'][ $instance_id ] = $widget_instance;
893
- }
894
- break;
895
- }
896
- }
897
- }
898
-
899
- // Update siteorigin panels data.
900
- update_post_meta( $page->ID, 'panels_data', $panels_data );
901
- }
902
- }
903
- }
904
- }
905
- }
906
  }
907
 
908
  new TG_Demo_Importer();
780
  return $data;
781
  }
782
 
783
+ /**
784
+ * Recursive function to address n level deep layoutbuilder data update.
785
+ * @param array $panels_data
786
+ * @param string $data_type
787
+ * @param array $data_value
788
+ * @return array
789
+ */
790
+ public function siteorigin_recursive_update( $panels_data, $data_type, $data_value) {
791
+ static $instance = 0;
792
+ foreach ( $panels_data as $panel_type => $panel_data ) {
793
+ // Format the value based on panel type.
794
+ switch ( $panel_type ) {
795
+ case 'grids':
796
+ foreach ( $panel_data as $instance_id => $grid_instance ) {
797
+ if ( ! empty( $data_value['data_update']['grids_data'] ) ) {
798
+ foreach ( $data_value['data_update']['grids_data'] as $grid_id => $grid_data ) {
799
+ if ( ! empty( $grid_data['style'] ) && $instance_id === $grid_id ) {
800
+ $level = isset( $grid_data['level'] ) ? $grid_data['level'] : (int)0;
801
+ if( $level == $instance ) {
802
+ foreach ( $grid_data['style'] as $style_key => $style_value ) {
803
+ if ( empty( $style_value ) ) {
804
+ continue;
805
+ }
806
+
807
+ // Format the value based on style key.
808
+ switch ( $style_key ) {
809
+ case 'background_image_attachment':
810
+ $attachment_id = tg_get_attachment_id( $style_value );
811
+
812
+ if ( 0 !== $attachment_id ) {
813
+ $grid_instance['style'][ $style_key ] = $attachment_id;
814
+ }
815
+ break;
816
+ default:
817
+ $grid_instance['style'][ $style_key ] = $style_value;
818
+ break;
819
+ }
820
+ }
821
+ }
822
+ }
823
+ }
824
+ }
825
+
826
+ // Update panel grids data.
827
+ $panels_data['grids'][ $instance_id ] = $grid_instance;
828
+ }
829
+ break;
830
+
831
+ case 'widgets':
832
+ foreach ($panel_data as $instance_id => $widget_instance ) {
833
+ if( isset( $widget_instance['panels_data']['widgets'] ) ) {
834
+ $instance = $instance+1;
835
+ $child_panels_data = $widget_instance['panels_data'];
836
+ $panels_data['widgets'][$instance_id]['panels_data'] = $this->siteorigin_recursive_update( $child_panels_data, $data_type, $data_value );
837
+ $instance = $instance-1;
838
+ continue;
839
+ }
840
+ if ( isset( $widget_instance['nav_menu'] ) && isset( $widget_instance['title'] ) ) {
841
+ $nav_menu = wp_get_nav_menu_object( $widget_instance['title'] );
842
+
843
+ if ( is_object( $nav_menu ) && $nav_menu->term_id ) {
844
+ $widget_instance['nav_menu'] = $nav_menu->term_id;
845
+ }
846
+ }elseif ( ! empty( $data_value['data_update']['widgets_data'] ) ) {
847
+ $instance_class = $widget_instance['panels_info']['class'];
848
+ foreach ( $data_value['data_update']['widgets_data'] as $dropdown_type => $dropdown_data ) {
849
+ if ( ! in_array( $dropdown_type, array( 'dropdown_pages', 'dropdown_categories' ) ) ) {
850
+ continue;
851
+ }
852
+ switch ( $dropdown_type ) {
853
+ case 'dropdown_pages':
854
+ foreach ( $dropdown_data as $widget_id => $widget_data ) {
855
+ if ( ! empty( $widget_data[ $instance_id ] ) && $widget_id == $instance_class ) {
856
+ $level = isset( $widget_data['level'] ) ? $widget_data['level'] : (int)0;
857
+ if( $level == $instance ) {
858
+ foreach ( $widget_data[ $instance_id ] as $widget_key => $widget_value ) {
859
+ $page = get_page_by_title( $widget_value );
860
+
861
+ if ( is_object( $page ) && $page->ID ) {
862
+ $widget_instance[ $widget_key ] = $page->ID;
863
+ }
864
+ }
865
+ }
866
+ }
867
+ }
868
+ break;
869
+ case 'dropdown_categories':
870
+ foreach ( $dropdown_data as $taxonomy => $taxonomy_data ) {
871
+ if ( ! taxonomy_exists( $taxonomy ) ) {
872
+ continue;
873
+ }
874
+
875
+ foreach ( $taxonomy_data as $widget_id => $widget_data ) {
876
+ if ( ! empty( $widget_data[ $instance_id ] ) && $widget_id == $instance_class ) {
877
+ $level = isset( $widget_data['level'] ) ? $widget_data['level'] : (int)0;
878
+ if( $level == $instance ) {
879
+ foreach ( $widget_data[ $instance_id ] as $widget_key => $widget_value ) {
880
+ $term = get_term_by( 'name', $widget_value, $taxonomy );
881
+
882
+ if ( is_object( $term ) && $term->term_id ) {
883
+ $widget_instance[ $widget_key ] = $term->term_id;
884
+ }
885
+ }
886
+ }
887
+ }
888
+ }
889
+ }
890
+ break;
891
+ }
892
+ }
893
+ }
894
+ $panels_data['widgets'][ $instance_id ] = $widget_instance;
895
+ }
896
+ break;
897
+ }
898
+ }
899
+ return $panels_data;
900
+ }
901
 
902
+ /**
903
+ * Update siteorigin panel settings data.
904
+ * @param string $demo_id
905
+ * @param array $demo_data
906
+ */
907
+ public function update_siteorigin_data( $demo_id, $demo_data ) {
908
+ if ( ! empty( $demo_data['siteorigin_panels_data_update'] ) ) {
909
+ foreach ( $demo_data['siteorigin_panels_data_update'] as $data_type => $data_value ) {
910
+ if ( ! empty( $data_value['post_title'] ) ) {
911
+ $page = get_page_by_title( $data_value['post_title'] );
912
+
913
+ if ( is_object( $page ) && $page->ID ) {
914
+ $panels_data = get_post_meta( $page->ID, 'panels_data', true );
915
+
916
+ if ( ! empty( $panels_data ) ) {
917
+ $panels_data = $this->siteorigin_recursive_update( $panels_data, $data_type, $data_value );
918
+
919
+ }
920
+ // Update siteorigin panels data.
921
+ update_post_meta( $page->ID, 'panels_data', $panels_data );
922
+ }
923
+ }
924
+ }
925
+ }
926
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
927
  }
928
 
929
  new TG_Demo_Importer();
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: ThemeGrill, shivapoudel
3
  Tags: themegrill, themes, demo, importer, download
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
- Stable tag: 1.2.0
7
  License: GPLv3 or later
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -12,7 +12,7 @@ Import your demo content, widgets and theme settings with one click for ThemeGri
12
 
13
  Import your demo content, widgets and theme settings with one click for <a href="https://themegrill.com/themes/" target="_blank" rel="nofollow">ThemeGrill</a> official themes.
14
 
15
- Get free support at http://themegrill.com/support-forum/
16
 
17
  == Installation ==
18
 
@@ -39,6 +39,10 @@ Yes you can! Join in on our [GitHub repository](https://github.com/themegrill/th
39
 
40
  == Changelog ==
41
 
 
 
 
 
42
  = 1.2.0 =
43
  * Tweak - Load scripts perfecly on demo importer appearance page.
44
  * Tweak - Set transient for redirecting to demo importer page after install or update.
3
  Tags: themegrill, themes, demo, importer, download
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 1.3.0
7
  License: GPLv3 or later
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
12
 
13
  Import your demo content, widgets and theme settings with one click for <a href="https://themegrill.com/themes/" target="_blank" rel="nofollow">ThemeGrill</a> official themes.
14
 
15
+ Get free support at https://themegrill.com/support-forum/
16
 
17
  == Installation ==
18
 
39
 
40
  == Changelog ==
41
 
42
+ = 1.3.0 =
43
+ * Tweak - Suppor data update for nested siteorigin nested layoutbuilder.
44
+ * Fix - Import button not working on firefox.
45
+
46
  = 1.2.0 =
47
  * Tweak - Load scripts perfecly on demo importer appearance page.
48
  * Tweak - Set transient for redirecting to demo importer page after install or update.
themegrill-demo-importer.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ThemeGrill Demo Importer
4
  * Plugin URI: http://themegrill.com/demo-importer/
5
  * Description: Description: Import your demo content, widgets and theme settings with one click for ThemeGrill official themes.
6
- * Version: 1.2.0
7
  * Author: ThemeGrill
8
  * Author URI: http://themegrill.com
9
  * License: GPLv3 or later
@@ -26,7 +26,7 @@ final class ThemeGrill_Demo_Importer {
26
  * Plugin version.
27
  * @var string
28
  */
29
- const VERSION = '1.1.0';
30
 
31
  /**
32
  * Instance of this class.
3
  * Plugin Name: ThemeGrill Demo Importer
4
  * Plugin URI: http://themegrill.com/demo-importer/
5
  * Description: Description: Import your demo content, widgets and theme settings with one click for ThemeGrill official themes.
6
+ * Version: 1.3.0
7
  * Author: ThemeGrill
8
  * Author URI: http://themegrill.com
9
  * License: GPLv3 or later
26
  * Plugin version.
27
  * @var string
28
  */
29
+ const VERSION = '1.3.0';
30
 
31
  /**
32
  * Instance of this class.