LoftLoader - Version 2.3.1

Version Description

  • Fixed: The preview area is not displayed when setting the loader
Download this release

Release Info

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

Code changes from version 2.3 to 2.3.1

assets/css/loftloader-settings.css CHANGED
@@ -6,7 +6,7 @@
6
  * Author: Kaylolo Yinxi Chen @Loft.Ocean
7
  * Author URI: http://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.0
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: Kaylolo Yinxi Chen @Loft.Ocean
7
  * Author URI: http://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.1
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: Kaylolo Yinxi Chen @Loft.Ocean
7
  * Author URI: http://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.0
10
  */
11
  @-webkit-keyframes spinReturn {
12
  0% {
@@ -648,4 +648,4 @@ body {
648
  word-wrap: normal !important; }
649
  .loader-close-button .close-des {
650
  padding: 0 5px;
651
- font-size: 12px; }
6
  * Author: Kaylolo Yinxi Chen @Loft.Ocean
7
  * Author URI: http://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.1
10
  */
11
  @-webkit-keyframes spinReturn {
12
  0% {
648
  word-wrap: normal !important; }
649
  .loader-close-button .close-des {
650
  padding: 0 5px;
651
+ font-size: 12px; }
assets/js/customize.js CHANGED
@@ -54,6 +54,33 @@
54
  loftloader_lite_i18n ? $('.site-title').text(loftloader_lite_i18n.name) : '';
55
  $('#loftloader-hide-site-title').remove();
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  // Init for loader 2.0 customizer, when sync from lower version
58
  var settings = api.get(),
59
  $custom_img = $('#customize-control-loftloader_custom_img');
54
  loftloader_lite_i18n ? $('.site-title').text(loftloader_lite_i18n.name) : '';
55
  $('#loftloader-hide-site-title').remove();
56
 
57
+ var current_url = document.createElement( 'a' ), current_search;
58
+ current_url.href = api.previewer.previewUrl();
59
+ current_search = api.utils.parseQueryString( current_url.search.substr( 1 ) );
60
+ api.previewer.unbind( 'url' ).bind( 'url', function( url ) {
61
+ var previewer = this, onUrlChange, urlChanged = false, urlParser;
62
+ urlParser = document.createElement( 'a' );
63
+ urlParser.href = url;
64
+ urlParser.search = $.param( { 'plugin': 'loftloader-lite' } );
65
+ url = urlParser.href;
66
+ previewer.scroll = 0;
67
+ onUrlChange = function() {
68
+ urlChanged = true;
69
+ };
70
+ previewer.previewUrl.bind( onUrlChange );
71
+ previewer.previewUrl.set( url );
72
+ previewer.previewUrl.unbind( onUrlChange );
73
+ if ( ! urlChanged ) {
74
+ previewer.refresh();
75
+ }
76
+ } );
77
+ if ( ! current_search['plugin'] ) {
78
+ current_search['plugin'] = 'loftloader-lite';
79
+ current_url.search = $.param( current_search );
80
+ api.previewer.previewUrl.set( current_url.href );
81
+ }
82
+
83
+
84
  // Init for loader 2.0 customizer, when sync from lower version
85
  var settings = api.get(),
86
  $custom_img = $('#customize-control-loftloader_custom_img');
assets/js/customize.min.js CHANGED
@@ -1 +1 @@
1
- !function(r,n){function l(e){var t,o=r.get(),a=!!o[e]&&o[e];return"string"==typeof a&&(a=a.trim()),!0===(t=a)?"on":t}n("head").append(n("<style>",{id:"loftloader-hide-site-title",text:".site-title { opacity: 0; }"})),r.LoftLoaderSwitchSection=r.Section.extend({initialize:function(){return r.Section.prototype.initialize.apply(this,arguments)},ready:function(){this.container.find("input[name=loftloader-main-switch]").attr("checked")||n("#customize-theme-controls").addClass("loftloader-settings-disabled"),n("#customize-theme-controls").addClass("loftloader-controls-wrapper")},attachEvents:function(){var l=this.container;l.on("change","input[name=loftloader-main-switch]",function(e){var t=!!n(this).attr("checked"),o=l.find("#customize-control-loftloader_main_switch input[type=checkbox]"),a=n("#customize-theme-controls");t?o.attr("checked","checked"):o.removeAttr("checked"),o.trigger("change"),t?a.removeClass("loftloader-settings-disabled"):a.addClass("loftloader-settings-disabled")})}}),n.extend(r.sectionConstructor,{loftloader_switch:r.LoftLoaderSwitchSection}),r.controlConstructor.slider=r.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")}})}}),r.bind("ready",function(e){loftloader_lite_i18n&&n(".site-title").text(loftloader_lite_i18n.name),n("#loftloader-hide-site-title").remove();var t=r.get(),o=n("#customize-control-loftloader_custom_img");if(o.length&&!o.find(".attachment-thumb").length&&t&&t.loftloader_custom_img){var a=t.loftloader_custom_img;if(a){var l=o.find(".attachment-media-view").addClass("attachment-media-view-image"),i=n("<div>",{class:"thumbnail thumbnail-image"}).append(n("<img>",{class:"attachment-thumb",src:a}));l.children(".placeholder").css("display","none").after(i).remove()}}n("body").on("change","input[type=number]",function(e){var t=parseInt(n(this).val()),o=n(this).attr("min")?parseInt(n(this).attr("min")):1;t<o&&n(this).val(o).trigger("change")}).on("change","input.loftlader-checkbox",function(e){var t=!!n(this).attr("checked"),o=n(this).siblings("input");o.length&&(t?o.attr("checked","checked"):o.removeAttr("checked"),o.trigger("change"))}).on("click",".customize-more-toggle",function(e){e.preventDefault();var t=n(this),o=n(this).siblings(".customize-control-description");o.length&&(t.hasClass("expanded")?o.slideUp("slow"):o.slideDown("slow",function(){n(this).css("display","block")}),t.toggleClass("expanded"))}).on("click",".loftloader-any-page-generate",function(e){e.preventDefault();var t=r.loftloader_generate_parameters();n(this).siblings(".loftloader-any-page-shortcode").val("[loftloader "+t+"]").select()})}),r.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(s,c){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}c("head").append(c("<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]").attr("checked")||c("#customize-theme-controls").addClass("loftloader-settings-disabled"),c("#customize-theme-controls").addClass("loftloader-controls-wrapper")},attachEvents:function(){var l=this.container;l.on("change","input[name=loftloader-main-switch]",function(e){var t=!!c(this).attr("checked"),o=l.find("#customize-control-loftloader_main_switch input[type=checkbox]"),a=c("#customize-theme-controls");t?o.attr("checked","checked"):o.removeAttr("checked"),o.trigger("change"),t?a.removeClass("loftloader-settings-disabled"):a.addClass("loftloader-settings-disabled")})}}),c.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&&c(".site-title").text(loftloader_lite_i18n.name),c("#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=c.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=c.param(t),s.previewer.previewUrl.set(o.href));var a,l,i,r=s.get(),n=c("#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=c("<div>",{class:"thumbnail thumbnail-image"}).append(c("<img>",{class:"attachment-thumb",src:a})),l.children(".placeholder").css("display","none").after(i).remove())),c("body").on("change","input[type=number]",function(e){var t=parseInt(c(this).val()),o=c(this).attr("min")?parseInt(c(this).attr("min")):1;t<o&&c(this).val(o).trigger("change")}).on("change","input.loftlader-checkbox",function(e){var t=!!c(this).attr("checked"),o=c(this).siblings("input");o.length&&(t?o.attr("checked","checked"):o.removeAttr("checked"),o.trigger("change"))}).on("click",".customize-more-toggle",function(e){e.preventDefault();var t=c(this),o=c(this).siblings(".customize-control-description");o.length&&(t.hasClass("expanded")?o.slideUp("slow"):o.slideDown("slow",function(){c(this).css("display","block")}),t.toggleClass("expanded"))}).on("click",".loftloader-any-page-generate",function(e){e.preventDefault();var t=s.loftloader_generate_parameters();c(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);
assets/scss/loftloader-settings.scss CHANGED
@@ -6,7 +6,7 @@
6
  * Author: Kaylolo Yinxi Chen @Loft.Ocean
7
  * Author URI: http://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.0
10
  */
11
 
12
 
@@ -143,7 +143,7 @@ $description-color: #888;
143
  text-align: center;
144
  @include roundedcorner;
145
  }
146
-
147
  input[type="text"],
148
  input[type="number"],
149
  button.button.remove-button {
6
  * Author: Kaylolo Yinxi Chen @Loft.Ocean
7
  * Author URI: http://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.1
10
  */
11
 
12
 
143
  text-align: center;
144
  @include roundedcorner;
145
  }
146
+
147
  input[type="text"],
148
  input[type="number"],
149
  button.button.remove-button {
assets/scss/loftloader.scss CHANGED
@@ -6,7 +6,7 @@
6
  * Author: Kaylolo Yinxi Chen @Loft.Ocean
7
  * Author URI: http://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.0
10
  */
11
 
12
  $primary-color: #248acc;
6
  * Author: Kaylolo Yinxi Chen @Loft.Ocean
7
  * Author URI: http://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.1
10
  */
11
 
12
  $primary-color: #248acc;
inc/class-loftloader-front.php CHANGED
@@ -301,7 +301,7 @@ if ( ! class_exists( 'LoftLoader_Front' ) ) {
301
  $this->site_footer_loaded = true;
302
  }
303
  /**
304
- * Not show loader in builder and theme customizer
305
  */
306
  protected function test_builder() {
307
  if ( defined( 'ELEMENTOR_PATH' ) && isset( $_GET['elementor-preview'] ) && ! empty( sanitize_text_field( wp_unslash( $_GET['elementor-preview'] ) ) ) ) {
301
  $this->site_footer_loaded = true;
302
  }
303
  /**
304
+ * Not show loader in builder and theme customizer
305
  */
306
  protected function test_builder() {
307
  if ( defined( 'ELEMENTOR_PATH' ) && isset( $_GET['elementor-preview'] ) && ! empty( sanitize_text_field( wp_unslash( $_GET['elementor-preview'] ) ) ) ) {
languages/loftloader.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the LoftLoader plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: LoftLoader 2.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loftloader\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-07-20T13:13:54+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: loftloader\n"
2
  # This file is distributed under the same license as the LoftLoader plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: LoftLoader 2.3.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loftloader\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-08-12T02:52:10+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: loftloader\n"
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
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', '2020072001' );
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.1
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', '2020081203' );
36
 
37
  class LoftLoader {
38
  public function __construct() {
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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.4
7
- Stable tag: 2.3
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 =
100
  * Improved: Hide loader when opening theme customizer
101
  * Improved: Hide loader when editing content with a third-party page builder plugin
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.5
7
+ Stable tag: 2.3.1
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.1 =
100
+ * Fixed: The preview area is not displayed when setting the loader
101
+
102
  = 2.3 =
103
  * Improved: Hide loader when opening theme customizer
104
  * Improved: Hide loader when editing content with a third-party page builder plugin