Plugin Directory

Changeset 1977136


Ignore:
Timestamp:
11/20/2018 03:25:11 AM (7 years ago)
Author:
loftocean
Message:

upload version 2.1.6

Location:
loftloader
Files:
77 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • loftloader/trunk/assets/css/loftloader-settings.css

    r1880442 r1977136  
    77 * Author URI: http://www.loftocean.com
    88 * 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.5
     9 * Version: 2.1.6
    1010*/
    1111@import url(https://fonts.googleapis.com/css?family=Lato:400,600);
  • loftloader/trunk/assets/css/loftloader.css

    r1880442 r1977136  
    77 * Author URI: http://www.loftocean.com
    88 * 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.5
     9 * Version: 2.1.6
    1010*/
    1111@-webkit-keyframes spinReturn {
  • loftloader/trunk/assets/js/customize.js

    r1880442 r1977136  
    140140                        'loftloader_loader_color'
    141141                    ],
     142                    'beating': [
     143                        'loftloader_loader_color'
     144                    ],
    142145                    'frame': [
    143146                        'loftloader_loader_color',
  • loftloader/trunk/assets/js/customize.min.js

    r1880442 r1977136  
    1 /**
    2 * Copyright (c) Loft.Ocean
    3 * http://www.loftocean.com
    4 */
    5 
    6 (function(api, $){
    7     $('head').append($('<style>', {'id': 'loftloader-hide-site-title', 'text': '.site-title { opacity:  0; }'}));
    8     // Main Switch section
    9     api.LoftLoaderSwitchSection = api.Section.extend({
    10         initialize: function () {
    11             return api.Section.prototype.initialize.apply( this, arguments );
    12         },
    13         ready: function(){
    14             var checked = this.container.find('input[name=loftloader-main-switch]').attr('checked') ? true : false;
    15             checked ? '' : $('#customize-theme-controls').addClass('loftloader-settings-disabled');
    16             $('#customize-theme-controls').addClass('loftloader-controls-wrapper');
    17         },
    18         attachEvents: function () {
    19             var container = this.container;
    20             container.on('change', 'input[name=loftloader-main-switch]', function(e){
    21                 var checked  = $(this).attr('checked') ? true : false,
    22                     $element = container.find('#customize-control-loftloader_main_switch input[type=checkbox]'),
    23                     controls_wrap = $('#customize-theme-controls');
    24 
    25                 checked ? $element.attr('checked', 'checked') : $element.removeAttr('checked');
    26                 $element.trigger('change');
    27                 checked ? controls_wrap.removeClass('loftloader-settings-disabled') : controls_wrap.addClass('loftloader-settings-disabled');
    28             });
    29         }
    30     });
    31     $.extend(api.sectionConstructor, {loftloader_switch: api.LoftLoaderSwitchSection});
    32 
    33     // Slider control
    34     api.controlConstructor.slider = api.Control.extend({
    35         ready: function(){
    36             var elem = this.container.find('.loader-ui-slider'),
    37                 input = this.container.find('input[data-customize-setting-link]');
    38             elem.slider({
    39                 'range': 'min',
    40                 'min': elem.data('min'),
    41                 'max': elem.data('max'),
    42                 'value': elem.data('value'),
    43                 'step': elem.data('step'),
    44                 'slide': function(event, ui){
    45                     input.val(ui.value).trigger('change');
    46                 }
    47             });
    48         }
    49     });
    50 
    51     // Register event handler for hide controls/description
    52     api.bind('ready', function(e){
    53         // Change the site title in string "You are customizing ..."
    54         loftloader_lite_i18n ? $('.site-title').text(loftloader_lite_i18n.name) : '';
    55         $('#loftloader-hide-site-title').remove();
    56 
    57         // Init for loader 2.0 customizer, when sync from lower version
    58         var settings = api.get(),
    59             $custom_img = $('#customize-control-loftloader_custom_img');
    60         if($custom_img.length && !$custom_img.find('.attachment-thumb').length && settings && settings['loftloader_custom_img']){
    61             var image = settings['loftloader_custom_img'];
    62             if(image){
    63                 var $container = $custom_img.find('.attachment-media-view').addClass('attachment-media-view-image'),
    64                     $image = $('<div>', {'class': "thumbnail thumbnail-image"}).append($('<img>', {'class': "attachment-thumb", 'src': image}));
    65 
    66                 $container.children('.placeholder').css('display', 'none').after($image).remove();
    67             }
    68         }   
    69 
    70         $('body')
    71         .on('change', 'input[type=number]', function(e){
    72             var val = parseInt($(this).val()),
    73                 min = $(this).attr('min') ? parseInt($(this).attr('min')) : 1;
    74             (val < min) ? $(this).val(min).trigger('change') : '';
    75         })
    76         .on('change', 'input.loftlader-checkbox', function(e){
    77             var checked  = $(this).attr('checked') ? true : false,
    78                 $element = $(this).siblings('input');
    79             if($element.length){
    80                 checked ? $element.attr('checked', 'checked') : $element.removeAttr('checked');
    81                 $element.trigger('change');
    82             }
    83         })
    84         .on('click', '.customize-more-toggle', function(e){
    85             e.preventDefault();
    86             var self = $(this),
    87                 description = $(this).siblings('.customize-control-description');
    88 
    89             if(description.length){
    90                 self.hasClass('expanded') ? description.slideUp('slow') : description.slideDown('slow', function(){ $(this).css('display', 'block'); });
    91                 self.toggleClass('expanded');
    92             }
    93         })
    94         .on('click', '.loftloader-any-page-generate', function(e){
    95             e.preventDefault();
    96             var shortcode = api.loftloader_generate_parameters();
    97             $(this).siblings('.loftloader-any-page-shortcode').val('[loftloader ' + shortcode + ']').select();
    98         });
    99     });
    100 
    101     /**
    102     * Convert to string 'on' if current value is boolean true (not other value equals to true)
    103     * @param value mix, the value to check
    104     * @return mix, string 'on' if current value equals to boolean true, otherwise return the original value.
    105     */
    106     function loftloader_check_boolean(value){
    107         return (value === true) ? 'on' : value;
    108     }
    109     /**
    110     * Get customize setting value
    111     * @param id string, the setting id
    112     * @return mix, return dirty value/setting value or false (the id not exists)
    113     **/
    114     function loftloader_get_setting_value(id){
    115         var settings = api.get(), //settings.settings, dirty_values = api.dirtyValues(),
    116             value = settings[id] ? settings[id] : false; //dirty_values[id] ? dirty_values[id] : (settings[id] ? settings[id]['value'] : false);
    117         if(typeof value === 'string'){
    118             value = value.trim();
    119         }
    120         return loftloader_check_boolean(value);
    121     }
    122 
    123     // Generate loftloader parameters
    124     api.loftloader_generate_parameters = function(){
    125         var dependency = {
    126                 'loftloader_bg_color': {},
    127                 'loftloader_bg_opacity': {},
    128                 'loftloader_bg_animation': {},
    129                 'loftloader_loader_type': {
    130                     'sun': [
    131                         'loftloader_loader_color'
    132                     ],
    133                     'circles': [
    134                         'loftloader_loader_color'
    135                     ],
    136                     'wave': [
    137                         'loftloader_loader_color'
    138                     ],
    139                     'square': [
    140                         'loftloader_loader_color'
    141                     ],
    142                     'frame': [
    143                         'loftloader_loader_color',
    144                         'loftloader_custom_img'
    145                     ],
    146                     'imgloading': [
    147                         'loftloader_custom_img',
    148                         'loftloader_img_width'
    149                     ]
    150                 },
    151                 'loftloader_show_close_timer': {},
    152                 'loftloader_show_close_tip': {}
    153             };
    154         var loftloader = type_value = loop = '';
    155         if(loftloader_get_setting_value('loftloader_main_switch') === 'on'){
    156             loftloader = 'loftloader_main_switch=on loftloader_show_range=sitewide';
    157             for(var id in dependency){
    158                 type_value = loftloader_get_setting_value(id);
    159                 switch(id){
    160                     case 'loftloader_show_close_tip':
    161                         type_value = type_value ? ( '"' + btoa( unescape( encodeURIComponent( type_value ) ) ) + '"' ) : '""';
    162                     case 'loftloader_bg_color':
    163                     case 'loftloader_bg_opacity':
    164                     case 'loftloader_bg_animation':
    165                         loop = [];
    166                         break;
    167                     default:
    168                         loop = dependency[id][type_value] ? dependency[id][type_value] : [];
    169                 }
    170                 loftloader += ' ' + id + '=' + type_value;
    171                 if(loop){
    172                     for(var j in loop){
    173                         loftloader += ' ' + loop[j] + '=' + loftloader_get_setting_value(loop[j]);
    174                     }
    175                 }
    176             }
    177         }
    178         else{
    179             loftloader = 'loftloader_main_switch=false';
    180         }
    181         return loftloader;
    182     }
    183 })(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:{}},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);
  • loftloader/trunk/assets/scss/loftloader-settings.scss

    r1880442 r1977136  
    77 * Author URI: http://www.loftocean.com
    88 * 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.5
     9 * Version: 2.1.6
    1010*/
    1111
  • loftloader/trunk/assets/scss/loftloader.scss

    r1880442 r1977136  
    77 * Author URI: http://www.loftocean.com
    88 * 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.5
     9 * Version: 2.1.6
    1010*/
    1111
  • loftloader/trunk/inc/class-loftloader-upgrade.php

    r1880442 r1977136  
    11<?php
    2 if(!class_exists('LoftLoader_Upgrade')){
    3     class LoftLoader_Upgrade{
    4         private $version ='2.1.5';
     2if ( ! class_exists( 'LoftLoader_Upgrade' ) ) {
     3    class LoftLoader_Upgrade {
     4        private $version ='2.1.6';
    55        function __construct(){
    66            $old_version = get_option('loftloader_lite_version', '1.0');
  • loftloader/trunk/languages/loftloader.pot

    r1880442 r1977136  
    44msgid ""
    55msgstr ""
    6 "Project-Id-Version: LoftLoader 2.1.5\n"
     6"Project-Id-Version: LoftLoader 2.1.6\n"
    77"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/loftloader\n"
    8 "POT-Creation-Date: 2018-05-24 11:59+0800\n"
     8"POT-Creation-Date: 2018-11-17 17:03+0800\n"
    99"MIME-Version: 1.0\n"
    1010"Content-Type: text/plain; charset=UTF-8\n"
     
    1313"Last-Translator: Suihai <cain@loftocean.com>\n"
    1414"Language-Team: Loft Ocean <cain@loftocean.com>\n"
    15 "X-Generator: Poedit 1.8.12\n"
    16 
    17 #: inc/class-loftloader-any-page.php:12
     15"X-Generator: Poedit 2.2\n"
     16
     17#: inc/any-page/class-loftloader-any-page.php:24
    1818msgid "LoftLoader Any Page Shortcode"
    1919msgstr ""
  • loftloader/trunk/loftloader.php

    r1880442 r1977136  
    44Plugin URI: http://www.loftocean.com/
    55Description: An easy to use plugin to add an animated preloader to your website with fully customisations.
    6 Version: 2.1.5
     6Version: 2.1.6
    77Author: Loft Ocean
    88Author URI: http://www.loftocean.com/
     
    3333    define('LOFTLOADER_NAME', plugin_basename( __FILE__ ));
    3434    define('LOFTLOADER_URI',  plugin_dir_url( __FILE__ ));
    35     define('LOFTLOADER_ASSET_VERSION', '2018052403');
     35    define('LOFTLOADER_ASSET_VERSION', '2018111901');
    3636
    3737    class LoftLoader{
     
    107107        $enable_any_page = get_option('loftloader_enable_any_page', '');
    108108        if($enable_any_page === 'on'){
    109             require_once LOFTLOADER_ROOT . 'inc/class-loftloader-any-page.php';
     109            require_once LOFTLOADER_ROOT . 'inc/any-page/class-loftloader-any-page.php';
    110110        }
    111111    }
  • loftloader/trunk/readme.txt

    r1880442 r1977136  
    55Requires at least: 4.3
    66Tested up to: 4.9
    7 Stable tag: 2.1.5
     7Stable tag: 2.1.6
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5757* Looping - Animation can be set to loop forever, and some animations can be set to run just once (ends after page has loaded).
    5858* Progress - Progress bar, counting percentage, or both. Any color. Position, size & font control.
    59 * Message - Enter your custom welcome or loading message to display. Control color, position & font.
     59* Message - Enter your custom welcome or loading message to display. Control color, position & font. And supports Random Message feature.
    6060* Load Time - Set a minimum load time to prevent the pre-loader from disappearing too fast.
    6161* Device Control - Choose to show the loading screen on all devices, or hide on mobile, or show on mobile only.
     
    9393
    9494== Changelog ==
     95= 2.1.6 =
     96* Improved: Any Page Extension meta box redesigned to fit in Gutenberg Sidebar
     97
    9598= 2.1.5 =
    9699* Fixed: Description for Close Button doesn’t work for Any Page Extension
Note: See TracChangeset for help on using the changeset viewer.