Changeset 2248622 for loftloader
- Timestamp:
- 02/22/2020 07:16:02 AM (6 years ago)
- Location:
- loftloader
- Files:
-
- 71 added
- 17 edited
-
tags/2.2.0 (added)
-
tags/2.2.0/assets (added)
-
tags/2.2.0/assets/css (added)
-
tags/2.2.0/assets/css/images (added)
-
tags/2.2.0/assets/css/images/ui-bg_flat_55_999999_40x100.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_flat_75_aaaaaa_40x100.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_glass_100_f6f6f6_1x400.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_glass_100_fdf5ce_1x400.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_glass_45_0078ae_1x400.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_glass_55_f8da4e_1x400.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_glass_75_79c9ec_1x400.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_gloss-wave_45_e14f1c_500x100.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_gloss-wave_50_6eac2c_500x100.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_gloss-wave_75_2191c0_500x100.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png (added)
-
tags/2.2.0/assets/css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_0078ae_256x240.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_056b93_256x240.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_acacac_256x240.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_e0fdff_256x240.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_ef8c08_256x240 1.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_ef8c08_256x240.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_f5e175_256x240.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_f7a50d_256x240.png (added)
-
tags/2.2.0/assets/css/images/ui-icons_fcd113_256x240.png (added)
-
tags/2.2.0/assets/css/jquery-ui.css (added)
-
tags/2.2.0/assets/css/loftloader-settings.css (added)
-
tags/2.2.0/assets/css/loftloader-settings.min.css (added)
-
tags/2.2.0/assets/css/loftloader.css (added)
-
tags/2.2.0/assets/css/loftloader.min.css (added)
-
tags/2.2.0/assets/img (added)
-
tags/2.2.0/assets/img/animation-options.png (added)
-
tags/2.2.0/assets/img/loftloader-logo.png (added)
-
tags/2.2.0/assets/img/pro-ad.jpg (added)
-
tags/2.2.0/assets/js (added)
-
tags/2.2.0/assets/js/customize.js (added)
-
tags/2.2.0/assets/js/customize.min.js (added)
-
tags/2.2.0/assets/js/loftloader.js (added)
-
tags/2.2.0/assets/js/loftloader.min.js (added)
-
tags/2.2.0/assets/js/preview.js (added)
-
tags/2.2.0/assets/js/preview.min.js (added)
-
tags/2.2.0/assets/scss (added)
-
tags/2.2.0/assets/scss/_loftloader-animation.scss (added)
-
tags/2.2.0/assets/scss/_loftloader-mixins.scss (added)
-
tags/2.2.0/assets/scss/loftloader-settings.scss (added)
-
tags/2.2.0/assets/scss/loftloader.scss (added)
-
tags/2.2.0/inc (added)
-
tags/2.2.0/inc/any-page (added)
-
tags/2.2.0/inc/any-page/class-any-page-filter.php (added)
-
tags/2.2.0/inc/any-page/class-loftloader-any-page.php (added)
-
tags/2.2.0/inc/any-page/gutenberg (added)
-
tags/2.2.0/inc/any-page/gutenberg/class-gutenberg-any-page.php (added)
-
tags/2.2.0/inc/any-page/gutenberg/plugin.js (added)
-
tags/2.2.0/inc/class-loftloader-customize.php (added)
-
tags/2.2.0/inc/class-loftloader-front.php (added)
-
tags/2.2.0/inc/class-loftloader-upgrade.php (added)
-
tags/2.2.0/inc/configs (added)
-
tags/2.2.0/inc/configs/customize-advanced.php (added)
-
tags/2.2.0/inc/configs/customize-background.php (added)
-
tags/2.2.0/inc/configs/customize-loader.php (added)
-
tags/2.2.0/inc/configs/customize-main.php (added)
-
tags/2.2.0/inc/configs/customize-more.php (added)
-
tags/2.2.0/inc/configs/customize-promo.php (added)
-
tags/2.2.0/inc/configs/customize-range.php (added)
-
tags/2.2.0/inc/configs/default-settings.php (added)
-
tags/2.2.0/languages (added)
-
tags/2.2.0/languages/loftloader.pot (added)
-
tags/2.2.0/loftloader.php (added)
-
tags/2.2.0/readme.txt (added)
-
trunk/assets/css/loftloader-settings.css (modified) (1 diff)
-
trunk/assets/css/loftloader.css (modified) (1 diff)
-
trunk/assets/js/customize.js (modified) (4 diffs)
-
trunk/assets/js/customize.min.js (modified) (1 diff)
-
trunk/assets/js/loftloader.js (modified) (2 diffs)
-
trunk/assets/js/loftloader.min.js (modified) (1 diff)
-
trunk/assets/scss/loftloader-settings.scss (modified) (12 diffs)
-
trunk/assets/scss/loftloader.scss (modified) (1 diff)
-
trunk/inc/any-page/class-any-page-filter.php (modified) (3 diffs)
-
trunk/inc/class-loftloader-customize.php (modified) (3 diffs)
-
trunk/inc/class-loftloader-front.php (modified) (1 diff)
-
trunk/inc/configs/customize-advanced.php (modified) (3 diffs)
-
trunk/inc/configs/customize-more.php (modified) (4 diffs)
-
trunk/inc/configs/default-settings.php (modified) (1 diff)
-
trunk/languages/loftloader.pot (modified) (4 diffs)
-
trunk/loftloader.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
loftloader/trunk/assets/css/loftloader-settings.css
r2193852 r2248622 7 7 * Author URI: http://www.loftocean.com 8 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.129 * Version: 2.2.0 10 10 */ 11 11 @import url(https://fonts.googleapis.com/css?family=Lato:400,600); -
loftloader/trunk/assets/css/loftloader.css
r2193852 r2248622 7 7 * Author URI: http://www.loftocean.com 8 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.129 * Version: 2.2.0 10 10 */ 11 11 @-webkit-keyframes spinReturn { -
loftloader/trunk/assets/js/customize.js
r2087328 r2248622 6 6 (function(api, $){ 7 7 $('head').append($('<style>', {'id': 'loftloader-hide-site-title', 'text': '.site-title { opacity: 0; }'})); 8 // Main Switch section 8 // Main Switch section 9 9 api.LoftLoaderSwitchSection = api.Section.extend({ 10 10 initialize: function () { 11 11 return api.Section.prototype.initialize.apply( this, arguments ); 12 12 }, 13 ready: function(){ 13 ready: function(){ 14 14 var checked = this.container.find('input[name=loftloader-main-switch]').attr('checked') ? true : false; 15 15 checked ? '' : $('#customize-theme-controls').addClass('loftloader-settings-disabled'); … … 66 66 $container.children('.placeholder').css('display', 'none').after($image).remove(); 67 67 } 68 } 68 } 69 69 70 70 $('body') … … 154 154 'loftloader_show_close_timer': {}, 155 155 'loftloader_show_close_tip': {}, 156 'loftloader_max_load_time': {}, 156 157 'loftloader_inline_js': {} 157 158 }; … … 168 169 case 'loftloader_bg_animation': 169 170 loop = []; 171 break; 172 case 'loftloader_max_load_time': 173 if ( ! type_value ) { 174 type_value = 0; 175 } 170 176 break; 171 177 default: -
loftloader/trunk/assets/js/customize.min.js
r2087328 r2248622 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);1 !function(r,n){function l(e){var t,o=r.get(),a=!!o[e]&&o[e];return"string"==typeof a&&(a=a.trim()),!0===(t=a)?"on":t}n("head").append(n("<style>",{id:"loftloader-hide-site-title",text:".site-title { opacity: 0; }"})),r.LoftLoaderSwitchSection=r.Section.extend({initialize:function(){return r.Section.prototype.initialize.apply(this,arguments)},ready:function(){this.container.find("input[name=loftloader-main-switch]").attr("checked")||n("#customize-theme-controls").addClass("loftloader-settings-disabled"),n("#customize-theme-controls").addClass("loftloader-controls-wrapper")},attachEvents:function(){var l=this.container;l.on("change","input[name=loftloader-main-switch]",function(e){var t=!!n(this).attr("checked"),o=l.find("#customize-control-loftloader_main_switch input[type=checkbox]"),a=n("#customize-theme-controls");t?o.attr("checked","checked"):o.removeAttr("checked"),o.trigger("change"),t?a.removeClass("loftloader-settings-disabled"):a.addClass("loftloader-settings-disabled")})}}),n.extend(r.sectionConstructor,{loftloader_switch:r.LoftLoaderSwitchSection}),r.controlConstructor.slider=r.Control.extend({ready:function(){var e=this.container.find(".loader-ui-slider"),o=this.container.find("input[data-customize-setting-link]");e.slider({range:"min",min:e.data("min"),max:e.data("max"),value:e.data("value"),step:e.data("step"),slide:function(e,t){o.val(t.value).trigger("change")}})}}),r.bind("ready",function(e){loftloader_lite_i18n&&n(".site-title").text(loftloader_lite_i18n.name),n("#loftloader-hide-site-title").remove();var t=r.get(),o=n("#customize-control-loftloader_custom_img");if(o.length&&!o.find(".attachment-thumb").length&&t&&t.loftloader_custom_img){var a=t.loftloader_custom_img;if(a){var l=o.find(".attachment-media-view").addClass("attachment-media-view-image"),i=n("<div>",{class:"thumbnail thumbnail-image"}).append(n("<img>",{class:"attachment-thumb",src:a}));l.children(".placeholder").css("display","none").after(i).remove()}}n("body").on("change","input[type=number]",function(e){var t=parseInt(n(this).val()),o=n(this).attr("min")?parseInt(n(this).attr("min")):1;t<o&&n(this).val(o).trigger("change")}).on("change","input.loftlader-checkbox",function(e){var t=!!n(this).attr("checked"),o=n(this).siblings("input");o.length&&(t?o.attr("checked","checked"):o.removeAttr("checked"),o.trigger("change"))}).on("click",".customize-more-toggle",function(e){e.preventDefault();var t=n(this),o=n(this).siblings(".customize-control-description");o.length&&(t.hasClass("expanded")?o.slideUp("slow"):o.slideDown("slow",function(){n(this).css("display","block")}),t.toggleClass("expanded"))}).on("click",".loftloader-any-page-generate",function(e){e.preventDefault();var t=r.loftloader_generate_parameters();n(this).siblings(".loftloader-any-page-shortcode").val("[loftloader "+t+"]").select()})}),r.loftloader_generate_parameters=function(){var e={loftloader_bg_color:{},loftloader_bg_opacity:{},loftloader_bg_animation:{},loftloader_loader_type:{sun:["loftloader_loader_color"],circles:["loftloader_loader_color"],wave:["loftloader_loader_color"],square:["loftloader_loader_color"],beating:["loftloader_loader_color"],frame:["loftloader_loader_color","loftloader_custom_img"],imgloading:["loftloader_custom_img","loftloader_img_width"]},loftloader_show_close_timer:{},loftloader_show_close_tip:{},loftloader_max_load_time:{},loftloader_inline_js:{}},t=type_value=loop="";if("on"===l("loftloader_main_switch"))for(var o in t="loftloader_main_switch=on loftloader_show_range=sitewide",e){switch(type_value=l(o),o){case"loftloader_show_close_tip":type_value=type_value?'"'+btoa(unescape(encodeURIComponent(type_value)))+'"':'""';case"loftloader_bg_color":case"loftloader_bg_opacity":case"loftloader_bg_animation":loop=[];break;case"loftloader_max_load_time":type_value=type_value||0;break;default:loop=e[o][type_value]?e[o][type_value]:[]}if(t+=" "+o+"="+type_value,loop)for(var a in loop)t+=" "+loop[a]+"="+l(loop[a])}else t="loftloader_main_switch=false";return t}}(wp.customize,jQuery); -
loftloader/trunk/assets/js/loftloader.js
r2087328 r2248622 4 4 } 5 5 if ( $( '#loftloader-wrapper' ).length ) { 6 $( window).load( function(){7 loftloader_finished(); 6 $( window ).load( function() { 7 loftloader_finished(); 8 8 } ); 9 9 10 10 $( document ).ready( function() { 11 var $loader_wrapper = $( '#loftloader-wrapper' ), 12 show_close_time = ''; 11 var $loader_wrapper = $( '#loftloader-wrapper' ), show_close_time = '', max_load_time = false; 13 12 if ( $loader_wrapper.data( 'show-close-time' ) ) { 14 show_close_time = parseInt( $loader_wrapper.data( 'show-close-time' ) );13 show_close_time = parseInt( $loader_wrapper.data( 'show-close-time' ), 10 ); 15 14 if( show_close_time ) { 16 setTimeout( function(){ 17 $loader_wrapper.find( '.loader-close-button' ).css('display', '' ); 15 setTimeout( function(){ 16 $loader_wrapper.find( '.loader-close-button' ).css('display', '' ); 18 17 }, show_close_time ); 19 18 $( '.loader-close-button' ).on( 'click', function() { … … 22 21 } 23 22 } 23 if ( $loader_wrapper.data( 'max-load-time' ) ) { 24 max_load_time = parseInt( $loader_wrapper.data( 'max-load-time' ), 10 ); 25 if( max_load_time ) { 26 setTimeout( function() { 27 loftloader_finished(); 28 }, max_load_time ); 29 } 30 } 24 31 } ); 25 32 } -
loftloader/trunk/assets/js/loftloader.min.js
r1860272 r2248622 1 !function( o){function t(){o("body").addClass("loaded")}o("#loftloader-wrapper").length&&(o(window).load(function(){t()}),o(document).ready(function(){var e=o("#loftloader-wrapper"),n="";e.data("show-close-time")&&(n=parseInt(e.data("show-close-time")))&&(setTimeout(function(){e.find(".loader-close-button").css("display","")},n),o(".loader-close-button").on("click",function(){t()}))}))}(jQuery);1 !function(e){function n(){e("body").addClass("loaded")}e("#loftloader-wrapper").length&&(e(window).load(function(){n()}),e(document).ready(function(){var o=e("#loftloader-wrapper"),t="",a=!1;o.data("show-close-time")&&(t=parseInt(o.data("show-close-time"),10))&&(setTimeout(function(){o.find(".loader-close-button").css("display","")},t),e(".loader-close-button").on("click",function(){n()})),o.data("max-load-time")&&(a=parseInt(o.data("max-load-time"),10))&&setTimeout(function(){n()},a)}))}(jQuery); -
loftloader/trunk/assets/scss/loftloader-settings.scss
r2193852 r2248622 7 7 * Author URI: http://www.loftocean.com 8 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.129 * Version: 2.2.0 10 10 */ 11 11 … … 53 53 font-weight: bold; 54 54 color: $text-color; 55 55 56 56 .rtl & { 57 57 float: left; … … 71 71 color: $text-color; 72 72 text-align: right; 73 73 74 74 .rtl & { 75 75 text-align: left; … … 147 147 width: 100%; 148 148 text-align: left; 149 149 150 150 .rtl & { 151 151 text-align: right; … … 167 167 box-shadow: none; 168 168 font-size: 0; 169 169 170 170 .rtl & { 171 171 float: left; … … 225 225 & + div { 226 226 float: right; 227 227 228 228 .rtl & { 229 229 float: left; … … 313 313 margin-top: -2px; 314 314 width: auto; 315 315 316 316 .rtl & { 317 317 margin-left: 15px; … … 425 425 border-radius: 50%; 426 426 border: none; 427 427 428 428 .rtl & { 429 429 float: left; … … 470 470 padding: 0; 471 471 @include animations(8); 472 472 473 473 .rtl & { 474 474 float: right; … … 523 523 box-shadow: none; 524 524 font-size: 0; 525 525 526 526 .rtl & { 527 527 float: left; … … 578 578 letter-spacing: 0.05em; 579 579 color: $text-color; 580 580 581 581 .rtl & { 582 582 float: left; … … 585 585 input[type="number"] { 586 586 margin-right: 5px; 587 587 588 588 .rtl & { 589 589 margin-right: 0; -
loftloader/trunk/assets/scss/loftloader.scss
r2193852 r2248622 7 7 * Author URI: http://www.loftocean.com 8 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.129 * Version: 2.2.0 10 10 */ 11 11 -
loftloader/trunk/inc/any-page/class-any-page-filter.php
r1977136 r2248622 2 2 if ( ! class_exists('LoftLoader_Any_Page_Filter' ) ) { 3 3 class LoftLoader_Any_Page_Filter{ 4 private $defaults = array(); 4 private $defaults = array(); 5 5 private $page_settings = array(); 6 6 private $page_enabled = false; … … 14 14 * @description get the plugin settings 15 15 */ 16 public function loader_settings() {16 public function loader_settings() { 17 17 global $wp_customize, $loftloader_default_settings; 18 $this->is_customize = isset( $wp_customize) ? true : false;19 if (((is_front_page() || is_home()) && (get_option('show_on_front', false) == 'page')) || is_page()){20 $page = get_queried_object();21 if (($atts = $this->get_loader_attributes($page->ID)) !== false){22 if ( isset( $atts['loftloader_show_close_tip'] ) ) {18 $this->is_customize = isset( $wp_customize ) ? true : false; 19 if ( $this->is_any_page_extension_enabled() ) { 20 $page = $this->get_queried_object(); 21 if ( ( $atts = $this->get_loader_attributes( $page->ID ) ) !== false ) { 22 if ( isset( $atts['loftloader_show_close_tip'] ) ) { 23 23 $atts['loftloader_show_close_tip'] = base64_decode( $atts['loftloader_show_close_tip'] ); 24 24 } … … 53 53 return ($this->page_enabled && !$this->is_customize && isset($this->page_settings[$setting_id])) ? $this->page_settings[$setting_id] : $setting_value; 54 54 } 55 56 /** 57 * Help function to test if any page extension enabled on current page 58 */ 59 protected function is_any_page_extension_enabled() { 60 $is_fromt_home_page = ( is_front_page() || is_home() ) && ( get_option('show_on_front', false ) == 'page' ); 61 $is_shop_page = $this->is_woocommerce_shop(); 62 return $is_fromt_home_page || $is_shop_page || is_page(); 63 } 64 /** 65 * Get queried page object 66 */ 67 protected function get_queried_object() { 68 if ( $this->is_woocommerce_shop() ) { 69 $page_id = wc_get_page_id( 'shop' ); 70 return get_page( $page_id ); 71 } else { 72 return get_queried_object(); 73 } 74 } 75 /** 76 * Condition function test if is woocommerce shop page 77 */ 78 protected function is_woocommerce_shop() { 79 if ( function_exists( 'is_shop' ) ) { 80 $page_id = wc_get_page_id( 'shop' ); 81 return ! empty( $page_id ) && ( $page_id !== -1 ) && is_shop(); 82 } 83 return false; 84 } 55 85 } 56 86 } -
loftloader/trunk/inc/class-loftloader-customize.php
r2186616 r2248622 138 138 class LoftLoader_Customize_Control extends WP_Customize_Control { 139 139 public $filter = false; 140 public $text = ''; 140 141 public $parent_setting_id = ''; 141 142 public $show_filter = array(); 142 143 public $img = ''; 143 144 public $href = ''; 145 public $note_below = ''; 144 146 public function active_callback() { 145 147 if ( $this->filter && ( $this->manager->get_setting($this->parent_setting_id ) instanceof WP_Customize_Setting ) && ! empty( $this->show_filter ) ) { … … 191 193 default: 192 194 parent::render_content(); 195 if ( ! empty( $this->text ) ) { 196 echo esc_html( $this->text ) . '<br/>'; 197 } 198 if ( ! empty( $this->note_below ) ) : ?> 199 <span class="description"><?php echo esc_html( $this->note_below ); ?></span><?php 200 endif; 193 201 } 194 202 } … … 348 356 } 349 357 } 358 359 if ( ! function_exists( 'loftloader_sanitize_number' ) ) { 360 /** 361 * Check the value is float with 1 decimal 362 * 363 * @param string the value from user 364 * @param object customize setting object 365 * @return string the value from user or the default setting value 366 */ 367 368 function loftloader_sanitize_number( $value) { 369 if ( ! empty( $value ) ) { 370 $value = floatval( $value ); 371 return number_format( $value, 1, '.', '' ); 372 } 373 return 0; 374 } 375 } 350 376 } -
loftloader/trunk/inc/class-loftloader-front.php
r2186616 r2248622 234 234 $show_close_time = number_format( $show_close_time, 0, '.', '' ); 235 235 $attrs .= sprintf( ' data-show-close-time="%s"', esc_js( esc_attr( $show_close_time * 1000 ) ) ); 236 237 $max_load_time = $this->get_loader_setting( 'loftloader_max_load_time' ); 238 $max_load_time = number_format( $max_load_time, 1, '.', '' ); 239 if ( ! empty( $max_load_time ) ) { 240 $attrs .= sprintf( ' data-max-load-time="%s"', esc_js( esc_attr( $max_load_time * 1000 ) ) ); 241 } 242 236 243 return apply_filters( 'loftloader_loader_attributes', $attrs ); 237 244 } -
loftloader/trunk/inc/configs/customize-advanced.php
r2087328 r2248622 6 6 */ 7 7 add_action( 'customize_register', 'loftloader_customize_advanced', 50 ); 8 function loftloader_customize_advanced( $wp_customize ) { 8 function loftloader_customize_advanced( $wp_customize ) { 9 9 global $loftloader_default_settings; 10 10 … … 31 31 'title' => esc_html__( 'Advanced', 'loftloader' ), 32 32 'description' => '', 33 'priority' => 5 033 'priority' => 55 34 34 ) ) ); 35 35 … … 38 38 'label' => esc_html__( 'How to Load LoftLoader\'s JavaScript', 'loftloader' ), 39 39 'description' => '', 40 'choices' => array( 40 'choices' => array( 41 41 '' => esc_html__( 'External JavaScript', 'loftloader' ), 42 42 'inline' => esc_html__( 'Inline JavaScript', 'loftloader' ) -
loftloader/trunk/inc/configs/customize-more.php
r2087328 r2248622 6 6 */ 7 7 add_action( 'customize_register', 'loftloader_customize_more', 45 ); 8 function loftloader_customize_more( $wp_customize ) { 8 function loftloader_customize_more( $wp_customize ) { 9 9 global $loftloader_default_settings; 10 10 11 $wp_customize->add_ section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_section_more', array(11 $wp_customize->add_panel( new WP_Customize_Panel ( $wp_customize, 'loftloader_panel_more', array( 12 12 'title' => esc_html__( 'More', 'loftloader' ), 13 'description' => '', 14 'priority' => 50 13 'priority' => 52 15 14 ) ) ); 16 15 16 $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_section_max_load_time', array( 17 'title' => esc_html__( 'Maximum Load Time', 'loftloader' ), 18 'panel' => 'loftloader_panel_more' 19 ) ) ); 20 $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_section_close_button', array( 21 'title' => esc_html__( 'Close Button', 'loftloader' ), 22 'panel' => 'loftloader_panel_more' 23 ) ) ); 24 25 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_max_load_time', array( 26 'default' => $loftloader_default_settings['loftloader_max_load_time'], 27 'transport' => 'postMessage', 28 'type' => 'option', 29 'sanitize_callback' => 'loftloader_sanitize_number' 30 ) ) ); 17 31 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_show_close_timer', array( 18 32 'default' => $loftloader_default_settings['loftloader_show_close_timer'], … … 28 42 ) ) ); 29 43 44 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_max_load_time', array( 45 'type' => 'number', 46 'label' => esc_html__( 'Maximum Load Time', 'loftloader' ), 47 'note_below' => esc_html__( 'Please enter any number greater than 0 to enable this feature.', 'loftloader' ), 48 'section' => 'loftloader_section_max_load_time', 49 'input_attrs' => array( 'min' => '0' ), 50 'text' => esc_html__( ' second(s)', 'loftloader' ), 51 'settings' => 'loftloader_max_load_time' 52 ) ) ); 30 53 $wp_customize->add_control( new LoftLoader_Customize_Slider_Control( $wp_customize, 'loftloader_show_close_timer', array( 31 54 'type' => 'slider', … … 39 62 ), 40 63 'input_class' => 'loftloader-show-close-timer', 41 'section' => 'loftloader_section_ more',64 'section' => 'loftloader_section_close_button', 42 65 'settings' => 'loftloader_show_close_timer' 43 66 ) ) ); … … 45 68 'type' => 'text', 46 69 'label' => esc_html__( 'Description for Close Button', 'loftloader' ), 47 'section' => 'loftloader_section_ more',70 'section' => 'loftloader_section_close_button', 48 71 'settings' => 'loftloader_show_close_tip' 49 72 ) ) ); -
loftloader/trunk/inc/configs/default-settings.php
r2087328 r2248622 24 24 'loftloader_show_close_tip' => '', 25 25 26 'loftloader_max_load_time' => 0, 27 26 28 'loftloader_inline_js' => '', 27 29 'loftloader_enable_any_page' => '' -
loftloader/trunk/languages/loftloader.pot
r2193852 r2248622 1 # Copyright (C) 20 19 LoftLoader2 # This file is distributed under the same license as the LoftLoader p ackage.1 # Copyright (C) 2020 Loft Ocean 2 # This file is distributed under the same license as the LoftLoader plugin. 3 3 #, fuzzy 4 4 msgid "" 5 5 msgstr "" 6 "Project-Id-Version: LoftLoader 2.1.12\n" 7 "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/loftloader\n" 8 "POT-Creation-Date: 2019-11-15 23:09+0800\n" 6 "Project-Id-Version: LoftLoader 2.2.0\n" 7 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/loftloader\n" 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 9 "Language-Team: LANGUAGE <LL@li.org>\n" 9 10 "MIME-Version: 1.0\n" 10 11 "Content-Type: text/plain; charset=UTF-8\n" 11 12 "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" 13 "POT-Creation-Date: 2020-02-22 14:51+0800\n" 14 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 15 15 "X-Generator: Poedit 2.2.4\n" 16 "X-Domain: loftloader\n" 17 18 #. Plugin Name of the plugin 19 msgid "LoftLoader" 20 msgstr "" 21 22 #. Plugin URI of the plugin 23 #. Author URI of the plugin 24 msgid "http://www.loftocean.com/" 25 msgstr "" 26 27 #. Description of the plugin 28 msgid "An easy to use plugin to add an animated preloader to your website with fully customisations." 29 msgstr "" 30 31 #. Author of the plugin 32 msgid "Loft Ocean" 33 msgstr "" 16 34 17 35 #: inc/any-page/class-loftloader-any-page.php:24 … … 35 53 msgstr "" 36 54 37 #: inc/class-loftloader-customize.php:17 5inc/configs/customize-advanced.php:2455 #: inc/class-loftloader-customize.php:177 inc/configs/customize-advanced.php:24 38 56 msgid "Generate" 39 57 msgstr "" 40 58 41 #: inc/class-loftloader-customize.php:2 5959 #: inc/class-loftloader-customize.php:267 42 60 msgid "More info" 43 msgstr ""44 45 #: inc/class-loftloader-front.php:18046 msgid "loader image"47 61 msgstr "" 48 62 … … 167 181 msgstr "" 168 182 169 #: inc/configs/customize-more.php:32 183 #: inc/configs/customize-more.php:17 inc/configs/customize-more.php:46 184 msgid "Maximum Load Time" 185 msgstr "" 186 187 #: inc/configs/customize-more.php:21 188 msgid "Close Button" 189 msgstr "" 190 191 #: inc/configs/customize-more.php:47 192 msgid "Please enter any number greater than 0 to enable this feature." 193 msgstr "" 194 195 #: inc/configs/customize-more.php:50 196 msgid " second(s)" 197 msgstr "" 198 199 #: inc/configs/customize-more.php:55 170 200 msgid "Show Close Button after" 171 201 msgstr "" 172 202 173 #: inc/configs/customize-more.php: 46203 #: inc/configs/customize-more.php:69 174 204 msgid "Description for Close Button" 175 205 msgstr "" … … 202 232 msgid "Settings" 203 233 msgstr "" 204 205 #. Plugin Name of the plugin/theme206 msgid "LoftLoader"207 msgstr ""208 209 #. Plugin URI of the plugin/theme210 #. Author URI of the plugin/theme211 msgid "http://www.loftocean.com/"212 msgstr ""213 214 #. Description of the plugin/theme215 msgid ""216 "An easy to use plugin to add an animated preloader to your website with "217 "fully customisations."218 msgstr ""219 220 #. Author of the plugin/theme221 msgid "Loft Ocean"222 msgstr "" -
loftloader/trunk/loftloader.php
r2193852 r2248622 4 4 Plugin URI: http://www.loftocean.com/ 5 5 Description: An easy to use plugin to add an animated preloader to your website with fully customisations. 6 Version: 2. 1.126 Version: 2.2.0 7 7 Author: Loft Ocean 8 8 Author URI: http://www.loftocean.com/ … … 33 33 define( 'LOFTLOADER_NAME', plugin_basename( __FILE__ ) ); 34 34 define( 'LOFTLOADER_URI', plugin_dir_url( __FILE__ ) ); 35 define( 'LOFTLOADER_ASSET_VERSION', '20 19111501' );35 define( 'LOFTLOADER_ASSET_VERSION', '2020022204' ); 36 36 37 37 class LoftLoader { -
loftloader/trunk/readme.txt
r2193852 r2248622 5 5 Requires at least: 4.7 6 6 Tested up to: 5.3 7 Stable tag: 2. 1.127 Stable tag: 2.2.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 97 97 98 98 == Changelog == 99 = 2.2.0 100 * New: Option to set a Maximum Load Time 101 * Improved: Rearranged options in More section 102 * Fixed: Any Page Extension - shortcode did not work on WooCommerce Shop Page 103 99 104 = 2.1.12 100 105 * Fixed: Minor style issues in LoftLoader Settings panel for WordPress 5.3
Note: See TracChangeset
for help on using the changeset viewer.