X7ROOT File Manager
Current Path:
/home/hamdjcne/public_html/wp-content/plugins/litespeed-cache/src
home
/
hamdjcne
/
public_html
/
wp-content
/
plugins
/
litespeed-cache
/
src
/
ðŸ“
..
📄
activation.cls.php
(15.06 KB)
📄
admin-display.cls.php
(35.74 KB)
📄
admin-settings.cls.php
(10.95 KB)
📄
admin.cls.php
(4.47 KB)
📄
api.cls.php
(11.52 KB)
📄
avatar.cls.php
(6.12 KB)
📄
base.cls.php
(32.76 KB)
ðŸ“
cdn
📄
cdn.cls.php
(13.22 KB)
📄
cloud.cls.php
(54.29 KB)
📄
conf.cls.php
(17.39 KB)
📄
control.cls.php
(21.25 KB)
📄
core.cls.php
(20.16 KB)
📄
crawler-map.cls.php
(14.89 KB)
📄
crawler.cls.php
(41.71 KB)
📄
css.cls.php
(15.25 KB)
📄
data.cls.php
(17.98 KB)
📄
data.upgrade.func.php
(23.38 KB)
ðŸ“
data_structure
📄
db-optm.cls.php
(10.16 KB)
📄
debug2.cls.php
(13.17 KB)
📄
doc.cls.php
(4.73 KB)
📄
error.cls.php
(7.49 KB)
📄
esi.cls.php
(27.17 KB)
📄
file.cls.php
(10.53 KB)
📄
gui.cls.php
(27.78 KB)
📄
health.cls.php
(2.9 KB)
📄
htaccess.cls.php
(24.13 KB)
📄
img-optm.cls.php
(65.27 KB)
📄
import.cls.php
(4.18 KB)
📄
import.preset.cls.php
(5.48 KB)
📄
lang.cls.php
(14.91 KB)
📄
localization.cls.php
(3.42 KB)
📄
media.cls.php
(33.18 KB)
📄
metabox.cls.php
(4.26 KB)
📄
object-cache.cls.php
(16.49 KB)
📄
object.lib.php
(34.13 KB)
📄
optimize.cls.php
(37.19 KB)
📄
optimizer.cls.php
(9.49 KB)
📄
placeholder.cls.php
(14.26 KB)
📄
purge.cls.php
(30.85 KB)
📄
report.cls.php
(6.19 KB)
📄
rest.cls.php
(7.52 KB)
📄
root.cls.php
(12.84 KB)
📄
router.cls.php
(19.94 KB)
📄
str.cls.php
(2.45 KB)
📄
tag.cls.php
(9.27 KB)
📄
task.cls.php
(6.14 KB)
📄
tool.cls.php
(3.41 KB)
📄
ucss.cls.php
(14.31 KB)
📄
utility.cls.php
(20.82 KB)
📄
vary.cls.php
(20.17 KB)
📄
vpi.cls.php
(7.26 KB)
Editing: tool.cls.php
<?php /** * The tools * * @since 3.0 * @package LiteSpeed * @subpackage LiteSpeed/inc * @author LiteSpeed Technologies <info@litespeedtech.com> */ namespace LiteSpeed; defined('WPINC') || exit(); class Tool extends Root { const LOG_TAG = '[Tool]'; /** * Get public IP * * @since 3.0 * @access public */ public function check_ip() { self::debug('✅ check_ip'); $response = wp_safe_remote_get('https://cyberpanel.sh/?ip', array( 'headers' => array( 'User-Agent' => 'curl/8.7.1', ), )); if (is_wp_error($response)) { return __('Failed to detect IP', 'litespeed-cache'); } $ip = trim($response['body']); self::debug('result [ip] ' . $ip); if (Utility::valid_ipv4($ip)) { return $ip; } return __('Failed to detect IP', 'litespeed-cache'); } /** * Heartbeat Control * * NOTE: since WP4.9, there could be a core bug that sometimes the hook is not working. * * @since 3.0 * @access public */ public function heartbeat() { add_action('wp_enqueue_scripts', array( $this, 'heartbeat_frontend' )); add_action('admin_enqueue_scripts', array( $this, 'heartbeat_backend' )); add_filter('heartbeat_settings', array( $this, 'heartbeat_settings' )); } /** * Heartbeat Control frontend control * * @since 3.0 * @access public */ public function heartbeat_frontend() { if (!$this->conf(Base::O_MISC_HEARTBEAT_FRONT)) { return; } if (!$this->conf(Base::O_MISC_HEARTBEAT_FRONT_TTL)) { wp_deregister_script('heartbeat'); Debug2::debug('[Tool] Deregistered frontend heartbeat'); } } /** * Heartbeat Control backend control * * @since 3.0 * @access public */ public function heartbeat_backend() { if ($this->_is_editor()) { if (!$this->conf(Base::O_MISC_HEARTBEAT_EDITOR)) { return; } if (!$this->conf(Base::O_MISC_HEARTBEAT_EDITOR_TTL)) { wp_deregister_script('heartbeat'); Debug2::debug('[Tool] Deregistered editor heartbeat'); } } else { if (!$this->conf(Base::O_MISC_HEARTBEAT_BACK)) { return; } if (!$this->conf(Base::O_MISC_HEARTBEAT_BACK_TTL)) { wp_deregister_script('heartbeat'); Debug2::debug('[Tool] Deregistered backend heartbeat'); } } } /** * Heartbeat Control settings * * @since 3.0 * @access public */ public function heartbeat_settings( $settings ) { // Check editor first to make frontend editor valid too if ($this->_is_editor()) { if ($this->conf(Base::O_MISC_HEARTBEAT_EDITOR)) { $settings['interval'] = $this->conf(Base::O_MISC_HEARTBEAT_EDITOR_TTL); Debug2::debug('[Tool] Heartbeat interval set to ' . $this->conf(Base::O_MISC_HEARTBEAT_EDITOR_TTL)); } } elseif (!is_admin()) { if ($this->conf(Base::O_MISC_HEARTBEAT_FRONT)) { $settings['interval'] = $this->conf(Base::O_MISC_HEARTBEAT_FRONT_TTL); Debug2::debug('[Tool] Heartbeat interval set to ' . $this->conf(Base::O_MISC_HEARTBEAT_FRONT_TTL)); } } elseif ($this->conf(Base::O_MISC_HEARTBEAT_BACK)) { $settings['interval'] = $this->conf(Base::O_MISC_HEARTBEAT_BACK_TTL); Debug2::debug('[Tool] Heartbeat interval set to ' . $this->conf(Base::O_MISC_HEARTBEAT_BACK_TTL)); } return $settings; } /** * If is in editor * * @since 3.0 * @access public */ private function _is_editor() { $res = is_admin() && Utility::str_hit_array($_SERVER['REQUEST_URI'], array( 'post.php', 'post-new.php' )); return apply_filters('litespeed_is_editor', $res); } }
Upload File
Create Folder