Plugin Directory

Changeset 2265313


Ignore:
Timestamp:
03/22/2020 08:52:35 AM (6 years ago)
Author:
broadbrander
Message:
  • Fixed: Preloader not showing on some websites.
  • Added: SVG support.
  • Updated: Deprecated jQuery code.
Location:
loader/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • loader/trunk/inc/customizer.php

    r2262313 r2265313  
    108108                'jpg|jpeg|jpe' => 'image/jpeg',
    109109                'gif'          => 'image/gif',
    110                 'png'          => 'image/png'
     110                'png'          => 'image/png',
     111                'svg'          => 'image/svg+xml'
    111112            );
    112113            $file_ext = wp_check_filetype( $file, $formats );
  • loader/trunk/inc/preloader/functions.php

    r2262313 r2265313  
    4646 echo'
    4747 <script>
    48  if(self==top){jQuery(document).ready(function(d){d(window).load(function(){d("#bbpreloading").addClass("hidepreloader")})});}
     48 if(self==top){jQuery(document).ready(function(d){d(window).on("load",function(){d("#bbpreloading").addClass("hidepreloader")})});}
    4949 else{
    5050 jQuery(document).ready(function(l){l(window).ready(function(){
     
    7373 <script>
    7474if ( window.location.href ==  "'. $home_url . '/" ){
    75 jQuery(document).ready(function(d){d(window).load(function(){d("#bbpreloading").addClass("hidepreloader")})});
     75jQuery(document).ready(function(d){d(window).on("load" , function(){d("#bbpreloading").addClass("hidepreloader")})});
    7676}
    7777
     
    214214if ( get_theme_mod('loader_style_select' , 1) == 1) {
    215215
     216    // Check if the wp_body_open is available
     217    if(has_action('wp_body_open')) {
    216218
    217219    // If avaibale add html after body tag
    218220    add_action('wp_body_open', 'loader_html');
    219221
     222    } else {
     223
     224    // Else add html to head
     225    add_action('wp_head', 'loader_html');
     226}
    220227}
    221228
     
    223230if ( get_theme_mod('loader_style_select') == 2) {
    224231
     232    // Check if the wp_body_open is available
     233    if(has_action('wp_body_open')) {
    225234
    226235    // If avaibale add html after body tag
    227236    add_action('wp_body_open', 'loader_html');
    228237
     238    } else {
     239
     240    // Else add html to head
     241    add_action('wp_head', 'loader_html');
     242}
    229243}
    230244
     
    232246if ( get_theme_mod('loader_style_select') == 3) {
    233247
     248    // Check if the wp_body_open is available
     249    if(has_action('wp_body_open')) {
     250
    234251    // If avaibale add html after body tag
    235252    add_action('wp_body_open', 'loader_3_html');
    236253
     254    } else {
     255
     256    // Else add html to head
     257    add_action('wp_head', 'loader_3_html');
     258}
    237259}
    238260
     
    240262if ( get_theme_mod('loader_style_select') == 4) {
    241263
     264    // Check if the wp_body_open is available
     265    if(has_action('wp_body_open')) {
     266
    242267    // If avaibale add html after body tag
    243268    add_action('wp_body_open', 'loader_4_html');
    244269
     270    } else {
     271
     272    // Else add html to head
     273    add_action('wp_head', 'loader_4_html');
     274}
    245275}
    246276
     
    248278if ( get_theme_mod('loader_style_select') == 5) {
    249279
     280    // Check if the wp_body_open is available
     281    if(has_action('wp_body_open')) {
     282
    250283    // If avaibale add html after body tag
    251284    add_action('wp_body_open', 'loader_html');
    252285
     286    } else {
     287
     288    // Else add html to head
     289    add_action('wp_head', 'loader_html');
     290}
    253291}
    254292
    255293if ( get_theme_mod('loader_style_select') == 6) {
    256294
     295    // Check if the wp_body_open is available
     296    if(has_action('wp_body_open')) {
     297
    257298    // If avaibale add html after body tag
    258299    add_action('wp_body_open', 'loader_6_html');
    259300
     301    } else {
     302
     303    // Else add html to head
     304    add_action('wp_head', 'loader_6_html');
     305}
    260306}
    261307
     
    263309if ( get_theme_mod('loader_style_select') == 'image') {
    264310
     311    // Check if the wp_body_open is available
     312    if(has_action('wp_body_open')) {
     313
    265314    // If avaibale add html after body tag
    266315    add_action('wp_body_open', 'loader_image_html');
     316
     317    } else {
     318
     319    // Else add html to head
     320    add_action('wp_head', 'loader_image_html');
     321}
    267322}
    268323
    269324if ( get_theme_mod('loader_style_select') == 'custom') {
    270325
     326    // Check if the wp_body_open is available
     327    if(has_action('wp_body_open')) {
     328
    271329    // If avaibale add html after body tag
    272330    add_action('wp_body_open', 'loader_custom_html');
    273 }
    274 
    275 }
    276 
     331
     332    } else {
     333
     334    // Else add html to head
     335    add_action('wp_head', 'loader_custom_html');
     336}
     337}
     338}
  • loader/trunk/loader.php

    r2262313 r2265313  
    44 * Plugin URI: https://wordpress.org/plugins/loader
    55 * Description: Loader is a lightweight plugin to show preloader and prefetch on mouse hover to load pages faster.
    6  * Version: 1.2.3
     6 * Version: 1.2.4
    77 * Author: BroadBrander
    88 * Author URI: https://broadbrander.com
  • loader/trunk/readme.txt

    r2262313 r2265313  
    11=== Loader: Preloader and User Experience Booster ===
    22Contributors: broadbrander
    3 Version: 1.2.3
     3Version: 1.2.4
    44Plugin Name: Loader: Preloader and User Experience Booster
    55Tags: wordpress, preloader, preload, prefetch, speed optimize
    66Requires at least: 4.9
    77Tested up to: 5.4.0
    8 Stable tag: 1.2.3
     8Stable tag: 1.2.4
    99Requires PHP: 5.2.4
    1010License: GPLv2 or later
     
    8585* Tweak: Increased maximum value of preloader size to 400 pixels.
    8686* Fixed: Minor bug.
     87
     88= 1.2.3 =
     89
     90* Fixed: Preloader not showing on some websites.
     91* Added: SVG support.
     92* Updated: Deprecated jQuery code.
Note: See TracChangeset for help on using the changeset viewer.