Nimble Page Builder - Version 3.1.4

Version Description

Visit the Github release page.

Download this release

Release Info

Developer nikeo
Plugin Icon 128x128 Nimble Page Builder
Version 3.1.4
Comparing to
See all releases

Code changes from version 3.1.3 to 3.1.4

assets/admin/js/nimble-gutenberg.js CHANGED
@@ -65,14 +65,6 @@
65
  // for new post, the url is empty, let's generate it server side with an ajax call
66
  var post_id = wp.data.select('core/editor').getCurrentPostId();
67
 
68
- // check post status before attempting to open the customizer. introduced for #831
69
- // draft post can't be edited with Nimble Builder
70
- var _post = wp.data.select('core/editor').getCurrentPost();
71
- if ( _post && _.isObject( _post ) && 'publish' !== _post.status && 'private' !== _post.status ) {
72
- alert(nimbleAdminLocalized.i18n["Nimble Builder can't be used on draft or scheduled posts. You can publish the post with visibility set to 'private' if you need to edit it with Nimble Builder before publishing."]);
73
- return;
74
- }
75
-
76
  // introduced for https://github.com/presscustomizr/nimble-builder/issues/509
77
  $clickedEl.addClass('sek-loading-customizer').removeClass('button-primary');
78
 
65
  // for new post, the url is empty, let's generate it server side with an ajax call
66
  var post_id = wp.data.select('core/editor').getCurrentPostId();
67
 
 
 
 
 
 
 
 
 
68
  // introduced for https://github.com/presscustomizr/nimble-builder/issues/509
69
  $clickedEl.addClass('sek-loading-customizer').removeClass('button-primary');
70
 
assets/front/js/ccat-nimble-front.js CHANGED
@@ -1182,9 +1182,6 @@ nb_.listenTo('nb-docready', function() {
1182
  if ( window.nb_ && window.nb_.getQueryVariable ) {
1183
  var anchorId = window.nb_.getQueryVariable('go_to'),
1184
  el = document.getElementById(anchorId);
1185
- if( anchorId && el ) {
1186
- setTimeout( function() { el.scrollIntoView();}, 200 );
1187
- }
1188
  // Then clean the url
1189
  var _cleanUrl = function() {
1190
  var currPathName = window.location.pathname; //get current address
@@ -1192,9 +1189,12 @@ nb_.listenTo('nb-docready', function() {
1192
  var beforeQueryString = currPathName.split("?go_to")[0];
1193
  window.history.replaceState({}, document.title, beforeQueryString );
1194
  };
1195
- try{ _cleanUrl(); } catch(er) {
1196
- if( window.console && window.console.log ) {
1197
- console.log( 'NB => error when cleaning url "go_to" param');
 
 
 
1198
  }
1199
  }
1200
  }
1182
  if ( window.nb_ && window.nb_.getQueryVariable ) {
1183
  var anchorId = window.nb_.getQueryVariable('go_to'),
1184
  el = document.getElementById(anchorId);
 
 
 
1185
  // Then clean the url
1186
  var _cleanUrl = function() {
1187
  var currPathName = window.location.pathname; //get current address
1189
  var beforeQueryString = currPathName.split("?go_to")[0];
1190
  window.history.replaceState({}, document.title, beforeQueryString );
1191
  };
1192
+ if( anchorId && el ) {
1193
+ setTimeout( function() { el.scrollIntoView();}, 200 );
1194
+ try{ _cleanUrl(); } catch(er) {
1195
+ if( window.console && window.console.log ) {
1196
+ console.log( 'NB => error when cleaning url "go_to" param');
1197
+ }
1198
  }
1199
  }
1200
  }
assets/front/js/ccat-nimble-front.min.js CHANGED
@@ -1 +1 @@
1
- void 0===window.nb_&&window.console&&window.console.log&&console.log("Nimble error => window.nb_ global not instantiated"),window.nb_.getQueryVariable=function(e){for(var n=window.location.search.substring(1).split("&"),t=0;t<n.length;t++){var o=n[t].split("=");if(o[0]==e)return o[1]}return!1},window,document,nb_.listenTo("nb-jquery-loaded",function(){jQuery(function(d){jQuery.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e,n){window.nb_["is"+n]=function(e){return Object.prototype.toString.call(e)==="[object "+n+"]"}});var a,i,u=function(){return Date.now||(new Date).getTime()};d.extend(nb_,{cachedElements:{$window:d(window),$body:d("body")},isMobile:function(){return nb_.isFunction(window.matchMedia)&&matchMedia("only screen and (max-width: 768px)").matches||this.isCustomizing()&&"desktop"!=this.previewedDevice},isCustomizing:function(){return this.cachedElements.$body.hasClass("is-customizing")||"undefined"!=typeof wp&&void 0!==wp.customize},previewedDevice:"desktop",elOrFirstVisibleParentIsInWindow:function(e,n){var t=e instanceof d?e:d(e);if(t instanceof d){if(!n||nb_.isNumber(n)){var o=function(e){if(0<e.length&&e.is(":visible"))return e;var n=e.prev();if(0<n.length&&n.is(":visible"))return n;if(0<n.length&&!n.is(":visible"))return o(n);var t=e.parent();return 0<t.length?o(t):null},a=o(t);if(!a||a.length<1)return!1;var i=this.cachedElements.$window.scrollTop(),r=i+this.cachedElements.$window.height(),l=a.offset().top,s=n||0;return i-s<=l+a.height()&&l<=r+s}nb_.errorLog("invalid threshold in nb_.elOrFirstVisibleParentIsInWindow")}else nb_.errorLog("invalid element in nb_.elOrFirstVisibleParentIsInWindow",t)},has:function(e,n){if(!_.isArray(n))return null!=e&&hasOwnProperty.call(e,n);for(var t=n.length,o=0;o<t;o++){var a=n[o];if(null==e||!Object.prototype.hasOwnProperty.call(e,a))return!1;e=e[a]}return!!t},debounce:function(o,a,i){var r;return function(){var e=this,n=arguments,t=i&&!r;clearTimeout(r),r=setTimeout(function(){r=null,i||o.apply(e,n)},a),t&&o.apply(e,n)}},throttle:function(t,o,a){var i,r,l,s,d=0;a||(a={});var c=function(){d=!1===a.leading?0:u(),i=null,s=t.apply(r,l),i||(r=l=null)},e=function(){var e=u();d||!1!==a.leading||(d=e);var n=o-(e-d);return r=this,l=arguments,n<=0||o<n?(i&&(clearTimeout(i),i=null),d=e,s=t.apply(r,l),i||(r=l=null)):i||!1===a.trailing||(i=setTimeout(c,n)),s};return e.cancel=function(){clearTimeout(i),d=0,i=r=l=null},e},delay:(a=function(e,n,t){return setTimeout(function(){return e.apply(null,t)},n)},i=null==i?a.length-1:+i,function(){for(var e=Math.max(arguments.length-i,0),n=Array(e),t=0;t<e;t++)n[t]=arguments[t+i];switch(i){case 0:return a.call(this,n);case 1:return a.call(this,arguments[0],n);case 2:return a.call(this,arguments[0],arguments[1],n)}var o=Array(i+1);for(t=0;t<i;t++)o[t]=arguments[t];return o[i]=n,a.apply(this,o)})}),nb_.emit("nb-app-ready")})}),window,document,nb_.listenTo("nb-app-ready",function(){var a;(a=jQuery).fn.fitText=function(e,n){var t=e||1,o=a.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},n);return this.each(function(){var e=a(this),n=function(){e.css("font-size",Math.max(Math.min(e.width()/(10*t),parseFloat(o.maxFontSize)),parseFloat(o.minFontSize))+"px")};n(),nb_.cachedElements.$window.on("resize.fittext orientationchange.fittext",n)})}}),window,document,nb_.listenTo("nb-app-ready",function(){jQuery(function(i){var r=function(e){var n=document.createElement("a");n.href=e,n.href=n.href;for(var t=["host","hostname","hash","href","port","protocol","search"],o=0,a=t.length;o<a;o++)this[t[o]]=n[t[o]];this.pathname=("/"!==n.pathname.charAt(0)?"/":"")+n.pathname},n=i("html, body");window.nb_allImagesLazyLoadedForScrollToAnchor=!1;var l=function(){var e=i(this);"scrollBehavior"in document.documentElement.style?e[0].scrollIntoView({behavior:"smooth"}):n.animate({scrollTop:e.offset().top-150},400)},t=0,s=function(){var e=i(this);i("img[data-sek-src]").not(".sek-lazy-load-error").length<1?(window.nb_allImagesLazyLoadedForScrollToAnchor=!0,l.call(e)):t<20?(t++,nb_.delay(function(){s.call(e)},100),nb_.delay(function(){l.call(e)},200)):l.call(e)},e=function(e){var n=i(this).attr("href");if(""!==n&&null!==n&&"string"==typeof n&&-1!==n.indexOf("#")){var t=new r(n),o=new r(window.document.location.href);if(t.pathname===o.pathname&&"string"==typeof t.hash&&""!==t.hash){var a=i('[data-sek-level="location"]').find('[id="'+t.hash.replace("#","")+'"]');1===a.length&&(e.preventDefault(),sekFrontLocalized.lazyload_enabled&&!1===window.nb_allImagesLazyLoadedForScrollToAnchor&&0<i("img[data-sek-src]").not(".sek-lazy-load-error").length?(i("body").one("smartload","img",function(){s.call(a)}),i("img[data-sek-src]").trigger("sek_load_img")):l.call(a))}}};nb_.cachedElements.$body.find(".menu-item").on("click","a",e),i('[data-sek-level="location"]').on("click","a",e)})}),window,document,nb_.listenTo("nb-app-ready",function(){!function(l,t){var a="nimbleLazyLoad",i={load_all_images_on_first_scroll:!1,threshold:100,fadeIn_options:{duration:400},delaySmartLoadEvent:0,candidateSelectors:"[data-sek-src], [data-sek-iframe-src]",force:!1},s="sek-lazy-loaded";function n(e,n){this.element=e,this.options=l.extend({},i,n);var t=sekFrontLocalized.lazyload_enabled;if(this.options.force&&(t=!0),t)if(l(this.element).data("nimbleLazyLoadDone"))l(this.element).trigger("nb-trigger-lazyload");else{this._defaults=i,this._name=a;var o=this;l(this.element).on("nb-trigger-lazyload",function(){o._maybe_trigger_load("nb-trigger-lazyload")}),this.init()}}n.prototype._getCandidateEls=function(){return l(this.options.candidateSelectors,this.element)},n.prototype.init=function(){var n=this;l("body").on("sek_load_img sek_load_iframe",n.options.candidateSelectors,function(e){!0!==l(this).data("sek-lazy-loaded")&&("sek_load_img"===e.type?n._load_img(this):"sek_load_iframe"===e.type&&n._load_iframe(this))}),nb_.cachedElements.$window.on("scroll",function(e){n._better_scroll_event_handler(e)}),nb_.cachedElements.$window.on("resize",nb_.debounce(function(e){n._maybe_trigger_load(e)},100)),this._maybe_trigger_load("dom-ready"),setTimeout(function(){n._maybe_trigger_load("dom-ready")},1e3),l(this.element).data("nimbleLazyLoadDone",!0)},n.prototype._better_scroll_event_handler=function(e){var n=this;this.doingAnimation||(this.doingAnimation=!0,t.requestAnimationFrame(function(){n._maybe_trigger_load(e),n.doingAnimation=!1}))},n.prototype._maybe_trigger_load=function(t){var o=this,e=o._getCandidateEls(),a=t&&"scroll"===t.type?this.options.threshold:0;_visible_list=e.filter(function(e,n){return!(!t||"scroll"!=t.type||!o.options.load_all_images_on_first_scroll)||nb_.elOrFirstVisibleParentIsInWindow(n,a)}),_visible_list.map(function(e,n){!0!==l(n).data("sek-lazy-loaded")&&("IFRAME"===l(n).prop("tagName")?l(n).trigger("sek_load_iframe"):l(n).trigger("sek_load_img"))})},n.prototype._load_img=function(e){var t=l(e);if(t.attr("data-sek-src")&&!t.hasClass(s)&&!t.hasClass("lazy-loading")){var n=t.attr("data-sek-src"),o=t.attr("data-sek-srcset"),a=t.attr("data-sek-sizes"),i=this,r=l("<img />",{src:n});t.addClass("lazy-loading"),t.off("sek_load_img"),r.on("load",function(){t.removeAttr(["data-sek-src","data-sek-srcset","data-sek-sizes"].join(" ")),t.data("sek-lazy-bg")?t.css("backgroundImage","url("+n+")"):(t.attr("src",n),o&&t.attr("srcset",o),a&&t.attr("sizes",a)),t.hasClass(s)||t.addClass(s),t.trigger("smartload"),t.data("sek-lazy-loaded",!0),i._clean_css_loader(t)}).on("error",function(e,n){t.addClass("sek-lazy-load-error")}),r[0].complete&&r.trigger("load"),t.removeClass("lazy-loading")}},n.prototype._clean_css_loader=function(e){l.each([e.find(".sek-css-loader"),e.parent().find(".sek-css-loader")],function(e,n){0<n.length&&n.remove()})},n.prototype._load_iframe=function(e){var n=l(e);n.off("sek_load_iframe"),n.attr("src",function(){var e=l(this).attr("data-sek-iframe-src");return l(this).removeAttr("data-sek-iframe-src"),n.data("sek-lazy-loaded",!0),n.trigger("smartload"),n.hasClass(s)||n.addClass(s),e})},l.fn[a]=function(e){return this.each(function(){l.data(this,"plugin_"+a)||l.data(this,"plugin_"+a,new n(this,e))})}}(jQuery,window),(sekFrontLocalized.lazyload_enabled||nb_.isCustomizing())&&nb_.emit("nb-lazyload-parsed")}),window,document,nb_.loadAssetWhenElementVisible=function(a,n){jQuery(function(t){if(!nb_.scrollHandlers[a].loaded){nb_.scrollHandlers[a].loaded=!1;var e=n.elements,o=n.func;t.each(e,function(e,n){!nb_.scrollHandlers[a].loaded&&nb_.elOrFirstVisibleParentIsInWindow(t(n))&&(o(),nb_.scrollHandlers[a].loaded=!0)}),n.scrollHandler&&nb_.scrollHandlers[a].loaded&&nb_.cachedElements.$window.off("scroll",n.scrollHandler)}})},nb_.loopOnScrollHandlers=function(){jQuery(function(e){e.each(nb_.scrollHandlers,function(e,n){if(n.loaded)return!0;var t=sekFrontLocalized.load_front_assets_on_scroll;if(!0===n.force_loading&&(t=!0),t){if(n.elements.length<1)return!0;try{nb_.loadAssetWhenElementVisible(e,n)}catch(e){nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers",e,n)}nb_.isFunction(n.func)&&nb_.isUndefined(n.scrollHandler)?(n.scrollHandler=nb_.throttle(function(){try{nb_.loadAssetWhenElementVisible(e,n)}catch(e){nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers",e,n)}},100),nb_.cachedElements.$window.on("scroll",n.scrollHandler)):nb_.isFunction(n.func)||nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers => wrong callback func param",n)}})})},nb_.listenTo("nb-app-ready",function(){jQuery(function(e){nb_.listenTo("nimble-new-scroll-handler-added",nb_.loopOnScrollHandlers)})}),window,document,nb_.listenTo("nb-app-ready",function(){jQuery(function(t){nb_.maybeLoadAssetsWhenSelectorInScreen=function(e){if((e=t.extend({id:"",elements:"",func:""},e)).id.length<1)nb_.errorLog("Nimble error => maybeLoadAssetsWhenSelectorInScreen => missing id",e);else if(!(t(e.elements).length<1)&&nb_.isFunction(e.func)){nb_.scrollHandlers=nb_.scrollHandlers||{};var n={elements:e.elements,func:e.func,force_loading:e.force_loading};nb_.scrollHandlers[e.id]=n,nb_.emit("nimble-new-scroll-handler-added",{fire_once:!1})}},nb_.emit("nimble-ready-to-load-assets-on-scroll")})}),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){var n=e('[data-sek-module-type="czr_image_module"]').find(".sek-link-to-img-lightbox");if(!(n.length<1)){nb_.maybeLoadAssetsWhenSelectorInScreen({id:"magnific-popup",elements:n,func:function(){e("head").find("#czr-magnific-popup").length<1&&e("head").append(e("<link/>",{rel:"stylesheet",id:"czr-magnific-popup",type:"text/css",href:sekFrontLocalized.frontAssetsPath+"css/libs/magnific-popup.min.css?"+sekFrontLocalized.assetVersion})),!nb_.isFunction(e.fn.magnificPopup)&&sekFrontLocalized.load_front_assets_on_scroll&&nb_.ajaxLoadScript({path:"js/libs/jquery-magnific-popup.min.js",loadcheck:function(){return nb_.isFunction(e.fn.magnificPopup)}})}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-magnific-popup",t)})}(window,document),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){if(!nb_.isFunction(window.Swiper)){var n=e('[data-sek-module-type="czr_img_slider_module"]');n.length<1||nb_.maybeLoadAssetsWhenSelectorInScreen({id:"swiper",elements:n,func:function(){e("head").find("#czr-swiper").length<1&&e("head").append(e("<link/>",{rel:"stylesheet",id:"czr-swiper",type:"text/css",href:sekFrontLocalized.frontAssetsPath+"css/libs/swiper.min.css?"+sekFrontLocalized.assetVersion})),nb_.ajaxLoadScript({path:"js/libs/swiper.min.js?"+sekFrontLocalized.assetVersion,loadcheck:function(){return nb_.isFunction(window.Swiper)}})}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-swiper",t)})}(window,document),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){var n=e("[data-sek-video-bg-src]");n.length<1||nb_.maybeLoadAssetsWhenSelectorInScreen({id:"nb-video-bg",elements:n,func:function(){nb_.ajaxLoadScript({path:"js/libs/nimble-video-bg.min.js?"+sekFrontLocalized.assetVersion})}})}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-videobg-js",t)})}(window,document),function(e,n){var t=function(){jQuery(function(n){if(!sekFrontLocalized.fontAwesomeAlreadyEnqueued&&sekFrontLocalized.load_front_assets_on_scroll){var e=n("i[class*=fa-]");if(!(e.length<1)){nb_.maybeLoadAssetsWhenSelectorInScreen({id:"font-awesome",elements:e,func:function(){if(n("head").find("#czr-font-awesome").length<1){var e=document.createElement("link");e.setAttribute("href",sekFrontLocalized.frontAssetsPath+"fonts/css/fontawesome-all.min.css?"+sekFrontLocalized.assetVersion),e.setAttribute("id","czr-font-awesome"),e.setAttribute("rel",nb_.hasPreloadSupport()?"preload":"stylesheet"),e.setAttribute("as","style"),e.onload=function(){this.onload=null,nb_.hasPreloadSupport()&&(this.rel="stylesheet")},document.getElementsByTagName("head")[0].appendChild(e)}}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-fa",t)})}(window,document),window,document,nb_.listenTo("nb-jmp-parsed",function(){jQuery(function(e){var n=e('[data-sek-module-type="czr_image_module"]').find(".sek-link-to-img-lightbox");n.length<1||n.each(function(){if($linkCandidate=e(this),!($linkCandidate.length<1||"string"!=typeof $linkCandidate[0].protocol||-1!==$linkCandidate[0].protocol.indexOf("javascript")||$linkCandidate.data("nimble-mfp-done"))){try{$linkCandidate.magnificPopup({type:"image",closeOnContentClick:!0,closeBtnInside:!0,fixedContentPos:!0,mainClass:"mfp-no-margins mfp-with-zoom",image:{verticalFit:!0},zoom:{enabled:!0,duration:300}})}catch(e){nb_.errorLog("error in callback of nimble-magnific-popup-loaded => ",e)}$linkCandidate.data("nimble-mfp-done",!0)}})})}),window,document,nb_.listenTo("nb-lazyload-parsed",function(){jQuery(function(n){var t=function(e){n(this).each(function(){try{(function(){n(this).data("nimbleLazyLoadDone")?n(this).trigger("nb-trigger-lazyload"):n(this).nimbleLazyLoad({force:nb_.isCustomizing()})}).call(n(this))}catch(e){nb_.errorLog("error with nimbleLazyLoad => ",e)}})};t.call(n(".sektion-wrapper")),nb_.cachedElements.$body.on("sek-section-added sek-level-refreshed sek-location-refreshed sek-columns-refreshed sek-modules-refreshed",'[data-sek-level="location"]',function(e){t.call(n(this),e),_.delay(function(){nb_.cachedElements.$window.trigger("resize")},200)})})}),window,document,nb_.listenTo("nb-parallax-parsed",function(){jQuery(function(n){n('[data-sek-bg-parallax="true"]').each(function(){n(this).parallaxBg({parallaxForce:n(this).data("sek-parallax-force")})});var t=function(){n(this).parallaxBg({parallaxForce:n(this).data("sek-parallax-force")}),setTimeout(function(){nb_.cachedElements.$body.trigger("resize")},500)};nb_.cachedElements.$body.on("sek-level-refreshed sek-section-added",function(e){"true"===n(this).data("sek-bg-parallax")?t.call(this):n(this).find('[data-sek-bg-parallax="true"]').each(function(){t.call(this)})})})}),nb_.listenTo("nb-docready",function(){if(window.nb_&&window.nb_.getQueryVariable){var e=window.nb_.getQueryVariable("go_to"),n=document.getElementById(e);e&&n&&setTimeout(function(){n.scrollIntoView()},200);try{t=window.location.pathname.split("?go_to")[0],window.history.replaceState({},document.title,t)}catch(e){window.console&&window.console.log&&console.log('NB => error when cleaning url "go_to" param')}}var t});
1
+ void 0===window.nb_&&window.console&&window.console.log&&console.log("Nimble error => window.nb_ global not instantiated"),window.nb_.getQueryVariable=function(e){for(var n=window.location.search.substring(1).split("&"),t=0;t<n.length;t++){var o=n[t].split("=");if(o[0]==e)return o[1]}return!1},window,document,nb_.listenTo("nb-jquery-loaded",function(){jQuery(function(d){jQuery.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],function(e,n){window.nb_["is"+n]=function(e){return Object.prototype.toString.call(e)==="[object "+n+"]"}});var a,i,u=function(){return Date.now||(new Date).getTime()};d.extend(nb_,{cachedElements:{$window:d(window),$body:d("body")},isMobile:function(){return nb_.isFunction(window.matchMedia)&&matchMedia("only screen and (max-width: 768px)").matches||this.isCustomizing()&&"desktop"!=this.previewedDevice},isCustomizing:function(){return this.cachedElements.$body.hasClass("is-customizing")||"undefined"!=typeof wp&&void 0!==wp.customize},previewedDevice:"desktop",elOrFirstVisibleParentIsInWindow:function(e,n){var t=e instanceof d?e:d(e);if(t instanceof d){if(!n||nb_.isNumber(n)){var o=function(e){if(0<e.length&&e.is(":visible"))return e;var n=e.prev();if(0<n.length&&n.is(":visible"))return n;if(0<n.length&&!n.is(":visible"))return o(n);var t=e.parent();return 0<t.length?o(t):null},a=o(t);if(!a||a.length<1)return!1;var i=this.cachedElements.$window.scrollTop(),r=i+this.cachedElements.$window.height(),l=a.offset().top,s=n||0;return i-s<=l+a.height()&&l<=r+s}nb_.errorLog("invalid threshold in nb_.elOrFirstVisibleParentIsInWindow")}else nb_.errorLog("invalid element in nb_.elOrFirstVisibleParentIsInWindow",t)},has:function(e,n){if(!_.isArray(n))return null!=e&&hasOwnProperty.call(e,n);for(var t=n.length,o=0;o<t;o++){var a=n[o];if(null==e||!Object.prototype.hasOwnProperty.call(e,a))return!1;e=e[a]}return!!t},debounce:function(o,a,i){var r;return function(){var e=this,n=arguments,t=i&&!r;clearTimeout(r),r=setTimeout(function(){r=null,i||o.apply(e,n)},a),t&&o.apply(e,n)}},throttle:function(t,o,a){var i,r,l,s,d=0;a||(a={});var c=function(){d=!1===a.leading?0:u(),i=null,s=t.apply(r,l),i||(r=l=null)},e=function(){var e=u();d||!1!==a.leading||(d=e);var n=o-(e-d);return r=this,l=arguments,n<=0||o<n?(i&&(clearTimeout(i),i=null),d=e,s=t.apply(r,l),i||(r=l=null)):i||!1===a.trailing||(i=setTimeout(c,n)),s};return e.cancel=function(){clearTimeout(i),d=0,i=r=l=null},e},delay:(a=function(e,n,t){return setTimeout(function(){return e.apply(null,t)},n)},i=null==i?a.length-1:+i,function(){for(var e=Math.max(arguments.length-i,0),n=Array(e),t=0;t<e;t++)n[t]=arguments[t+i];switch(i){case 0:return a.call(this,n);case 1:return a.call(this,arguments[0],n);case 2:return a.call(this,arguments[0],arguments[1],n)}var o=Array(i+1);for(t=0;t<i;t++)o[t]=arguments[t];return o[i]=n,a.apply(this,o)})}),nb_.emit("nb-app-ready")})}),window,document,nb_.listenTo("nb-app-ready",function(){var a;(a=jQuery).fn.fitText=function(e,n){var t=e||1,o=a.extend({minFontSize:Number.NEGATIVE_INFINITY,maxFontSize:Number.POSITIVE_INFINITY},n);return this.each(function(){var e=a(this),n=function(){e.css("font-size",Math.max(Math.min(e.width()/(10*t),parseFloat(o.maxFontSize)),parseFloat(o.minFontSize))+"px")};n(),nb_.cachedElements.$window.on("resize.fittext orientationchange.fittext",n)})}}),window,document,nb_.listenTo("nb-app-ready",function(){jQuery(function(i){var r=function(e){var n=document.createElement("a");n.href=e,n.href=n.href;for(var t=["host","hostname","hash","href","port","protocol","search"],o=0,a=t.length;o<a;o++)this[t[o]]=n[t[o]];this.pathname=("/"!==n.pathname.charAt(0)?"/":"")+n.pathname},n=i("html, body");window.nb_allImagesLazyLoadedForScrollToAnchor=!1;var l=function(){var e=i(this);"scrollBehavior"in document.documentElement.style?e[0].scrollIntoView({behavior:"smooth"}):n.animate({scrollTop:e.offset().top-150},400)},t=0,s=function(){var e=i(this);i("img[data-sek-src]").not(".sek-lazy-load-error").length<1?(window.nb_allImagesLazyLoadedForScrollToAnchor=!0,l.call(e)):t<20?(t++,nb_.delay(function(){s.call(e)},100),nb_.delay(function(){l.call(e)},200)):l.call(e)},e=function(e){var n=i(this).attr("href");if(""!==n&&null!==n&&"string"==typeof n&&-1!==n.indexOf("#")){var t=new r(n),o=new r(window.document.location.href);if(t.pathname===o.pathname&&"string"==typeof t.hash&&""!==t.hash){var a=i('[data-sek-level="location"]').find('[id="'+t.hash.replace("#","")+'"]');1===a.length&&(e.preventDefault(),sekFrontLocalized.lazyload_enabled&&!1===window.nb_allImagesLazyLoadedForScrollToAnchor&&0<i("img[data-sek-src]").not(".sek-lazy-load-error").length?(i("body").one("smartload","img",function(){s.call(a)}),i("img[data-sek-src]").trigger("sek_load_img")):l.call(a))}}};nb_.cachedElements.$body.find(".menu-item").on("click","a",e),i('[data-sek-level="location"]').on("click","a",e)})}),window,document,nb_.listenTo("nb-app-ready",function(){!function(l,t){var a="nimbleLazyLoad",i={load_all_images_on_first_scroll:!1,threshold:100,fadeIn_options:{duration:400},delaySmartLoadEvent:0,candidateSelectors:"[data-sek-src], [data-sek-iframe-src]",force:!1},s="sek-lazy-loaded";function n(e,n){this.element=e,this.options=l.extend({},i,n);var t=sekFrontLocalized.lazyload_enabled;if(this.options.force&&(t=!0),t)if(l(this.element).data("nimbleLazyLoadDone"))l(this.element).trigger("nb-trigger-lazyload");else{this._defaults=i,this._name=a;var o=this;l(this.element).on("nb-trigger-lazyload",function(){o._maybe_trigger_load("nb-trigger-lazyload")}),this.init()}}n.prototype._getCandidateEls=function(){return l(this.options.candidateSelectors,this.element)},n.prototype.init=function(){var n=this;l("body").on("sek_load_img sek_load_iframe",n.options.candidateSelectors,function(e){!0!==l(this).data("sek-lazy-loaded")&&("sek_load_img"===e.type?n._load_img(this):"sek_load_iframe"===e.type&&n._load_iframe(this))}),nb_.cachedElements.$window.on("scroll",function(e){n._better_scroll_event_handler(e)}),nb_.cachedElements.$window.on("resize",nb_.debounce(function(e){n._maybe_trigger_load(e)},100)),this._maybe_trigger_load("dom-ready"),setTimeout(function(){n._maybe_trigger_load("dom-ready")},1e3),l(this.element).data("nimbleLazyLoadDone",!0)},n.prototype._better_scroll_event_handler=function(e){var n=this;this.doingAnimation||(this.doingAnimation=!0,t.requestAnimationFrame(function(){n._maybe_trigger_load(e),n.doingAnimation=!1}))},n.prototype._maybe_trigger_load=function(t){var o=this,e=o._getCandidateEls(),a=t&&"scroll"===t.type?this.options.threshold:0;_visible_list=e.filter(function(e,n){return!(!t||"scroll"!=t.type||!o.options.load_all_images_on_first_scroll)||nb_.elOrFirstVisibleParentIsInWindow(n,a)}),_visible_list.map(function(e,n){!0!==l(n).data("sek-lazy-loaded")&&("IFRAME"===l(n).prop("tagName")?l(n).trigger("sek_load_iframe"):l(n).trigger("sek_load_img"))})},n.prototype._load_img=function(e){var t=l(e);if(t.attr("data-sek-src")&&!t.hasClass(s)&&!t.hasClass("lazy-loading")){var n=t.attr("data-sek-src"),o=t.attr("data-sek-srcset"),a=t.attr("data-sek-sizes"),i=this,r=l("<img />",{src:n});t.addClass("lazy-loading"),t.off("sek_load_img"),r.on("load",function(){t.removeAttr(["data-sek-src","data-sek-srcset","data-sek-sizes"].join(" ")),t.data("sek-lazy-bg")?t.css("backgroundImage","url("+n+")"):(t.attr("src",n),o&&t.attr("srcset",o),a&&t.attr("sizes",a)),t.hasClass(s)||t.addClass(s),t.trigger("smartload"),t.data("sek-lazy-loaded",!0),i._clean_css_loader(t)}).on("error",function(e,n){t.addClass("sek-lazy-load-error")}),r[0].complete&&r.trigger("load"),t.removeClass("lazy-loading")}},n.prototype._clean_css_loader=function(e){l.each([e.find(".sek-css-loader"),e.parent().find(".sek-css-loader")],function(e,n){0<n.length&&n.remove()})},n.prototype._load_iframe=function(e){var n=l(e);n.off("sek_load_iframe"),n.attr("src",function(){var e=l(this).attr("data-sek-iframe-src");return l(this).removeAttr("data-sek-iframe-src"),n.data("sek-lazy-loaded",!0),n.trigger("smartload"),n.hasClass(s)||n.addClass(s),e})},l.fn[a]=function(e){return this.each(function(){l.data(this,"plugin_"+a)||l.data(this,"plugin_"+a,new n(this,e))})}}(jQuery,window),(sekFrontLocalized.lazyload_enabled||nb_.isCustomizing())&&nb_.emit("nb-lazyload-parsed")}),window,document,nb_.loadAssetWhenElementVisible=function(a,n){jQuery(function(t){if(!nb_.scrollHandlers[a].loaded){nb_.scrollHandlers[a].loaded=!1;var e=n.elements,o=n.func;t.each(e,function(e,n){!nb_.scrollHandlers[a].loaded&&nb_.elOrFirstVisibleParentIsInWindow(t(n))&&(o(),nb_.scrollHandlers[a].loaded=!0)}),n.scrollHandler&&nb_.scrollHandlers[a].loaded&&nb_.cachedElements.$window.off("scroll",n.scrollHandler)}})},nb_.loopOnScrollHandlers=function(){jQuery(function(e){e.each(nb_.scrollHandlers,function(e,n){if(n.loaded)return!0;var t=sekFrontLocalized.load_front_assets_on_scroll;if(!0===n.force_loading&&(t=!0),t){if(n.elements.length<1)return!0;try{nb_.loadAssetWhenElementVisible(e,n)}catch(e){nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers",e,n)}nb_.isFunction(n.func)&&nb_.isUndefined(n.scrollHandler)?(n.scrollHandler=nb_.throttle(function(){try{nb_.loadAssetWhenElementVisible(e,n)}catch(e){nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers",e,n)}},100),nb_.cachedElements.$window.on("scroll",n.scrollHandler)):nb_.isFunction(n.func)||nb_.errorLog("Nimble error => nb_.loopOnScrollHandlers => wrong callback func param",n)}})})},nb_.listenTo("nb-app-ready",function(){jQuery(function(e){nb_.listenTo("nimble-new-scroll-handler-added",nb_.loopOnScrollHandlers)})}),window,document,nb_.listenTo("nb-app-ready",function(){jQuery(function(t){nb_.maybeLoadAssetsWhenSelectorInScreen=function(e){if((e=t.extend({id:"",elements:"",func:""},e)).id.length<1)nb_.errorLog("Nimble error => maybeLoadAssetsWhenSelectorInScreen => missing id",e);else if(!(t(e.elements).length<1)&&nb_.isFunction(e.func)){nb_.scrollHandlers=nb_.scrollHandlers||{};var n={elements:e.elements,func:e.func,force_loading:e.force_loading};nb_.scrollHandlers[e.id]=n,nb_.emit("nimble-new-scroll-handler-added",{fire_once:!1})}},nb_.emit("nimble-ready-to-load-assets-on-scroll")})}),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){var n=e('[data-sek-module-type="czr_image_module"]').find(".sek-link-to-img-lightbox");if(!(n.length<1)){nb_.maybeLoadAssetsWhenSelectorInScreen({id:"magnific-popup",elements:n,func:function(){e("head").find("#czr-magnific-popup").length<1&&e("head").append(e("<link/>",{rel:"stylesheet",id:"czr-magnific-popup",type:"text/css",href:sekFrontLocalized.frontAssetsPath+"css/libs/magnific-popup.min.css?"+sekFrontLocalized.assetVersion})),!nb_.isFunction(e.fn.magnificPopup)&&sekFrontLocalized.load_front_assets_on_scroll&&nb_.ajaxLoadScript({path:"js/libs/jquery-magnific-popup.min.js",loadcheck:function(){return nb_.isFunction(e.fn.magnificPopup)}})}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-magnific-popup",t)})}(window,document),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){if(!nb_.isFunction(window.Swiper)){var n=e('[data-sek-module-type="czr_img_slider_module"]');n.length<1||nb_.maybeLoadAssetsWhenSelectorInScreen({id:"swiper",elements:n,func:function(){e("head").find("#czr-swiper").length<1&&e("head").append(e("<link/>",{rel:"stylesheet",id:"czr-swiper",type:"text/css",href:sekFrontLocalized.frontAssetsPath+"css/libs/swiper.min.css?"+sekFrontLocalized.assetVersion})),nb_.ajaxLoadScript({path:"js/libs/swiper.min.js?"+sekFrontLocalized.assetVersion,loadcheck:function(){return nb_.isFunction(window.Swiper)}})}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-swiper",t)})}(window,document),function(e,n){var t=function(){jQuery(function(e){if(sekFrontLocalized.load_front_assets_on_scroll){var n=e("[data-sek-video-bg-src]");n.length<1||nb_.maybeLoadAssetsWhenSelectorInScreen({id:"nb-video-bg",elements:n,func:function(){nb_.ajaxLoadScript({path:"js/libs/nimble-video-bg.min.js?"+sekFrontLocalized.assetVersion})}})}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-videobg-js",t)})}(window,document),function(e,n){var t=function(){jQuery(function(n){if(!sekFrontLocalized.fontAwesomeAlreadyEnqueued&&sekFrontLocalized.load_front_assets_on_scroll){var e=n("i[class*=fa-]");if(!(e.length<1)){nb_.maybeLoadAssetsWhenSelectorInScreen({id:"font-awesome",elements:e,func:function(){if(n("head").find("#czr-font-awesome").length<1){var e=document.createElement("link");e.setAttribute("href",sekFrontLocalized.frontAssetsPath+"fonts/css/fontawesome-all.min.css?"+sekFrontLocalized.assetVersion),e.setAttribute("id","czr-font-awesome"),e.setAttribute("rel",nb_.hasPreloadSupport()?"preload":"stylesheet"),e.setAttribute("as","style"),e.onload=function(){this.onload=null,nb_.hasPreloadSupport()&&(this.rel="stylesheet")},document.getElementsByTagName("head")[0].appendChild(e)}}})}}})};nb_.listenTo("nb-app-ready",function(){nb_.listenTo("nb-needs-fa",t)})}(window,document),window,document,nb_.listenTo("nb-jmp-parsed",function(){jQuery(function(e){var n=e('[data-sek-module-type="czr_image_module"]').find(".sek-link-to-img-lightbox");n.length<1||n.each(function(){if($linkCandidate=e(this),!($linkCandidate.length<1||"string"!=typeof $linkCandidate[0].protocol||-1!==$linkCandidate[0].protocol.indexOf("javascript")||$linkCandidate.data("nimble-mfp-done"))){try{$linkCandidate.magnificPopup({type:"image",closeOnContentClick:!0,closeBtnInside:!0,fixedContentPos:!0,mainClass:"mfp-no-margins mfp-with-zoom",image:{verticalFit:!0},zoom:{enabled:!0,duration:300}})}catch(e){nb_.errorLog("error in callback of nimble-magnific-popup-loaded => ",e)}$linkCandidate.data("nimble-mfp-done",!0)}})})}),window,document,nb_.listenTo("nb-lazyload-parsed",function(){jQuery(function(n){var t=function(e){n(this).each(function(){try{(function(){n(this).data("nimbleLazyLoadDone")?n(this).trigger("nb-trigger-lazyload"):n(this).nimbleLazyLoad({force:nb_.isCustomizing()})}).call(n(this))}catch(e){nb_.errorLog("error with nimbleLazyLoad => ",e)}})};t.call(n(".sektion-wrapper")),nb_.cachedElements.$body.on("sek-section-added sek-level-refreshed sek-location-refreshed sek-columns-refreshed sek-modules-refreshed",'[data-sek-level="location"]',function(e){t.call(n(this),e),_.delay(function(){nb_.cachedElements.$window.trigger("resize")},200)})})}),window,document,nb_.listenTo("nb-parallax-parsed",function(){jQuery(function(n){n('[data-sek-bg-parallax="true"]').each(function(){n(this).parallaxBg({parallaxForce:n(this).data("sek-parallax-force")})});var t=function(){n(this).parallaxBg({parallaxForce:n(this).data("sek-parallax-force")}),setTimeout(function(){nb_.cachedElements.$body.trigger("resize")},500)};nb_.cachedElements.$body.on("sek-level-refreshed sek-section-added",function(e){"true"===n(this).data("sek-bg-parallax")?t.call(this):n(this).find('[data-sek-bg-parallax="true"]').each(function(){t.call(this)})})})}),nb_.listenTo("nb-docready",function(){if(window.nb_&&window.nb_.getQueryVariable){var e=window.nb_.getQueryVariable("go_to"),n=document.getElementById(e);if(e&&n){setTimeout(function(){n.scrollIntoView()},200);try{t=window.location.pathname.split("?go_to")[0],window.history.replaceState({},document.title,t)}catch(e){window.console&&window.console.log&&console.log('NB => error when cleaning url "go_to" param')}}}var t});
inc/admin/nimble-admin.php CHANGED
@@ -215,16 +215,6 @@ function sek_enqueue_js_asset_for_gutenberg_edit_button() {
215
  NIMBLE_ASSETS_VERSION,
216
  true
217
  );
218
-
219
- wp_localize_script(
220
- 'nb-gutenberg',
221
- 'nimbleAdminLocalized',
222
- array(
223
- 'i18n' => array(
224
- "Nimble Builder can't be used on draft or scheduled posts. You can publish the post with visibility set to 'private' if you need to edit it with Nimble Builder before publishing." => __( "Nimble Builder can't be used on draft or scheduled posts. You can publish the post with visibility set to 'private' if you need to edit it with Nimble Builder before publishing.", 'nimble-builder'),
225
- )
226
- )
227
- );
228
  }
229
  add_action( 'admin_footer', '\Nimble\sek_print_js_for_nimble_edit_btn' );
230
  function sek_print_js_for_nimble_edit_btn() {
@@ -270,16 +260,7 @@ function sek_print_js_for_nimble_edit_btn() {
270
  if ( _.isEmpty( _url ) ) {
271
  $clickedEl.addClass('sek-loading-customizer').removeClass('button-primary');
272
  var post_id = $('#post_ID').val();
273
- wp.ajax.post( 'sek_get_post_status_before_customizing', {
274
- nimble_edit_post_id : post_id
275
- }).done( function( status ) {
276
- if ( 'publish' === status || 'private' === status ) {
277
- _doRedirectToCustomizer( post_id, $clickedEl );
278
- } else {
279
- $clickedEl.removeClass('sek-loading-customizer').addClass('button-primary');
280
- alert('<?php _e("Nimble Builder can\'t be used on draft or scheduled posts. You can publish the post with visibility set to \'private\' if you need to edit it with Nimble Builder before publishing.", "nimble-builder"); ?>' );
281
- }
282
- }).fail( function( resp ) { console.log('Nimble Builder Error => problem when getting post status')});
283
  } else {
284
  window.location.href = _url;
285
  }
@@ -343,8 +324,6 @@ function sek_add_nimble_post_state( $post_states, $post ) {
343
  return $post_states;
344
  if ( !sek_current_user_can_access_nb_ui() )
345
  return $post_states;
346
- if ( $post && 'publish' !== $post->post_status && 'private' !== $post->post_status )
347
- return $post_states;
348
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
349
  if ( $post && current_user_can( 'edit_post', $post->ID ) && sek_local_skope_has_been_customized( $manually_built_skope_id ) ) {
350
  $post_states['nimble'] = __( 'Nimble Builder', 'nimble-builder' );
@@ -356,8 +335,6 @@ add_filter( 'page_row_actions', '\Nimble\sek_filter_post_row_actions', 11, 2 );
356
  function sek_filter_post_row_actions( $actions, $post ) {
357
  if ( !sek_current_user_can_access_nb_ui() )
358
  return $actions;
359
- if ( $post && 'publish' !== $post->post_status && 'private' !== $post->post_status )
360
- return $actions;
361
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
362
  if ( $post && current_user_can( 'edit_post', $post->ID ) && sek_local_skope_has_been_customized( $manually_built_skope_id ) ) {
363
  $actions['edit_with_nimble_builder'] = sprintf( '<a href="%1$s" title="%2$s">%2$s</a>',
215
  NIMBLE_ASSETS_VERSION,
216
  true
217
  );
 
 
 
 
 
 
 
 
 
 
218
  }
219
  add_action( 'admin_footer', '\Nimble\sek_print_js_for_nimble_edit_btn' );
220
  function sek_print_js_for_nimble_edit_btn() {
260
  if ( _.isEmpty( _url ) ) {
261
  $clickedEl.addClass('sek-loading-customizer').removeClass('button-primary');
262
  var post_id = $('#post_ID').val();
263
+ _doRedirectToCustomizer( post_id, $clickedEl );
 
 
 
 
 
 
 
 
 
264
  } else {
265
  window.location.href = _url;
266
  }
324
  return $post_states;
325
  if ( !sek_current_user_can_access_nb_ui() )
326
  return $post_states;
 
 
327
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
328
  if ( $post && current_user_can( 'edit_post', $post->ID ) && sek_local_skope_has_been_customized( $manually_built_skope_id ) ) {
329
  $post_states['nimble'] = __( 'Nimble Builder', 'nimble-builder' );
335
  function sek_filter_post_row_actions( $actions, $post ) {
336
  if ( !sek_current_user_can_access_nb_ui() )
337
  return $actions;
 
 
338
  $manually_built_skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . 'post_' . $post->post_type . '_' . $post->ID );
339
  if ( $post && current_user_can( 'edit_post', $post->ID ) && sek_local_skope_has_been_customized( $manually_built_skope_id ) ) {
340
  $actions['edit_with_nimble_builder'] = sprintf( '<a href="%1$s" title="%2$s">%2$s</a>',
inc/sektions/ccat-constants-and-helper-functions.php CHANGED
@@ -3989,18 +3989,6 @@ function sek_add_customize_link() {
3989
  if ( is_customize_preview() && $wp_customize->changeset_post_id() && !current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $wp_customize->changeset_post_id() ) ) {
3990
  return;
3991
  }
3992
- // Previewing a post ?
3993
- // case when previewing a draft post
3994
- if ( array_key_exists( 'preview', $_GET ) && $_GET['preview'] )
3995
- return;
3996
- // case when previewing a future scheduled post
3997
- if ( array_key_exists( 'p', $_GET ) ) {
3998
- $post_id = $_GET['p'];
3999
- $post = get_post( $post_id );
4000
- if ( $post && 'publish' !== $post->post_status && 'private' !== $post->post_status )
4001
- return;
4002
- }
4003
-
4004
  $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
4005
  if ( is_customize_preview() && $wp_customize->changeset_uuid() ) {
4006
  $current_url = remove_query_arg( 'customize_changeset_uuid', $current_url );
@@ -4063,8 +4051,7 @@ function sek_get_customize_url_when_is_admin( $post = null ) {
4063
  && ( $post_type_object->public )
4064
  && ( $post_type_object->show_in_admin_bar )
4065
  && ( get_post_type_archive_link( $post_type_object->name ) )
4066
- && !( 'post' === $post_type_object->name && 'posts' === get_option( 'show_on_front' ) )
4067
- && ( 'publish' === $post_type_object->post_status && 'private' === $post_type_object->post_status ) )
4068
  {
4069
  $customize_url = get_post_type_archive_link( $current_screen->post_type );
4070
  } elseif ( 'term' == $current_screen->base
3989
  if ( is_customize_preview() && $wp_customize->changeset_post_id() && !current_user_can( get_post_type_object( 'customize_changeset' )->cap->edit_post, $wp_customize->changeset_post_id() ) ) {
3990
  return;
3991
  }
 
 
 
 
 
 
 
 
 
 
 
 
3992
  $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
3993
  if ( is_customize_preview() && $wp_customize->changeset_uuid() ) {
3994
  $current_url = remove_query_arg( 'customize_changeset_uuid', $current_url );
4051
  && ( $post_type_object->public )
4052
  && ( $post_type_object->show_in_admin_bar )
4053
  && ( get_post_type_archive_link( $post_type_object->name ) )
4054
+ && !( 'post' === $post_type_object->name && 'posts' === get_option( 'show_on_front' ) ) )
 
4055
  {
4056
  $customize_url = get_post_type_archive_link( $current_screen->post_type );
4057
  } elseif ( 'term' == $current_screen->base
inc/sektions/ccat-sektions-base.php CHANGED
@@ -2530,8 +2530,6 @@ if ( !class_exists( 'SEK_Front_Ajax' ) ) :
2530
  // Returns the customize url for the edit button when using Gutenberg editor
2531
  // implemented for https://github.com/presscustomizr/nimble-builder/issues/449
2532
  // @see assets/admin/js/nimble-gutenberg.js
2533
- add_action( 'wp_ajax_sek_get_post_status_before_customizing', array( $this, 'sek_get_post_status_before_customizing' ) );
2534
-
2535
  add_action( 'wp_ajax_sek_get_customize_url_for_nimble_edit_button', array( $this, 'sek_get_customize_url_for_nimble_edit_button' ) );
2536
 
2537
  // This is the list of accepted actions
@@ -2915,26 +2913,6 @@ if ( !class_exists( 'SEK_Front_Ajax' ) ) :
2915
  $customize_url = sek_get_customize_url_for_post_id( $post_id, $return_url_after_customization );
2916
  wp_send_json_success( $customize_url );
2917
  }
2918
-
2919
- // check post status before attempting to open the customizer. introduced for #831
2920
- // draft post can't be edited with Nimble Builder
2921
- function sek_get_post_status_before_customizing() {
2922
- $this->sek_do_ajax_pre_checks( array( 'check_nonce' => false ) );
2923
-
2924
- if ( !isset( $_POST['nimble_edit_post_id'] ) || empty( $_POST['nimble_edit_post_id'] ) ) {
2925
- wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => missing post_id' );
2926
- }
2927
-
2928
- $post_id = $_POST['nimble_edit_post_id'];
2929
- $post = get_post($post_id);
2930
- $post_status = 'not_set';
2931
-
2932
- if ( $post && is_object($post) && isset($post->post_status)) {
2933
- $post_status = $post->post_status;
2934
- }
2935
- wp_send_json_success( $post_status );
2936
- }
2937
-
2938
  }//class
2939
  endif;
2940
  ?><?php
2530
  // Returns the customize url for the edit button when using Gutenberg editor
2531
  // implemented for https://github.com/presscustomizr/nimble-builder/issues/449
2532
  // @see assets/admin/js/nimble-gutenberg.js
 
 
2533
  add_action( 'wp_ajax_sek_get_customize_url_for_nimble_edit_button', array( $this, 'sek_get_customize_url_for_nimble_edit_button' ) );
2534
 
2535
  // This is the list of accepted actions
2913
  $customize_url = sek_get_customize_url_for_post_id( $post_id, $return_url_after_customization );
2914
  wp_send_json_success( $customize_url );
2915
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2916
  }//class
2917
  endif;
2918
  ?><?php
nimble-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Nimble Page Builder
4
  * Plugin URI: https://nimblebuilder.com
5
  * Description: Simple and smart companion that allows you to insert sections into any existing page, create landing pages or entire websites including header and footer.
6
- * Version: 3.1.3
7
  * Text Domain: nimble-builder
8
  * Author: Press Customizr
9
  * Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
@@ -16,7 +16,7 @@ if ( !defined( 'ABSPATH' ) ) {
16
  /* ------------------------------------------------------------------------- *
17
  * CONSTANTS
18
  /* ------------------------------------------------------------------------- */
19
- $current_version = "3.1.3";
20
 
21
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
22
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
3
  * Plugin Name: Nimble Page Builder
4
  * Plugin URI: https://nimblebuilder.com
5
  * Description: Simple and smart companion that allows you to insert sections into any existing page, create landing pages or entire websites including header and footer.
6
+ * Version: 3.1.4
7
  * Text Domain: nimble-builder
8
  * Author: Press Customizr
9
  * Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
16
  /* ------------------------------------------------------------------------- *
17
  * CONSTANTS
18
  /* ------------------------------------------------------------------------- */
19
+ $current_version = "3.1.4";
20
 
21
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
22
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: page builder, visual editor, customizer, drag and drop, header, footer, la
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.7
9
- Stable tag: 3.1.3
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.7
9
+ Stable tag: 3.1.4
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url