LoftLoader - Version 2.1.7

Version Description

  • New: Option to choose how to load LoftLoaders JavaScript (External or Inline)
  • Fixed: Gutenberg Update button was not clickable after making changes only to Any Page Extension options
  • Fixed: Minor CSS issues
Download this release

Release Info

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

Code changes from version 2.1.6 to 2.1.7

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.1.6
10
  */
11
  @import url(https://fonts.googleapis.com/css?family=Lato:400,600);
12
  #customize-theme-controls.loftloader-controls-wrapper {
@@ -399,6 +399,4 @@
399
 
400
  .customize-partial-edit-shortcut,
401
  .widget .customize-partial-edit-shortcut {
402
- display: none !important; }
403
-
404
- /*# sourceMappingURL=loftloader-settings.css.map */
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.1.7
10
  */
11
  @import url(https://fonts.googleapis.com/css?family=Lato:400,600);
12
  #customize-theme-controls.loftloader-controls-wrapper {
399
 
400
  .customize-partial-edit-shortcut,
401
  .widget .customize-partial-edit-shortcut {
402
+ display: none !important; }
 
 
assets/css/loftloader-settings.min.css CHANGED
@@ -1 +1 @@
1
- @import url(https://fonts.googleapis.com/css?family=Lato:400,600);#customize-theme-controls.loftloader-controls-wrapper button.button.remove-button:hover,#customize-theme-controls.loftloader-controls-wrapper input[type=checkbox]:hover{opacity:.75}#customize-theme-controls.loftloader-controls-wrapper{font-family:Lato}#customize-theme-controls.loftloader-controls-wrapper .customize-section-title h3{font-size:18px;font-weight:600;letter-spacing:.05em;color:#111}#customize-theme-controls.loftloader-controls-wrapper .customize-section-title h3 span{letter-spacing:0}#customize-theme-controls.loftloader-controls-wrapper .customize-control-title{margin-top:0;font-size:12px;letter-spacing:.05em;font-weight:700;text-transform:none;color:#111}#customize-theme-controls.loftloader-controls-wrapper .customize-control-title+span.description{margin-top:-6px}#customize-theme-controls.loftloader-controls-wrapper span.description{margin-bottom:12px;font-size:11px;font-style:normal;color:#888}#customize-theme-controls.loftloader-controls-wrapper span.description strong{color:#111;font-weight:700}#customize-theme-controls.loftloader-controls-wrapper button.button.remove-button,#customize-theme-controls.loftloader-controls-wrapper input[type=text],#customize-theme-controls.loftloader-controls-wrapper input[type=number],#customize-theme-controls.loftloader-controls-wrapper select{background:#FFF;font-size:12px;letter-spacing:.05em;font-weight:700;color:#111;border-color:#41C7D3;box-shadow:none}#customize-theme-controls.loftloader-controls-wrapper button.button.remove-button,#customize-theme-controls.loftloader-controls-wrapper input[type=text],#customize-theme-controls.loftloader-controls-wrapper input[type=number]{width:80px;text-align:center;border-radius:4px}#customize-theme-controls.loftloader-controls-wrapper #customize-control-loftloader_show_close_tip input[type=text]{width:100%;text-align:left}#customize-theme-controls.loftloader-controls-wrapper input[type=checkbox]{position:relative;float:right;width:33px;height:33px;border-radius:50%;background:0 0;border:2px solid #41C7D3;box-shadow:none;font-size:0}#customize-theme-controls.loftloader-controls-wrapper input[type=checkbox]:checked:before{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);margin:0 0 0 -3px;color:#41C7D3}@media screen and (max-width:782px){#customize-theme-controls.loftloader-controls-wrapper input[type=checkbox]:checked:before{margin:0 0 0 -8px}}#customize-theme-controls.loftloader-controls-wrapper .loftloader-radiobtn{display:none;width:inherit;height:inherit;opacity:0;margin:0}#customize-theme-controls.loftloader-controls-wrapper .loftloader-radiobtn+span{position:absolute;top:0;left:0;display:block;width:inherit;height:inherit;border:2px solid #DDD;box-sizing:border-box}#customize-theme-controls.loftloader-controls-wrapper .loftloader-radiobtn:checked+span{border-color:#41C7D3}#customize-theme-controls.loftloader-controls-wrapper .customize-control-btn label{position:relative;display:inline-block;margin-left:0;padding:0}#customize-theme-controls.loftloader-controls-wrapper .customize-control-btn span.customize-control-title{display:inline}#customize-theme-controls.loftloader-controls-wrapper .customize-control-btn span.customize-control-title+div{float:right}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content{padding:0;background:#FFF}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content:before{position:absolute;top:0;left:0;z-index:-1;display:block;width:100%;height:100%;background:#FFF;content:""}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content li{padding:15px 12px;margin-bottom:0;border-bottom:1px solid #EEE;box-sizing:border-box}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content li.customize-section-description-container{padding:12px 12px 0;border-bottom:none}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content li:last-of-type{border-bottom:none}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container{overflow:visible;width:auto}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-color-result{width:24px;height:24px;padding:0;margin-top:2px;border:1px solid rgba(0,0,0,.1);border-radius:50%;box-shadow:none!important;line-height:28px}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-color-result:after{right:auto;left:24px;width:80px;padding:0 6px;background:0 0;border:none;color:#555;font-size:11px;text-align:left;line-height:24px}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-color-result .wp-color-result-text{margin-left:24px;background:0 0;border:none;color:inherit;line-height:24px}body.rtl #customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-color-result .wp-color-result-text{margin-right:24px;margin-left:0}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-picker-open+.wp-picker-input-wrap{float:right;margin-top:-2px;width:auto}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container input[type=text].wp-color-picker{display:inline-block;padding:0 5px;margin-top:0;width:80px!important;border:1px solid #41C7D3;vertical-align:top;font-family:Lato;line-height:26px}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .button.wp-picker-default,#customize-theme-controls.loftloader-controls-wrapper li#accordion-section-loftloader_switch .accordion-section-title:after{display:none}#customize-theme-controls.loftloader-controls-wrapper .attachment-media-view,#customize-theme-controls.loftloader-controls-wrapper .media-widget-preview.media_audio,#customize-theme-controls.loftloader-controls-wrapper .media-widget-preview.media_image{background:0 0}#customize-theme-controls.loftloader-controls-wrapper .loader-ui-slider{height:16px;margin-top:12px;background:0 0;border-radius:0;border:none}#customize-theme-controls.loftloader-controls-wrapper .loader-ui-slider:before{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:100%;height:2px;background:#DDD;content:""}#customize-theme-controls.loftloader-controls-wrapper .loader-ui-slider .ui-slider-range{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);height:2px;background:#41C7D3}#customize-theme-controls.loftloader-controls-wrapper .loader-ui-slider .ui-slider-handle{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:16px;height:16px;background:#41C7D3;border:none;border-radius:50%}#customize-theme-controls.loftloader-controls-wrapper.loftloader-settings-disabled li#accordion-section-loftloader_switch~li{pointer-events:none;opacity:.5}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-image .thumbnail.thumbnail-image{background-color:#EEE}#customize-theme-controls.loftloader-controls-wrapper li#accordion-section-loftloader_switch{margin-bottom:10px}#customize-theme-controls.loftloader-controls-wrapper li#accordion-section-loftloader_switch .accordion-section-title{padding:20px 10px 22px 14px}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-check span.customize-control-title,#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-slider span.customize-control-title{display:inline}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-slider span.customize-control-title+span{float:right;padding-right:5px;font-size:12px;letter-spacing:.05em;font-weight:700;color:#111}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-slider span.customize-control-title+span input{width:60px;padding-right:0;background:0 0;border:none;box-shadow:none;font-size:12px;letter-spacing:.05em;font-weight:700;color:#111;text-align:right}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle{position:relative;float:right;-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg);z-index:9;width:20px;height:20px;margin-top:-20px;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;background:#41C7D3;border-radius:50%;border:none}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle:before{position:absolute;top:50%;left:50%;-webkit-transform:translate(-70%,-30%);-ms-transform:translate(-70%,-30%);transform:translate(-70%,-30%);display:block;width:6px;height:6px;border:1px solid #FFF;border-left:none;border-bottom:none;transform-origin:50% 50%;content:""}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle:focus{outline:0;opacity:.5}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle.expanded{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle+span.description{margin:12px 0 0}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation{margin-top:12px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label{position:relative;float:left;width:45px;height:45px;margin:0 -2px -2px 0;padding:0}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(1) .loftloader-radiobtn+span:after{background-position:0 -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(2) .loftloader-radiobtn+span:after{background-position:-45px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(3) .loftloader-radiobtn+span:after{background-position:-90px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(4) .loftloader-radiobtn+span:after{background-position:-135px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(5) .loftloader-radiobtn+span:after{background-position:-180px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(6) .loftloader-radiobtn+span:after{background-position:-225px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(7) .loftloader-radiobtn+span:after{background-position:-270px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(8) .loftloader-radiobtn+span:after{background-position:-315px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label .loftloader-radiobtn+span{overflow:hidden}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label .loftloader-radiobtn+span:after{position:absolute;top:0;left:0;display:block;width:inherit;height:inherit;background-image:url(../img/animation-options.png);background-size:315px;opacity:.25;content:""}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label .loftloader-radiobtn:checked+span{z-index:8}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label .loftloader-radiobtn:checked+span:after{opacity:1}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation:after{position:relative;display:block;clear:both;content:""}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button{position:relative;float:right;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);width:33px;height:33px;border-radius:50%;background:0 0;border:2px solid #41C7D3;box-shadow:none;font-size:0}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:after,#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:before{position:absolute;content:"";display:block}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:before{top:50%;left:50%;-webkit-transform:translate(-22%,-76%);-ms-transform:translate(-22%,-76%);transform:translate(-22%,-76%);width:6px;height:6px;border:2px solid #41C7D3;border-left:none;border-bottom:none;transform-origin:50% 50%}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:after{top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);-ms-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg);width:2px;height:16px;background:#41C7D3}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:hover{opacity:.75}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg .current{margin-top:15px}#customize-theme-controls.loftloader-controls-wrapper li.customize-control-number label{position:relative;display:block}#customize-theme-controls.loftloader-controls-wrapper li.customize-control-number label>span:last-child{float:right;z-index:9;font-size:12px;font-weight:700;letter-spacing:.05em;color:#111}#customize-theme-controls.loftloader-controls-wrapper li.customize-control-number label>span:last-child input[type=number]{margin-right:5px}#customize-theme-controls.loftloader-controls-wrapper li.customize-control-number span.customize-control-title{display:inline}.wp-full-overlay>.customize-controls-close,.wp-full-overlay>.et-core-modal-overlay{display:none;visibility:hidden}.customize-partial-edit-shortcut,.widget .customize-partial-edit-shortcut{display:none!important}
1
+ @import url(https://fonts.googleapis.com/css?family=Lato:400,600);#customize-theme-controls.loftloader-controls-wrapper{font-family:Lato}#customize-theme-controls.loftloader-controls-wrapper .customize-section-title h3{font-size:18px;font-weight:600;letter-spacing:.05em;color:#111}#customize-theme-controls.loftloader-controls-wrapper .customize-section-title h3 span{letter-spacing:0}#customize-theme-controls.loftloader-controls-wrapper .customize-control-title{margin-top:0;font-size:12px;letter-spacing:.05em;font-weight:700;text-transform:none;color:#111}#customize-theme-controls.loftloader-controls-wrapper .customize-control-title+span.description{margin-top:-6px}#customize-theme-controls.loftloader-controls-wrapper span.description{margin-bottom:12px;font-size:11px;font-style:normal;color:#888}#customize-theme-controls.loftloader-controls-wrapper span.description strong{color:#111;font-weight:700}#customize-theme-controls.loftloader-controls-wrapper button.button.remove-button,#customize-theme-controls.loftloader-controls-wrapper input[type=number],#customize-theme-controls.loftloader-controls-wrapper input[type=text],#customize-theme-controls.loftloader-controls-wrapper select{background:#fff;font-size:12px;letter-spacing:.05em;font-weight:700;color:#111;border-color:#41c7d3;box-shadow:none}#customize-theme-controls.loftloader-controls-wrapper button.button.remove-button,#customize-theme-controls.loftloader-controls-wrapper input[type=number],#customize-theme-controls.loftloader-controls-wrapper input[type=text]{width:80px;text-align:center;border-radius:4px}#customize-theme-controls.loftloader-controls-wrapper #customize-control-loftloader_show_close_tip input[type=text]{width:100%;text-align:left}#customize-theme-controls.loftloader-controls-wrapper button.button.remove-button:hover{opacity:.75}#customize-theme-controls.loftloader-controls-wrapper input[type=checkbox]{position:relative;float:right;width:33px;height:33px;border-radius:50%;background:0 0;border:2px solid #41c7d3;box-shadow:none;font-size:0}#customize-theme-controls.loftloader-controls-wrapper input[type=checkbox]:checked:before{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);margin:0 0 0 -3px;color:#41c7d3}@media screen and (max-width:782px){#customize-theme-controls.loftloader-controls-wrapper input[type=checkbox]:checked:before{margin:0 0 0 -8px}}#customize-theme-controls.loftloader-controls-wrapper input[type=checkbox]:hover{opacity:.75}#customize-theme-controls.loftloader-controls-wrapper .loftloader-radiobtn{display:none;width:inherit;height:inherit;opacity:0;margin:0}#customize-theme-controls.loftloader-controls-wrapper .loftloader-radiobtn+span{position:absolute;top:0;left:0;display:block;width:inherit;height:inherit;border:2px solid #ddd;box-sizing:border-box}#customize-theme-controls.loftloader-controls-wrapper .loftloader-radiobtn:checked+span{border-color:#41c7d3}#customize-theme-controls.loftloader-controls-wrapper .customize-control-btn label{position:relative;display:inline-block;margin-left:0;padding:0}#customize-theme-controls.loftloader-controls-wrapper .customize-control-btn span.customize-control-title{display:inline}#customize-theme-controls.loftloader-controls-wrapper .customize-control-btn span.customize-control-title+div{float:right}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content{padding:0;background:#fff}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content:before{position:absolute;top:0;left:0;z-index:-1;display:block;width:100%;height:100%;background:#fff;content:""}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content li{padding:15px 12px;margin-bottom:0;border-bottom:1px solid #eee;box-sizing:border-box}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content li.customize-section-description-container{padding:12px 12px 0;border-bottom:none}#customize-theme-controls.loftloader-controls-wrapper .accordion-section-content li:last-of-type{border-bottom:none}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container{overflow:visible;width:auto}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-color-result{width:24px;height:24px;padding:0;margin-top:2px;border:1px solid rgba(0,0,0,.1);border-radius:50%;box-shadow:none!important;line-height:28px}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-color-result:after{right:auto;left:24px;width:80px;padding:0 6px;background:0 0;border:none;color:#555;font-size:11px;text-align:left;line-height:24px}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-color-result .wp-color-result-text{margin-left:24px;background:0 0;border:none;color:inherit;line-height:24px}body.rtl #customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-color-result .wp-color-result-text{margin-right:24px;margin-left:0}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .wp-picker-open+.wp-picker-input-wrap{float:right;margin-top:-2px;width:auto}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container input[type=text].wp-color-picker{display:inline-block;padding:0 5px;margin-top:0;width:80px!important;border:1px solid #41c7d3;vertical-align:top;font-family:Lato;line-height:26px}#customize-theme-controls.loftloader-controls-wrapper .wp-picker-container .button.wp-picker-default{display:none}#customize-theme-controls.loftloader-controls-wrapper .attachment-media-view,#customize-theme-controls.loftloader-controls-wrapper .media-widget-preview.media_audio,#customize-theme-controls.loftloader-controls-wrapper .media-widget-preview.media_image{background:0 0}#customize-theme-controls.loftloader-controls-wrapper .loader-ui-slider{height:16px;margin-top:12px;background:0 0;border-radius:0;border:none}#customize-theme-controls.loftloader-controls-wrapper .loader-ui-slider:before{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:100%;height:2px;background:#ddd;content:""}#customize-theme-controls.loftloader-controls-wrapper .loader-ui-slider .ui-slider-range{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);height:2px;background:#41c7d3}#customize-theme-controls.loftloader-controls-wrapper .loader-ui-slider .ui-slider-handle{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:16px;height:16px;background:#41c7d3;border:none;border-radius:50%}#customize-theme-controls.loftloader-controls-wrapper.loftloader-settings-disabled li#accordion-section-loftloader_switch~li{pointer-events:none;opacity:.5}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-image .thumbnail.thumbnail-image{background-color:#eee}#customize-theme-controls.loftloader-controls-wrapper li#accordion-section-loftloader_switch{margin-bottom:10px}#customize-theme-controls.loftloader-controls-wrapper li#accordion-section-loftloader_switch .accordion-section-title{padding:20px 10px 22px 14px}#customize-theme-controls.loftloader-controls-wrapper li#accordion-section-loftloader_switch .accordion-section-title:after{display:none}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-slider span.customize-control-title{display:inline}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-slider span.customize-control-title+span{float:right;padding-right:5px;font-size:12px;letter-spacing:.05em;font-weight:700;color:#111}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-slider span.customize-control-title+span input{width:60px;padding-right:0;background:0 0;border:none;box-shadow:none;font-size:12px;letter-spacing:.05em;font-weight:700;color:#111;text-align:right}#customize-theme-controls.loftloader-controls-wrapper li.customize-control.customize-control-check span.customize-control-title{display:inline}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle{position:relative;float:right;-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg);z-index:9;width:20px;height:20px;margin-top:-20px;cursor:pointer;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;background:#41c7d3;border-radius:50%;border:none}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle:before{position:absolute;top:50%;left:50%;-webkit-transform:translate(-70%,-30%);-ms-transform:translate(-70%,-30%);transform:translate(-70%,-30%);display:block;width:6px;height:6px;border:1px solid #fff;border-left:none;border-bottom:none;transform-origin:50% 50%;content:""}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle:focus{outline:0;opacity:.5}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle.expanded{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type .customize-more-toggle+span.description{margin:12px 0 0}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation{margin-top:12px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label{position:relative;float:left;width:45px;height:45px;margin:0 -2px -2px 0;padding:0}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(1) .loftloader-radiobtn+span:after{background-position:0 -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(2) .loftloader-radiobtn+span:after{background-position:-45px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(3) .loftloader-radiobtn+span:after{background-position:-90px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(4) .loftloader-radiobtn+span:after{background-position:-135px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(5) .loftloader-radiobtn+span:after{background-position:-180px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(6) .loftloader-radiobtn+span:after{background-position:-225px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(7) .loftloader-radiobtn+span:after{background-position:-270px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label:nth-child(8) .loftloader-radiobtn+span:after{background-position:-315px -47px}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label .loftloader-radiobtn+span{overflow:hidden}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label .loftloader-radiobtn+span:after{position:absolute;top:0;left:0;display:block;width:inherit;height:inherit;background-image:url(../img/animation-options.png);background-size:315px;opacity:.25;content:""}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label .loftloader-radiobtn:checked+span{z-index:8}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation label .loftloader-radiobtn:checked+span:after{opacity:1}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_loader_type #loftloader_option_animation:after{position:relative;display:block;clear:both;content:""}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button{position:relative;float:right;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);width:33px;height:33px;border-radius:50%;background:0 0;border:2px solid #41c7d3;box-shadow:none;font-size:0}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:after,#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:before{position:absolute;content:"";display:block}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:before{top:50%;left:50%;-webkit-transform:translate(-22%,-76%);-ms-transform:translate(-22%,-76%);transform:translate(-22%,-76%);width:6px;height:6px;border:2px solid #41c7d3;border-left:none;border-bottom:none;transform-origin:50% 50%}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:after{top:50%;left:50%;-webkit-transform:translate(-50%,-50%) rotate(45deg);-ms-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg);width:2px;height:16px;background:#41c7d3}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg button.upload-button:hover{opacity:.75}#customize-theme-controls.loftloader-controls-wrapper li#customize-control-loftloader_customimg .current{margin-top:15px}#customize-theme-controls.loftloader-controls-wrapper li.customize-control-number label{position:relative;display:block}#customize-theme-controls.loftloader-controls-wrapper li.customize-control-number label>span:last-child{float:right;z-index:9;font-size:12px;font-weight:700;letter-spacing:.05em;color:#111}#customize-theme-controls.loftloader-controls-wrapper li.customize-control-number label>span:last-child input[type=number]{margin-right:5px}#customize-theme-controls.loftloader-controls-wrapper li.customize-control-number span.customize-control-title{display:inline}.wp-full-overlay>.customize-controls-close,.wp-full-overlay>.et-core-modal-overlay{display:none;visibility:hidden}.customize-partial-edit-shortcut,.widget .customize-partial-edit-shortcut{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.1.6
10
  */
11
  @-webkit-keyframes spinReturn {
12
  0% {
@@ -281,6 +281,7 @@ body {
281
  z-index: 1002;
282
  display: inline-block;
283
  margin: 0 auto;
 
284
  color: #248acc; }
285
  #loftloader-wrapper .loader-section {
286
  position: fixed;
@@ -586,6 +587,7 @@ body {
586
  right: 10px;
587
  top: 10px;
588
  z-index: 99999;
 
589
  width: auto;
590
  min-width: 35px;
591
  height: 35px;
@@ -629,6 +631,4 @@ body {
629
  word-wrap: normal !important; }
630
  .loader-close-button .close-des {
631
  padding: 0 5px;
632
- font-size: 12px; }
633
-
634
- /*# sourceMappingURL=loftloader.css.map */
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.1.7
10
  */
11
  @-webkit-keyframes spinReturn {
12
  0% {
281
  z-index: 1002;
282
  display: inline-block;
283
  margin: 0 auto;
284
+ background: none !important;
285
  color: #248acc; }
286
  #loftloader-wrapper .loader-section {
287
  position: fixed;
587
  right: 10px;
588
  top: 10px;
589
  z-index: 99999;
590
+ box-sizing: border-box;
591
  width: auto;
592
  min-width: 35px;
593
  height: 35px;
631
  word-wrap: normal !important; }
632
  .loader-close-button .close-des {
633
  padding: 0 5px;
634
+ font-size: 12px; }
 
 
assets/css/loftloader.min.css CHANGED
@@ -1 +1 @@
1
- @-webkit-keyframes spinReturn{0%{-webkit-transform:rotate(0)}25%{-webkit-transform:rotate(225deg)}50%{-webkit-transform:rotate(180deg)}75%{-webkit-transform:rotate(405deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spinReturn{0%{transform:rotate(0)}25%{transform:rotate(225deg)}50%{transform:rotate(180deg)}75%{transform:rotate(405deg)}100%{transform:rotate(360deg)}}@-webkit-keyframes lightUp{0%,100%,60%{opacity:.2}40%{opacity:1}}@keyframes lightUp{0%,100%,60%{opacity:.2}40%{opacity:1}}@-webkit-keyframes wave{0%,100%,80%{-webkit-transform:scaleY(1)}40%{-webkit-transform:scaleY(.1)}}@keyframes wave{0%,100%,80%{transform:scaleY(1)}40%{transform:scaleY(.1)}}@-webkit-keyframes drawframeTop{0%{-webkit-transform:scaleX(1);transform-origin:100% 0}12.5%{-webkit-transform:scaleX(0);transform-origin:100% 0}50%{-webkit-transform:scaleX(0);transform-origin:0 0}62.5%{-webkit-transform:scaleX(1);transform-origin:0 0}100%{-webkit-transform:scaleX(1);transform-origin:100% 0}}@keyframes drawframeTop{0%{transform:scaleX(1);transform-origin:100% 0}12.5%{transform:scaleX(0);transform-origin:100% 0}50%{transform:scaleX(0);transform-origin:0 0}62.5%{transform:scaleX(1);transform-origin:0 0}100%{transform:scaleX(1);transform-origin:100% 0}}@-webkit-keyframes drawframeBottom{0%{-webkit-transform:scaleX(1);transform-origin:0 0}12.5%{-webkit-transform:scaleX(0);transform-origin:0 0}50%{-webkit-transform:scaleX(0);transform-origin:100% 0}62.5%{-webkit-transform:scaleX(1);transform-origin:100% 0}100%{-webkit-transform:scaleX(1);transform-origin:0 0}}@keyframes drawframeBottom{0%{transform:scaleX(1);transform-origin:0 0}12.5%{transform:scaleX(0);transform-origin:0 0}50%{transform:scaleX(0);transform-origin:100% 0}62.5%{transform:scaleX(1);transform-origin:100% 0}100%{transform:scaleX(1);transform-origin:0 0}}@-webkit-keyframes drawframeRight{0%{-webkit-transform:scaleY(1);transform-origin:0 100%}12.5%{-webkit-transform:scaleY(0);transform-origin:0 100%}50%{-webkit-transform:scaleY(0);transform-origin:0 0}62.5%{-webkit-transform:scaleY(1);transform-origin:0 0}100%{-webkit-transform:scaleY(1);transform-origin:0 100%}}@keyframes drawframeRight{0%{transform:scaleY(1);transform-origin:0 100%}12.5%{transform:scaleY(0);transform-origin:0 100%}50%{transform:scaleY(0);transform-origin:0 0}62.5%{transform:scaleY(1);transform-origin:0 0}100%{transform:scaleY(1);transform-origin:0 100%}}@-webkit-keyframes drawframeLeft{0%{-webkit-transform:scaleY(1);transform-origin:0 0}12.5%{-webkit-transform:scaleY(0);transform-origin:0 0}50%{-webkit-transform:scaleY(0);transform-origin:0 100%}62.5%{-webkit-transform:scaleY(1);transform-origin:0 100%}100%{-webkit-transform:scaleY(1);transform-origin:0 0}}@keyframes drawframeLeft{0%{transform:scaleY(1);transform-origin:0 0}12.5%{transform:scaleY(0);transform-origin:0 0}50%{transform:scaleY(0);transform-origin:0 100%}62.5%{transform:scaleY(1);transform-origin:0 100%}100%{transform:scaleY(1);transform-origin:0 0}}@-webkit-keyframes imgLoading{0%{height:0%;opacity:1}95%{height:100%;opacity:1}100%{height:100%;opacity:0}}@keyframes imgLoading{0%{height:0%;opacity:1}95%{height:100%;opacity:1}100%{height:100%;opacity:0}}@-webkit-keyframes beat{0%{transform:scale(0);opacity:0}80%{transform:scale(1);opacity:.7}100%{transform:scale(1);opacity:0}}@keyframes beat{0%{transform:scale(0);opacity:0}80%{transform:scale(1);opacity:.7}100%{transform:scale(1);opacity:0}}body,html{opacity:1!important}#loftloader-wrapper{position:fixed;top:0;left:0;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:999999;width:100%;height:100%;background:0 0!important}.loaded #loftloader-wrapper{-webkit-transform:translateX(-200%);-ms-transform:translateX(-200%);transform:translateX(-200%);visibility:hidden;pointer-events:none;transition:all;transition-delay:1s}.loaded #loftloader-wrapper.slide-vertical{-webkit-transform:translate(-100%,0);-ms-transform:translate(-100%,0);transform:translate(-100%,0)}.loaded #loftloader-wrapper #loader,.loaded #loftloader-wrapper .loader-close-button{opacity:0;transition:all .3s ease-out}#loftloader-wrapper .loader-inner{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:1001;text-align:center;transition:all 0s;font-size:0}#loftloader-wrapper .loader-inner #loader{position:relative;z-index:1002;display:inline-block;margin:0 auto;color:#248acc}#loftloader-wrapper .loader-section{position:fixed;z-index:999;width:50%;height:100%;background:#000;opacity:.95;transition:all 0s;will-change:transform}#loftloader-wrapper .loader-section.section-fade{top:0;left:0;width:100%;will-change:opacity}.loaded #loftloader-wrapper .loader-section.section-fade{opacity:0!important;transition:all .7s .3s cubic-bezier(.645,.045,.355,1)}#loftloader-wrapper .loader-section.section-slide-up{top:0;left:0;width:100%}.loaded #loftloader-wrapper .loader-section.section-slide-up{-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%);transition:all .7s .3s cubic-bezier(.645,.045,.355,1)}#loftloader-wrapper .loader-section.section-left,#loftloader-wrapper .loader-section.section-right{top:0}#loftloader-wrapper .loader-section.section-left{left:0}.loaded #loftloader-wrapper .loader-section.section-left{transition:all .7s .3s cubic-bezier(.645,.045,.355,1);-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}#loftloader-wrapper .loader-section.section-right{right:0}.loaded #loftloader-wrapper .loader-section.section-right{transition:all .7s .3s cubic-bezier(.645,.045,.355,1);-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}#loftloader-wrapper .loader-section.section-down,#loftloader-wrapper .loader-section.section-up{left:0;width:100%;height:50%}#loftloader-wrapper .loader-section.section-up{top:0}.loaded #loftloader-wrapper .loader-section.section-up{transition:all .7s .3s cubic-bezier(.645,.045,.355,1);-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}#loftloader-wrapper .loader-section.section-down{bottom:0}.loaded #loftloader-wrapper .loader-section.section-down{transition:all .7s .3s cubic-bezier(.645,.045,.355,1);-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%)}#loftloader-wrapper.pl-sun #loader{width:50px;height:50px}#loftloader-wrapper.pl-sun #loader span{position:absolute;top:0;left:0;display:block;width:50px;height:50px;background:currentColor;opacity:.9;transform-origin:50% 50%;-webkit-animation:spinReturn 4s ease infinite;animation:spinReturn 4s ease infinite}#loftloader-wrapper.pl-sun #loader span:before{position:absolute;top:0;left:0;display:block;width:100%;height:100%;background:inherit;opacity:.9;content:"";transform-origin:50% 50%;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#loftloader-wrapper.pl-circles #loader{width:100px;height:60px}#loftloader-wrapper.pl-circles #loader span,#loftloader-wrapper.pl-circles #loader:after,#loftloader-wrapper.pl-circles #loader:before{position:absolute;display:block;width:10px;height:10px;border-radius:50%;opacity:.2;background:currentColor}#loftloader-wrapper.pl-circles #loader span{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-animation:lightUp 1.5s linear infinite .5s;animation:lightUp 1.5s linear infinite .5s}#loftloader-wrapper.pl-circles #loader:after,#loftloader-wrapper.pl-circles #loader:before{content:"";top:50%;-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%)}#loftloader-wrapper.pl-circles #loader:before{left:0;-webkit-animation:lightUp 1.5s linear infinite;animation:lightUp 1.5s linear infinite}#loftloader-wrapper.pl-circles #loader:after{right:0;-webkit-animation:lightUp 1.5s linear infinite 1s;animation:lightUp 1.5s linear infinite 1s}#loftloader-wrapper.pl-wave #loader{width:60px;height:30px}#loftloader-wrapper.pl-wave #loader span,#loftloader-wrapper.pl-wave #loader:after,#loftloader-wrapper.pl-wave #loader:before{position:relative;display:inline-block;width:6px;height:100%;background:currentColor}#loftloader-wrapper.pl-wave #loader span{margin:0 16px;-webkit-animation:wave .9s linear infinite .3s;animation:wave .9s linear infinite .3s}#loftloader-wrapper.pl-wave #loader:after,#loftloader-wrapper.pl-wave #loader:before{content:""}#loftloader-wrapper.pl-wave #loader:before{-webkit-animation:wave .9s linear infinite;animation:wave .9s linear infinite}#loftloader-wrapper.pl-wave #loader:after{-webkit-animation:wave .9s linear infinite .6s;animation:wave .9s linear infinite .6s}#loftloader-wrapper.pl-square #loader{width:50px;height:50px;transform-origin:50% 50%;-webkit-animation:spinReturn 4s ease infinite;animation:spinReturn 4s ease infinite}#loftloader-wrapper.pl-square #loader span{position:absolute;top:0;left:0;display:block;width:100%;height:100%;border:4px solid currentColor;box-sizing:border-box;transform-origin:50% 50%;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#loftloader-wrapper.pl-frame #loader{width:80px;height:80px;max-width:90vw}#loftloader-wrapper.pl-frame #loader:after,#loftloader-wrapper.pl-frame #loader:before{position:absolute;width:100%;height:4px;background:currentColor;content:""}#loftloader-wrapper.pl-frame #loader:before{top:0;right:0;left:auto;-webkit-animation:drawframeTop 4s linear infinite;animation:drawframeTop 4s linear infinite}#loftloader-wrapper.pl-frame #loader:after{right:auto;bottom:0;left:0;-webkit-animation:drawframeBottom 4s linear infinite 1s;animation:drawframeBottom 4s linear infinite 1s}#loftloader-wrapper.pl-frame #loader span{position:absolute;top:0;left:0;display:block;width:100%;height:100%}#loftloader-wrapper.pl-frame #loader span:after,#loftloader-wrapper.pl-frame #loader span:before{position:absolute;width:4px;height:100%;background:currentColor;content:""}#loftloader-wrapper.pl-frame #loader span:before{top:auto;right:0;bottom:0;-webkit-animation:drawframeRight 4s linear infinite .5s;animation:drawframeRight 4s linear infinite .5s}#loftloader-wrapper.pl-frame #loader span:after{top:0;bottom:auto;left:0;-webkit-animation:drawframeLeft 4s linear infinite 1.5s;animation:drawframeLeft 4s linear infinite 1.5s}#loftloader-wrapper.pl-frame #loader img{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:block;max-width:80%;max-height:80%}#loftloader-wrapper.pl-imgloading #loader{width:auto;height:auto;max-width:90vw}#loftloader-wrapper.pl-imgloading #loader img{position:relative;z-index:1;display:block;width:100%;height:auto;margin:0 auto;opacity:.3}#loftloader-wrapper.pl-imgloading #loader span{position:absolute;bottom:0;left:0;z-index:3;display:block;width:100%;height:0%;transition:0s;background-repeat:no-repeat;background-size:cover;background-position:center bottom;-webkit-animation:imgLoading 6s linear infinite;animation:imgLoading 6s linear infinite}#loftloader-wrapper.pl-beating #loader{width:60px;height:60px}#loftloader-wrapper.pl-beating #loader span,#loftloader-wrapper.pl-beating #loader:before{position:absolute;top:0;left:0;display:block;width:60px;height:60px;border-radius:50%;background:currentColor;box-shadow:0 0 50px;opacity:0}#loftloader-wrapper.pl-beating #loader span{-webkit-animation:beat 1.5s linear infinite;animation:beat 1.5s linear infinite}#loftloader-wrapper.pl-beating #loader:before{content:"";-webkit-animation:beat 1.5s linear infinite 1s;animation:beat 1.5s linear infinite 1s}.loader-close-button{position:fixed;right:10px;top:10px;z-index:99999;width:auto;min-width:35px;height:35px;padding:5px 30px 5px 5px;border-radius:999px;background:rgba(0,0,0,.3);color:#FFF;font-size:12px;line-height:25px;cursor:pointer}.loader-close-button:hover{background:rgba(0,0,0,.7)}.loader-close-button:after,.loader-close-button:before{position:absolute;top:16px;right:9px;display:block;width:18px;height:2px;transform-origin:50% 50%;content:"";background:#FFF}.loader-close-button:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.loader-close-button:after{-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg)}.loader-close-button .screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);overflow:hidden;word-wrap:normal!important}.loader-close-button .close-des{padding:0 5px;font-size:12px}
1
+ @-webkit-keyframes spinReturn{0%{-webkit-transform:rotate(0)}25%{-webkit-transform:rotate(225deg)}50%{-webkit-transform:rotate(180deg)}75%{-webkit-transform:rotate(405deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spinReturn{0%{transform:rotate(0)}25%{transform:rotate(225deg)}50%{transform:rotate(180deg)}75%{transform:rotate(405deg)}100%{transform:rotate(360deg)}}@-webkit-keyframes lightUp{0%{opacity:.2}40%{opacity:1}60%{opacity:.2}100%{opacity:.2}}@keyframes lightUp{0%{opacity:.2}40%{opacity:1}60%{opacity:.2}100%{opacity:.2}}@-webkit-keyframes wave{0%{-webkit-transform:scaleY(1)}40%{-webkit-transform:scaleY(.1)}80%{-webkit-transform:scaleY(1)}100%{-webkit-transform:scaleY(1)}}@keyframes wave{0%{transform:scaleY(1)}40%{transform:scaleY(.1)}80%{transform:scaleY(1)}100%{transform:scaleY(1)}}@-webkit-keyframes drawframeTop{0%{-webkit-transform:scaleX(1);transform-origin:100% 0}12.5%{-webkit-transform:scaleX(0);transform-origin:100% 0}50%{-webkit-transform:scaleX(0);transform-origin:0 0}62.5%{-webkit-transform:scaleX(1);transform-origin:0 0}100%{-webkit-transform:scaleX(1);transform-origin:100% 0}}@keyframes drawframeTop{0%{transform:scaleX(1);transform-origin:100% 0}12.5%{transform:scaleX(0);transform-origin:100% 0}50%{transform:scaleX(0);transform-origin:0 0}62.5%{transform:scaleX(1);transform-origin:0 0}100%{transform:scaleX(1);transform-origin:100% 0}}@-webkit-keyframes drawframeBottom{0%{-webkit-transform:scaleX(1);transform-origin:0 0}12.5%{-webkit-transform:scaleX(0);transform-origin:0 0}50%{-webkit-transform:scaleX(0);transform-origin:100% 0}62.5%{-webkit-transform:scaleX(1);transform-origin:100% 0}100%{-webkit-transform:scaleX(1);transform-origin:0 0}}@keyframes drawframeBottom{0%{transform:scaleX(1);transform-origin:0 0}12.5%{transform:scaleX(0);transform-origin:0 0}50%{transform:scaleX(0);transform-origin:100% 0}62.5%{transform:scaleX(1);transform-origin:100% 0}100%{transform:scaleX(1);transform-origin:0 0}}@-webkit-keyframes drawframeRight{0%{-webkit-transform:scaleY(1);transform-origin:0 100%}12.5%{-webkit-transform:scaleY(0);transform-origin:0 100%}50%{-webkit-transform:scaleY(0);transform-origin:0 0}62.5%{-webkit-transform:scaleY(1);transform-origin:0 0}100%{-webkit-transform:scaleY(1);transform-origin:0 100%}}@keyframes drawframeRight{0%{transform:scaleY(1);transform-origin:0 100%}12.5%{transform:scaleY(0);transform-origin:0 100%}50%{transform:scaleY(0);transform-origin:0 0}62.5%{transform:scaleY(1);transform-origin:0 0}100%{transform:scaleY(1);transform-origin:0 100%}}@-webkit-keyframes drawframeLeft{0%{-webkit-transform:scaleY(1);transform-origin:0 0}12.5%{-webkit-transform:scaleY(0);transform-origin:0 0}50%{-webkit-transform:scaleY(0);transform-origin:0 100%}62.5%{-webkit-transform:scaleY(1);transform-origin:0 100%}100%{-webkit-transform:scaleY(1);transform-origin:0 0}}@keyframes drawframeLeft{0%{transform:scaleY(1);transform-origin:0 0}12.5%{transform:scaleY(0);transform-origin:0 0}50%{transform:scaleY(0);transform-origin:0 100%}62.5%{transform:scaleY(1);transform-origin:0 100%}100%{transform:scaleY(1);transform-origin:0 0}}@-webkit-keyframes imgLoading{0%{height:0%;opacity:1}95%{height:100%;opacity:1}100%{height:100%;opacity:0}}@keyframes imgLoading{0%{height:0%;opacity:1}95%{height:100%;opacity:1}100%{height:100%;opacity:0}}@-webkit-keyframes beat{0%{transform:scale(0);opacity:0}80%{transform:scale(1);opacity:.7}100%{transform:scale(1);opacity:0}}@keyframes beat{0%{transform:scale(0);opacity:0}80%{transform:scale(1);opacity:.7}100%{transform:scale(1);opacity:0}}body,html{opacity:1!important}#loftloader-wrapper{position:fixed;top:0;left:0;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:999999;width:100%;height:100%;background:0 0!important}.loaded #loftloader-wrapper{-webkit-transform:translateX(-200%);-ms-transform:translateX(-200%);transform:translateX(-200%);visibility:hidden;pointer-events:none;transition:all;transition-delay:1s}.loaded #loftloader-wrapper.slide-vertical{-webkit-transform:translate(-100%,0);-ms-transform:translate(-100%,0);transform:translate(-100%,0)}.loaded #loftloader-wrapper #loader,.loaded #loftloader-wrapper .loader-close-button{opacity:0;transition:all .3s ease-out}#loftloader-wrapper .loader-inner{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:1001;text-align:center;transition:all 0s;font-size:0}#loftloader-wrapper .loader-inner #loader{position:relative;z-index:1002;display:inline-block;margin:0 auto;background:0 0!important;color:#248acc}#loftloader-wrapper .loader-section{position:fixed;z-index:999;width:50%;height:100%;background:#000;opacity:.95;transition:all 0s;will-change:transform}#loftloader-wrapper .loader-section.section-fade{top:0;left:0;width:100%;will-change:opacity}.loaded #loftloader-wrapper .loader-section.section-fade{opacity:0!important;transition:all .7s .3s cubic-bezier(.645,.045,.355,1)}#loftloader-wrapper .loader-section.section-slide-up{top:0;left:0;width:100%}.loaded #loftloader-wrapper .loader-section.section-slide-up{-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%);transition:all .7s .3s cubic-bezier(.645,.045,.355,1)}#loftloader-wrapper .loader-section.section-left,#loftloader-wrapper .loader-section.section-right{top:0}#loftloader-wrapper .loader-section.section-left{left:0}.loaded #loftloader-wrapper .loader-section.section-left{transition:all .7s .3s cubic-bezier(.645,.045,.355,1);-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}#loftloader-wrapper .loader-section.section-right{right:0}.loaded #loftloader-wrapper .loader-section.section-right{transition:all .7s .3s cubic-bezier(.645,.045,.355,1);-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}#loftloader-wrapper .loader-section.section-down,#loftloader-wrapper .loader-section.section-up{left:0;width:100%;height:50%}#loftloader-wrapper .loader-section.section-up{top:0}.loaded #loftloader-wrapper .loader-section.section-up{transition:all .7s .3s cubic-bezier(.645,.045,.355,1);-webkit-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}#loftloader-wrapper .loader-section.section-down{bottom:0}.loaded #loftloader-wrapper .loader-section.section-down{transition:all .7s .3s cubic-bezier(.645,.045,.355,1);-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%)}#loftloader-wrapper.pl-sun #loader{width:50px;height:50px}#loftloader-wrapper.pl-sun #loader span{position:absolute;top:0;left:0;display:block;width:50px;height:50px;background:currentColor;opacity:.9;transform-origin:50% 50%;-webkit-animation:spinReturn 4s ease infinite;animation:spinReturn 4s ease infinite}#loftloader-wrapper.pl-sun #loader span:before{position:absolute;top:0;left:0;display:block;width:100%;height:100%;background:inherit;opacity:.9;content:"";transform-origin:50% 50%;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#loftloader-wrapper.pl-circles #loader{width:100px;height:60px}#loftloader-wrapper.pl-circles #loader span,#loftloader-wrapper.pl-circles #loader:after,#loftloader-wrapper.pl-circles #loader:before{position:absolute;display:block;width:10px;height:10px;border-radius:50%;opacity:.2;background:currentColor}#loftloader-wrapper.pl-circles #loader span{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-animation:lightUp 1.5s linear infinite .5s;animation:lightUp 1.5s linear infinite .5s}#loftloader-wrapper.pl-circles #loader:after,#loftloader-wrapper.pl-circles #loader:before{content:"";top:50%;-webkit-transform:translate(0,-50%);-ms-transform:translate(0,-50%);transform:translate(0,-50%)}#loftloader-wrapper.pl-circles #loader:before{left:0;-webkit-animation:lightUp 1.5s linear infinite;animation:lightUp 1.5s linear infinite}#loftloader-wrapper.pl-circles #loader:after{right:0;-webkit-animation:lightUp 1.5s linear infinite 1s;animation:lightUp 1.5s linear infinite 1s}#loftloader-wrapper.pl-wave #loader{width:60px;height:30px}#loftloader-wrapper.pl-wave #loader span,#loftloader-wrapper.pl-wave #loader:after,#loftloader-wrapper.pl-wave #loader:before{position:relative;display:inline-block;width:6px;height:100%;background:currentColor}#loftloader-wrapper.pl-wave #loader span{margin:0 16px;-webkit-animation:wave .9s linear infinite .3s;animation:wave .9s linear infinite .3s}#loftloader-wrapper.pl-wave #loader:after,#loftloader-wrapper.pl-wave #loader:before{content:""}#loftloader-wrapper.pl-wave #loader:before{-webkit-animation:wave .9s linear infinite;animation:wave .9s linear infinite}#loftloader-wrapper.pl-wave #loader:after{-webkit-animation:wave .9s linear infinite .6s;animation:wave .9s linear infinite .6s}#loftloader-wrapper.pl-square #loader{width:50px;height:50px;transform-origin:50% 50%;-webkit-animation:spinReturn 4s ease infinite;animation:spinReturn 4s ease infinite}#loftloader-wrapper.pl-square #loader span{position:absolute;top:0;left:0;display:block;width:100%;height:100%;border:4px solid currentColor;box-sizing:border-box;transform-origin:50% 50%;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#loftloader-wrapper.pl-frame #loader{width:80px;height:80px;max-width:90vw}#loftloader-wrapper.pl-frame #loader:after,#loftloader-wrapper.pl-frame #loader:before{position:absolute;width:100%;height:4px;background:currentColor;content:""}#loftloader-wrapper.pl-frame #loader:before{top:0;right:0;left:auto;-webkit-animation:drawframeTop 4s linear infinite;animation:drawframeTop 4s linear infinite}#loftloader-wrapper.pl-frame #loader:after{right:auto;bottom:0;left:0;-webkit-animation:drawframeBottom 4s linear infinite 1s;animation:drawframeBottom 4s linear infinite 1s}#loftloader-wrapper.pl-frame #loader span{position:absolute;top:0;left:0;display:block;width:100%;height:100%}#loftloader-wrapper.pl-frame #loader span:after,#loftloader-wrapper.pl-frame #loader span:before{position:absolute;width:4px;height:100%;background:currentColor;content:""}#loftloader-wrapper.pl-frame #loader span:before{top:auto;right:0;bottom:0;-webkit-animation:drawframeRight 4s linear infinite .5s;animation:drawframeRight 4s linear infinite .5s}#loftloader-wrapper.pl-frame #loader span:after{top:0;bottom:auto;left:0;-webkit-animation:drawframeLeft 4s linear infinite 1.5s;animation:drawframeLeft 4s linear infinite 1.5s}#loftloader-wrapper.pl-frame #loader img{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:block;max-width:80%;max-height:80%}#loftloader-wrapper.pl-imgloading #loader{width:auto;height:auto;max-width:90vw}#loftloader-wrapper.pl-imgloading #loader img{position:relative;z-index:1;display:block;width:100%;height:auto;margin:0 auto}#loftloader-wrapper.pl-imgloading #loader img{opacity:.3}#loftloader-wrapper.pl-imgloading #loader span{position:absolute;bottom:0;left:0;z-index:3;display:block;width:100%;height:0%;transition:0s;background-repeat:no-repeat;background-size:cover;background-position:center bottom;-webkit-animation:imgLoading 6s linear infinite;animation:imgLoading 6s linear infinite}#loftloader-wrapper.pl-beating #loader{width:60px;height:60px}#loftloader-wrapper.pl-beating #loader span,#loftloader-wrapper.pl-beating #loader:before{position:absolute;top:0;left:0;display:block;width:60px;height:60px;border-radius:50%;background:currentColor;box-shadow:0 0 50px;opacity:0}#loftloader-wrapper.pl-beating #loader span{-webkit-animation:beat 1.5s linear infinite;animation:beat 1.5s linear infinite}#loftloader-wrapper.pl-beating #loader:before{content:"";-webkit-animation:beat 1.5s linear infinite 1s;animation:beat 1.5s linear infinite 1s}.loader-close-button{position:fixed;right:10px;top:10px;z-index:99999;box-sizing:border-box;width:auto;min-width:35px;height:35px;padding:5px 30px 5px 5px;border-radius:999px;background:rgba(0,0,0,.3);color:#fff;font-size:12px;line-height:25px;cursor:pointer}.loader-close-button:hover{background:rgba(0,0,0,.7)}.loader-close-button:after,.loader-close-button:before{position:absolute;top:16px;right:9px;display:block;width:18px;height:2px;transform-origin:50% 50%;content:"";background:#fff}.loader-close-button:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.loader-close-button:after{-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg)}.loader-close-button .screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);overflow:hidden;word-wrap:normal!important}.loader-close-button .close-des{padding:0 5px;font-size:12px}
assets/js/customize.js CHANGED
@@ -152,7 +152,8 @@
152
  ]
153
  },
154
  'loftloader_show_close_timer': {},
155
- 'loftloader_show_close_tip': {}
 
156
  };
157
  var loftloader = type_value = loop = '';
158
  if(loftloader_get_setting_value('loftloader_main_switch') === 'on'){
152
  ]
153
  },
154
  'loftloader_show_close_timer': {},
155
+ 'loftloader_show_close_tip': {},
156
+ 'loftloader_inline_js': {}
157
  };
158
  var loftloader = type_value = loop = '';
159
  if(loftloader_get_setting_value('loftloader_main_switch') === 'on'){
assets/js/customize.min.js CHANGED
@@ -1 +1 @@
1
- !function(n,r){function l(e){var t,o=n.get(),a=!!o[e]&&o[e];return"string"==typeof a&&(a=a.trim()),!0===(t=a)?"on":t}r("head").append(r("<style>",{id:"loftloader-hide-site-title",text:".site-title { opacity: 0; }"})),n.LoftLoaderSwitchSection=n.Section.extend({initialize:function(){return n.Section.prototype.initialize.apply(this,arguments)},ready:function(){!!!this.container.find("input[name=loftloader-main-switch]").attr("checked")&&r("#customize-theme-controls").addClass("loftloader-settings-disabled"),r("#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=!!r(this).attr("checked"),o=l.find("#customize-control-loftloader_main_switch input[type=checkbox]"),a=r("#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")})}}),r.extend(n.sectionConstructor,{loftloader_switch:n.LoftLoaderSwitchSection}),n.controlConstructor.slider=n.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")}})}}),n.bind("ready",function(e){loftloader_lite_i18n&&r(".site-title").text(loftloader_lite_i18n.name),r("#loftloader-hide-site-title").remove();var t=n.get(),o=r("#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=r("<div>",{class:"thumbnail thumbnail-image"}).append(r("<img>",{class:"attachment-thumb",src:a}));l.children(".placeholder").css("display","none").after(i).remove()}}r("body").on("change","input[type=number]",function(e){var t=parseInt(r(this).val()),o=r(this).attr("min")?parseInt(r(this).attr("min")):1;t<o&&r(this).val(o).trigger("change")}).on("change","input.loftlader-checkbox",function(e){var t=!!r(this).attr("checked"),o=r(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=r(this),o=r(this).siblings(".customize-control-description");o.length&&(t.hasClass("expanded")?o.slideUp("slow"):o.slideDown("slow",function(){r(this).css("display","block")}),t.toggleClass("expanded"))}).on("click",".loftloader-any-page-generate",function(e){e.preventDefault();var t=n.loftloader_generate_parameters();r(this).siblings(".loftloader-any-page-shortcode").val("[loftloader "+t+"]").select()})}),n.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:{}},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;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(n,r){function l(e){var t,o=n.get(),a=!!o[e]&&o[e];return"string"==typeof a&&(a=a.trim()),!0===(t=a)?"on":t}r("head").append(r("<style>",{id:"loftloader-hide-site-title",text:".site-title { opacity: 0; }"})),n.LoftLoaderSwitchSection=n.Section.extend({initialize:function(){return n.Section.prototype.initialize.apply(this,arguments)},ready:function(){!!!this.container.find("input[name=loftloader-main-switch]").attr("checked")&&r("#customize-theme-controls").addClass("loftloader-settings-disabled"),r("#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=!!r(this).attr("checked"),o=l.find("#customize-control-loftloader_main_switch input[type=checkbox]"),a=r("#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")})}}),r.extend(n.sectionConstructor,{loftloader_switch:n.LoftLoaderSwitchSection}),n.controlConstructor.slider=n.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")}})}}),n.bind("ready",function(e){loftloader_lite_i18n&&r(".site-title").text(loftloader_lite_i18n.name),r("#loftloader-hide-site-title").remove();var t=n.get(),o=r("#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=r("<div>",{class:"thumbnail thumbnail-image"}).append(r("<img>",{class:"attachment-thumb",src:a}));l.children(".placeholder").css("display","none").after(i).remove()}}r("body").on("change","input[type=number]",function(e){var t=parseInt(r(this).val()),o=r(this).attr("min")?parseInt(r(this).attr("min")):1;t<o&&r(this).val(o).trigger("change")}).on("change","input.loftlader-checkbox",function(e){var t=!!r(this).attr("checked"),o=r(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=r(this),o=r(this).siblings(".customize-control-description");o.length&&(t.hasClass("expanded")?o.slideUp("slow"):o.slideDown("slow",function(){r(this).css("display","block")}),t.toggleClass("expanded"))}).on("click",".loftloader-any-page-generate",function(e){e.preventDefault();var t=n.loftloader_generate_parameters();r(this).siblings(".loftloader-any-page-shortcode").val("[loftloader "+t+"]").select()})}),n.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_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;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/js/loftloader.js CHANGED
@@ -1,21 +1,26 @@
1
- (function($){
2
- function loftloader_finished(){
3
- $('body').addClass('loaded');
4
  }
5
- if($('#loftloader-wrapper').length){
6
- $(window).load(function(){ loftloader_finished(); });
 
 
7
 
8
- $(document).ready(function(){
9
- var $loader_wrapper = $('#loftloader-wrapper'), show_close_time = '';
10
- if($loader_wrapper.data('show-close-time')){
11
- show_close_time = parseInt($loader_wrapper.data('show-close-time'));
12
- if(show_close_time){
13
- setTimeout(function(){ $loader_wrapper.find('.loader-close-button').css('display', ''); }, show_close_time);
14
- $('.loader-close-button').on('click', function(){
 
 
 
15
  loftloader_finished();
16
- });
17
  }
18
  }
19
- });
20
  }
21
- })(jQuery);
1
+ ( function( $ ) {
2
+ function loftloader_finished() {
3
+ $('body').addClass( 'loaded' );
4
  }
5
+ if ( $( '#loftloader-wrapper' ).length ) {
6
+ $(window).load( function(){
7
+ loftloader_finished();
8
+ } );
9
 
10
+ $( document ).ready( function() {
11
+ var $loader_wrapper = $( '#loftloader-wrapper' ),
12
+ show_close_time = '';
13
+ if ( $loader_wrapper.data( 'show-close-time' ) ) {
14
+ show_close_time = parseInt( $loader_wrapper.data( 'show-close-time' ) );
15
+ if( show_close_time ) {
16
+ setTimeout( function(){
17
+ $loader_wrapper.find( '.loader-close-button' ).css('display', '' );
18
+ }, show_close_time );
19
+ $( '.loader-close-button' ).on( 'click', function() {
20
  loftloader_finished();
21
+ } );
22
  }
23
  }
24
+ } );
25
  }
26
+ } )( jQuery );
assets/scss/_loftloader-animation.scss CHANGED
File without changes
assets/scss/_loftloader-mixins.scss CHANGED
File without changes
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.1.6
10
  */
11
 
12
 
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.1.7
10
  */
11
 
12
 
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.1.6
10
  */
11
 
12
  $primary-color: #248acc;
@@ -63,6 +63,7 @@ body {
63
  z-index: 1002;
64
  display: inline-block;
65
  margin: 0 auto;
 
66
  color: $primary-color;
67
  }
68
  }
@@ -458,6 +459,7 @@ body {
458
  right: 10px;
459
  top: 10px;
460
  z-index: 99999;
 
461
  width: auto;
462
  min-width: 35px;
463
  height: 35px;
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.1.7
10
  */
11
 
12
  $primary-color: #248acc;
63
  z-index: 1002;
64
  display: inline-block;
65
  margin: 0 auto;
66
+ background: none !important;
67
  color: $primary-color;
68
  }
69
  }
459
  right: 10px;
460
  top: 10px;
461
  z-index: 99999;
462
+ box-sizing: border-box;
463
  width: auto;
464
  min-width: 35px;
465
  height: 35px;
inc/any-page/class-loftloader-any-page.php CHANGED
@@ -19,25 +19,24 @@ if ( ! class_exists( 'LoftLoader_Any_Page' ) && !class_exists('LoftLoader_Any_Pa
19
  }
20
  // Register loftloader shortcode meta box
21
  public function register_meta_boxes(){
22
- add_meta_box(
23
- 'loftloader_any_page_meta',
24
- esc_html__( 'LoftLoader Any Page Shortcode', 'loftloader-any-page' ),
25
- array( $this, 'metabox_callback' ),
26
- 'page',
27
- 'advanced',
28
  'high',
29
  array(
30
  '__block_editor_compatible_meta_box' => true,
31
  '__back_compat_meta_box' => true
32
  )
33
- );
34
  }
35
  // Show meta box html
36
- public function metabox_callback($post){
37
- $shortcode = get_post_meta($post->ID, 'loftloader_page_shortcode', true);
38
- $html = '<textarea name="loftloader_page_shortcode" style="width: 100%;" rows="4">' . str_replace('/\\"/g', '\\\\"', $shortcode) . '</textarea>';
39
- $html .= '<input type="hidden" name="loftloader_any_page_nonce" value="' . wp_create_nonce('loftloader_any_page_nonce') . '" />';
40
- echo $html;
41
  }
42
  // Save loftloader shortcode meta
43
  public function save_meta($post_id, $post, $update){
@@ -45,9 +44,13 @@ if ( ! class_exists( 'LoftLoader_Any_Page' ) && !class_exists('LoftLoader_Any_Pa
45
  return $post_id;
46
  }
47
  if ( current_user_can( 'edit_post', $post_id ) ) {
48
- update_post_meta( $post_id, 'loftloader_page_shortcode', sanitize_text_field( $_REQUEST['loftloader_page_shortcode'] ) );
49
- }
50
- return $_post_id;
 
 
 
 
51
  }
52
 
53
  // Initial LoftLoader Pro Shortcode actions
19
  }
20
  // Register loftloader shortcode meta box
21
  public function register_meta_boxes(){
22
+ add_meta_box(
23
+ 'loftloader_any_page_meta',
24
+ esc_html__( 'LoftLoader Any Page Shortcode', 'loftloader' ),
25
+ array( $this, 'metabox_callback' ),
26
+ 'page',
27
+ 'advanced',
28
  'high',
29
  array(
30
  '__block_editor_compatible_meta_box' => true,
31
  '__back_compat_meta_box' => true
32
  )
33
+ );
34
  }
35
  // Show meta box html
36
+ public function metabox_callback( $post ) {
37
+ $shortcode = get_post_meta($post->ID, 'loftloader_page_shortcode', true); ?>
38
+ <textarea name="loftloader_page_shortcode" style="width: 100%;" rows="4"><?php echo esc_textarea( str_replace('/\\"/g', '\\\\"', $shortcode ) ); ?></textarea>
39
+ <input type="hidden" name="loftloader_any_page_nonce" value="<?php echo esc_attr( wp_create_nonce( 'loftloader_any_page_nonce' ) ); ?>" /> <?php
 
40
  }
41
  // Save loftloader shortcode meta
42
  public function save_meta($post_id, $post, $update){
44
  return $post_id;
45
  }
46
  if ( current_user_can( 'edit_post', $post_id ) ) {
47
+ $shortcode = '';
48
+ if ( ! empty( $_REQUEST['loftloader_page_shortcode'] ) ) {
49
+ $shortcode = sanitize_text_field( wp_unslash( $_REQUEST['loftloader_page_shortcode'] ) );
50
+ }
51
+ update_post_meta( $post_id, 'loftloader_page_shortcode', $shortcode );
52
+ }
53
+ return $_post_id;
54
  }
55
 
56
  // Initial LoftLoader Pro Shortcode actions
inc/any-page/gutenberg/plugin.js CHANGED
@@ -43,7 +43,10 @@
43
 
44
  this.state = this.props.meta;
45
  }
46
-
 
 
 
47
  static getDerivedStateFromProps( nextProps, state ) {
48
  if ( ( nextProps.isPublishing || nextProps.isSaving ) && ! nextProps.isAutoSaving ) {
49
  wp.apiRequest( { path: '/loftloader/v2/update-meta?id=' + nextProps.postId, method: 'POST', data: state } ).then(
@@ -67,7 +70,7 @@
67
  label: __( 'Paste LoftLoader shortcode into the box below' ),
68
  value: this.state.loftloader_page_shortcode,
69
  onChange: ( value ) => {
70
- this.setState( { loftloader_page_shortcode: value } );
71
  }
72
  } )
73
  ),
43
 
44
  this.state = this.props.meta;
45
  }
46
+ onSaveMeta( newValue ) {
47
+ dispatch( 'core/editor' ).editPost( { meta: { 'loftload-saving': 1 } } );
48
+ this.setState( newValue );
49
+ }
50
  static getDerivedStateFromProps( nextProps, state ) {
51
  if ( ( nextProps.isPublishing || nextProps.isSaving ) && ! nextProps.isAutoSaving ) {
52
  wp.apiRequest( { path: '/loftloader/v2/update-meta?id=' + nextProps.postId, method: 'POST', data: state } ).then(
70
  label: __( 'Paste LoftLoader shortcode into the box below' ),
71
  value: this.state.loftloader_page_shortcode,
72
  onChange: ( value ) => {
73
+ this.onSaveMeta( { loftloader_page_shortcode: value } );
74
  }
75
  } )
76
  ),
inc/class-loftloader-customize.php CHANGED
@@ -1,27 +1,27 @@
1
  <?php
2
- if(!class_exists('LoftLoader_Customize')){
3
  /**
4
  * Load the Loftloader lite customize related functions
5
  *
6
  * @author Loft.Ocean
7
  * @since 2.0.0
8
  */
9
- class LoftLoader_Customize{
10
- public function __construct(){
11
  $this->load_default_settings();
12
- if(loftloader_is_customize()){
13
  $this->load_customize_controls();
14
- add_action('customize_controls_init', array($this, 'remove_sections'), 1000);
15
- add_action('customize_controls_enqueue_scripts', array($this, 'customize_scripts'), 9999);
16
- add_action('customize_preview_init', array($this, 'preview_scripts'));
17
  }
18
  }
19
 
20
- private function load_default_settings(){
21
  require_once LOFTLOADER_ROOT . 'inc/configs/default-settings.php';
22
  }
23
 
24
- public function load_customize_controls(){
25
  $config_dir = LOFTLOADER_ROOT . 'inc/configs/';
26
  require_once $config_dir . 'customize-main.php';
27
  require_once $config_dir . 'customize-range.php';
@@ -29,58 +29,58 @@ if(!class_exists('LoftLoader_Customize')){
29
  require_once $config_dir . 'customize-loader.php';
30
  require_once $config_dir . 'customize-promo.php';
31
  require_once $config_dir . 'customize-more.php';
32
- require_once $config_dir . 'customize-any-page.php';
33
  }
34
 
35
- public function remove_sections(){
36
  global $wp_customize;
37
  foreach($wp_customize->containers() as $id => $container){
38
- if($container instanceof WP_Customize_Panel){
39
- (strpos($id, 'loftloader_') === false) ? $wp_customize->remove_panel($id) : '';
40
- }
41
- else if($container instanceof WP_Customize_Section){
42
- (strpos($id, 'loftloader_') === false) ? $wp_customize->remove_section($id) : '';
43
  }
44
  }
45
  }
46
 
47
- public function customize_scripts(){
48
  global $wp_scripts, $wp_styles;
49
  $js_url = LOFTLOADER_URI . 'assets/js/customize.min.js';
50
  $js_dep = array('jquery', 'wp-color-picker', 'jquery-ui-slider', 'customize-controls');
51
  $ui_css = LOFTLOADER_URI . 'assets/css/jquery-ui.css';
52
  $loader_css = LOFTLOADER_URI . 'assets/css/loftloader-settings.min.css';
53
 
54
- wp_register_script('loftloader-lite-customize', $js_url, $js_dep, LOFTLOADER_ASSET_VERSION);
55
- wp_localize_script('loftloader-lite-customize', 'loftloader_lite_i18n', array('name' => esc_html__('LoftLoader Lite', 'loftloader'))); // Change the site title in string "You are customizing ..."
56
- wp_enqueue_script('loftloader-lite-customize');
57
 
58
- wp_enqueue_style('loftloader-lite-ui', $ui_css, array(), LOFTLOADER_ASSET_VERSION);
59
- wp_enqueue_style('loftloader-lite-customize', $loader_css, array(), LOFTLOADER_ASSET_VERSION);
60
 
61
- foreach($wp_scripts->registered as $h => $o){
62
- if(strpos($o->src, 'wp-content/themes') !== false){
63
- wp_dequeue_script($h);
64
  }
65
  };
66
- foreach($wp_styles->registered as $h => $o){
67
- if(strpos($o->src, 'wp-content/themes') !== false){
68
- wp_dequeue_style($h);
69
  }
70
  };
71
  }
72
 
73
- public function preview_scripts(){
74
  $js_url = LOFTLOADER_URI . 'assets/js/preview.min.js';
75
- wp_register_script('loftloader-lite-preview', $js_url, array('jquery', 'customize-preview'), LOFTLOADER_ASSET_VERSION, true);
76
- wp_localize_script('loftloader-lite-preview', 'loftloader_lite', array('preview' => 'on'));
77
- wp_enqueue_script('loftloader-lite-preview'); }
 
78
  }
79
 
80
  new LoftLoader_Customize();
81
  }
82
 
83
- if(class_exists('WP_Customize_Setting')){
84
  /**
85
  * LoftLoader related customization api classes
86
  *
@@ -88,89 +88,104 @@ if(class_exists('WP_Customize_Setting')){
88
  */
89
 
90
  // LoftLoader base section class, changed the json function to modify the customize action text
91
- class LoftLoader_Customize_Section extends WP_Customize_Section{
92
  public function json() {
93
  $array = parent::json();
94
- $array['customizeAction'] = esc_html__('Setting', 'loftloader');
95
  return $array;
96
  }
97
  /**
98
  * render function for LoftLoader Switch section
99
  */
100
  protected function render() {
101
- if('loftloader_switch' === $this->type){
102
  $switch = $this->manager->get_setting('loftloader_main_switch')->value();
103
- $classes = 'accordion-section control-section control-section-' . $this->type;
104
- ?>
105
- <li id="accordion-section-<?php echo $this->id; ?>" class="accordion-section control-section control-section-<?php echo $this->type; ?>">
 
 
 
106
  <h3 class="accordion-section-title" tabindex="0">
107
- <?php echo $this->title; ?>
108
  <span class="screen-reader-text"><?php esc_html_e( 'Press return or enter to open this section', 'loftloader' ); ?></span>
109
- <input type="checkbox" name="loftloader-main-switch" value="on" <?php checked($switch, 'on'); ?> />
110
  </h3>
111
  <ul class="accordion-section-content">
112
  <li class="customize-section-description-container">
113
  <div class="customize-section-title">
114
  <button class="customize-section-back" tabindex="-1">
115
- <span class="screen-reader-text"><?php esc_html_e('Back', 'loftloader'); ?></span>
116
  </button>
117
  <h3>
118
- <span class="customize-action"><?php esc_html_e('Setting', 'loftloader'); ?></span><?php echo $this->title; ?>
 
119
  </h3>
120
- </div>
121
- <?php
122
- if(!empty($this->description)){
123
- echo '<div class="description customize-section-description">' . $this->description . '</div>';
124
- }
125
- ?>
126
  </li>
127
  </ul>
128
- </li>
129
- <?php
130
- }
131
- else{
132
  parent::render();
133
- }
134
  }
135
  }
136
 
137
  // LoftLoader base customize control class: add class properties as displaying dependency.
138
- class LoftLoader_Customize_Control extends WP_Customize_Control{
139
  public $filter = false;
140
  public $parent_setting_id = '';
141
  public $show_filter = array();
142
  public $img = '';
143
  public $href = '';
144
- public function active_callback(){
145
- if($this->filter && ($this->manager->get_setting($this->parent_setting_id) instanceof WP_Customize_Setting) && !empty($this->show_filter)){
146
- $parent_setting_value = $this->manager->get_setting($this->parent_setting_id)->value();
147
- return in_array($parent_setting_value, $this->show_filter) ? true : false;
148
  }
149
  return true;
150
  }
151
- public function render_content(){
152
- switch($this->type){
153
  case 'loftloader-ad':
154
- if(!empty($this->label)) : ?> <span class="customize-control-title"><?php echo esc_html($this->label); ?></span> <?php endif;
155
- if(!empty($this->img)) : ?> <a href="<?php echo $this->href; ?>" target="_blank"><img src="<?php echo esc_url($this->img); ?>" ></a> <?php endif; ?>
 
 
 
 
 
 
156
  <div class="customize-control-notifications-container"></div> <?php
157
  break;
158
  case 'loftloader-any-page':
159
- if(!empty($this->label)) : ?> <span class="customize-control-title"><?php echo esc_html($this->label); ?></span> <?php endif;
160
- if(!empty( $this->description)) : ?> <span class="description customize-control-description"><?php echo $this->description ; ?></span> <?php endif; ?>
161
- <input type="button" <?php $this->link(); ?> class="button button-primary loftloader-any-page-generate" value="<?php esc_attr_e('Generate', 'loftloader'); ?>" /><br/><br/>
 
 
 
 
 
 
 
 
 
162
  <textarea class="loftloader-any-page-shortcode" cols="30" rows="4"></textarea>
163
  <div class="customize-control-notifications-container"></div> <?php
164
  break;
165
  case 'check': ?>
166
  <label> <?php
167
- if(!empty( $this->label)) : ?>
168
  <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php
169
  endif;
170
- if(!empty( $this->description)) : ?>
171
- <span class="description customize-control-description"><?php echo $this->description; ?></span>
172
- <?php endif; ?>
173
- <input class="loftlader-checkbox" type="checkbox" value="on" name="<?php echo $this->id; ?>" <?php checked( 'on', $this->value() ); ?> />
174
  <input style="display:none;" type="checkbox" value="on" <?php $this->link(); ?> <?php checked( 'on', $this->value() ); ?> />
175
  </label> <?php break;
176
  default:
@@ -179,67 +194,72 @@ if(class_exists('WP_Customize_Setting')){
179
  }
180
  }
181
  // Modify the color control class to add the display dependency logic.
182
- class LoftLoader_Customize_Color_Control extends WP_Customize_Color_Control{
183
  public $filter = false;
184
  public $parent_setting_id = '';
185
  public $show_filter = array();
186
- public function active_callback(){
187
- if($this->filter && ($this->manager->get_setting($this->parent_setting_id) instanceof WP_Customize_Setting) && !empty($this->show_filter)){
188
- $parent_setting_value = $this->manager->get_setting($this->parent_setting_id)->value();
189
- return in_array($parent_setting_value, $this->show_filter) ? true : false;
190
  }
191
  return true;
192
  }
193
  }
194
  // Modify the image control class to add the display dependency logic.
195
- class LoftLoader_Customize_Image_Control extends WP_Customize_Image_Control{
196
  public $filter = false;
197
  public $parent_setting_id = '';
198
  public $show_filter = array();
199
- public function active_callback(){
200
- if($this->filter && ($this->manager->get_setting($this->parent_setting_id) instanceof WP_Customize_Setting) && !empty($this->show_filter)){
201
- $parent_setting_value = $this->manager->get_setting($this->parent_setting_id)->value();
202
- return in_array($parent_setting_value, $this->show_filter) ? true : false;
203
  }
204
  return true;
205
  }
206
  }
207
  // Add new slider control class with jqueryui slider function
208
- class LoftLoader_Customize_Slider_Control extends LoftLoader_Customize_Control{
209
  public $input_class = '';
210
  public $after_text = '%';
211
- public function render_content(){
212
- if ( empty( $this->input_attrs ) )
213
  return;
 
214
 
215
- echo '<label class="amount opacity">';
216
  if ( ! empty( $this->label ) ) : ?>
217
- <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
218
- <?php endif; ?>
219
- <span class="<?php echo $this->input_class; ?>">
220
  <input readonly="readonly" type="text" <?php $this->link(); ?> value="<?php echo esc_attr( $this->value() ); ?>" >
221
- <?php echo $this->after_text; ?>
222
  </span>
223
- <?php
224
- echo '</label>';
225
- ?>
226
- <div class="ui-slider loader-ui-slider" data-value="<?php echo $this->manager->get_setting($this->id)->value(); ?>" <?php $this->input_attrs(); ?>></div>
227
- <div class="customize-control-notifications-container"></div>
228
- <?php
 
 
229
  }
230
  }
231
  // Add new radio type control class for loader animation choices.
232
- class LoftLoader_Customize_Animation_Types_Control extends WP_Customize_Control{
233
- public function render_content(){
234
  if ( empty( $this->choices ) )
235
  return;
236
 
237
  if ( ! empty( $this->label ) ) : ?>
238
  <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
239
- <?php endif;
240
- echo '<button class="customize-more-toggle" aria-expanded="false"><span class="screen-reader-text">' . esc_html__('More info', 'loftloader') . '</span></button>';
 
 
241
  if ( ! empty( $this->description ) ) : ?>
242
- <span class="description customize-control-description" style="display: none;"><?php echo $this->description ; ?></span>
243
  <?php endif; ?>
244
 
245
  <div id="loftloader_option_animation">
@@ -247,15 +267,24 @@ if(class_exists('WP_Customize_Setting')){
247
  $name = '_customize-radio-' . $this->id;
248
  foreach ( $this->choices as $value => $attrs ) :
249
  $attr = '';
250
- if(!empty($attrs['attr'])){
251
- foreach((array)$attrs['attr'] as $attr_name => $attr_value){
252
  $attr .= ' ' . $attr_name . '="' . $attr_value . '"';
253
  }
254
  }
255
- $item_id = sanitize_title($this->id . '-' . $value);
256
  ?>
257
- <label for="<?php echo $item_id; ?>" title="<?php echo esc_attr($attrs['label']); ?>">
258
- <input id="<?php echo $item_id; ?>" class="loftloader-radiobtn <?php echo $value; ?>" type="radio" value="<?php echo esc_attr( $value ); ?>" name="<?php echo esc_attr( $name ); ?>" <?php $this->link(); checked( $this->value(), $value ); ?> <?php echo $attr; ?> />
 
 
 
 
 
 
 
 
 
259
  <span></span>
260
  </label>
261
  <?php endforeach; ?>
@@ -264,40 +293,46 @@ if(class_exists('WP_Customize_Setting')){
264
  }
265
  }
266
  // Add new number type control class with text after the element.
267
- class LoftLoader_Customize_Number_Text_Control extends LoftLoader_Customize_Control{
268
  public $after_text = '';
269
  public $input_class = '';
270
  public $input_wrap_class = '';
271
- public function render_content(){
272
- ?>
273
  <label>
274
  <?php if ( ! empty( $this->label ) ) : ?>
275
  <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
276
  <?php endif;
277
  if ( ! empty( $this->description ) ) : ?>
278
- <span class="description customize-control-description"><?php echo $this->description; ?></span>
279
  <?php endif; ?>
280
  <span class="<?php echo esc_attr($this->input_wrap_class); ?>">
281
- <input class="<?php echo esc_attr($this->input_class); ?>" type="<?php echo esc_attr( $this->type ); ?>" <?php $this->input_attrs(); ?> value="<?php echo esc_attr( $this->value() ); ?>" <?php $this->link(); ?> /><?php echo empty($this->after_text) ? '' : $this->after_text; ?>
 
 
 
 
 
 
 
282
  </span>
283
  </label>
284
  <?php
285
  }
286
  }
287
 
288
- if(!function_exists('loftloader_sanitize_checkbox')){
289
  /**
290
  * Check the switch checkbox value
291
  *
292
  * @param string the value from user
293
  * @return mix if set return string 'on', otherwise return false
294
  */
295
- function loftloader_sanitize_checkbox($input){
296
- return empty($input) ? 'off' : 'on';
297
  }
298
  }
299
 
300
- if(!function_exists('loftloader_sanitize_choice')){
301
  /**
302
  * Check the value is one of the choices from customize control
303
  *
@@ -306,10 +341,10 @@ if(class_exists('WP_Customize_Setting')){
306
  * @return string the value from user or the default setting value
307
  */
308
 
309
- function loftloader_sanitize_choice($input, $setting){
310
- $choices = $setting->manager->get_control($setting->id)->choices;
311
- $choices = array_keys($choices);
312
- return in_array($input, $choices) ? $input : $setting->default;
313
  }
314
  }
315
  }
1
  <?php
2
+ if ( ! class_exists( 'LoftLoader_Customize' ) ) {
3
  /**
4
  * Load the Loftloader lite customize related functions
5
  *
6
  * @author Loft.Ocean
7
  * @since 2.0.0
8
  */
9
+ class LoftLoader_Customize {
10
+ public function __construct() {
11
  $this->load_default_settings();
12
+ if ( loftloader_is_customize() ) {
13
  $this->load_customize_controls();
14
+ add_action( 'customize_controls_init', array( $this, 'remove_sections' ), 1000 );
15
+ add_action( 'customize_controls_enqueue_scripts', array( $this, 'customize_scripts' ), 9999 );
16
+ add_action( 'customize_preview_init', array( $this, 'preview_scripts' ) );
17
  }
18
  }
19
 
20
+ private function load_default_settings() {
21
  require_once LOFTLOADER_ROOT . 'inc/configs/default-settings.php';
22
  }
23
 
24
+ public function load_customize_controls() {
25
  $config_dir = LOFTLOADER_ROOT . 'inc/configs/';
26
  require_once $config_dir . 'customize-main.php';
27
  require_once $config_dir . 'customize-range.php';
29
  require_once $config_dir . 'customize-loader.php';
30
  require_once $config_dir . 'customize-promo.php';
31
  require_once $config_dir . 'customize-more.php';
32
+ require_once $config_dir . 'customize-advanced.php';
33
  }
34
 
35
+ public function remove_sections() {
36
  global $wp_customize;
37
  foreach($wp_customize->containers() as $id => $container){
38
+ if ( $container instanceof WP_Customize_Panel ) {
39
+ ( strpos( $id, 'loftloader_' ) === false ) ? $wp_customize->remove_panel( $id ) : '';
40
+ } else if ( $container instanceof WP_Customize_Section){
41
+ ( strpos( $id, 'loftloader_' ) === false ) ? $wp_customize->remove_section( $id ) : '';
 
42
  }
43
  }
44
  }
45
 
46
+ public function customize_scripts() {
47
  global $wp_scripts, $wp_styles;
48
  $js_url = LOFTLOADER_URI . 'assets/js/customize.min.js';
49
  $js_dep = array('jquery', 'wp-color-picker', 'jquery-ui-slider', 'customize-controls');
50
  $ui_css = LOFTLOADER_URI . 'assets/css/jquery-ui.css';
51
  $loader_css = LOFTLOADER_URI . 'assets/css/loftloader-settings.min.css';
52
 
53
+ wp_register_script( 'loftloader-lite-customize', $js_url, $js_dep, LOFTLOADER_ASSET_VERSION );
54
+ wp_localize_script( 'loftloader-lite-customize', 'loftloader_lite_i18n', array( 'name' => esc_html__( 'LoftLoader Lite', 'loftloader' ) ) ); // Change the site title in string "You are customizing ..."
55
+ wp_enqueue_script( 'loftloader-lite-customize' );
56
 
57
+ wp_enqueue_style( 'loftloader-lite-ui', $ui_css, array(), LOFTLOADER_ASSET_VERSION );
58
+ wp_enqueue_style( 'loftloader-lite-customize', $loader_css, array(), LOFTLOADER_ASSET_VERSION );
59
 
60
+ foreach ( $wp_scripts->registered as $h => $o ) {
61
+ if ( strpos($o->src, 'wp-content/themes') !== false ) {
62
+ wp_dequeue_script( $h );
63
  }
64
  };
65
+ foreach ( $wp_styles->registered as $h => $o ) {
66
+ if ( strpos($o->src, 'wp-content/themes') !== false ) {
67
+ wp_dequeue_style( $h );
68
  }
69
  };
70
  }
71
 
72
+ public function preview_scripts() {
73
  $js_url = LOFTLOADER_URI . 'assets/js/preview.min.js';
74
+ wp_register_script( 'loftloader-lite-preview', $js_url, array( 'jquery', 'customize-preview' ), LOFTLOADER_ASSET_VERSION, true );
75
+ wp_localize_script( 'loftloader-lite-preview', 'loftloader_lite', array( 'preview' => 'on' ) );
76
+ wp_enqueue_script( 'loftloader-lite-preview' );
77
+ }
78
  }
79
 
80
  new LoftLoader_Customize();
81
  }
82
 
83
+ if ( class_exists( 'WP_Customize_Setting' ) ) {
84
  /**
85
  * LoftLoader related customization api classes
86
  *
88
  */
89
 
90
  // LoftLoader base section class, changed the json function to modify the customize action text
91
+ class LoftLoader_Customize_Section extends WP_Customize_Section {
92
  public function json() {
93
  $array = parent::json();
94
+ $array['customizeAction'] = esc_html__( 'Setting', 'loftloader' );
95
  return $array;
96
  }
97
  /**
98
  * render function for LoftLoader Switch section
99
  */
100
  protected function render() {
101
+ if ( 'loftloader_switch' === $this->type ) :
102
  $switch = $this->manager->get_setting('loftloader_main_switch')->value();
103
+ $classes = 'accordion-section control-section control-section-' . $this->type; ?>
104
+
105
+ <li
106
+ id="accordion-section-<?php echo esc_attr( $this->id ); ?>"
107
+ class="accordion-section control-section control-section-<?php echo esc_attr( $this->type ); ?>"
108
+ >
109
  <h3 class="accordion-section-title" tabindex="0">
110
+ <?php echo esc_html( $this->title ); ?>
111
  <span class="screen-reader-text"><?php esc_html_e( 'Press return or enter to open this section', 'loftloader' ); ?></span>
112
+ <input type="checkbox" name="loftloader-main-switch" value="on" <?php checked( $switch, 'on' ); ?> />
113
  </h3>
114
  <ul class="accordion-section-content">
115
  <li class="customize-section-description-container">
116
  <div class="customize-section-title">
117
  <button class="customize-section-back" tabindex="-1">
118
+ <span class="screen-reader-text"><?php esc_html_e( 'Back', 'loftloader' ); ?></span>
119
  </button>
120
  <h3>
121
+ <span class="customize-action"><?php esc_html_e( 'Setting', 'loftloader' ); ?></span>
122
+ <?php echo wp_kses_post( $this->title ); ?>
123
  </h3>
124
+ </div> <?php
125
+ if ( ! empty( $this->description ) ) : ?>
126
+ <div class="description customize-section-description"><?php echo wp_kses_post( $this->description ); ?></div> <?php
127
+ endif; ?>
 
 
128
  </li>
129
  </ul>
130
+ </li> <?php
131
+ else :
 
 
132
  parent::render();
133
+ endif;
134
  }
135
  }
136
 
137
  // LoftLoader base customize control class: add class properties as displaying dependency.
138
+ class LoftLoader_Customize_Control extends WP_Customize_Control {
139
  public $filter = false;
140
  public $parent_setting_id = '';
141
  public $show_filter = array();
142
  public $img = '';
143
  public $href = '';
144
+ public function active_callback() {
145
+ if ( $this->filter && ( $this->manager->get_setting($this->parent_setting_id ) instanceof WP_Customize_Setting ) && ! empty( $this->show_filter ) ) {
146
+ $parent_setting_value = $this->manager->get_setting( $this->parent_setting_id )->value();
147
+ return in_array( $parent_setting_value, $this->show_filter ) ? true : false;
148
  }
149
  return true;
150
  }
151
+ public function render_content() {
152
+ switch ( $this->type ) {
153
  case 'loftloader-ad':
154
+ if ( ! empty( $this->label ) ) : ?>
155
+ <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php
156
+ endif;
157
+ if ( ! empty( $this->img ) ) : ?>
158
+ <a href="<?php echo esc_url( $this->href ); ?>" target="_blank">
159
+ <img src="<?php echo esc_url( $this->img ); ?>" >
160
+ </a> <?php
161
+ endif; ?>
162
  <div class="customize-control-notifications-container"></div> <?php
163
  break;
164
  case 'loftloader-any-page':
165
+ if ( ! empty( $this->label ) ) : ?>
166
+ <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php
167
+ endif;
168
+ if ( ! empty( $this->description ) ) : ?>
169
+ <span class="description customize-control-description"><?php echo wp_kses_post( $this->description ); ?></span> <?php
170
+ endif; ?>
171
+ <input
172
+ type="button"
173
+ <?php $this->link(); ?>
174
+ class="button button-primary loftloader-any-page-generate"
175
+ value="<?php esc_attr_e( 'Generate', 'loftloader' ); ?>"
176
+ /><br/><br/>
177
  <textarea class="loftloader-any-page-shortcode" cols="30" rows="4"></textarea>
178
  <div class="customize-control-notifications-container"></div> <?php
179
  break;
180
  case 'check': ?>
181
  <label> <?php
182
+ if ( ! empty( $this->label ) ) : ?>
183
  <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php
184
  endif;
185
+ if ( ! empty( $this->description ) ) : ?>
186
+ <span class="description customize-control-description"><?php echo wp_kses_post( $this->description ); ?></span> <?php
187
+ endif; ?>
188
+ <input class="loftlader-checkbox" type="checkbox" value="on" name="<?php echo esc_attr( $this->id ); ?>" <?php checked( 'on', $this->value() ); ?> />
189
  <input style="display:none;" type="checkbox" value="on" <?php $this->link(); ?> <?php checked( 'on', $this->value() ); ?> />
190
  </label> <?php break;
191
  default:
194
  }
195
  }
196
  // Modify the color control class to add the display dependency logic.
197
+ class LoftLoader_Customize_Color_Control extends WP_Customize_Color_Control {
198
  public $filter = false;
199
  public $parent_setting_id = '';
200
  public $show_filter = array();
201
+ public function active_callback() {
202
+ if ( $this->filter && ( $this->manager->get_setting( $this->parent_setting_id ) instanceof WP_Customize_Setting ) && ! empty( $this->show_filter ) ) {
203
+ $parent_setting_value = $this->manager->get_setting( $this->parent_setting_id )->value();
204
+ return in_array( $parent_setting_value, $this->show_filter ) ? true : false;
205
  }
206
  return true;
207
  }
208
  }
209
  // Modify the image control class to add the display dependency logic.
210
+ class LoftLoader_Customize_Image_Control extends WP_Customize_Image_Control {
211
  public $filter = false;
212
  public $parent_setting_id = '';
213
  public $show_filter = array();
214
+ public function active_callback() {
215
+ if ( $this->filter && ( $this->manager->get_setting($this->parent_setting_id ) instanceof WP_Customize_Setting ) && ! empty( $this->show_filter ) ) {
216
+ $parent_setting_value = $this->manager->get_setting( $this->parent_setting_id )->value();
217
+ return in_array( $parent_setting_value, $this->show_filter ) ? true : false;
218
  }
219
  return true;
220
  }
221
  }
222
  // Add new slider control class with jqueryui slider function
223
+ class LoftLoader_Customize_Slider_Control extends LoftLoader_Customize_Control {
224
  public $input_class = '';
225
  public $after_text = '%';
226
+ public function render_content() {
227
+ if ( empty( $this->input_attrs ) ) {
228
  return;
229
+ } ?>
230
 
231
+ <label class="amount opacity"> <?php
232
  if ( ! empty( $this->label ) ) : ?>
233
+ <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php
234
+ endif; ?>
235
+ <span class="<?php echo esc_attr( $this->input_class ); ?>">
236
  <input readonly="readonly" type="text" <?php $this->link(); ?> value="<?php echo esc_attr( $this->value() ); ?>" >
237
+ <?php echo wp_kses_post( $this->after_text ); ?>
238
  </span>
239
+ </label>
240
+ <div
241
+ class="ui-slider loader-ui-slider"
242
+ data-value="<?php echo esc_attr( $this->manager->get_setting($this->id)->value() ); ?>"
243
+ <?php $this->input_attrs(); ?>
244
+ >
245
+ </div>
246
+ <div class="customize-control-notifications-container"></div> <?php
247
  }
248
  }
249
  // Add new radio type control class for loader animation choices.
250
+ class LoftLoader_Customize_Animation_Types_Control extends WP_Customize_Control {
251
+ public function render_content() {
252
  if ( empty( $this->choices ) )
253
  return;
254
 
255
  if ( ! empty( $this->label ) ) : ?>
256
  <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
257
+ <?php endif; ?>
258
+ <button class="customize-more-toggle" aria-expanded="false">
259
+ <span class="screen-reader-text"><?php esc_html_e('More info', 'loftloader'); ?></span>
260
+ </button> <?php
261
  if ( ! empty( $this->description ) ) : ?>
262
+ <span class="description customize-control-description" style="display: none;"><?php echo wp_kses_post( $this->description ); ?></span>
263
  <?php endif; ?>
264
 
265
  <div id="loftloader_option_animation">
267
  $name = '_customize-radio-' . $this->id;
268
  foreach ( $this->choices as $value => $attrs ) :
269
  $attr = '';
270
+ if ( ! empty( $attrs['attr'] ) ) {
271
+ foreach ( (array)$attrs['attr'] as $attr_name => $attr_value ) {
272
  $attr .= ' ' . $attr_name . '="' . $attr_value . '"';
273
  }
274
  }
275
+ $item_id = sanitize_title( $this->id . '-' . $value );
276
  ?>
277
+ <label for="<?php echo esc_attr( $item_id ); ?>" title="<?php echo esc_attr($attrs['label']); ?>">
278
+ <input
279
+ id="<?php echo esc_attr( $item_id ); ?>"
280
+ class="loftloader-radiobtn <?php echo esc_attr( $value ); ?>"
281
+ type="radio"
282
+ value="<?php echo esc_attr( $value ); ?>"
283
+ name="<?php echo esc_attr( $name ); ?>"
284
+ <?php $this->link(); ?>
285
+ <?php checked( $this->value(), $value ); ?>
286
+ <?php echo wp_kses_post( $attr ); ?>
287
+ />
288
  <span></span>
289
  </label>
290
  <?php endforeach; ?>
293
  }
294
  }
295
  // Add new number type control class with text after the element.
296
+ class LoftLoader_Customize_Number_Text_Control extends LoftLoader_Customize_Control {
297
  public $after_text = '';
298
  public $input_class = '';
299
  public $input_wrap_class = '';
300
+ public function render_content() { ?>
 
301
  <label>
302
  <?php if ( ! empty( $this->label ) ) : ?>
303
  <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
304
  <?php endif;
305
  if ( ! empty( $this->description ) ) : ?>
306
+ <span class="description customize-control-description"><?php echo wp_kses_post( $this->description ); ?></span>
307
  <?php endif; ?>
308
  <span class="<?php echo esc_attr($this->input_wrap_class); ?>">
309
+ <input
310
+ class="<?php echo esc_attr( $this->input_class ); ?>"
311
+ type="<?php echo esc_attr( $this->type ); ?>"
312
+ <?php $this->input_attrs(); ?>
313
+ value="<?php echo esc_attr( $this->value() ); ?>"
314
+ <?php $this->link(); ?>
315
+ />
316
+ <?php echo esc_attr( $this->after_text ); ?>
317
  </span>
318
  </label>
319
  <?php
320
  }
321
  }
322
 
323
+ if ( ! function_exists( 'loftloader_sanitize_checkbox' ) ) {
324
  /**
325
  * Check the switch checkbox value
326
  *
327
  * @param string the value from user
328
  * @return mix if set return string 'on', otherwise return false
329
  */
330
+ function loftloader_sanitize_checkbox( $input ) {
331
+ return empty( $input ) ? 'off' : 'on';
332
  }
333
  }
334
 
335
+ if ( ! function_exists( 'loftloader_sanitize_choice' ) ) {
336
  /**
337
  * Check the value is one of the choices from customize control
338
  *
341
  * @return string the value from user or the default setting value
342
  */
343
 
344
+ function loftloader_sanitize_choice( $input, $setting ) {
345
+ $choices = $setting->manager->get_control( $setting->id )->choices;
346
+ $choices = array_keys( $choices );
347
+ return in_array( $input, $choices ) ? $input : $setting->default;
348
  }
349
  }
350
  }
inc/class-loftloader-front.php CHANGED
@@ -14,46 +14,109 @@ if(!defined('ABSPATH')){
14
  * @since version 1.0
15
  */
16
 
17
- if(!class_exists('LoftLoader_Front')){
18
- class LoftLoader_Front{
19
  private $defaults;
20
  private $type; // Get the loader settings
21
- public function __construct(){
22
  $this->get_settings();
23
- if($this->loader_enabled()){
24
- add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
25
- add_action('wp_head', array($this, 'loader_custom_styles'), 100);
26
- add_action('wp_footer', array($this, 'show_loader_html'));
 
 
27
  }
28
  }
29
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  * @description get the plugin settings
31
  */
32
- public function get_settings(){
33
  global $loftloader_default_settings;
34
  $this->defaults = $loftloader_default_settings;
35
- do_action('loftloader_settings');
36
- $this->type = esc_attr($this->get_loader_setting('loftloader_loader_type'));
37
  }
38
  /**
39
  * @description enqueue the scripts and styles for front end
40
  */
41
- public function enqueue_scripts(){
42
- is_customize_preview() ? '' : wp_enqueue_script('loftloader-lite-front-main', LOFTLOADER_URI . 'assets/js/loftloader.min.js', array('jquery'), LOFTLOADER_ASSET_VERSION, true);
 
 
 
43
  wp_enqueue_style('loftloader-lite-animation', LOFTLOADER_URI . 'assets/css/loftloader.min.css', array(), LOFTLOADER_ASSET_VERSION);
44
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  /**
46
  * @description custom css for front end
47
  */
48
- public function loader_custom_styles(){
49
- $color = esc_attr($this->get_loader_setting('loftloader_loader_color'));
50
- $bgColor = esc_attr($this->get_loader_setting('loftloader_bg_color'));
51
- $bgOpacity = intval($this->get_loader_setting('loftloader_bg_opacity')) / 100;
52
 
53
- $styles = $this->generate_style('loftloader-lite-custom-bg-color', '#loftloader-wrapper .loader-section {' . PHP_EOL . "\t" . 'background: ' . $bgColor . ';' . PHP_EOL . '}' . PHP_EOL);
54
- $styles .= $this->generate_style('loftloader-lite-custom-bg-opacity', '#loftloader-wrapper .loader-section {' . PHP_EOL . "\t" . 'opacity: ' . $bgOpacity . ';' . PHP_EOL . '}' . PHP_EOL);
 
 
 
 
 
 
55
  $css = '';
56
- switch($this->type){
57
  case 'sun':
58
  $css = '#loftloader-wrapper.pl-sun #loader {' . PHP_EOL . "\t" . 'color: ' . $color . ';' . PHP_EOL . '}' . PHP_EOL;
59
  break;
@@ -79,97 +142,94 @@ if(!class_exists('LoftLoader_Front')){
79
  $css = '#loftloader-wrapper.pl-beating #loader {' . PHP_EOL . "\t" . 'color: ' . $color . ';' . PHP_EOL . '}' . PHP_EOL;
80
  break;
81
  }
82
- $styles .= $this->generate_style('loftloader-lite-custom-loader', $css);
83
- echo $styles;
84
-
85
- ob_start();
86
  }
87
  /**
88
  * @description loftloader html
89
  */
90
- public function show_loader_html(){
91
- $image = esc_url($this->get_loader_setting('loftloader_custom_img'));
92
- $ending = esc_attr($this->get_loader_setting('loftloader_bg_animation'));
 
 
 
 
93
 
94
- $html = '<div id="loftloader-wrapper" class="pl-' . $this->type . '"' . $this->loader_attributes() . '>';
95
- $html .= '<div class="loader-inner"><div id="loader">';
96
- $html .= in_array($this->type, array('frame', 'imgloading'))
97
- ? ('<span></span>' . (empty($image) ? '' : ('<img src="' . $image . '" alt="preloder">'))) : '<span></span>';
98
- $html .= '</div></div>';
99
- switch($ending){
100
- case 'fade':
101
- $html .= '<div class="loader-section section-fade"></div>';
102
- break;
103
- case 'up':
104
- $html .= '<div class="loader-section section-slide-up"></div>';
105
- break;
106
- case 'split-v':
107
- $html .= '<div class="loader-section section-up"></div>';
108
- $html .= '<div class="loader-section section-down"></div>';
109
- break;
110
- default:
111
- $html .= '<div class="loader-section section-left">';
112
- $html .= '</div><div class="loader-section section-right"></div>';
113
- }
114
 
115
- if(!is_customize_preview()){
116
- $close_description = $this->get_loader_setting('loftloader_show_close_tip');
117
- $html .= sprintf(
118
- '<div class="loader-close-button" style="display: none;"><span class="screen-reader-text">%s</span>%s</div>',
119
- esc_html__('Close', 'loftloader'),
120
- empty($close_description) ? '' : sprintf('<span class="close-des">%s</span>', $close_description)
121
- );
122
- }
123
- $html .= '</div>';
124
 
125
- $origin = ob_get_clean();
126
- $regexp ='/<body[^>]*>/i';
127
- if(preg_match($regexp, $origin, $match)){
128
- $html = $match[0] . $html;
129
- echo preg_replace($regexp, $html, $origin);
130
- }
131
- else{
132
- echo $origin . $html;
133
  }
 
134
  }
135
  /**
136
  * Helper function to add manual loader settings
137
  */
138
- private function loader_attributes(){
139
  $attrs = '';
140
- $show_close_time = $this->get_loader_setting('loftloader_show_close_timer');
141
- $show_close_time = number_format($show_close_time, 0, '.', '');
142
- $attrs .= sprintf(' data-show-close-time="%s"', esc_js(esc_attr($show_close_time * 1000)));
143
- return apply_filters('loftloader_loader_attributes', $attrs);
144
  }
145
  /**
146
  * Helper function to test whether show loftloader
147
  * @return boolean return true if loftloader enabled and display on current page, otherwise false
148
  */
149
- private function loader_enabled(){
150
- if(($this->get_loader_setting('loftloader_main_switch') === 'on')){
151
- $range = $this->get_loader_setting('loftloader_show_range');
152
- if(($range === 'sitewide') || (($range === 'homepage') && is_front_page())){
153
  return true;
154
- }
155
- else{
156
  return false;
157
  }
158
- }
159
- else{
160
- return apply_filters('loftloader_loader_enabled', false);
161
  }
162
  }
163
  /**
164
  * Helper function get setting option
165
  */
166
- private function get_loader_setting($setting_id){
167
- return apply_filters('loftloader_get_loader_setting', get_option($setting_id, $this->defaults[$setting_id]), $setting_id);
168
  }
169
  /**
170
  * Helper function generate styles
171
  */
172
- private function generate_style($id, $style){
173
  return '<style id="' . $id . '">' . $style . '</style>';
174
  }
175
  }
14
  * @since version 1.0
15
  */
16
 
17
+ if ( ! class_exists( 'LoftLoader_Front' ) ) {
18
+ class LoftLoader_Front {
19
  private $defaults;
20
  private $type; // Get the loader settings
21
+ public function __construct() {
22
  $this->get_settings();
23
+ $this->start_cache();
24
+ if ( $this->loader_enabled() ) {
25
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
26
+ add_action( 'wp_head', array( $this, 'loader_custom_styles' ), 100 );
27
+ add_action( 'wp_footer', array( $this, 'load_inline_js' ), 99 );
28
+ add_filter( 'loftloader_modify_html', array( $this, 'show_loader_html' ) );
29
  }
30
  }
31
  /**
32
+ * Start cache for outputing
33
+ */
34
+ public function start_cache() {
35
+ // Only for front view
36
+ if ( ! is_admin() ) {
37
+ // Start cache the output with callback function
38
+ ob_start( array( $this, 'modify_html' ) );
39
+ }
40
+ }
41
+ /**
42
+ * Will be called when flush cache
43
+ *
44
+ * @param string cached string
45
+ * @return string modified cached string
46
+ */
47
+ public function modify_html( $html ) {
48
+ return apply_filters( 'loftloader_modify_html', $html );
49
+ }
50
+ /**
51
  * @description get the plugin settings
52
  */
53
+ public function get_settings() {
54
  global $loftloader_default_settings;
55
  $this->defaults = $loftloader_default_settings;
56
+ do_action( 'loftloader_settings' );
57
+ $this->type = esc_attr( $this->get_loader_setting( 'loftloader_loader_type' ) );
58
  }
59
  /**
60
  * @description enqueue the scripts and styles for front end
61
  */
62
+ public function enqueue_scripts() {
63
+ $loadJSStyle = $this->get_loader_setting( 'loftloader_inline_js' );
64
+ if ( ! is_customize_preview() && ( 'inline' !== $loadJSStyle ) ) {
65
+ wp_enqueue_script( 'loftloader-lite-front-main', LOFTLOADER_URI . 'assets/js/loftloader.min.js', array( 'jquery' ), LOFTLOADER_ASSET_VERSION, true );
66
+ }
67
  wp_enqueue_style('loftloader-lite-animation', LOFTLOADER_URI . 'assets/css/loftloader.min.css', array(), LOFTLOADER_ASSET_VERSION);
68
  }
69
+ /**
70
+ * Load inline JavaScript code if set
71
+ */
72
+ public function load_inline_js() {
73
+ $loadJSStyle = $this->get_loader_setting( 'loftloader_inline_js' );
74
+ if ( ( 'inline' === $loadJSStyle ) && ! is_customize_preview() ) { ?>
75
+ <script type="text/javascript">
76
+ ( function() {
77
+ function loftloader_finished() {
78
+ document.body.classList.add( 'loaded' );
79
+ }
80
+ var loader = document.getElementById( 'loftloader-wrapper' );
81
+ if ( loader ) {
82
+ window.addEventListener( 'load', function( e ) {
83
+ loftloader_finished();
84
+ } );
85
+ if ( loader.dataset && loader.dataset.showCloseTime ) {
86
+ var showCloseTime = parseInt( loader.dataset.showCloseTime ),
87
+ closeBtn = loader.getElementsByClassName( 'loader-close-button' );
88
+ if ( showCloseTime && closeBtn.length ) {
89
+ setTimeout( function() {
90
+ closeBtn[0].style.display = '';
91
+ }, showCloseTime );
92
+ closeBtn[0].addEventListener( 'click', function( e ) {
93
+ loftloader_finished();
94
+ } );
95
+ }
96
+ }
97
+ }
98
+ } ) ();
99
+ </script> <?php
100
+ }
101
+ }
102
  /**
103
  * @description custom css for front end
104
  */
105
+ public function loader_custom_styles() {
106
+ $color = esc_attr( $this->get_loader_setting( 'loftloader_loader_color' ) );
107
+ $bgColor = esc_attr( $this->get_loader_setting( 'loftloader_bg_color' ) );
108
+ $bgOpacity = intval( $this->get_loader_setting('loftloader_bg_opacity' ) ) / 100;
109
 
110
+ $styles = $this->generate_style(
111
+ 'loftloader-lite-custom-bg-color',
112
+ '#loftloader-wrapper .loader-section {' . PHP_EOL . "\t" . 'background: ' . $bgColor . ';' . PHP_EOL . '}' . PHP_EOL
113
+ );
114
+ $styles .= $this->generate_style(
115
+ 'loftloader-lite-custom-bg-opacity',
116
+ '#loftloader-wrapper .loader-section {' . PHP_EOL . "\t" . 'opacity: ' . $bgOpacity . ';' . PHP_EOL . '}' . PHP_EOL
117
+ );
118
  $css = '';
119
+ switch ( $this->type ) {
120
  case 'sun':
121
  $css = '#loftloader-wrapper.pl-sun #loader {' . PHP_EOL . "\t" . 'color: ' . $color . ';' . PHP_EOL . '}' . PHP_EOL;
122
  break;
142
  $css = '#loftloader-wrapper.pl-beating #loader {' . PHP_EOL . "\t" . 'color: ' . $color . ';' . PHP_EOL . '}' . PHP_EOL;
143
  break;
144
  }
145
+ $styles .= $this->generate_style( 'loftloader-lite-custom-loader', $css );
146
+ echo wp_kses( $styles, array(
147
+ 'style' => array( 'type' => array(), 'id' => array(), 'media' => array() )
148
+ ) );
149
  }
150
  /**
151
  * @description loftloader html
152
  */
153
+ public function show_loader_html( $origin ) {
154
+ if ( ! empty( $origin ) ) {
155
+ $regexp ='/(<body[^>]*>)/i';
156
+ $split = preg_split( $regexp, $origin, 3, PREG_SPLIT_DELIM_CAPTURE );
157
+ if ( is_array( $split ) && ( 3 <= count( $split ) ) ) {
158
+ $image = esc_url($this->get_loader_setting('loftloader_custom_img'));
159
+ $ending = esc_attr($this->get_loader_setting('loftloader_bg_animation'));
160
 
161
+ $html = '<div id="loftloader-wrapper" class="pl-' . $this->type . '"' . $this->loader_attributes() . '>';
162
+ $html .= '<div class="loader-inner"><div id="loader">';
163
+ $html .= in_array($this->type, array('frame', 'imgloading'))
164
+ ? ('<span></span>' . (empty($image) ? '' : ('<img src="' . $image . '" alt="preloder">'))) : '<span></span>';
165
+ $html .= '</div></div>';
166
+ switch($ending){
167
+ case 'fade':
168
+ $html .= '<div class="loader-section section-fade"></div>';
169
+ break;
170
+ case 'up':
171
+ $html .= '<div class="loader-section section-slide-up"></div>';
172
+ break;
173
+ case 'split-v':
174
+ $html .= '<div class="loader-section section-up"></div>';
175
+ $html .= '<div class="loader-section section-down"></div>';
176
+ break;
177
+ default:
178
+ $html .= '<div class="loader-section section-left">';
179
+ $html .= '</div><div class="loader-section section-right"></div>';
180
+ }
181
 
182
+ if(!is_customize_preview()){
183
+ $close_description = $this->get_loader_setting('loftloader_show_close_tip');
184
+ $html .= sprintf(
185
+ '<div class="loader-close-button" style="display: none;"><span class="screen-reader-text">%s</span>%s</div>',
186
+ esc_html__('Close', 'loftloader'),
187
+ empty($close_description) ? '' : sprintf('<span class="close-des">%s</span>', $close_description)
188
+ );
189
+ }
190
+ $html .= '</div>';
191
 
192
+ return $split[0] . $split[1] . $html . implode( '', array_slice( $split, 2 ) );
193
+ }
 
 
 
 
 
 
194
  }
195
+ return $origin;
196
  }
197
  /**
198
  * Helper function to add manual loader settings
199
  */
200
+ private function loader_attributes() {
201
  $attrs = '';
202
+ $show_close_time = $this->get_loader_setting( 'loftloader_show_close_timer' );
203
+ $show_close_time = number_format( $show_close_time, 0, '.', '' );
204
+ $attrs .= sprintf( ' data-show-close-time="%s"', esc_js( esc_attr( $show_close_time * 1000 ) ) );
205
+ return apply_filters( 'loftloader_loader_attributes', $attrs );
206
  }
207
  /**
208
  * Helper function to test whether show loftloader
209
  * @return boolean return true if loftloader enabled and display on current page, otherwise false
210
  */
211
+ private function loader_enabled() {
212
+ if ( ( $this->get_loader_setting( 'loftloader_main_switch' ) === 'on' ) ) {
213
+ $range = $this->get_loader_setting( 'loftloader_show_range' );
214
+ if ( ( $range === 'sitewide' ) || ( ( $range === 'homepage' ) && is_front_page() ) ) {
215
  return true;
216
+ } else {
 
217
  return false;
218
  }
219
+ } else {
220
+ return apply_filters( 'loftloader_loader_enabled', false );
 
221
  }
222
  }
223
  /**
224
  * Helper function get setting option
225
  */
226
+ private function get_loader_setting( $setting_id ) {
227
+ return apply_filters( 'loftloader_get_loader_setting', get_option( $setting_id, $this->defaults[ $setting_id ] ), $setting_id );
228
  }
229
  /**
230
  * Helper function generate styles
231
  */
232
+ private function generate_style( $id, $style ) {
233
  return '<style id="' . $id . '">' . $style . '</style>';
234
  }
235
  }
inc/class-loftloader-upgrade.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  if ( ! class_exists( 'LoftLoader_Upgrade' ) ) {
3
  class LoftLoader_Upgrade {
4
- private $version ='2.1.6';
5
  function __construct(){
6
  $old_version = get_option('loftloader_lite_version', '1.0');
7
  if(version_compare($old_version, $this->version, '<')){
1
  <?php
2
  if ( ! class_exists( 'LoftLoader_Upgrade' ) ) {
3
  class LoftLoader_Upgrade {
4
+ private $version ='2.1.7';
5
  function __construct(){
6
  $old_version = get_option('loftloader_lite_version', '1.0');
7
  if(version_compare($old_version, $this->version, '<')){
inc/configs/customize-advanced.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Load loftloader lite Any page related functions
4
+ *
5
+ * @since version 2.0.0
6
+ */
7
+ add_action( 'customize_register', 'loftloader_customize_advanced', 50 );
8
+ function loftloader_customize_advanced( $wp_customize ) {
9
+ global $loftloader_default_settings;
10
+
11
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_inline_js', array(
12
+ 'default' => $loftloader_default_settings['loftloader_inline_js'],
13
+ 'transport' => 'refresh',
14
+ 'type' => 'option',
15
+ 'sanitize_callback' => 'loftloader_sanitize_choice'
16
+ ) ) );
17
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_enable_any_page', array(
18
+ 'default' => $loftloader_default_settings['loftloader_enable_any_page'],
19
+ 'transport' => 'refresh',
20
+ 'type' => 'option',
21
+ 'sanitize_callback' => 'loftloader_sanitize_checkbox'
22
+ ) ) );
23
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_any_page_generation', array(
24
+ 'default' => esc_html__( 'Generate', 'loftloader' ),
25
+ 'transport' => 'postMessage',
26
+ 'type' => 'option',
27
+ 'sanitize_callback' => 'sanitize_text_field'
28
+ ) ) );
29
+
30
+ $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_customize_advanced', array(
31
+ 'title' => esc_html__( 'Advanced', 'loftloader' ),
32
+ 'description' => '',
33
+ 'priority' => 50
34
+ ) ) );
35
+
36
+ $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_inline_js', array(
37
+ 'type' => 'radio',
38
+ 'label' => esc_html__( 'How to Load LoftLoader\'s JavaScript', 'loftloader' ),
39
+ 'description' => '',
40
+ 'choices' => array(
41
+ '' => esc_html__( 'External JavaScript', 'loftloader' ),
42
+ 'inline' => esc_html__( 'Inline JavaScript', 'loftloader' )
43
+ ),
44
+ 'section' => 'loftloader_customize_advanced',
45
+ 'settings' => 'loftloader_inline_js'
46
+ ) ) );
47
+ $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_enable_any_page', array(
48
+ 'type' => 'check',
49
+ 'label' => esc_html__( 'Check to enable Any Page Extension', 'loftloader' ),
50
+ 'description' => '',
51
+ 'choices' => array( 'on' => '' ),
52
+ 'section' => 'loftloader_customize_advanced',
53
+ 'settings' => 'loftloader_enable_any_page'
54
+ ) ) );
55
+ $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_any_page_generation', array(
56
+ 'type' => 'loftloader-any-page',
57
+ 'label' => esc_html__( 'Generate LoftLoader Shortcode', 'loftloader' ),
58
+ 'description' => '',
59
+ 'section' => 'loftloader_customize_advanced',
60
+ 'settings' => 'loftloader_any_page_generation',
61
+ 'filter' => true,
62
+ 'parent_setting_id' => 'loftloader_enable_any_page',
63
+ 'show_filter' => array( 'on' )
64
+ ) ) );
65
+ }
inc/configs/customize-any-page.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- /**
3
- * Load loftloader lite Any page related functions
4
- *
5
- * @since version 2.0.0
6
- */
7
- add_action('customize_register', 'loftloader_customize_any_page', 50);
8
- function loftloader_customize_any_page($wp_customize){
9
- global $loftloader_default_settings;
10
-
11
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_enable_any_page', array(
12
- 'default' => $loftloader_default_settings['loftloader_enable_any_page'],
13
- 'transport' => 'refresh',
14
- 'type' => 'option',
15
- 'sanitize_callback' => 'loftloader_sanitize_checkbox'
16
- )));
17
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_any_page_generation', array(
18
- 'default' => esc_html__('Generate', 'loftloader'),
19
- 'transport' => 'postMessage',
20
- 'type' => 'option'
21
- )));
22
-
23
- $wp_customize->add_section(new LoftLoader_Customize_Section($wp_customize, 'loftloader_any_page', array(
24
- 'title' => esc_html__('Advanced', 'loftloader'),
25
- 'description' => '',
26
- 'priority' => 50
27
- )));
28
-
29
- $wp_customize->add_control(new LoftLoader_Customize_Control($wp_customize, 'loftloader_enable_any_page', array(
30
- 'type' => 'check',
31
- 'label' => esc_html__('Check to enable Any Page Extension', 'loftloader'),
32
- 'description' => '',
33
- 'choices' => array('on' => ''),
34
- 'section' => 'loftloader_any_page',
35
- 'settings' => 'loftloader_enable_any_page'
36
- )));
37
- $wp_customize->add_control(new LoftLoader_Customize_Control($wp_customize, 'loftloader_any_page_generation', array(
38
- 'type' => 'loftloader-any-page',
39
- 'label' => esc_html__('Generate LoftLoader Shortcode', 'loftloader'),
40
- 'description' => '',
41
- 'section' => 'loftloader_any_page',
42
- 'settings' => 'loftloader_any_page_generation',
43
- 'filter' => true,
44
- 'parent_setting_id' => 'loftloader_enable_any_page',
45
- 'show_filter' => array('on')
46
- )));
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/configs/customize-background.php CHANGED
@@ -4,64 +4,64 @@
4
  *
5
  * @since version 2.0.0
6
  */
7
- add_action('customize_register', 'loftloader_customize_background', 30);
8
- function loftloader_customize_background($wp_customize){
9
  global $loftloader_default_settings;
10
 
11
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_bg_color', array(
12
- 'default' => $loftloader_default_settings['loftloader_bg_color'],
13
- 'transport' => 'postMessage',
14
- 'type' => 'option',
15
  'sanitize_callback' => 'sanitize_hex_color'
16
- )));
17
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_bg_opacity', array(
18
- 'default' => $loftloader_default_settings['loftloader_bg_opacity'],
19
- 'transport' => 'postMessage',
20
- 'type' => 'option',
21
  'sanitize_callback' => 'absint'
22
- )));
23
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_bg_animation', array(
24
- 'default' => $loftloader_default_settings['loftloader_bg_animation'],
25
- 'transport' => 'refresh',
26
- 'type' => 'option',
27
  'sanitize_callback' => 'loftloader_sanitize_choice'
28
- )));
29
 
30
- $wp_customize->add_section(new LoftLoader_Customize_Section($wp_customize, 'loftloader_background', array(
31
- 'title' => esc_html__('Background', 'loftloader'),
32
  'description' => '',
33
  'priority' => 40
34
- )));
35
 
36
- $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'loftloader_bg_color', array(
37
- 'label' => esc_html__('Pick Color', 'loftloader'),
38
  'section' => 'loftloader_background',
39
  'settings' => 'loftloader_bg_color'
40
- )));
41
- $wp_customize->add_control(new LoftLoader_Customize_Slider_Control($wp_customize, 'loftloader_bg_opacity', array(
42
- 'type' => 'slider',
43
- 'label' => esc_html__('Opacity', 'loftloader'),
44
- 'input_attrs' => array(
45
  'data-default' => 100,
46
  'data-min' => 0,
47
  'data-max' => 100,
48
  'data-step' => 5
49
  ),
50
- 'input_class' => 'loaderbgopacity',
51
- 'section' => 'loftloader_background',
52
- 'settings' => 'loftloader_bg_opacity'
53
- )));
54
- $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'loftloader_bg_animation', array(
55
- 'type' => 'select',
56
- 'label' => esc_html__('Ending Animation', 'loftloader'),
57
- 'description' => esc_html__('Hover on preview area to see the result.', 'loftloader'),
58
- 'choices' => array(
59
- 'fade' => esc_html__('Fade', 'loftloader'),
60
- 'split-h' => esc_html__('Slide Left & Right', 'loftloader'),
61
- 'up' => esc_html__('Slide Up', 'loftloader'),
62
- 'split-v' => esc_html__('Slide Up & Down', 'loftloader')
63
  ),
64
- 'section' => 'loftloader_background',
65
- 'settings' => 'loftloader_bg_animation'
66
- )));
67
  }
4
  *
5
  * @since version 2.0.0
6
  */
7
+ add_action( 'customize_register', 'loftloader_customize_background', 30 );
8
+ function loftloader_customize_background( $wp_customize ) {
9
  global $loftloader_default_settings;
10
 
11
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_bg_color', array(
12
+ 'default' => $loftloader_default_settings['loftloader_bg_color'],
13
+ 'transport' => 'postMessage',
14
+ 'type' => 'option',
15
  'sanitize_callback' => 'sanitize_hex_color'
16
+ ) ) );
17
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_bg_opacity', array(
18
+ 'default' => $loftloader_default_settings['loftloader_bg_opacity'],
19
+ 'transport' => 'postMessage',
20
+ 'type' => 'option',
21
  'sanitize_callback' => 'absint'
22
+ ) ) );
23
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_bg_animation', array(
24
+ 'default' => $loftloader_default_settings['loftloader_bg_animation'],
25
+ 'transport' => 'refresh',
26
+ 'type' => 'option',
27
  'sanitize_callback' => 'loftloader_sanitize_choice'
28
+ ) ) );
29
 
30
+ $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_background', array(
31
+ 'title' => esc_html__( 'Background', 'loftloader' ),
32
  'description' => '',
33
  'priority' => 40
34
+ ) ) );
35
 
36
+ $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'loftloader_bg_color', array(
37
+ 'label' => esc_html__( 'Pick Color', 'loftloader' ),
38
  'section' => 'loftloader_background',
39
  'settings' => 'loftloader_bg_color'
40
+ ) ) );
41
+ $wp_customize->add_control( new LoftLoader_Customize_Slider_Control( $wp_customize, 'loftloader_bg_opacity', array(
42
+ 'type' => 'slider',
43
+ 'label' => esc_html__( 'Opacity', 'loftloader' ),
44
+ 'input_attrs' => array(
45
  'data-default' => 100,
46
  'data-min' => 0,
47
  'data-max' => 100,
48
  'data-step' => 5
49
  ),
50
+ 'input_class' => 'loaderbgopacity',
51
+ 'section' => 'loftloader_background',
52
+ 'settings' => 'loftloader_bg_opacity'
53
+ ) ) );
54
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'loftloader_bg_animation', array(
55
+ 'type' => 'select',
56
+ 'label' => esc_html__( 'Ending Animation', 'loftloader' ),
57
+ 'description' => esc_html__( 'Hover on preview area to see the result.', 'loftloader' ),
58
+ 'choices' => array(
59
+ 'fade' => esc_html__( 'Fade', 'loftloader' ),
60
+ 'split-h' => esc_html__( 'Slide Left & Right', 'loftloader' ),
61
+ 'up' => esc_html__( 'Slide Up', 'loftloader' ),
62
+ 'split-v' => esc_html__( 'Slide Up & Down', 'loftloader' )
63
  ),
64
+ 'section' => 'loftloader_background',
65
+ 'settings' => 'loftloader_bg_animation'
66
+ ) ) );
67
  }
inc/configs/customize-loader.php CHANGED
@@ -4,86 +4,86 @@
4
  *
5
  * @since version 2.0.0
6
  */
7
- add_action('customize_register', 'loftloader_customize_loader', 40);
8
- function loftloader_customize_loader($wp_customize){
9
  global $loftloader_default_settings;
10
 
11
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_loader_type', array(
12
- 'default' => $loftloader_default_settings['loftloader_loader_type'],
13
- 'transport' => 'refresh',
14
- 'type' => 'option',
15
  'sanitize_callback' => 'loftloader_sanitize_choice'
16
- )));
17
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_loader_color', array(
18
- 'default' => $loftloader_default_settings['loftloader_loader_color'],
19
- 'transport' => 'refresh',
20
- 'type' => 'option',
21
  'sanitize_callback' => 'sanitize_hex_color'
22
- )));
23
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_custom_img', array(
24
- 'default' => $loftloader_default_settings['loftloader_custom_img'],
25
- 'transport' => 'refresh',
26
- 'type' => 'option',
27
  'sanitize_callback' => 'esc_url_raw'
28
- )));
29
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_img_width', array(
30
- 'default' => $loftloader_default_settings['loftloader_img_width'],
31
- 'transport' => 'refresh',
32
- 'type' => 'option',
33
  'sanitize_callback' => 'absint'
34
- )));
35
 
36
- $wp_customize->add_section(new LoftLoader_Customize_Section($wp_customize, 'loftloader_loader', array(
37
- 'title' => esc_html__('Loader', 'loftloader'),
38
  'description' => '',
39
  'priority' => 50
40
- )));
41
 
42
  // Controls for section loader
43
- $wp_customize->add_control(new LoftLoader_Customize_Animation_Types_Control($wp_customize, 'loftloader_loader_type', array(
44
- 'type' => 'radio',
45
- 'label' => esc_html__('Loader Animation', 'loftloader'),
46
- 'description' => sprintf(esc_html__('Some support custom image.', 'loftloader'), '<strong>', '</strong>'),
47
- 'choices' => array(
48
- 'sun' => array('label' => esc_html__('Spinning Sun', 'loftloader')),
49
- 'circles' => array('label' => esc_html__('Luminous Circles', 'loftloader')),
50
- 'wave' => array('label' => esc_html__('Wave', 'loftloader')),
51
- 'square' => array('label' => esc_html__('Spinning Square', 'loftloader')),
52
- 'frame' => array('label' => esc_html__('Drawing Frame', 'loftloader')),
53
- 'imgloading' => array('label' => esc_html__('Custom Image Loading', 'loftloader')),
54
- 'beating' => array('label' => esc_html__('Beating', 'loftloader'))
55
  ),
56
- 'section' => 'loftloader_loader',
57
- 'settings' => 'loftloader_loader_type'
58
- )));
59
- $wp_customize->add_control(new LoftLoader_Customize_Color_Control($wp_customize, 'loftloader_loader_color', array(
60
- 'label' => esc_html__('Pick Color', 'loftloader'),
61
- 'section' => 'loftloader_loader',
62
- 'settings' => 'loftloader_loader_color',
63
- 'filter' => true,
64
  'parent_setting_id' => 'loftloader_loader_type',
65
- 'show_filter' => array('sun', 'circles', 'wave', 'square', 'frame', 'beating')
66
- )));
67
- $wp_customize->add_control(new LoftLoader_Customize_Image_Control($wp_customize, 'loftloader_custom_img', array(
68
- 'type' => 'image',
69
- 'label' => esc_html__('Upload Image', 'loftloader'),
70
- 'description' => '',
71
- 'section' => 'loftloader_loader',
72
- 'settings' => 'loftloader_custom_img',
73
- 'filter' => true,
74
  'parent_setting_id' => 'loftloader_loader_type',
75
- 'show_filter' => array('frame', 'imgloading')
76
- )));
77
- $wp_customize->add_control(new LoftLoader_Customize_Number_Text_Control($wp_customize, 'loftloader_img_width', array(
78
- 'type' => 'number',
79
- 'label' => esc_html__('Image Width', 'loftloader'),
80
- 'section' => 'loftloader_loader',
81
- 'settings' => 'loftloader_img_width',
82
- 'after_text' => 'px',
83
- 'input_class' => 'loaderimgwidth',
84
- 'input_wrap_class' => 'imgwidth',
85
- 'filter' => true,
86
  'parent_setting_id' => 'loftloader_loader_type',
87
- 'show_filter' => array('imgloading')
88
- )));
89
  }
4
  *
5
  * @since version 2.0.0
6
  */
7
+ add_action( 'customize_register', 'loftloader_customize_loader', 40 );
8
+ function loftloader_customize_loader( $wp_customize ) {
9
  global $loftloader_default_settings;
10
 
11
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_loader_type', array(
12
+ 'default' => $loftloader_default_settings['loftloader_loader_type'],
13
+ 'transport' => 'refresh',
14
+ 'type' => 'option',
15
  'sanitize_callback' => 'loftloader_sanitize_choice'
16
+ ) ) );
17
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_loader_color', array(
18
+ 'default' => $loftloader_default_settings['loftloader_loader_color'],
19
+ 'transport' => 'refresh',
20
+ 'type' => 'option',
21
  'sanitize_callback' => 'sanitize_hex_color'
22
+ ) ) );
23
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_custom_img', array(
24
+ 'default' => $loftloader_default_settings['loftloader_custom_img'],
25
+ 'transport' => 'refresh',
26
+ 'type' => 'option',
27
  'sanitize_callback' => 'esc_url_raw'
28
+ ) ) );
29
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_img_width', array(
30
+ 'default' => $loftloader_default_settings['loftloader_img_width'],
31
+ 'transport' => 'refresh',
32
+ 'type' => 'option',
33
  'sanitize_callback' => 'absint'
34
+ ) ) );
35
 
36
+ $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_loader', array(
37
+ 'title' => esc_html__( 'Loader', 'loftloader' ),
38
  'description' => '',
39
  'priority' => 50
40
+ ) ) );
41
 
42
  // Controls for section loader
43
+ $wp_customize->add_control( new LoftLoader_Customize_Animation_Types_Control( $wp_customize, 'loftloader_loader_type', array(
44
+ 'type' => 'radio',
45
+ 'label' => esc_html__( 'Loader Animation', 'loftloader' ),
46
+ 'description' => sprintf( esc_html__( 'Some support custom image.', 'loftloader' ), '<strong>', '</strong>'),
47
+ 'choices' => array(
48
+ 'sun' => array( 'label' => esc_html__( 'Spinning Sun', 'loftloader' ) ),
49
+ 'circles' => array( 'label' => esc_html__( 'Luminous Circles', 'loftloader' ) ),
50
+ 'wave' => array( 'label' => esc_html__( 'Wave', 'loftloader' ) ),
51
+ 'square' => array( 'label' => esc_html__( 'Spinning Square', 'loftloader' ) ),
52
+ 'frame' => array( 'label' => esc_html__( 'Drawing Frame', 'loftloader' ) ),
53
+ 'imgloading' => array( 'label' => esc_html__( 'Custom Image Loading', 'loftloader' ) ),
54
+ 'beating' => array( 'label' => esc_html__( 'Beating', 'loftloader' ) )
55
  ),
56
+ 'section' => 'loftloader_loader',
57
+ 'settings' => 'loftloader_loader_type'
58
+ ) ) );
59
+ $wp_customize->add_control( new LoftLoader_Customize_Color_Control( $wp_customize, 'loftloader_loader_color', array(
60
+ 'label' => esc_html__( 'Pick Color', 'loftloader' ),
61
+ 'section' => 'loftloader_loader',
62
+ 'settings' => 'loftloader_loader_color',
63
+ 'filter' => true,
64
  'parent_setting_id' => 'loftloader_loader_type',
65
+ 'show_filter' => array( 'sun', 'circles', 'wave', 'square', 'frame', 'beating' )
66
+ ) ) );
67
+ $wp_customize->add_control( new LoftLoader_Customize_Image_Control( $wp_customize, 'loftloader_custom_img', array(
68
+ 'type' => 'image',
69
+ 'label' => esc_html__( 'Upload Image', 'loftloader' ),
70
+ 'description' => '',
71
+ 'section' => 'loftloader_loader',
72
+ 'settings' => 'loftloader_custom_img',
73
+ 'filter' => true,
74
  'parent_setting_id' => 'loftloader_loader_type',
75
+ 'show_filter' => array( 'frame', 'imgloading' )
76
+ ) ) );
77
+ $wp_customize->add_control( new LoftLoader_Customize_Number_Text_Control( $wp_customize, 'loftloader_img_width', array(
78
+ 'type' => 'number',
79
+ 'label' => esc_html__( 'Image Width', 'loftloader' ),
80
+ 'section' => 'loftloader_loader',
81
+ 'settings' => 'loftloader_img_width',
82
+ 'after_text' => 'px',
83
+ 'input_class' => 'loaderimgwidth',
84
+ 'input_wrap_class' => 'imgwidth',
85
+ 'filter' => true,
86
  'parent_setting_id' => 'loftloader_loader_type',
87
+ 'show_filter' => array( 'imgloading' )
88
+ ) ) );
89
  }
inc/configs/customize-main.php CHANGED
@@ -4,28 +4,28 @@
4
  *
5
  * @since version 2.0.0
6
  */
7
- add_action('customize_register', 'loftloader_customize_main', 10);
8
- function loftloader_customize_main($wp_customize){
9
  global $loftloader_default_settings;
10
 
11
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_main_switch', array(
12
  'default' => $loftloader_default_settings['loftloader_main_switch'],
13
  'transport' => 'refresh',
14
  'type' => 'option',
15
  'sanitize_callback' => 'loftloader_sanitize_checkbox'
16
- )));
17
 
18
- $wp_customize->add_section(new LoftLoader_Customize_Section($wp_customize, 'loftloader_switch', array(
19
  'title' => esc_html__('Enable LoftLoader', 'loftloader'),
20
  'type' => 'loftloader_switch',
21
  'priority' => 10,
22
- )));
23
 
24
- $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'loftloader_main_switch', array(
25
  'type' => 'checkbox',
26
- 'label' => esc_html__('Enable LoftLoader', 'loftloader'),
27
  'choices' => array('on' => ''),
28
  'section' => 'loftloader_switch',
29
  'settings' => 'loftloader_main_switch'
30
- )));
31
  }
4
  *
5
  * @since version 2.0.0
6
  */
7
+ add_action( 'customize_register', 'loftloader_customize_main', 10 );
8
+ function loftloader_customize_main( $wp_customize ) {
9
  global $loftloader_default_settings;
10
 
11
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_main_switch', array(
12
  'default' => $loftloader_default_settings['loftloader_main_switch'],
13
  'transport' => 'refresh',
14
  'type' => 'option',
15
  'sanitize_callback' => 'loftloader_sanitize_checkbox'
16
+ ) ) );
17
 
18
+ $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_switch', array(
19
  'title' => esc_html__('Enable LoftLoader', 'loftloader'),
20
  'type' => 'loftloader_switch',
21
  'priority' => 10,
22
+ ) ) );
23
 
24
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'loftloader_main_switch', array(
25
  'type' => 'checkbox',
26
+ 'label' => esc_html__( 'Enable LoftLoader', 'loftloader' ),
27
  'choices' => array('on' => ''),
28
  'section' => 'loftloader_switch',
29
  'settings' => 'loftloader_main_switch'
30
+ ) ) );
31
  }
inc/configs/customize-more.php CHANGED
@@ -4,32 +4,32 @@
4
  *
5
  * @since version 2.1.3
6
  */
7
- add_action('customize_register', 'loftloader_customize_more', 45);
8
- function loftloader_customize_more($wp_customize){
9
  global $loftloader_default_settings;
10
 
11
- $wp_customize->add_section(new LoftLoader_Customize_Section($wp_customize, 'loftloader_section_more', array(
12
- 'title' => esc_html__('More', 'loftloader'),
13
  'description' => '',
14
  'priority' => 50
15
- )));
16
 
17
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_show_close_timer', array(
18
  'default' => $loftloader_default_settings['loftloader_show_close_timer'],
19
  'transport' => 'postMessage',
20
  'type' => 'option',
21
  'sanitize_callback' => 'absint'
22
- )));
23
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_show_close_tip', array(
24
  'default' => $loftloader_default_settings['loftloader_show_close_tip'],
25
  'transport' => 'postMessage',
26
  'type' => 'option',
27
  'sanitize_callback' => 'sanitize_text_field'
28
- )));
29
 
30
- $wp_customize->add_control(new LoftLoader_Customize_Slider_Control($wp_customize, 'loftloader_show_close_timer', array(
31
  'type' => 'slider',
32
- 'label' => esc_html__('Show Close Button after', 'loftloader'),
33
  'after_text' => 'second(s)',
34
  'input_attrs' => array(
35
  'data-default' => '15',
@@ -40,11 +40,11 @@ function loftloader_customize_more($wp_customize){
40
  'input_class' => 'loftloader-show-close-timer',
41
  'section' => 'loftloader_section_more',
42
  'settings' => 'loftloader_show_close_timer'
43
- )));
44
- $wp_customize->add_control(new LoftLoader_Customize_Control($wp_customize, 'loftloader_show_close_tip', array(
45
  'type' => 'text',
46
- 'label' => esc_html__('Description for Close Button', 'loftloader'),
47
  'section' => 'loftloader_section_more',
48
  'settings' => 'loftloader_show_close_tip'
49
- )));
50
  }
4
  *
5
  * @since version 2.1.3
6
  */
7
+ add_action( 'customize_register', 'loftloader_customize_more', 45 );
8
+ function loftloader_customize_more( $wp_customize ) {
9
  global $loftloader_default_settings;
10
 
11
+ $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_section_more', array(
12
+ 'title' => esc_html__( 'More', 'loftloader' ),
13
  'description' => '',
14
  'priority' => 50
15
+ ) ) );
16
 
17
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_show_close_timer', array(
18
  'default' => $loftloader_default_settings['loftloader_show_close_timer'],
19
  'transport' => 'postMessage',
20
  'type' => 'option',
21
  'sanitize_callback' => 'absint'
22
+ ) ) );
23
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_show_close_tip', array(
24
  'default' => $loftloader_default_settings['loftloader_show_close_tip'],
25
  'transport' => 'postMessage',
26
  'type' => 'option',
27
  'sanitize_callback' => 'sanitize_text_field'
28
+ ) ) );
29
 
30
+ $wp_customize->add_control( new LoftLoader_Customize_Slider_Control( $wp_customize, 'loftloader_show_close_timer', array(
31
  'type' => 'slider',
32
+ 'label' => esc_html__( 'Show Close Button after', 'loftloader' ),
33
  'after_text' => 'second(s)',
34
  'input_attrs' => array(
35
  'data-default' => '15',
40
  'input_class' => 'loftloader-show-close-timer',
41
  'section' => 'loftloader_section_more',
42
  'settings' => 'loftloader_show_close_timer'
43
+ ) ) );
44
+ $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_show_close_tip', array(
45
  'type' => 'text',
46
+ 'label' => esc_html__( 'Description for Close Button', 'loftloader' ),
47
  'section' => 'loftloader_section_more',
48
  'settings' => 'loftloader_show_close_tip'
49
+ ) ) );
50
  }
inc/configs/customize-promo.php CHANGED
@@ -4,26 +4,27 @@
4
  *
5
  * @since version 2.0.0
6
  */
7
- add_action('customize_register', 'loftloader_customize_promotion', 100);
8
- function loftloader_customize_promotion($wp_customize){
9
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_promo', array(
10
- 'default' => '',
11
- 'transport' => 'postMessage',
12
- 'type' => 'option'
13
- )));
 
14
 
15
- $wp_customize->add_section(new WP_Customize_Section($wp_customize, 'loftloader_promo', array(
16
- 'title' => esc_html__('Upgrade to Pro', 'loftloader'),
17
  'description' => '',
18
  'priority' => 100
19
- )));
20
 
21
- $wp_customize->add_control(new LoftLoader_Customize_Control($wp_customize, 'loftloader_promo', array(
22
  'type' => 'loftloader-ad',
23
  'label' => '',
24
  'img' => LOFTLOADER_URI . 'assets/img/pro-ad.jpg',
25
- 'href' => esc_url('https://codecanyon.net/item/loftloader-pro-preloader-plugin-for-wordpress/17339671?ref=LoftOcean'),
26
  'section' => 'loftloader_promo',
27
  'settings' => 'loftloader_promo'
28
- )));
29
  }
4
  *
5
  * @since version 2.0.0
6
  */
7
+ add_action( 'customize_register', 'loftloader_customize_promotion', 100 );
8
+ function loftloader_customize_promotion( $wp_customize ) {
9
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_promo', array(
10
+ 'default' => '',
11
+ 'transport' => 'postMessage',
12
+ 'type' => 'option',
13
+ 'sanitize_callback' => 'sanitize_text_field'
14
+ ) ) );
15
 
16
+ $wp_customize->add_section( new WP_Customize_Section( $wp_customize, 'loftloader_promo', array(
17
+ 'title' => esc_html__( 'Upgrade to Pro', 'loftloader' ),
18
  'description' => '',
19
  'priority' => 100
20
+ ) ) );
21
 
22
+ $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_promo', array(
23
  'type' => 'loftloader-ad',
24
  'label' => '',
25
  'img' => LOFTLOADER_URI . 'assets/img/pro-ad.jpg',
26
+ 'href' => esc_url( 'https://codecanyon.net/item/loftloader-pro-preloader-plugin-for-wordpress/17339671?ref=LoftOcean' ),
27
  'section' => 'loftloader_promo',
28
  'settings' => 'loftloader_promo'
29
+ ) ) );
30
  }
inc/configs/customize-range.php CHANGED
@@ -4,31 +4,31 @@
4
  *
5
  * @since version 2.0.0
6
  */
7
- add_action('customize_register', 'loftloader_customize_range', 20);
8
- function loftloader_customize_range($wp_customize){
9
  global $loftloader_default_settings;
10
 
11
- $wp_customize->add_setting(new WP_Customize_Setting($wp_customize, 'loftloader_show_range', array(
12
- 'default' => $loftloader_default_settings['loftloader_show_range'],
13
- 'transport' => 'refresh',
14
- 'type' => 'option',
15
  'sanitize_callback' => 'loftloader_sanitize_choice'
16
- )));
17
 
18
- $wp_customize->add_section(new LoftLoader_Customize_Section($wp_customize, 'loftloader_range', array(
19
- 'title' => esc_html__('Display on', 'loftloader'),
20
  'description' => '',
21
  'priority' => 20
22
- )));
23
 
24
- $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'loftloader_show_range', array(
25
- 'type' => 'radio',
26
- 'label' => '',
27
- 'choices' => array(
28
- 'sitewide' => esc_html__('Sitewide', 'loftloader'),
29
- 'homepage' => esc_html__('Homepage only', 'loftloader')
30
  ),
31
- 'section' => 'loftloader_range',
32
- 'settings' => 'loftloader_show_range'
33
- )));
34
  }
4
  *
5
  * @since version 2.0.0
6
  */
7
+ add_action( 'customize_register', 'loftloader_customize_range', 20 );
8
+ function loftloader_customize_range( $wp_customize ) {
9
  global $loftloader_default_settings;
10
 
11
+ $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_show_range', array(
12
+ 'default' => $loftloader_default_settings['loftloader_show_range'],
13
+ 'transport' => 'refresh',
14
+ 'type' => 'option',
15
  'sanitize_callback' => 'loftloader_sanitize_choice'
16
+ ) ) );
17
 
18
+ $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_range', array(
19
+ 'title' => esc_html__( 'Display on', 'loftloader' ),
20
  'description' => '',
21
  'priority' => 20
22
+ ) ) );
23
 
24
+ $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'loftloader_show_range', array(
25
+ 'type' => 'radio',
26
+ 'label' => '',
27
+ 'choices' => array(
28
+ 'sitewide' => esc_html__( 'Sitewide', 'loftloader' ),
29
+ 'homepage' => esc_html__( 'Homepage only', 'loftloader' )
30
  ),
31
+ 'section' => 'loftloader_range',
32
+ 'settings' => 'loftloader_show_range'
33
+ ) ) );
34
  }
inc/configs/default-settings.php CHANGED
@@ -8,20 +8,21 @@
8
  global $loftloader_default_settings;
9
 
10
  $loftloader_default_settings = array(
11
- 'loftloader_main_switch' => 'on',
12
- 'loftloader_show_range' => 'sitewide',
13
 
14
- 'loftloader_bg_color' => '#000000',
15
- 'loftloader_bg_opacity' => 95,
16
- 'loftloader_bg_animation' => 'fade',
17
 
18
- 'loftloader_loader_type' => 'sun',
19
- 'loftloader_loader_color' => '#248acc',
20
- 'loftloader_custom_img' => LOFTLOADER_URI . 'assets/img/loftloader-logo.png',
21
- 'loftloader_img_width' => 76,
22
 
23
  'loftloader_show_close_timer' => 15,
24
  'loftloader_show_close_tip' => '',
25
 
26
- 'loftloader_enable_any_page' => ''
 
27
  );
8
  global $loftloader_default_settings;
9
 
10
  $loftloader_default_settings = array(
11
+ 'loftloader_main_switch' => 'on',
12
+ 'loftloader_show_range' => 'sitewide',
13
 
14
+ 'loftloader_bg_color' => '#000000',
15
+ 'loftloader_bg_opacity' => 95,
16
+ 'loftloader_bg_animation' => 'fade',
17
 
18
+ 'loftloader_loader_type' => 'sun',
19
+ 'loftloader_loader_color' => '#248acc',
20
+ 'loftloader_custom_img' => LOFTLOADER_URI . 'assets/img/loftloader-logo.png',
21
+ 'loftloader_img_width' => 76,
22
 
23
  'loftloader_show_close_timer' => 15,
24
  'loftloader_show_close_tip' => '',
25
 
26
+ 'loftloader_inline_js' => '',
27
+ 'loftloader_enable_any_page' => ''
28
  );
languages/loftloader.pot CHANGED
@@ -1,60 +1,72 @@
1
- # Copyright (C) 2018 LoftLoader
2
  # This file is distributed under the same license as the LoftLoader package.
3
  #, fuzzy
4
  msgid ""
5
  msgstr ""
6
- "Project-Id-Version: LoftLoader 2.1.6\n"
7
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/loftloader\n"
8
- "POT-Creation-Date: 2018-11-17 17:03+0800\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: Suihai <cain@loftocean.com>\n"
14
  "Language-Team: Loft Ocean <cain@loftocean.com>\n"
15
- "X-Generator: Poedit 2.2\n"
16
 
17
  #: inc/any-page/class-loftloader-any-page.php:24
18
  msgid "LoftLoader Any Page Shortcode"
19
  msgstr ""
20
 
21
- #: inc/class-loftloader-customize.php:55 loftloader.php:85
22
  msgid "LoftLoader Lite"
23
  msgstr ""
24
 
25
- #: inc/class-loftloader-customize.php:94 inc/class-loftloader-customize.php:118
26
  msgid "Setting"
27
  msgstr ""
28
 
29
- #: inc/class-loftloader-customize.php:108
30
  msgid "Press return or enter to open this section"
31
  msgstr ""
32
 
33
- #: inc/class-loftloader-customize.php:115
34
  msgid "Back"
35
  msgstr ""
36
 
37
- #: inc/class-loftloader-customize.php:161 inc/configs/customize-any-page.php:18
38
  msgid "Generate"
39
  msgstr ""
40
 
41
- #: inc/class-loftloader-customize.php:240
42
  msgid "More info"
43
  msgstr ""
44
 
45
- #: inc/class-loftloader-front.php:119
46
  msgid "Close"
47
  msgstr ""
48
 
49
- #: inc/configs/customize-any-page.php:24
50
  msgid "Advanced"
51
  msgstr ""
52
 
53
- #: inc/configs/customize-any-page.php:31
 
 
 
 
 
 
 
 
 
 
 
 
54
  msgid "Check to enable Any Page Extension"
55
  msgstr ""
56
 
57
- #: inc/configs/customize-any-page.php:39
58
  msgid "Generate LoftLoader Shortcode"
59
  msgstr ""
60
 
@@ -158,7 +170,7 @@ msgstr ""
158
  msgid "Description for Close Button"
159
  msgstr ""
160
 
161
- #: inc/configs/customize-promo.php:16
162
  msgid "Upgrade to Pro"
163
  msgstr ""
164
 
1
+ # Copyright (C) 2019 LoftLoader
2
  # This file is distributed under the same license as the LoftLoader package.
3
  #, fuzzy
4
  msgid ""
5
  msgstr ""
6
+ "Project-Id-Version: LoftLoader 2.1.7\n"
7
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/loftloader\n"
8
+ "POT-Creation-Date: 2019-05-14 10:59+0800\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: Suihai <cain@loftocean.com>\n"
14
  "Language-Team: Loft Ocean <cain@loftocean.com>\n"
15
+ "X-Generator: Poedit 2.2.1\n"
16
 
17
  #: inc/any-page/class-loftloader-any-page.php:24
18
  msgid "LoftLoader Any Page Shortcode"
19
  msgstr ""
20
 
21
+ #: inc/class-loftloader-customize.php:54 loftloader.php:85
22
  msgid "LoftLoader Lite"
23
  msgstr ""
24
 
25
+ #: inc/class-loftloader-customize.php:94 inc/class-loftloader-customize.php:121
26
  msgid "Setting"
27
  msgstr ""
28
 
29
+ #: inc/class-loftloader-customize.php:111
30
  msgid "Press return or enter to open this section"
31
  msgstr ""
32
 
33
+ #: inc/class-loftloader-customize.php:118
34
  msgid "Back"
35
  msgstr ""
36
 
37
+ #: inc/class-loftloader-customize.php:175 inc/configs/customize-advanced.php:24
38
  msgid "Generate"
39
  msgstr ""
40
 
41
+ #: inc/class-loftloader-customize.php:259
42
  msgid "More info"
43
  msgstr ""
44
 
45
+ #: inc/class-loftloader-front.php:186
46
  msgid "Close"
47
  msgstr ""
48
 
49
+ #: inc/configs/customize-advanced.php:31
50
  msgid "Advanced"
51
  msgstr ""
52
 
53
+ #: inc/configs/customize-advanced.php:38
54
+ msgid "How to Load LoftLoader's JavaScript"
55
+ msgstr ""
56
+
57
+ #: inc/configs/customize-advanced.php:41
58
+ msgid "External JavaScript"
59
+ msgstr ""
60
+
61
+ #: inc/configs/customize-advanced.php:42
62
+ msgid "Inline JavaScript"
63
+ msgstr ""
64
+
65
+ #: inc/configs/customize-advanced.php:49
66
  msgid "Check to enable Any Page Extension"
67
  msgstr ""
68
 
69
+ #: inc/configs/customize-advanced.php:57
70
  msgid "Generate LoftLoader Shortcode"
71
  msgstr ""
72
 
170
  msgid "Description for Close Button"
171
  msgstr ""
172
 
173
+ #: inc/configs/customize-promo.php:17
174
  msgid "Upgrade to Pro"
175
  msgstr ""
176
 
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.1.6
7
  Author: Loft Ocean
8
  Author URI: http://www.loftocean.com/
9
  Text Domain: loftloader
@@ -21,102 +21,106 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
21
  */
22
 
23
  // Not allowed by directly accessing.
24
- if(!defined('ABSPATH')){
25
- die(esc_html__('Access not allowed!', 'loftloader'));
26
  }
27
 
28
- if(!class_exists('LoftLoader')){
29
  /**
30
  * Define the constant used in this plugin
31
  */
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', '2018111901');
36
 
37
- class LoftLoader{
38
- public function __construct(){
39
- load_plugin_textdomain('loftloader');
40
 
41
  $this->load_upgrade();
42
  $this->load_customize();
43
 
44
- add_action('wp', array($this, 'load_front'));
45
- add_action('admin_menu', array($this, 'admin_menu'));
46
- add_filter('plugin_action_links_' . LOFTLOADER_NAME, array($this, 'plugin_action_links'));
47
  }
48
  /**
49
  * For LoftLoader customize, load the customize related functions
50
  */
51
- function load_upgrade(){
52
  require_once LOFTLOADER_ROOT . 'inc/class-loftloader-upgrade.php';
53
  }
54
  /**
55
  * For LoftLoader upgrade, load the upgrade related functions
56
  */
57
- function load_customize(){
58
  require_once LOFTLOADER_ROOT . 'inc/class-loftloader-customize.php';
59
  }
60
 
61
  /**
62
  * For LoftLoader front, load the front end related functions
63
  */
64
- function load_front(){
65
  require_once LOFTLOADER_ROOT . 'inc/class-loftloader-front.php';
66
  }
67
 
68
  /**
69
  * Add new setting link to loftloader
70
  */
71
- function plugin_action_links($links){
72
  $customize_url = $this->get_customize_uri();
73
  $action_links = array(
74
  'settings' => '<a href="' . $customize_url . '" title="' . esc_attr__('View LoftLoader Settings', 'loftloader') . '">' . esc_html__('Settings', 'loftloader') . '</a>'
75
  );
76
- return array_merge($action_links, $links);
77
  }
78
 
79
  /**
80
  * Add an admin menu for loftloader
81
  */
82
- function admin_menu(){
83
  global $submenu;
84
  $customize_url = $this->get_customize_uri();
85
- $submenu['options-general.php'][] = array(esc_html__('LoftLoader Lite', 'loftloader'), 'manage_options', $customize_url, 'hide-if-no-customize');
86
  }
87
 
88
  /**
89
  * Helper function to get loftloader customize url
90
  * @return url loftloader customize uri
91
  */
92
- function get_customize_uri(){
93
- return add_query_arg(array('return' => urlencode(wp_unslash( $_SERVER['REQUEST_URI'])), 'plugin' => 'loftloader-lite'), 'customize.php');
 
 
 
 
94
  }
95
  }
96
 
97
  // Init loftloader lite
98
- add_action('after_setup_theme', 'loftloader_init');
99
- function loftloader_init(){
100
- if(!class_exists('LoftLoaderPro')){
101
  new LoftLoader();
102
  }
103
  }
104
 
105
- add_action('plugins_loaded', 'loftloader_any_page');
106
- function loftloader_any_page(){
107
- $enable_any_page = get_option('loftloader_enable_any_page', '');
108
- if($enable_any_page === 'on'){
109
  require_once LOFTLOADER_ROOT . 'inc/any-page/class-loftloader-any-page.php';
110
  }
111
  }
112
 
113
  // Remove widget panels
114
- add_filter('customize_loaded_components', 'loftloader_remove_widget_panels', 1000);
115
- function loftloader_remove_widget_panels($components){
116
- if(!class_exists('LoftLoaderPro') && (isset($_GET['plugin']) && ($_GET['plugin'] === 'loftloader-lite'))){
117
- foreach($components as $i => $c){
118
- if(false !== $i){
119
- unset($components[$i]);
120
  }
121
  }
122
  }
@@ -128,8 +132,8 @@ if(!class_exists('LoftLoader')){
128
  *
129
  * @return boolean
130
  */
131
- function loftloader_is_customize(){
132
  global $wp_customize;
133
- return (isset($_GET['plugin']) && ($_GET['plugin'] === 'loftloader-lite')) || (isset($wp_customize) && $wp_customize->is_preview() && !is_admin()) || defined('DOING_AJAX');
134
  }
135
  }
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.1.7
7
  Author: Loft Ocean
8
  Author URI: http://www.loftocean.com/
9
  Text Domain: loftloader
21
  */
22
 
23
  // Not allowed by directly accessing.
24
+ if ( ! defined( 'ABSPATH' ) ) {
25
+ die( esc_html__( 'Access not allowed!', 'loftloader' ) );
26
  }
27
 
28
+ if ( ! class_exists( 'LoftLoader' ) ) {
29
  /**
30
  * Define the constant used in this plugin
31
  */
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', '2019051401' );
36
 
37
+ class LoftLoader {
38
+ public function __construct() {
39
+ load_plugin_textdomain( 'loftloader' );
40
 
41
  $this->load_upgrade();
42
  $this->load_customize();
43
 
44
+ add_action( 'wp', array( $this, 'load_front' ) );
45
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
46
+ add_filter( 'plugin_action_links_' . LOFTLOADER_NAME, array( $this, 'plugin_action_links' ) );
47
  }
48
  /**
49
  * For LoftLoader customize, load the customize related functions
50
  */
51
+ function load_upgrade() {
52
  require_once LOFTLOADER_ROOT . 'inc/class-loftloader-upgrade.php';
53
  }
54
  /**
55
  * For LoftLoader upgrade, load the upgrade related functions
56
  */
57
+ function load_customize() {
58
  require_once LOFTLOADER_ROOT . 'inc/class-loftloader-customize.php';
59
  }
60
 
61
  /**
62
  * For LoftLoader front, load the front end related functions
63
  */
64
+ function load_front() {
65
  require_once LOFTLOADER_ROOT . 'inc/class-loftloader-front.php';
66
  }
67
 
68
  /**
69
  * Add new setting link to loftloader
70
  */
71
+ function plugin_action_links( $links ) {
72
  $customize_url = $this->get_customize_uri();
73
  $action_links = array(
74
  'settings' => '<a href="' . $customize_url . '" title="' . esc_attr__('View LoftLoader Settings', 'loftloader') . '">' . esc_html__('Settings', 'loftloader') . '</a>'
75
  );
76
+ return array_merge( $action_links, $links );
77
  }
78
 
79
  /**
80
  * Add an admin menu for loftloader
81
  */
82
+ function admin_menu() {
83
  global $submenu;
84
  $customize_url = $this->get_customize_uri();
85
+ $submenu['options-general.php'][] = array( esc_html__( 'LoftLoader Lite', 'loftloader' ), 'manage_options', $customize_url, 'hide-if-no-customize' );
86
  }
87
 
88
  /**
89
  * Helper function to get loftloader customize url
90
  * @return url loftloader customize uri
91
  */
92
+ function get_customize_uri() {
93
+ $return_url = '';
94
+ if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
95
+ $return_url = urlencode( sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
96
+ }
97
+ return add_query_arg( array('return' => $return_url, 'plugin' => 'loftloader-lite' ), 'customize.php' );
98
  }
99
  }
100
 
101
  // Init loftloader lite
102
+ add_action( 'after_setup_theme', 'loftloader_init' );
103
+ function loftloader_init() {
104
+ if ( ! class_exists( 'LoftLoaderPro' ) ) {
105
  new LoftLoader();
106
  }
107
  }
108
 
109
+ add_action( 'plugins_loaded', 'loftloader_any_page' );
110
+ function loftloader_any_page() {
111
+ $enable_any_page = get_option( 'loftloader_enable_any_page', '' );
112
+ if ( $enable_any_page === 'on' ) {
113
  require_once LOFTLOADER_ROOT . 'inc/any-page/class-loftloader-any-page.php';
114
  }
115
  }
116
 
117
  // Remove widget panels
118
+ add_filter( 'customize_loaded_components', 'loftloader_remove_widget_panels', 1000 );
119
+ function loftloader_remove_widget_panels( $components ) {
120
+ if ( ! class_exists( 'LoftLoaderPro' ) && ( isset( $_GET['plugin'] ) && ( $_GET['plugin'] === 'loftloader-lite' ) ) ) {
121
+ foreach ( $components as $i => $c ) {
122
+ if ( false !== $i ) {
123
+ unset( $components[ $i ] );
124
  }
125
  }
126
  }
132
  *
133
  * @return boolean
134
  */
135
+ function loftloader_is_customize() {
136
  global $wp_customize;
137
+ return ( isset($_GET['plugin'] ) && ( $_GET['plugin'] === 'loftloader-lite') ) || ( isset( $wp_customize ) && $wp_customize->is_preview() && ! is_admin() ) || defined( 'DOING_AJAX' );
138
  }
139
  }
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.3
6
- Tested up to: 5.0
7
- Stable tag: 2.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -23,7 +23,7 @@ Small and powerful. LoftLoader helps you to add a beautiful animated preloader t
23
  * 7 loading animation effects. 2 of them support custom image.
24
  * Unlimited background color. Also can change the opacity.
25
  * Unlimited loader color.
26
- * Can add different loaders for different pages on one site (New feature since v2.0).
27
  * Responsive & retina ready.
28
  * Option to enable/disable the preloader.
29
  * Option to enable preloader on site homepage only.
@@ -62,6 +62,8 @@ LoftLoader Pro is available. [Upgrade to pro version](https://codecanyon.net/ite
62
  * Option to enable smooth page transition effect. [Check the example](http://demo.loftocean.com/loftloader-transition/).
63
  * Choose to save customize styles as inline styles in &lt;head&gt; or as an external .css file.
64
  * Option to disable page scrolling while loading.
 
 
65
  * Purchase once, free lifetime update with new features.
66
 
67
  Check some [examples](http://www.loftocean.com/loftloader/example-13/) created by pro version.
@@ -92,6 +94,11 @@ Check some [examples](http://www.loftocean.com/loftloader/example-13/) created b
92
  8. Pro version: Load Time, Device Control & Smooth Page Transition
93
 
94
  == Changelog ==
 
 
 
 
 
95
  = 2.1.6 =
96
  * Improved: Any Page Extension meta box redesigned to fit in Gutenberg Sidebar
97
 
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.3
6
+ Tested up to: 5.2
7
+ Stable tag: 2.1.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
23
  * 7 loading animation effects. 2 of them support custom image.
24
  * Unlimited background color. Also can change the opacity.
25
  * Unlimited loader color.
26
+ * Can add different loaders for different pages on one site (New feature since v2.0. Only works for “Pages”.).
27
  * Responsive & retina ready.
28
  * Option to enable/disable the preloader.
29
  * Option to enable preloader on site homepage only.
62
  * Option to enable smooth page transition effect. [Check the example](http://demo.loftocean.com/loftloader-transition/).
63
  * Choose to save customize styles as inline styles in &lt;head&gt; or as an external .css file.
64
  * Option to disable page scrolling while loading.
65
+ * Can add different loaders for different Pages, Posts and custom post types (such as portfolios, products, etc.) on one site.
66
+ * Users can choose which elements to detect during the loading process (All elements / Images / Videos / Images & Videos).
67
  * Purchase once, free lifetime update with new features.
68
 
69
  Check some [examples](http://www.loftocean.com/loftloader/example-13/) created by pro version.
94
  8. Pro version: Load Time, Device Control & Smooth Page Transition
95
 
96
  == Changelog ==
97
+ = 2.1.7 =
98
+ * New: Option to choose how to load LoftLoader’s JavaScript (External or Inline)
99
+ * Fixed: Gutenberg “Update” button was not clickable after making changes only to Any Page Extension options
100
+ * Fixed: Minor CSS issues
101
+
102
  = 2.1.6 =
103
  * Improved: Any Page Extension meta box redesigned to fit in Gutenberg Sidebar
104