PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 6.4.4
Jetpack – WP Security, Backup, Speed, & Growth v6.4.4
12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 All 500 releases
jetpack / modules / lazy-images.php
lazy-images.php
41 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Module Name: Lazy Images
5 * Module Description: Lazy load images
6 * Jumpstart Description: Lazy-loading images improve your site's speed and create a smoother viewing experience. Images will load as visitors scroll down the screen, instead of all at once.
7 * Sort Order: 24
8 * Recommendation Order: 14
9 * First Introduced: 5.6.0
10 * Requires Connection: No
11 * Auto Activate: No
12 * Module Tags: Appearance, Recommended
13 * Feature: Appearance, Jumpstart
14 * Additional Search Queries: mobile, theme, performance, image
15 */
16
17 /**
18 * This module relies heavily upon the Lazy Load plugin which was worked on by
19 * Mohammad Jangda (batmoo), the WordPress.com VIP team, the TechCrunch 2011
20 * redesign team, and Jake Goldman of 10up LLC.
21 *
22 * The JavaScript has been updated to rely on InterSection observer instead of
23 * jQuery Sonar. Many thanks to Dean Hume (deanhume) and his example:
24 * https://github.com/deanhume/lazy-observer-load
25 */
26
27 require_once( JETPACK__PLUGIN_DIR . 'modules/lazy-images/lazy-images.php' );
28
29 /*
30 * Initialize lazy images on the wp action so that conditional
31 * tags are safe to use.
32 *
33 * As an example, this is important if a theme wants to disable lazy images except
34 * on single posts, pages, or attachments by short-circuiting lazy images when
35 * is_singular() returns false.
36 *
37 * See: https://github.com/Automattic/jetpack/issues/8888
38 */
39
40 add_action( 'wp', array( 'Jetpack_Lazy_Images', 'instance' ) );
41