Plugin Directory

Changeset 1143062


Ignore:
Timestamp:
04/23/2015 09:33:43 AM (11 years ago)
Author:
bypr.nils
Message:

version history

Location:
smart-image-loader/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smart-image-loader/trunk/plugin.php

    r1030214 r1143062  
    44Plugin URI: https://wordpress.org/plugins/smart-image-loader
    55Description: Load images visible at page load ('above the fold') first for a fast page loading impression. Optional lazy loading for images 'below the fold'.
    6 Version: 0.4.0
     6Version: 0.4.1
    77Text Domain: smart-image-loader
    88Author: Bayer und Preuss
     
    119119            lazy_load_at:          <?= get_option('sil-lazy-load-at', '0') ?>,
    120120            fade:                  <?= get_option('sil-fade', 'false') ? 'true' : 'false' ?>,
    121             placeholder:           <?= '"' . get_option('sil-placeholder', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') . '"' ?>
     121            placeholder:           <?= '"' . get_option('sil-placeholder', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') . '"' ?>,
     122            loader:                <?= get_option('sil-loader', 'true') ? 'true' : 'false' ?>
    122123        };
    123124    </script>
     
    131132    <noscript>
    132133        <style type="text/css">
    133             img[data-sil]
    134             { display: none; }
     134            img[data-sil] { display: none; }
    135135        </style>
    136136    </noscript>
    137137    <?php
     138
     139    if ( get_option('sil-loader') ) {
     140    ?>
     141    <style type="text/css">
     142        img[data-sil]
     143        {
     144            background-image: url('/wp-content/plugins/smart-image-loader/loading.gif');
     145            background-repeat: no-repeat;
     146            background-position: center center;
     147        }
     148    </style>
     149    <?php
     150    }
    138151}add_action('wp_head', 'sil_noscript');
    139152
     
    168181    add_option( 'sil-fade', 'false');
    169182    add_option( 'sil-placeholder', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
     183    add_option( 'sil-loader', 'true');
    170184}add_action( 'admin_menu', 'add_sil_options' );
    171185
     
    185199    register_setting( 'sil-settings-group', 'sil-fade' );
    186200    register_setting( 'sil-settings-group', 'sil-placeholder' );
     201    register_setting( 'sil-settings-group', 'sil-loader' );
    187202}add_action( 'admin_menu', 'register_sil_settings' );
    188203
     
    190205add_filter( 'the_content', 'get_wrapped_html' );
    191206
    192 
    193 
  • smart-image-loader/trunk/readme.txt

    r1030214 r1143062  
    44Tags: performance, speed, lazy loading, image, above the fold
    55Requires at least: 3.8.3
    6 Tested up to: 4.0
    7 Stable tag: 0.4.0
     6Tested up to: 4.2
     7Stable tag: 0.4.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434
    3535== Changelog ==
     36
     37= 0.4.1 =
     38* fixed visible detection
     39* test with Wordpress 4.2
     40
    3641
    3742= 0.4.0 =
Note: See TracChangeset for help on using the changeset viewer.