HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
File: /datos/www/expodubai.colombia.co/wp-content/plugins/wp-smushit/app/pages/class-lazy.php
<?php
/**
 * Lazy load page.
 *
 * @package Smush\App\Pages
 */

namespace Smush\App\Pages;

use Smush\App\Abstract_Summary_Page;
use Smush\App\Interface_Page;

if ( ! defined( 'WPINC' ) ) {
	die;
}

/**
 * Class Lazy
 */
class Lazy extends Abstract_Summary_Page implements Interface_Page {
	/**
	 * Register meta boxes.
	 */
	public function register_meta_boxes() {
		parent::register_meta_boxes();

		if ( ! $this->settings->get( 'lazy_load' ) ) {
			$this->add_meta_box(
				'lazyload/disabled',
				__( 'Lazy Load', 'wp-smushit' ),
				null,
				null,
				null,
				'main',
				array(
					'box_class' => 'sui-box sui-message sui-no-padding',
				)
			);

			return;
		}

		$this->add_meta_box(
			'lazyload',
			__( 'Lazy Load', 'wp-smushit' ),
			array( $this, 'lazy_load_meta_box' ),
			null,
			array( $this, 'common_meta_box_footer' )
		);
	}

	/**
	 * Common footer meta box.
	 *
	 * @since 3.2.0
	 */
	public function common_meta_box_footer() {
		$this->view( 'meta-box-footer', array(), 'common' );
	}

	/**
	 * Lazy loading meta box.
	 *
	 * @since 3.2.0
	 */
	public function lazy_load_meta_box() {
		$this->view(
			'lazyload/meta-box',
			array(
				'settings' => $this->settings->get_setting( WP_SMUSH_PREFIX . 'lazy_load' ),
				'cpts'     => get_post_types( // custom post types.
					array(
						'public'   => true,
						'_builtin' => false,
					),
					'objects',
					'and'
				),
			)
		);
	}
}