PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 3.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v3.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / templates / images / lazyload.php

lazyload.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 3.7.0, at templates/images/lazyload.php

49 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if (!defined('WPO_VERSION')) die('No direct access allowed'); ?>
2 <?php
3 $lazyload_options = $options->get_option('lazyload', array(
4 'images' => false,
5 'iframes' => false,
6 'skip_classes' => '',
7 ));
8
9 $read_more_link = 'https://developers.google.com/web/fundamentals/performance/lazy-loading-guidance/images-and-video/';
10
11 ?>
12
13 <div id="wpo_lazy_load_settings">
14 <h3 class="wpo-first-child"><?php esc_html_e('Lazy-load images', 'wp-optimize'); ?></h3>
15 <div class="wpo-fieldgroup premium-only">
16 <p>
17 <?php
18 $message = __('Lazy-loading is a technique that defers loading of non-critical resources (images, video) at page load time.', 'wp-optimize');
19 $message .= ' ';
20 $message .= __('Instead, these non-critical resources are loaded at the point they are needed (e.g. the user scrolls down to them).', 'wp-optimize');
21 echo esc_html($message);
22 ?>
23 <br>
24 <?php $wp_optimize->wp_optimize_url($read_more_link, __('Follow this link to read more about lazy-loading images and video', 'wp-optimize')); ?>
25 </p>
26 <ul>
27 <li><label><input type="checkbox" name="lazyload[images]" <?php checked($lazyload_options['images']); ?> disabled /><?php esc_html_e('Images', 'wp-optimize'); ?></label></li>
28 <li><label><input type="checkbox" name="lazyload[iframes]" <?php checked($lazyload_options['iframes']); ?> disabled /><?php esc_html_e('Iframes and Videos', 'wp-optimize'); ?></label></li>
29 </ul>
30
31 <p>
32 <?php esc_html_e('Skip image classes', 'wp-optimize');?><br>
33 <input type="text" name="lazyload[skip_classes]" id="wpo_lazyload_skip_classes" value="<?php echo esc_attr($lazyload_options['skip_classes']); ?>" disabled readonly /><br>
34 <?php
35 $message = __('Enter the image class or classes comma-separated.', 'wp-optimize');
36 $message .= ' ';
37 $message .= __('Supports wildcards.', 'wp-optimize');
38 $message .= ' ';
39 $message .= __('Example: image-class1, image-class2, thumbnail*, ...', 'wp-optimize');
40 ?>
41 <small><?php echo esc_html($message); ?></small>
42 </p>
43
44 <div class="wpo-unused-image-sizes__premium-mask">
45 <a class="wpo-unused-images__premium-link" href="<?php echo esc_url($wp_optimize->premium_version_link); ?>" target="_blank"><?php esc_html_e('Enable Lazy-loading with WP-Optimize Premium.', 'wp-optimize'); ?></a>
46 </div>
47 </div>
48 </div>
49