/home/fortodpl/thecutediva.com/wp-content/plugins/litespeed-cache/src
NameSizeModeActions
cdn/-0755rm
data_structure/-0755rm
activation.cls.php180400644editdlrm
admin-display.cls.php499290644editdlrm
admin-settings.cls.php130780644editdlrm
admin.cls.php62760644editdlrm
api.cls.php106860644editdlrm
avatar.cls.php94720644editdlrm
base.cls.php385600644editdlrm
cdn.cls.php181830644editdlrm
cloud-auth-callback.trait.php106830644editdlrm
cloud-auth-ip.trait.php44330644editdlrm
cloud-auth.trait.php96080644editdlrm
cloud-misc.trait.php105720644editdlrm
cloud-node.trait.php60900644editdlrm
cloud-queue-svc.cls.php95580644editdlrm
cloud-request.trait.php201570644editdlrm
cloud.cls.php75000644editdlrm
conf.cls.php200000644editdlrm
control.cls.php249330644editdlrm
core.cls.php220460644editdlrm
crawler-map.cls.php228330644editdlrm
crawler.cls.php450600644editdlrm
css.cls.php74300644editdlrm
data.cls.php227330644editdlrm
data.upgrade.func.php65640644editdlrm
db-optm.cls.php157160644editdlrm
debug2.cls.php188420644editdlrm
doc.cls.php55770644editdlrm
error.cls.php75300644editdlrm
esi.cls.php321220644editdlrm
file.cls.php140780644editdlrm
guest.cls.php28210644editdlrm
gui.cls.php359330644editdlrm
health.cls.php47710644editdlrm
htaccess.cls.php305260644editdlrm
img-optm-manage.trait.php320030644editdlrm
img-optm-pull.trait.php226320644editdlrm
img-optm-send.trait.php212730644editdlrm
img-optm.cls.php53720644editdlrm
import.cls.php43950644editdlrm
import.preset.cls.php56330644editdlrm
lang.cls.php174300644editdlrm
localization.cls.php41230644editdlrm
media.cls.php451220644editdlrm
metabox.cls.php54190644editdlrm
object-cache-wp.cls.php192680644editdlrm
object-cache.cls.php223460644editdlrm
object.lib.php141800644editdlrm
optimax.cls.php91540644editdlrm
optimize.cls.php396740644editdlrm
optimizer.cls.php130120644editdlrm
placeholder.cls.php180600644editdlrm
purge.cls.php363300644editdlrm
report.cls.php77130644editdlrm
rest.cls.php81360644editdlrm
root.cls.php146310644editdlrm
router.cls.php213590644editdlrm
str.cls.php31560644editdlrm
tag.cls.php94810644editdlrm
task.cls.php91930644editdlrm
tool.cls.php46870644editdlrm
ucss.cls.php75200644editdlrm
utility.cls.php277570644editdlrm
vary.cls.php218420644editdlrm
vpi.cls.php43510644editdlrm
Edit: /home/fortodpl/thecutediva.com/wp-content/plugins/litespeed-cache/src/import.preset.cls.php (5633B)
dirlist(self::BACKUP_DIR) ?: array() ); rsort($backups); return $backups; } /** * Removes extra backup files * * @since 5.3.0 * @access public */ public static function prune_backups() { $backups = self::get_backups(); global $wp_filesystem; foreach (array_slice($backups, self::MAX_BACKUPS) as $backup) { $path = self::get_backup($backup); $wp_filesystem->delete($path); Debug2::debug('[Preset] Deleted old backup from ' . $backup); } } /** * Returns a settings file's extensionless basename given its filesystem path * * @since 5.3.0 * @access public */ public static function basename( $path ) { return basename($path, '.data'); } /** * Returns a standard preset's path given its extensionless basename * * @since 5.3.0 * @access public */ public static function get_standard( $name ) { return path_join(self::STANDARD_DIR, $name . '.data'); } /** * Returns a backup's path given its extensionless basename * * @since 5.3.0 * @access public */ public static function get_backup( $name ) { return path_join(self::BACKUP_DIR, $name . '.data'); } /** * Initializes the global $wp_filesystem object and clears stat cache * * @since 5.3.0 */ static function init_filesystem() { require_once ABSPATH . '/wp-admin/includes/file.php'; \WP_Filesystem(); clearstatcache(); } /** * Init * * @since 5.3.0 */ public function __construct() { Debug2::debug('[Preset] Init'); $this->_summary = self::get_summary(); } /** * Applies a standard preset's settings given its extensionless basename * * @since 5.3.0 * @access public */ public function apply( $preset ) { $this->make_backup($preset); $path = self::get_standard($preset); $result = $this->import_file($path) ? $preset : 'error'; $this->log($result); } /** * Restores settings from the backup file with the given timestamp, then deletes the file * * @since 5.3.0 * @access public */ public function restore( $timestamp ) { $backups = array(); foreach (self::get_backups() as $backup) { if (preg_match('/^backup-' . $timestamp . '(-|$)/', $backup) === 1) { $backups[] = $backup; } } if (empty($backups)) { $this->log('error'); return; } $backup = $backups[0]; $path = self::get_backup($backup); if (!$this->import_file($path)) { $this->log('error'); return; } self::init_filesystem(); global $wp_filesystem; $wp_filesystem->delete($path); Debug2::debug('[Preset] Deleted most recent backup from ' . $backup); $this->log('backup'); } /** * Saves current settings as a backup file, then prunes extra backup files * * @since 5.3.0 * @access public */ public function make_backup( $preset ) { $backup = 'backup-' . time() . '-before-' . $preset; $data = $this->export(true); $path = self::get_backup($backup); File::save($path, $data, true); Debug2::debug('[Preset] Backup saved to ' . $backup); self::prune_backups(); } /** * Tries to import from a given settings file * * @since 5.3.0 */ function import_file( $path ) { $debug = function ( $result, $name ) { $action = $result ? 'Applied' : 'Failed to apply'; Debug2::debug('[Preset] ' . $action . ' settings from ' . $name); return $result; }; $name = self::basename($path); $contents = file_get_contents($path); if (false === $contents) { Debug2::debug('[Preset] ❌ Failed to get file contents'); return $debug(false, $name); } $parsed = array(); try { // Check if the data is v4+ if (strpos($contents, '["_version",') === 0) { $contents = explode("\n", $contents); foreach ($contents as $line) { $line = trim($line); if (empty($line)) { continue; } list($key, $value) = \json_decode($line, true); $parsed[$key] = $value; } } else { $parsed = \json_decode(base64_decode($contents), true); } } catch (\Exception $ex) { Debug2::debug('[Preset] ❌ Failed to parse serialized data'); return $debug(false, $name); } if (empty($parsed)) { Debug2::debug('[Preset] ❌ Nothing to apply'); return $debug(false, $name); } $this->cls('Conf')->update_confs($parsed); return $debug(true, $name); } /** * Updates the log * * @since 5.3.0 */ function log( $preset ) { $this->_summary['preset'] = $preset; $this->_summary['preset_timestamp'] = time(); self::save_summary(); } /** * Handles all request actions from main cls * * @since 5.3.0 * @access public */ public function handler() { $type = Router::verify_type(); switch ($type) { case self::TYPE_APPLY: $this->apply(!empty($_GET['preset']) ? $_GET['preset'] : false); break; case self::TYPE_RESTORE: $this->restore(!empty($_GET['timestamp']) ? $_GET['timestamp'] : false); break; default: break; } Admin::redirect(); } }