Current Path: > > usr > src > litespeed-wp-plugin > > 6.5.1 > litespeed-cache > > src
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
cdn | Directory | - | - | |
data_structure | Directory | - | - | |
activation.cls.php | File | 15351 bytes | September 25 2024 22:06:38. | |
admin-display.cls.php | File | 33999 bytes | September 25 2024 22:06:38. | |
admin-settings.cls.php | File | 9750 bytes | September 25 2024 22:06:38. | |
admin.cls.php | File | 4548 bytes | September 25 2024 22:06:38. | |
api.cls.php | File | 11342 bytes | September 25 2024 22:06:38. | |
avatar.cls.php | File | 6208 bytes | September 25 2024 22:06:38. | |
base.cls.php | File | 30959 bytes | September 25 2024 22:06:38. | |
cdn-setup.cls.php | File | 10702 bytes | September 25 2024 22:06:38. | |
cdn.cls.php | File | 13447 bytes | September 25 2024 22:06:38. | |
cloud.cls.php | File | 43495 bytes | September 25 2024 22:06:38. | |
conf.cls.php | File | 19025 bytes | September 25 2024 22:06:38. | |
control.cls.php | File | 22268 bytes | September 25 2024 22:06:38. | |
core.cls.php | File | 20531 bytes | September 25 2024 22:06:38. | |
crawler-map.cls.php | File | 14335 bytes | September 25 2024 22:06:38. | |
crawler.cls.php | File | 35465 bytes | September 25 2024 22:06:38. | |
css.cls.php | File | 13418 bytes | September 25 2024 22:06:38. | |
data.cls.php | File | 17824 bytes | September 25 2024 22:06:38. | |
data.upgrade.func.php | File | 21885 bytes | September 25 2024 22:06:38. | |
db-optm.cls.php | File | 9815 bytes | September 25 2024 22:06:38. | |
debug2.cls.php | File | 13412 bytes | September 25 2024 22:06:38. | |
doc.cls.php | File | 4851 bytes | September 25 2024 22:06:38. | |
error.cls.php | File | 7071 bytes | September 25 2024 22:06:38. | |
esi.cls.php | File | 27553 bytes | September 25 2024 22:06:38. | |
file.cls.php | File | 10378 bytes | September 25 2024 22:06:38. | |
gui.cls.php | File | 28108 bytes | September 25 2024 22:06:38. | |
health.cls.php | File | 2962 bytes | September 25 2024 22:06:38. | |
htaccess.cls.php | File | 24527 bytes | September 25 2024 22:06:38. | |
img-optm.cls.php | File | 61689 bytes | September 25 2024 22:06:38. | |
import.cls.php | File | 4250 bytes | September 25 2024 22:06:38. | |
instance.cls.php | File | 154 bytes | September 25 2024 22:06:38. | |
lang.cls.php | File | 15844 bytes | September 25 2024 22:06:38. | |
localization.cls.php | File | 3464 bytes | September 25 2024 22:06:38. | |
media.cls.php | File | 31770 bytes | September 25 2024 22:06:38. | |
metabox.cls.php | File | 4306 bytes | September 25 2024 22:06:38. | |
object-cache.cls.php | File | 16299 bytes | September 25 2024 22:06:38. | |
object.lib.php | File | 34784 bytes | September 25 2024 22:06:38. | |
optimize.cls.php | File | 37402 bytes | September 25 2024 22:06:38. | |
optimizer.cls.php | File | 9232 bytes | September 25 2024 22:06:38. | |
placeholder.cls.php | File | 14454 bytes | September 25 2024 22:06:38. | |
preset.cls.php | File | 5560 bytes | September 25 2024 22:06:38. | |
purge.cls.php | File | 30500 bytes | September 25 2024 22:06:38. | |
report.cls.php | File | 5456 bytes | September 25 2024 22:06:38. | |
rest.cls.php | File | 8060 bytes | September 25 2024 22:06:38. | |
root.cls.php | File | 12898 bytes | September 25 2024 22:06:38. | |
router.cls.php | File | 19479 bytes | September 25 2024 22:06:38. | |
str.cls.php | File | 1198 bytes | September 25 2024 22:06:38. | |
tag.cls.php | File | 8826 bytes | September 25 2024 22:06:38. | |
task.cls.php | File | 5965 bytes | September 25 2024 22:06:38. | |
tool.cls.php | File | 3370 bytes | September 25 2024 22:06:38. | |
ucss.cls.php | File | 14735 bytes | September 25 2024 22:06:38. | |
utility.cls.php | File | 21129 bytes | September 25 2024 22:06:38. | |
vary.cls.php | File | 19631 bytes | September 25 2024 22:06:38. | |
vpi.cls.php | File | 7586 bytes | September 25 2024 22:06:38. |
<?php /** * The admin-panel specific functionality of the plugin. * * * @since 1.0.0 * @package LiteSpeed_Cache * @subpackage LiteSpeed_Cache/admin * @author LiteSpeed Technologies <info@litespeedtech.com> */ namespace LiteSpeed; defined('WPINC') || exit(); class Admin extends Root { const LOG_TAG = '👮'; const PAGE_EDIT_HTACCESS = 'litespeed-edit-htaccess'; /** * Initialize the class and set its properties. * Run in hook `after_setup_theme` when is_admin() * * @since 1.0.0 */ public function __construct() { // Define LSCWP_MU_PLUGIN if is mu-plugins if (defined('WPMU_PLUGIN_DIR') && dirname(LSCWP_DIR) == WPMU_PLUGIN_DIR) { define('LSCWP_MU_PLUGIN', true); } self::debug('No cache due to Admin page'); defined('DONOTCACHEPAGE') || define('DONOTCACHEPAGE', true); // Additional litespeed assets on admin display // Also register menu $this->cls('Admin_Display'); // initialize admin actions add_action('admin_init', array($this, 'admin_init')); // add link to plugin list page add_filter('plugin_action_links_' . LSCWP_BASENAME, array($this->cls('Admin_Display'), 'add_plugin_links')); } /** * Callback that initializes the admin options for LiteSpeed Cache. * * @since 1.0.0 * @access public */ public function admin_init() { // Hook attachment upload if ($this->conf(Base::O_IMG_OPTM_AUTO)) { add_filter('wp_update_attachment_metadata', array($this, 'wp_update_attachment_metadata'), 9999, 2); } $this->_proceed_admin_action(); // Terminate if user doesn't have the access to settings if (is_network_admin()) { $capability = 'manage_network_options'; } else { $capability = 'manage_options'; } if (!current_user_can($capability)) { return; } // Save setting from admin settings page // NOTE: cli will call `validate_plugin_settings` manually. Cron activation doesn't need to validate // Add privacy policy // @since 2.2.6 if (function_exists('wp_add_privacy_policy_content')) { wp_add_privacy_policy_content(Core::NAME, Doc::privacy_policy()); } $this->cls('Media')->after_admin_init(); do_action('litspeed_after_admin_init'); if ($this->cls('Router')->esi_enabled()) { add_action('in_widget_form', array($this->cls('Admin_Display'), 'show_widget_edit'), 100, 3); add_filter('widget_update_callback', __NAMESPACE__ . '\Admin_Settings::validate_widget_save', 10, 4); } } /** * Handle attachment update * @since 4.0 */ public function wp_update_attachment_metadata($data, $post_id) { $this->cls('Img_Optm')->wp_update_attachment_metadata($data, $post_id); return $data; } /** * Run litespeed admin actions * * @since 1.1.0 */ private function _proceed_admin_action() { // handle actions switch (Router::get_action()) { case Router::ACTION_SAVE_SETTINGS: $this->cls('Admin_Settings')->save($_POST); break; // Save network settings case Router::ACTION_SAVE_SETTINGS_NETWORK: $this->cls('Admin_Settings')->network_save($_POST); break; default: break; } } /** * Clean up the input string of any extra slashes/spaces. * * @since 1.0.4 * @access public * @param string $input The input string to clean. * @return string The cleaned up input. */ public static function cleanup_text($input) { if (is_array($input)) { return array_map(__CLASS__ . '::cleanup_text', $input); } return stripslashes(trim($input)); } /** * After a LSCWP_CTRL action, need to redirect back to the same page * without the nonce and action in the query string. * * If the redirect url cannot be determined, redirects to the homepage. * * @since 1.0.12 * @access public * @global string $pagenow */ public static function redirect($url = false) { global $pagenow; if (!empty($_GET['_litespeed_ori'])) { wp_safe_redirect(wp_get_referer() ?: get_home_url()); exit(); } $qs = ''; if (!$url) { if (!empty($_GET)) { if (isset($_GET[Router::ACTION])) { unset($_GET[Router::ACTION]); } if (isset($_GET[Router::NONCE])) { unset($_GET[Router::NONCE]); } if (isset($_GET[Router::TYPE])) { unset($_GET[Router::TYPE]); } if (isset($_GET['litespeed_i'])) { unset($_GET['litespeed_i']); } if (!empty($_GET)) { $qs = '?' . http_build_query($_GET); } } if (is_network_admin()) { $url = network_admin_url($pagenow . $qs); } else { $url = admin_url($pagenow . $qs); } } wp_redirect($url); exit(); } }
SILENT KILLER Tool