X7ROOT File Manager
Current Path:
/usr/src/litespeed-wp-plugin/7.8.0.1/litespeed-cache/src
usr
/
src
/
litespeed-wp-plugin
/
7.8.0.1
/
litespeed-cache
/
src
/
??
..
??
activation.cls.php
(17.31 KB)
??
admin-display.cls.php
(48.47 KB)
??
admin-settings.cls.php
(11.12 KB)
??
admin.cls.php
(6.13 KB)
??
api.cls.php
(10.36 KB)
??
avatar.cls.php
(8.65 KB)
??
base.cls.php
(37.66 KB)
??
cdn
??
cdn.cls.php
(15.92 KB)
??
cloud-auth-callback.trait.php
(10.43 KB)
??
cloud-auth-ip.trait.php
(4.33 KB)
??
cloud-auth.trait.php
(9.38 KB)
??
cloud-misc.trait.php
(10.32 KB)
??
cloud-node.trait.php
(5.95 KB)
??
cloud-request.trait.php
(19.68 KB)
??
cloud.cls.php
(7.32 KB)
??
conf.cls.php
(19.53 KB)
??
control.cls.php
(24.35 KB)
??
core.cls.php
(20.97 KB)
??
crawler-map.cls.php
(19.41 KB)
??
crawler.cls.php
(44.72 KB)
??
css.cls.php
(17.77 KB)
??
data.cls.php
(22.21 KB)
??
data.upgrade.func.php
(5.72 KB)
??
data_structure
??
db-optm.cls.php
(15.35 KB)
??
debug2.cls.php
(18.4 KB)
??
doc.cls.php
(5.45 KB)
??
error.cls.php
(7.35 KB)
??
esi.cls.php
(27.18 KB)
??
file.cls.php
(10.57 KB)
??
guest.cls.php
(2.75 KB)
??
gui.cls.php
(36.57 KB)
??
health.cls.php
(2.83 KB)
??
htaccess.cls.php
(29.81 KB)
??
img-optm-manage.trait.php
(30.85 KB)
??
img-optm-pull.trait.php
(22.1 KB)
??
img-optm-send.trait.php
(21.9 KB)
??
img-optm.cls.php
(5.26 KB)
??
import.cls.php
(4.29 KB)
??
import.preset.cls.php
(5.5 KB)
??
lang.cls.php
(17.02 KB)
??
localization.cls.php
(4.03 KB)
??
media.cls.php
(44.08 KB)
??
metabox.cls.php
(5.29 KB)
??
object-cache-wp.cls.php
(18.82 KB)
??
object-cache.cls.php
(20.95 KB)
??
object.lib.php
(14.16 KB)
??
optimize.cls.php
(38.64 KB)
??
optimizer.cls.php
(10.5 KB)
??
placeholder.cls.php
(17.93 KB)
??
purge.cls.php
(34.41 KB)
??
report.cls.php
(6.12 KB)
??
rest.cls.php
(9.08 KB)
??
root.cls.php
(14.29 KB)
??
router.cls.php
(20.76 KB)
??
str.cls.php
(3.08 KB)
??
tag.cls.php
(9.26 KB)
??
task.cls.php
(7.05 KB)
??
tool.cls.php
(4.17 KB)
??
ucss.cls.php
(16.35 KB)
??
utility.cls.php
(26.01 KB)
??
vary.cls.php
(21.33 KB)
??
vpi.cls.php
(9.38 KB)
Editing: img-optm.cls.php
<?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(); } }
Upload File
Create Folder