-
WIBUHAX0R1337
-
/
home
/
coludnqa
/
xtrasolutionsco.com
/
wp-content
/
plugins
/
litespeed-cache
/
src
/
[ Home ]
Create Folder
Create File
Nama File / Folder
Size
Action
cdn
--
NONE
data_structure
--
NONE
activation.cls.php
17.437KB
Edit File
Delete File
Rename
admin-display.cls.php
48.119KB
Edit File
Delete File
Rename
admin-settings.cls.php
11.116KB
Edit File
Delete File
Rename
admin.cls.php
5.046KB
Edit File
Delete File
Rename
api.cls.php
10.437KB
Edit File
Delete File
Rename
avatar.cls.php
8.682KB
Edit File
Delete File
Rename
base.cls.php
34.58KB
Edit File
Delete File
Rename
cdn.cls.php
15.918KB
Edit File
Delete File
Rename
cloud.cls.php
65.796KB
Edit File
Delete File
Rename
conf.cls.php
19.53KB
Edit File
Delete File
Rename
control.cls.php
24.349KB
Edit File
Delete File
Rename
core.cls.php
21.015KB
Edit File
Delete File
Rename
crawler-map.cls.php
19.428KB
Edit File
Delete File
Rename
crawler.cls.php
42.195KB
Edit File
Delete File
Rename
css.cls.php
15.271KB
Edit File
Delete File
Rename
data.cls.php
16.49KB
Edit File
Delete File
Rename
data.upgrade.func.php
3.073KB
Edit File
Delete File
Rename
db-optm.cls.php
10.341KB
Edit File
Delete File
Rename
debug2.cls.php
14.17KB
Edit File
Delete File
Rename
doc.cls.php
4.066KB
Edit File
Delete File
Rename
error.cls.php
7.383KB
Edit File
Delete File
Rename
esi.cls.php
27.182KB
Edit File
Delete File
Rename
file.cls.php
10.569KB
Edit File
Delete File
Rename
gui.cls.php
36.503KB
Edit File
Delete File
Rename
health.cls.php
2.831KB
Edit File
Delete File
Rename
htaccess.cls.php
24.002KB
Edit File
Delete File
Rename
img-optm.cls.php
65.13KB
Edit File
Delete File
Rename
import.cls.php
4.292KB
Edit File
Delete File
Rename
import.preset.cls.php
5.501KB
Edit File
Delete File
Rename
lang.cls.php
15.06KB
Edit File
Delete File
Rename
localization.cls.php
3.439KB
Edit File
Delete File
Rename
media.cls.php
40.368KB
Edit File
Delete File
Rename
metabox.cls.php
5.316KB
Edit File
Delete File
Rename
object-cache-wp.cls.php
24.667KB
Edit File
Delete File
Rename
object-cache.cls.php
20.301KB
Edit File
Delete File
Rename
object.lib.php
13.31KB
Edit File
Delete File
Rename
optimize.cls.php
38.663KB
Edit File
Delete File
Rename
optimizer.cls.php
9.414KB
Edit File
Delete File
Rename
placeholder.cls.php
14.187KB
Edit File
Delete File
Rename
purge.cls.php
33.95KB
Edit File
Delete File
Rename
report.cls.php
6.119KB
Edit File
Delete File
Rename
rest.cls.php
8.637KB
Edit File
Delete File
Rename
root.cls.php
13.987KB
Edit File
Delete File
Rename
router.cls.php
20.568KB
Edit File
Delete File
Rename
str.cls.php
3.15KB
Edit File
Delete File
Rename
tag.cls.php
9.259KB
Edit File
Delete File
Rename
task.cls.php
6.132KB
Edit File
Delete File
Rename
tool.cls.php
4.217KB
Edit File
Delete File
Rename
ucss.cls.php
14.374KB
Edit File
Delete File
Rename
utility.cls.php
21.763KB
Edit File
Delete File
Rename
vary.cls.php
20.201KB
Edit File
Delete File
Rename
vpi.cls.php
9.363KB
Edit File
Delete File
Rename
<?php // phpcs:ignoreFile /** * The tools * * @since 3.0 * @package LiteSpeed */ namespace LiteSpeed; defined( 'WPINC' ) || exit(); /** * Class Tool * * Provides utility functions for LiteSpeed Cache, including IP detection and heartbeat control. * * @since 3.0 */ class Tool extends Root { const LOG_TAG = '[Tool]'; /** * Get public IP * * Retrieves the public IP address of the server. * * @since 3.0 * @access public * @return string The public IP address or an error message. */ 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 esc_html__( 'Failed to detect IP', 'litespeed-cache' ); } $ip = trim( $response['body'] ); self::debug( 'result [ip] ' . $ip ); if ( Utility::valid_ipv4( $ip ) ) { return $ip; } return esc_html__( 'Failed to detect IP', 'litespeed-cache' ); } /** * Heartbeat Control * * Configures WordPress heartbeat settings for frontend, backend, and editor. * * @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 * * Manages heartbeat settings for the frontend. * * @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 * * Manages heartbeat settings for the backend and editor. * * @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 * * Adjusts heartbeat interval settings based on configuration. * * @since 3.0 * @access public * @param array $settings Existing heartbeat settings. * @return array Modified heartbeat settings. */ 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; } /** * Check if in editor * * Determines if the current request is within the WordPress editor. * * @since 3.0 * @access public * @return bool True if in editor, false otherwise. */ public function is_editor() { $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; $res = is_admin() && Utility::str_hit_array( $request_uri, array( 'post.php', 'post-new.php' ) ); return apply_filters( 'litespeed_is_editor', $res ); } }
Save!!!
© 2022 - 2023 WIBUHAXOR V1 By Lutfifakee || Padang Blackhat