X7ROOT File Manager
Current Path:
/home/katmhsmi/lifecoachbostonma.com/wp-content/plugins/litespeed-cache/src
home
/
katmhsmi
/
lifecoachbostonma.com
/
wp-content
/
plugins
/
litespeed-cache
/
src
/
📁
..
📄
activation.cls.php
(15.06 KB)
📄
admin-display.cls.php
(33.98 KB)
📄
admin-settings.cls.php
(9.15 KB)
📄
admin.cls.php
(4.51 KB)
📄
api.cls.php
(11.28 KB)
📄
avatar.cls.php
(6.26 KB)
📄
base.cls.php
(30.87 KB)
📁
cdn
📄
cdn-setup.cls.php
(9.76 KB)
📄
cdn.cls.php
(13.52 KB)
📄
cloud.cls.php
(40 KB)
📄
conf.cls.php
(18.9 KB)
📄
control.cls.php
(20.75 KB)
📄
core.cls.php
(19.6 KB)
📄
crawler-map.cls.php
(13.44 KB)
📄
crawler.cls.php
(31.24 KB)
📄
css.cls.php
(13.07 KB)
📄
data.cls.php
(17.3 KB)
📄
data.upgrade.func.php
(22.31 KB)
📁
data_structure
📄
db-optm.cls.php
(8.66 KB)
📄
debug2.cls.php
(11.98 KB)
📄
doc.cls.php
(4.04 KB)
📄
error.cls.php
(6.38 KB)
📄
esi.cls.php
(26.45 KB)
📄
file.cls.php
(10.47 KB)
📄
gui.cls.php
(27.87 KB)
📄
health.cls.php
(3 KB)
📄
htaccess.cls.php
(24.33 KB)
📄
img-optm.cls.php
(55.81 KB)
📄
import.cls.php
(4.32 KB)
📄
instance.cls.php
(153 B)
📄
lang.cls.php
(16.64 KB)
📄
localization.cls.php
(3.53 KB)
📄
media.cls.php
(27.1 KB)
📄
metabox.cls.php
(4.22 KB)
📄
object-cache.cls.php
(15.82 KB)
📄
object.lib.php
(33.85 KB)
📄
optimize.cls.php
(35.34 KB)
📄
optimizer.cls.php
(8.81 KB)
📄
placeholder.cls.php
(14.5 KB)
📄
preset.cls.php
(5.56 KB)
📄
purge.cls.php
(30.43 KB)
📄
report.cls.php
(5.43 KB)
📄
rest.cls.php
(7.62 KB)
📄
root.cls.php
(12.9 KB)
📄
router.cls.php
(17.82 KB)
📄
str.cls.php
(1.18 KB)
📄
tag.cls.php
(8.78 KB)
📄
task.cls.php
(4.41 KB)
📄
tool.cls.php
(3.41 KB)
📄
ucss.cls.php
(14.77 KB)
📄
utility.cls.php
(21.15 KB)
📄
vary.cls.php
(19.63 KB)
📄
vpi.cls.php
(7.54 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 { /** * Get public IP * * @since 3.0 * @access public */ public function check_ip() { Debug2::debug( '[Tool] ✅ check_ip' ); $response = wp_remote_get( 'https://www.doapi.us/ip' ); if ( is_wp_error( $response ) ) { return new \WP_Error( 'remote_get_fail', 'Failed to fetch from https://www.doapi.us/ip', array( 'status' => 404 ) ); } $data = $response[ 'body' ]; Debug2::debug( '[Tool] result [ip] ' . $data ); return $data; } /** * 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 ) ); } } else { if ( $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