PluginProbe
Powerkit – Supercharge your WordPress Site / 2.4.4
Powerkit – Supercharge your WordPress Site v2.4.4
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 / admin / class-powerkit-lazyload-admin.php

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

51 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The admin-specific functionality of the module.
4 *
5 * @link https://codesupply.co
6 * @since 1.0.0
7 *
8 * @package Powerkit
9 * @subpackage Modules/Admin
10 */
11
12 /**
13 * The admin-specific functionality of the module.
14 */
15 class Powerkit_Lazyload_Admin extends Powerkit_Module_Admin {
16
17 /**
18 * Initialize
19 */
20 public function initialize() {
21 add_action( 'admin_init', array( $this, 'register_settings_section' ) );
22 }
23
24 /**
25 * Register admin page
26 *
27 * @since 1.0.0
28 */
29 public function register_settings_section() {
30
31 add_settings_section( 'powerkit_lazyload_settings', sprintf( '<span id="%s">%s</span>', powerkit_get_page_slug( $this->slug ), esc_html__( 'Lazy Load', 'powerkit' ) ), array( $this, 'powerkit_lazyload_settings_callback' ), 'media' );
32
33 register_setting( 'media', 'powerkit_lazyload_csco_lqip' );
34 }
35
36 /**
37 * Section Description.
38 *
39 * @since 1.0.0
40 */
41 public function powerkit_lazyload_settings_callback() {
42 ?>
43 <label>
44 <input class="regular-text" id="powerkit_lazyload_csco_lqip" name="powerkit_lazyload_csco_lqip" type="checkbox" value="true" <?php checked( (bool) get_option( 'powerkit_lazyload_csco_lqip', false ) ); ?>>
45 <?php esc_html_e( 'Displays Low Quality Image Placeholders while the image is loading. Make sure you regenerate thumbnails after saving.', 'powerkit' ); ?>
46 </label>
47 <br><br>
48 <?php
49 }
50 }
51