LoftLoader - Version 2.3.7

Version Description

  • Improved: Compatibility with WordPress 5.8
Download this release

Release Info

Developer loftocean
Plugin Icon 128x128 LoftLoader
Version 2.3.7
Comparing to
See all releases

Code changes from version 2.3.6 to 2.3.7

assets/css/loftloader-settings.css CHANGED
@@ -6,7 +6,7 @@
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
- * Version: 2.3.6
10
  */
11
  @import url(https://fonts.googleapis.com/css?family=Lato:400,600);
12
  #customize-theme-controls.loftloader-controls-wrapper {
@@ -431,4 +431,4 @@
431
 
432
  .customize-partial-edit-shortcut,
433
  .widget .customize-partial-edit-shortcut {
434
- display: none !important; }
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
+ * Version: 2.3.7
10
  */
11
  @import url(https://fonts.googleapis.com/css?family=Lato:400,600);
12
  #customize-theme-controls.loftloader-controls-wrapper {
431
 
432
  .customize-partial-edit-shortcut,
433
  .widget .customize-partial-edit-shortcut {
434
+ display: none !important; }
assets/css/loftloader.css CHANGED
@@ -6,7 +6,7 @@
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
- * Version: 2.3.6
10
  */
11
  @-webkit-keyframes spinReturn {
12
  0% {
@@ -647,4 +647,4 @@ body {
647
  word-wrap: normal !important; }
648
  .loader-close-button .close-des {
649
  padding: 0 5px;
650
- font-size: 12px; }
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
+ * Version: 2.3.7
10
  */
11
  @-webkit-keyframes spinReturn {
12
  0% {
647
  word-wrap: normal !important; }
648
  .loader-close-button .close-des {
649
  padding: 0 5px;
650
+ font-size: 12px; }
assets/js/customize.min.js CHANGED
@@ -1 +1 @@
1
- !function(s,d){function l(e){var t,o=s.get(),a=!!o[e]&&o[e];return"string"==typeof a&&(a=a.trim()),!0===(t=a)?"on":t}d("head").append(d("<style>",{id:"loftloader-hide-site-title",text:".site-title { opacity: 0; }"})),s.LoftLoaderSwitchSection=s.Section.extend({initialize:function(){return s.Section.prototype.initialize.apply(this,arguments)},ready:function(){this.container.find("input[name=loftloader-main-switch]").is(":checked")||d("#customize-theme-controls").addClass("loftloader-settings-disabled"),d("#customize-theme-controls").addClass("loftloader-controls-wrapper")},attachEvents:function(){this.container.on("change","input[name=loftloader-main-switch]",function(e){var t=d(this).is(":checked"),o=d("#customize-theme-controls");s("loftloader_main_switch")(t),t?o.removeClass("loftloader-settings-disabled"):o.addClass("loftloader-settings-disabled")})}}),d.extend(s.sectionConstructor,{loftloader_switch:s.LoftLoaderSwitchSection}),s.controlConstructor.slider=s.Control.extend({ready:function(){var e=this.container.find(".loader-ui-slider"),o=this.container.find("input[data-customize-setting-link]");e.slider({range:"min",min:e.data("min"),max:e.data("max"),value:e.data("value"),step:e.data("step"),slide:function(e,t){o.val(t.value).trigger("change")}})}}),s.bind("ready",function(e){loftloader_lite_i18n&&d(".site-title").text(loftloader_lite_i18n.name),d("#loftloader-hide-site-title").remove();var t,o=document.createElement("a");o.href=s.previewer.previewUrl(),t=s.utils.parseQueryString(o.search.substr(1)),s.previewer.unbind("url").bind("url",function(e){var t,o=this,a=!1,l=document.createElement("a");l.href=e,l.search=d.param({plugin:"loftloader-lite"}),e=l.href,o.scroll=0,t=function(){a=!0},o.previewUrl.bind(t),o.previewUrl.set(e),o.previewUrl.unbind(t),a||o.refresh()}),t.plugin||(t.plugin="loftloader-lite",o.search=d.param(t),s.previewer.previewUrl.set(o.href));var a,l,i,r=s.get(),n=d("#customize-control-loftloader_custom_img");n.length&&!n.find(".attachment-thumb").length&&r&&r.loftloader_custom_img&&((a=r.loftloader_custom_img)&&(l=n.find(".attachment-media-view").addClass("attachment-media-view-image"),i=d("<div>",{class:"thumbnail thumbnail-image"}).append(d("<img>",{class:"attachment-thumb",src:a})),l.children(".placeholder").css("display","none").after(i).remove())),d("body").on("change","input[type=number]",function(e){var t=parseInt(d(this).val()),o=d(this).attr("min")?parseInt(d(this).attr("min")):1;t<o&&d(this).val(o).trigger("change")}).on("change","input.loftlader-checkbox",function(e){var t=d(this).siblings("input");t.length&&t.attr("data-customize-setting-link")&&s(t.attr("data-customize-setting-link"))(d(this).is(":checked"))}).on("click",".customize-more-toggle",function(e){e.preventDefault();var t=d(this),o=d(this).siblings(".customize-control-description");o.length&&(t.hasClass("expanded")?o.slideUp("slow"):o.slideDown("slow",function(){d(this).css("display","block")}),t.toggleClass("expanded"))}).on("click",".loftloader-any-page-generate",function(e){e.preventDefault();var t=s.loftloader_generate_parameters();d(this).siblings(".loftloader-any-page-shortcode").val("[loftloader "+t+"]").select()})}),s.loftloader_generate_parameters=function(){var e={loftloader_bg_color:{},loftloader_bg_opacity:{},loftloader_bg_animation:{},loftloader_loader_type:{sun:["loftloader_loader_color"],circles:["loftloader_loader_color"],wave:["loftloader_loader_color"],square:["loftloader_loader_color"],beating:["loftloader_loader_color"],frame:["loftloader_loader_color","loftloader_custom_img"],imgloading:["loftloader_custom_img","loftloader_img_width"]},loftloader_show_close_timer:{},loftloader_show_close_tip:{},loftloader_max_load_time:{},loftloader_inline_js:{}},t=type_value=loop="";if("on"===l("loftloader_main_switch"))for(var o in t="loftloader_main_switch=on loftloader_show_range=sitewide",e){switch(type_value=l(o),o){case"loftloader_show_close_tip":type_value=type_value?'"'+btoa(unescape(encodeURIComponent(type_value)))+'"':'""';case"loftloader_bg_color":case"loftloader_bg_opacity":case"loftloader_bg_animation":loop=[];break;case"loftloader_max_load_time":type_value=type_value||0;break;default:loop=e[o][type_value]?e[o][type_value]:[]}if(t+=" "+o+"="+type_value,loop)for(var a in loop)t+=" "+loop[a]+"="+l(loop[a])}else t="loftloader_main_switch=false";return t}}(wp.customize,jQuery);
1
+ !function(a,l){function i(e){var t=a.get(),e=t[e]||!1;return"string"==typeof e&&(e=e.trim()),!0===(e=e)?"on":e}l("head").append(l("<style>",{id:"loftloader-hide-site-title",text:".site-title { opacity: 0; }"})),a.LoftLoaderSwitchSection=a.Section.extend({initialize:function(){return a.Section.prototype.initialize.apply(this,arguments)},ready:function(){this.container.find("input[name=loftloader-main-switch]").is(":checked")||l("#customize-theme-controls").addClass("loftloader-settings-disabled"),l("#customize-theme-controls").addClass("loftloader-controls-wrapper")},attachEvents:function(){this.container.on("change","input[name=loftloader-main-switch]",function(e){var t=l(this).is(":checked"),o=l("#customize-theme-controls");a("loftloader_main_switch")(t),t?o.removeClass("loftloader-settings-disabled"):o.addClass("loftloader-settings-disabled")})}}),l.extend(a.sectionConstructor,{loftloader_switch:a.LoftLoaderSwitchSection}),a.controlConstructor.slider=a.Control.extend({ready:function(){var e=this.container.find(".loader-ui-slider"),o=this.container.find("input[data-customize-setting-link]");e.slider({range:"min",min:e.data("min"),max:e.data("max"),value:e.data("value"),step:e.data("step"),slide:function(e,t){o.val(t.value).trigger("change")}})}}),a.bind("ready",function(e){loftloader_lite_i18n&&l(".site-title").text(loftloader_lite_i18n.name),l("#loftloader-hide-site-title").remove();var t=document.createElement("a");t.href=a.previewer.previewUrl(),o=a.utils.parseQueryString(t.search.substr(1)),a.previewer.unbind("url").bind("url",function(e){var t=this,o=!1,a=document.createElement("a");a.href=e,a.search=l.param({plugin:"loftloader-lite"}),e=a.href,t.scroll=0,a=function(){o=!0},t.previewUrl.bind(a),t.previewUrl.set(e),t.previewUrl.unbind(a),o||t.refresh()}),o.plugin||(o.plugin="loftloader-lite",t.search=l.param(o),a.previewer.previewUrl.set(t.href));var o=a.get(),t=l("#customize-control-loftloader_custom_img");t.length&&!t.find(".attachment-thumb").length&&o&&o.loftloader_custom_img&&((o=o.loftloader_custom_img)&&(t=t.find(".attachment-media-view").addClass("attachment-media-view-image"),o=l("<div>",{class:"thumbnail thumbnail-image"}).append(l("<img>",{class:"attachment-thumb",src:o})),t.children(".placeholder").css("display","none").after(o).remove())),l("body").on("change","input[type=number]",function(e){var t=parseInt(l(this).val()),o=l(this).attr("min")?parseInt(l(this).attr("min")):1;t<o&&l(this).val(o).trigger("change")}).on("change","input.loftlader-checkbox",function(e){var t=l(this).siblings("input");t.length&&t.attr("data-customize-setting-link")&&a(t.attr("data-customize-setting-link"))(l(this).is(":checked"))}).on("click",".customize-more-toggle",function(e){e.preventDefault();var t=l(this),e=l(this).siblings(".customize-control-description");e.length&&(t.hasClass("expanded")?e.slideUp("slow"):e.slideDown("slow",function(){l(this).css("display","block")}),t.toggleClass("expanded"))}).on("click",".loftloader-any-page-generate",function(e){e.preventDefault();e=a.loftloader_generate_parameters();l(this).siblings(".loftloader-any-page-shortcode").val("[loftloader "+e+"]").select()})}),a.loftloader_generate_parameters=function(){var e={loftloader_bg_color:{},loftloader_bg_opacity:{},loftloader_bg_animation:{},loftloader_loader_type:{sun:["loftloader_loader_color"],circles:["loftloader_loader_color"],wave:["loftloader_loader_color"],square:["loftloader_loader_color"],beating:["loftloader_loader_color"],frame:["loftloader_loader_color","loftloader_custom_img"],imgloading:["loftloader_custom_img","loftloader_img_width"]},loftloader_show_close_timer:{},loftloader_show_close_tip:{},loftloader_max_load_time:{},loftloader_inline_js:{}},t=type_value=loop="";if("on"===i("loftloader_main_switch"))for(var o in t="loftloader_main_switch=on loftloader_show_range=sitewide",e){switch(type_value=i(o),o){case"loftloader_show_close_tip":type_value=type_value?'"'+btoa(unescape(encodeURIComponent(type_value)))+'"':'""';case"loftloader_bg_color":case"loftloader_bg_opacity":case"loftloader_bg_animation":loop=[];break;case"loftloader_max_load_time":type_value=type_value||0;break;default:loop=e[o][type_value]||[]}if(t+=" "+o+"="+type_value,loop)for(var a in loop)t+=" "+loop[a]+"="+i(loop[a])}else t="loftloader_main_switch=false";return t}}(wp.customize,jQuery);
assets/js/preview.js CHANGED
@@ -5,6 +5,7 @@
5
 
6
  (function(api, $, preview, parentAPI){
7
  if(typeof parentAPI.settings.settings.loftloader_main_switch !== 'undefined'){
 
8
  // Helper functions
9
  /***** Update style element by id inside <head>, if not exist, create new *****/
10
  function loftloader_update_style(id, style){
@@ -14,7 +15,7 @@
14
  }
15
  // Change loader background opacity instantly
16
  api('loftloader_bg_opacity', function( value ) {
17
- value.bind( function( to ) {
18
  loftloader_update_style('loftloader-lite-custom-bg-opacity', '#loftloader-wrapper .loader-section { opacity: ' + (to / 100) + '; }');
19
  });
20
  });
@@ -33,4 +34,4 @@
33
  else if($('#loftloader-wrapper').length){
34
  $(window).load(function(){ $('body').addClass('loaded'); });
35
  }
36
- })(wp.customize, jQuery, parent.document, parent.wp.customize);
5
 
6
  (function(api, $, preview, parentAPI){
7
  if(typeof parentAPI.settings.settings.loftloader_main_switch !== 'undefined'){
8
+ var $loaderWrapper = $( '#loftloader-wrapper' );
9
  // Helper functions
10
  /***** Update style element by id inside <head>, if not exist, create new *****/
11
  function loftloader_update_style(id, style){
15
  }
16
  // Change loader background opacity instantly
17
  api('loftloader_bg_opacity', function( value ) {
18
+ value.bind( function( to ) {
19
  loftloader_update_style('loftloader-lite-custom-bg-opacity', '#loftloader-wrapper .loader-section { opacity: ' + (to / 100) + '; }');
20
  });
21
  });
34
  else if($('#loftloader-wrapper').length){
35
  $(window).load(function(){ $('body').addClass('loaded'); });
36
  }
37
+ })(wp.customize, jQuery, parent.document, parent.wp.customize);
assets/js/preview.min.js CHANGED
@@ -1,6 +1 @@
1
- /**
2
- * Copyright (c) Loft.Ocean
3
- * http://www.loftocean.com
4
- */
5
-
6
- !function(a,b,c,d){function e(a,c){var d=b("head").find("#"+a);d=d.length?d:b("<style>").attr("id",a).html("").appendTo(b("head")),d.html(c)}"undefined"!=typeof d.settings.settings.loftloader_main_switch?(a("loftloader_bg_opacity",function(a){a.bind(function(a){e("loftloader-lite-custom-bg-opacity","#loftloader-wrapper .loader-section { opacity: "+a/100+"; }")})}),a("loftloader_bg_color",function(a){a.bind(function(a){e("loftloader-lite-custom-bg-color","#loftloader-wrapper .loader-section { background-color: "+a+"; }")})}),b("body").hover(function(a){b(this).addClass("loaded")},function(a){b(this).removeClass("loaded")})):b("#loftloader-wrapper").length&&b(window).load(function(){b("body").addClass("loaded")})}(wp.customize,jQuery,parent.document,parent.wp.customize);
1
+ !function(o,l){function t(o,t){var e=l("head").find("#"+o);(e=e.length?e:l("<style>").attr("id",o).html("").appendTo(l("head"))).html(t)}void 0!==parent.wp.customize.settings.settings.loftloader_main_switch?(l("#loftloader-wrapper"),o("loftloader_bg_opacity",function(o){o.bind(function(o){t("loftloader-lite-custom-bg-opacity","#loftloader-wrapper .loader-section { opacity: "+o/100+"; }")})}),o("loftloader_bg_color",function(o){o.bind(function(o){t("loftloader-lite-custom-bg-color","#loftloader-wrapper .loader-section { background-color: "+o+"; }")})}),l("body").hover(function(o){l(this).addClass("loaded")},function(o){l(this).removeClass("loaded")})):l("#loftloader-wrapper").length&&l(window).load(function(){l("body").addClass("loaded")})}(wp.customize,jQuery,parent.document);
 
 
 
 
 
assets/scss/loftloader.scss CHANGED
@@ -6,7 +6,7 @@
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
- * Version: 2.3.6
10
  */
11
 
12
  $primary-color: #248acc;
6
  * Author: The Loft.Ocean Team
7
  * Author URI: https://www.loftocean.com
8
  * Description: LoftLoader (Lite Version) is a plugin for adding beautiful and smooth preload animation to your WordPress website. With setting options, you can choose from preset animations, add custom logo image, choose colours to match your branding, and amuse and impress your visitors while loading site content.
9
+ * Version: 2.3.7
10
  */
11
 
12
  $primary-color: #248acc;
inc/class-loftloader-front.php CHANGED
@@ -178,8 +178,9 @@ if ( ! class_exists( 'LoftLoader_Front' ) ) {
178
  if ( is_array( $split ) && ( 3 <= count( $split ) ) ) {
179
  $image = esc_url($this->get_loader_setting('loftloader_custom_img'));
180
  $ending = esc_attr($this->get_loader_setting('loftloader_bg_animation'));
 
181
 
182
- $html = '<div id="loftloader-wrapper" class="pl-' . $this->type . '"' . $this->loader_attributes() . '>';
183
  $html .= '<div class="loader-inner"><div id="loader">';
184
 
185
  if ( ! empty( $image ) ) {
@@ -355,7 +356,7 @@ if ( ! class_exists( 'LoftLoader_Front' ) ) {
355
  }
356
  return sprintf(
357
  '<img width="%3$s" height="%4$s" data-no-lazy="1" class="skip-lazy" alt="%1$s" src="%2$s">',
358
- esc_attr__( 'loader image', 'loftloader-pro' ),
359
  esc_url( $img ),
360
  esc_attr( $width ),
361
  esc_attr( intval( $height ) )
178
  if ( is_array( $split ) && ( 3 <= count( $split ) ) ) {
179
  $image = esc_url($this->get_loader_setting('loftloader_custom_img'));
180
  $ending = esc_attr($this->get_loader_setting('loftloader_bg_animation'));
181
+ $wrap_class = array( 'pl-' . $this->type );
182
 
183
+ $html = '<div id="loftloader-wrapper" class="' . implode( ' ', $wrap_class ) . '"' . $this->loader_attributes() . '>';
184
  $html .= '<div class="loader-inner"><div id="loader">';
185
 
186
  if ( ! empty( $image ) ) {
356
  }
357
  return sprintf(
358
  '<img width="%3$s" height="%4$s" data-no-lazy="1" class="skip-lazy" alt="%1$s" src="%2$s">',
359
+ esc_attr__( 'loader image', 'loftloader' ),
360
  esc_url( $img ),
361
  esc_attr( $width ),
362
  esc_attr( intval( $height ) )
loftloader.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: LoftLoader
4
  Plugin URI: http://www.loftocean.com/
5
  Description: An easy to use plugin to add an animated preloader to your website with fully customisations.
6
- Version: 2.3.6
7
  Author: Loft.Ocean
8
  Author URI: http://www.loftocean.com/
9
  Text Domain: loftloader
@@ -32,7 +32,7 @@ if ( ! class_exists( 'LoftLoader' ) ) {
32
  define( 'LOFTLOADER_ROOT', dirname( __FILE__ ) . '/' );
33
  define( 'LOFTLOADER_NAME', plugin_basename( __FILE__ ) );
34
  define( 'LOFTLOADER_URI', plugin_dir_url( __FILE__ ) );
35
- define( 'LOFTLOADER_ASSET_VERSION', '2021041202' );
36
 
37
  class LoftLoader {
38
  public function __construct() {
3
  Plugin Name: LoftLoader
4
  Plugin URI: http://www.loftocean.com/
5
  Description: An easy to use plugin to add an animated preloader to your website with fully customisations.
6
+ Version: 2.3.7
7
  Author: Loft.Ocean
8
  Author URI: http://www.loftocean.com/
9
  Text Domain: loftloader
32
  define( 'LOFTLOADER_ROOT', dirname( __FILE__ ) . '/' );
33
  define( 'LOFTLOADER_NAME', plugin_basename( __FILE__ ) );
34
  define( 'LOFTLOADER_URI', plugin_dir_url( __FILE__ ) );
35
+ define( 'LOFTLOADER_ASSET_VERSION', '2021102001' );
36
 
37
  class LoftLoader {
38
  public function __construct() {
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: loftocean
3
  Tags: loader, load, preloader, page preloader, prelader spinner, preloader with custom logo, animated preloader, CSS3 preloader, customize
4
  Donate link:
5
- Requires at least: 4.7
6
- Tested up to: 5.7
7
- Stable tag: 2.3.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -96,6 +96,9 @@ Check some [examples](http://www.loftocean.com/loftloader/example-13/) created b
96
  8. Pro version: Load Time, Device Control & Smooth Page Transition
97
 
98
  == Changelog ==
 
 
 
99
  = 2.3.6 =
100
  * Improved: Added width and height attributes to image elements
101
  * Improved: Removed most of non-composited animations
2
  Contributors: loftocean
3
  Tags: loader, load, preloader, page preloader, prelader spinner, preloader with custom logo, animated preloader, CSS3 preloader, customize
4
  Donate link:
5
+ Requires at least: 5.0
6
+ Tested up to: 5.8
7
+ Stable tag: 2.3.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
96
  8. Pro version: Load Time, Device Control & Smooth Page Transition
97
 
98
  == Changelog ==
99
+ = 2.3.7 =
100
+ * Improved: Compatibility with WordPress 5.8
101
+
102
  = 2.3.6 =
103
  * Improved: Added width and height attributes to image elements
104
  * Improved: Removed most of non-composited animations