Plugin Directory


Ignore:
Timestamp:
11/07/2026 08:10:59 AM (38 hours ago)
Author:
mdraabiul
Message:

Release 0.2.0 - lazy loading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cache-shark/trunk/src/Admin.php

    r3785734 r3789168  
    199199                                        </tr>
    200200                                        <tr>
     201                                                <th scope="row"><?php esc_html_e( 'Lazy loading', 'cache-shark' ); ?></th>
     202                                                <td>
     203                                                        <label><input type="checkbox" name="<?php echo esc_attr( $name ); ?>[lazy_images]" value="1" <?php checked( 1, (int) $o['lazy_images'] ); ?>> <?php esc_html_e( 'Lazy-load images', 'cache-shark' ); ?></label><br>
     204                                                        <label><input type="checkbox" name="<?php echo esc_attr( $name ); ?>[lazy_iframes]" value="1" <?php checked( 1, (int) $o['lazy_iframes'] ); ?>> <?php esc_html_e( 'Lazy-load iframes (embedded videos, maps)', 'cache-shark' ); ?></label>
     205                                                        <p class="description"><?php esc_html_e( 'Offscreen images and embeds load only when the visitor scrolls near them. WordPress already does this for images in post content; this also covers images from your theme and widgets. Applied to cached pages only, never to logged-in users.', 'cache-shark' ); ?></p>
     206                                                </td>
     207                                        </tr>
     208                                        <tr>
     209                                                <th scope="row"><label for="vc-skip"><?php esc_html_e( 'Skip the first images', 'cache-shark' ); ?></label></th>
     210                                                <td>
     211                                                        <input id="vc-skip" type="number" min="0" max="20" class="small-text" name="<?php echo esc_attr( $name ); ?>[lazy_skip_first]" value="<?php echo esc_attr( (string) (int) $o['lazy_skip_first'] ); ?>">
     212                                                        <p class="description"><?php esc_html_e( 'Images at the top of the page must show immediately. The first images on each page (default 2) are never lazy-loaded.', 'cache-shark' ); ?></p>
     213                                                </td>
     214                                        </tr>
     215                                        <tr>
     216                                                <th scope="row"><label for="vc-lazy-exclude"><?php esc_html_e( 'Never lazy-load these', 'cache-shark' ); ?></label></th>
     217                                                <td>
     218                                                        <textarea id="vc-lazy-exclude" rows="4" class="large-text code" name="<?php echo esc_attr( $name ); ?>[lazy_exclude]"><?php echo esc_textarea( implode( "\n", (array) $o['lazy_exclude'] ) ); ?></textarea>
     219                                                        <p class="description"><?php esc_html_e( 'One per line. Any image or iframe whose HTML contains this text is skipped, for example a class name such as hero-image or a file name such as logo.png.', 'cache-shark' ); ?></p>
     220                                                </td>
     221                                        </tr>
     222                                        <tr>
    201223                                                <th scope="row"><label for="vc-urls"><?php esc_html_e( 'Never cache these URLs', 'cache-shark' ); ?></label></th>
    202224                                                <td>
Note: See TracChangeset for help on using the changeset viewer.