??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/rosestpetronal.nl/wp-content/plugins/litespeed-cache/src/img-optm.cls.php
⬅ Kembali
<?php
/**
* The class to optimize image.
*
* @since 2.0
* @package LiteSpeed
*/
namespace LiteSpeed;
use WpOrg\Requests\Autoload;
use WpOrg\Requests\Requests;
defined( 'WPINC' ) || exit();
/**
* Class Img_Optm
*
* Handles image optimization operations with QUIC.cloud service.
*/
class Img_Optm extends Base {
use Img_Optm_Send;
use Img_Optm_Pull;
use Img_Optm_Manage;
const LOG_TAG = '🗜️';
const CLOUD_ACTION_NEW_REQ = 'new_req';
const CLOUD_ACTION_TAKEN = 'taken';
const CLOUD_ACTION_REQUEST_DESTROY = 'imgoptm_destroy';
const CLOUD_ACTION_CLEAN = 'clean';
const TYPE_NEW_REQ = 'new_req';
const TYPE_RESCAN = 'rescan';
const TYPE_DESTROY = 'destroy';
const TYPE_RESET_COUNTER = 'reset_counter';
const TYPE_CLEAN = 'clean';
const TYPE_PULL = 'pull';
const TYPE_BATCH_SWITCH_ORI = 'batch_switch_ori';
const TYPE_BATCH_SWITCH_OPTM = 'batch_switch_optm';
const TYPE_CALC_BKUP = 'calc_bkup';
const TYPE_RESET_ROW = 'reset_row';
const TYPE_RM_BKUP = 'rm_bkup';
const STATUS_NEW = 0; // 'new';
const STATUS_RAW = 1; // 'raw';
const STATUS_REQUESTED = 3; // 'requested';
const STATUS_NOTIFIED = 6; // 'notified';
const STATUS_DUPLICATED = 8; // 'duplicated';
const STATUS_PULLED = 9; // 'pulled';
const STATUS_FAILED = -1; // 'failed';
const STATUS_MISS = -3; // 'miss';
const STATUS_ERR_FETCH = -5; // 'err_fetch';
const STATUS_ERR_404 = -6; // 'err_404';
const STATUS_ERR_OPTM = -7; // 'err_optm';
const STATUS_XMETA = -8; // 'xmeta';
const STATUS_ERR = -9; // 'err';
const DB_SIZE = 'litespeed-optimize-size';
const DB_SET = 'litespeed-optimize-set';
const DB_NEED_PULL = 'need_pull';
/**
* WordPress upload directory info.
*
* @var array
*/
private $wp_upload_dir;
/**
* Temporary post ID for current operation.
*
* @var int
*/
private $tmp_pid;
/**
* Temporary type for current operation.
*
* @var string
*/
private $tmp_type;
/**
* Temporary path for current operation.
*
* @var string
*/
private $tmp_path;
/**
* Images queued for optimization.
*
* @var array
*/
private $_img_in_queue = [];
/**
* List of existing source files.
*
* @var array
*/
private $_existed_src_list = [];
/**
* Set of post IDs.
*
* @var array
*/
private $_pids_set = [];
/**
* Thumbnail set string.
*
* @var string
*/
private $_thumbnail_set = '';
/**
* Image optimization table name.
*
* @var string
*/
private $_table_img_optm;
/**
* Image optimization working table name.
*
* @var string
*/
private $_table_img_optming;
/**
* Flag indicating if cron has run.
*
* @var bool
*/
private $_cron_ran = false;
/**
* Sizes to skip during optimization.
*
* @var array
*/
private $_sizes_skipped = [];
/**
* Media class instance.
*
* @var Media
*/
private $__media;
/**
* Data class instance.
*
* @var Data
*/
private $__data;
/**
* Summary data.
*
* @var array
*/
protected $_summary;
/**
* Output format (webp/avif).
*
* @var string
*/
private $_format = '';
/**
* Init
*
* @since 2.0
*/
public function __construct() {
Debug2::debug2( '[ImgOptm] init' );
$this->wp_upload_dir = wp_upload_dir();
$this->__media = $this->cls( 'Media' );
$this->__data = $this->cls( 'Data' );
$this->_table_img_optm = $this->__data->tb( 'img_optm' );
$this->_table_img_optming = $this->__data->tb( 'img_optming' );
$this->_summary = self::get_summary();
if ( empty( $this->_summary['next_post_id'] ) ) {
$this->_summary['next_post_id'] = 0;
}
if ( $this->conf( Base::O_IMG_OPTM_WEBP ) ) {
$this->_format = 'webp';
if ( $this->conf( Base::O_IMG_OPTM_WEBP ) === 2 ) {
$this->_format = 'avif';
}
}
// Allow users to ignore custom sizes.
$this->_sizes_skipped = apply_filters( 'litespeed_imgoptm_sizes_skipped', $this->conf( Base::O_IMG_OPTM_SIZES_SKIPPED ) );
}
/**
* Handle all request actions from main cls
*
* @since 2.0
* @access public
*/
public function handler() {
$type = Router::verify_type();
switch ( $type ) {
case self::TYPE_RESET_ROW:
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$id = ! empty( $_GET['id'] ) ? absint( wp_unslash( $_GET['id'] ) ) : false;
$this->reset_row( $id );
break;
case self::TYPE_CALC_BKUP:
$this->_calc_bkup();
break;
case self::TYPE_RM_BKUP:
$this->rm_bkup();
break;
case self::TYPE_NEW_REQ:
$this->new_req();
break;
case self::TYPE_RESCAN:
$this->_rescan();
break;
case self::TYPE_RESET_COUNTER:
$this->_reset_counter();
break;
case self::TYPE_DESTROY:
$this->_destroy();
break;
case self::TYPE_CLEAN:
$this->clean();
break;
case self::TYPE_PULL:
self::start_async();
break;
case self::TYPE_BATCH_SWITCH_ORI:
case self::TYPE_BATCH_SWITCH_OPTM:
$this->batch_switch( $type );
break;
case substr( $type, 0, 4 ) === 'avif':
case substr( $type, 0, 4 ) === 'webp':
case substr( $type, 0, 4 ) === 'orig':
$this->_switch_optm_file( $type );
break;
default:
break;
}
Admin::redirect();
}
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 cdn
dir
—
2026-06-22 10:09
📁 data_structure
dir
—
2026-06-22 10:09
🐘 activation.cls.php
php
17.3 KB
2026-04-01 20:54
🐘 admin-display.cls.php
php
48.5 KB
2026-04-01 20:54
🐘 admin-settings.cls.php
php
11.1 KB
2026-04-01 20:54
🐘 admin.cls.php
php
6.1 KB
2026-04-01 20:54
🐘 api.cls.php
php
10.4 KB
2026-04-01 20:54
🐘 avatar.cls.php
php
8.7 KB
2026-04-01 20:54
🐘 base.cls.php
php
37.7 KB
2026-04-01 20:54
🐘 cdn.cls.php
php
15.9 KB
2026-04-01 20:54
🐘 cloud-auth-callback.trait.php
php
10.4 KB
2026-04-01 20:54
🐘 cloud-auth-ip.trait.php
php
4.3 KB
2026-04-01 20:54
🐘 cloud-auth.trait.php
php
9.4 KB
2026-04-01 20:54
🐘 cloud-misc.trait.php
php
10.3 KB
2026-04-01 20:54
🐘 cloud-node.trait.php
php
5.9 KB
2026-04-01 20:54
🐘 cloud-request.trait.php
php
19.7 KB
2026-04-01 20:54
🐘 cloud.cls.php
php
7.3 KB
2026-04-01 20:54
🐘 conf.cls.php
php
19.5 KB
2026-04-01 20:54
🐘 control.cls.php
php
24.3 KB
2026-04-01 20:54
🐘 core.cls.php
php
21 KB
2026-04-01 20:54
🐘 crawler-map.cls.php
php
19.4 KB
2026-04-01 20:54
🐘 crawler.cls.php
php
44.7 KB
2026-04-01 20:54
🐘 css.cls.php
php
17.8 KB
2026-04-01 20:54
🐘 data.cls.php
php
22.2 KB
2026-04-01 20:54
🐘 data.upgrade.func.php
php
5.7 KB
2026-04-01 20:54
🐘 db-optm.cls.php
php
15.3 KB
2026-04-01 20:54
🐘 debug2.cls.php
php
18.4 KB
2026-04-01 20:54
🐘 doc.cls.php
php
5.4 KB
2026-04-01 20:54
🐘 error.cls.php
php
7.4 KB
2026-04-01 20:54
🐘 esi.cls.php
php
27.2 KB
2026-04-01 20:54
🐘 file.cls.php
php
10.6 KB
2026-04-01 20:54
🐘 guest.cls.php
php
2.8 KB
2026-04-01 20:54
🐘 gui.cls.php
php
36.6 KB
2026-04-01 20:54
🐘 health.cls.php
php
2.8 KB
2026-04-01 20:54
🐘 htaccess.cls.php
php
29.8 KB
2026-04-01 20:54
🐘 img-optm-manage.trait.php
php
30.8 KB
2026-04-01 20:54
🐘 img-optm-pull.trait.php
php
22.1 KB
2026-04-01 20:54
🐘 img-optm-send.trait.php
php
21.9 KB
2026-04-01 20:54
🐘 img-optm.cls.php
php
5.3 KB
2026-04-01 20:54
🐘 import.cls.php
php
4.3 KB
2026-04-01 20:54
🐘 import.preset.cls.php
php
5.5 KB
2026-04-01 20:54
🐘 lang.cls.php
php
17 KB
2026-04-01 20:54
🐘 localization.cls.php
php
4 KB
2026-04-01 20:54
🐘 media.cls.php
php
44.1 KB
2026-04-01 20:54
🐘 metabox.cls.php
php
5.3 KB
2026-04-01 20:54
🐘 object-cache-wp.cls.php
php
18.8 KB
2026-04-01 20:54
🐘 object-cache.cls.php
php
20.9 KB
2026-04-01 20:54
🐘 object.lib.php
php
14.2 KB
2026-04-01 20:54
🐘 optimize.cls.php
php
38.6 KB
2026-04-01 20:54
🐘 optimizer.cls.php
php
10.5 KB
2026-04-01 20:54
🐘 placeholder.cls.php
php
17.9 KB
2026-04-01 20:54
🐘 purge.cls.php
php
34.4 KB
2026-04-01 20:54
🐘 report.cls.php
php
6.1 KB
2026-04-01 20:54
🐘 rest.cls.php
php
9.1 KB
2026-04-01 20:54
🐘 root.cls.php
php
14.3 KB
2026-04-01 20:54
🐘 router.cls.php
php
20.8 KB
2026-04-01 20:54
🐘 str.cls.php
php
3.1 KB
2026-04-01 20:54
🐘 tag.cls.php
php
9.3 KB
2026-04-01 20:54
🐘 task.cls.php
php
7 KB
2026-04-01 20:54
🐘 tool.cls.php
php
4.2 KB
2026-04-01 20:54
🐘 ucss.cls.php
php
16.3 KB
2026-04-01 20:54
🐘 utility.cls.php
php
26 KB
2026-04-01 20:54
🐘 vary.cls.php
php
21.3 KB
2026-04-01 20:54
🐘 vpi.cls.php
php
9.4 KB
2026-04-01 20:54