PluginProbe
Powerkit – Supercharge your WordPress Site / 2.2.9
Powerkit – Supercharge your WordPress Site v2.2.9
3.1.1 3.1.0 3.0.9 3.0.8 trunk 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 All 87 releases
powerkit / modules / lazyload / class-powerkit-lazyload.php

class-powerkit-lazyload.php in Powerkit – Supercharge your WordPress Site 2.2.9, at modules/lazyload/class-powerkit-lazyload.php

60 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Lazy Load
4 *
5 * @package Powerkit
6 * @subpackage Modules
7 */
8
9 /**
10 * Init module
11 */
12 class Powerkit_Lazyload extends Powerkit_Module {
13
14 /**
15 * Register module
16 */
17 public function register() {
18 $this->name = esc_html__( 'Lazy Load', 'powerkit' );
19 $this->desc = esc_html__( 'The Lazy Load module enables loading images when a user scrolls close to them, making images load only when needed and saving the user’s bandwidth.', 'powerkit' );
20 $this->slug = 'lazyload';
21 $this->type = 'default';
22 $this->category = 'basic';
23 $this->priority = 1020;
24 $this->public = true;
25 $this->enabled = false;
26 $this->badge = esc_html__( 'Advanced', 'powerkit' );
27 $this->links = array(
28 array(
29 'name' => esc_html__( 'Go to settings', 'powerkit' ),
30 'url' => admin_url( sprintf( 'options-media.php#%s', powerkit_get_page_slug( $this->slug ) ) ),
31 ),
32 array(
33 'name' => esc_html__( 'View documentation', 'powerkit' ),
34 'url' => powerkit_get_setting( 'documentation' ) . '/image-optimization/lazy-load/',
35 'target' => '_blank',
36 ),
37 );
38 }
39
40 /**
41 * Initialize module
42 */
43 public function initialize() {
44
45 /* Load the required dependencies for this module */
46
47 // Helpers Functions for the module.
48 require_once dirname( __FILE__ ) . '/helpers/helper-powerkit-lazyload.php';
49
50 // Admin and public area.
51 require_once dirname( __FILE__ ) . '/admin/class-powerkit-lazyload-admin.php';
52 require_once dirname( __FILE__ ) . '/public/class-powerkit-lazyload-public.php';
53
54 new Powerkit_Lazyload_Admin( $this->slug );
55 new Powerkit_Lazyload_Public( $this->slug );
56 }
57 }
58
59 new Powerkit_Lazyload();
60