GRAYBYTE WORDPRESS FILE MANAGER1697

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/src/litespeed-wp-plugin/7.2/litespeed-cache/src/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/src/litespeed-wp-plugin/7.2/litespeed-cache/src//admin.cls.php
<?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();
	}
}

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
January 01 1970 00:00:00
root / root
0
cdn
--
June 18 2025 22:15:22
root / root
0755
data_structure
--
June 18 2025 22:15:22
root / root
0755
activation.cls.php
15.062 KB
June 18 2025 22:15:22
root / root
0644
admin-display.cls.php
35.741 KB
June 18 2025 22:15:22
root / root
0644
admin-settings.cls.php
10.949 KB
June 18 2025 22:15:22
root / root
0644
admin.cls.php
4.467 KB
June 18 2025 22:15:22
root / root
0644
api.cls.php
11.521 KB
June 18 2025 22:15:22
root / root
0644
avatar.cls.php
6.12 KB
June 18 2025 22:15:22
root / root
0644
base.cls.php
32.756 KB
June 18 2025 22:15:22
root / root
0644
cdn.cls.php
13.223 KB
June 18 2025 22:15:22
root / root
0644
cloud.cls.php
54.285 KB
June 18 2025 22:15:22
root / root
0644
conf.cls.php
17.387 KB
June 18 2025 22:15:22
root / root
0644
control.cls.php
21.249 KB
June 18 2025 22:15:22
root / root
0644
core.cls.php
20.158 KB
June 18 2025 22:15:22
root / root
0644
crawler-map.cls.php
14.891 KB
June 18 2025 22:15:22
root / root
0644
crawler.cls.php
41.71 KB
June 18 2025 22:15:22
root / root
0644
css.cls.php
15.251 KB
June 18 2025 22:15:22
root / root
0644
data.cls.php
17.981 KB
June 18 2025 22:15:22
root / root
0644
data.upgrade.func.php
23.384 KB
June 18 2025 22:15:22
root / root
0644
db-optm.cls.php
10.157 KB
June 18 2025 22:15:22
root / root
0644
debug2.cls.php
13.169 KB
June 18 2025 22:15:22
root / root
0644
doc.cls.php
4.732 KB
June 18 2025 22:15:22
root / root
0644
error.cls.php
7.487 KB
June 18 2025 22:15:22
root / root
0644
esi.cls.php
27.166 KB
June 18 2025 22:15:22
root / root
0644
file.cls.php
10.526 KB
June 18 2025 22:15:22
root / root
0644
gui.cls.php
27.776 KB
June 18 2025 22:15:22
root / root
0644
health.cls.php
2.901 KB
June 18 2025 22:15:22
root / root
0644
htaccess.cls.php
24.13 KB
June 18 2025 22:15:22
root / root
0644
img-optm.cls.php
65.273 KB
June 18 2025 22:15:22
root / root
0644
import.cls.php
4.18 KB
June 18 2025 22:15:22
root / root
0644
import.preset.cls.php
5.481 KB
June 18 2025 22:15:22
root / root
0644
lang.cls.php
14.913 KB
June 18 2025 22:15:22
root / root
0644
localization.cls.php
3.42 KB
June 18 2025 22:15:22
root / root
0644
media.cls.php
33.177 KB
June 18 2025 22:15:22
root / root
0644
metabox.cls.php
4.262 KB
June 18 2025 22:15:22
root / root
0644
object-cache.cls.php
16.487 KB
June 18 2025 22:15:22
root / root
0644
object.lib.php
34.132 KB
June 18 2025 22:15:22
root / root
0644
optimize.cls.php
37.19 KB
June 18 2025 22:15:22
root / root
0644
optimizer.cls.php
9.486 KB
June 18 2025 22:15:22
root / root
0644
placeholder.cls.php
14.258 KB
June 18 2025 22:15:22
root / root
0644
purge.cls.php
30.847 KB
June 18 2025 22:15:22
root / root
0644
report.cls.php
6.189 KB
June 18 2025 22:15:22
root / root
0644
rest.cls.php
7.519 KB
June 18 2025 22:15:22
root / root
0644
root.cls.php
12.841 KB
June 18 2025 22:15:22
root / root
0644
router.cls.php
19.943 KB
June 18 2025 22:15:22
root / root
0644
str.cls.php
2.454 KB
June 18 2025 22:15:22
root / root
0644
tag.cls.php
9.274 KB
June 18 2025 22:15:22
root / root
0644
task.cls.php
6.136 KB
June 18 2025 22:15:22
root / root
0644
tool.cls.php
3.409 KB
June 18 2025 22:15:22
root / root
0644
ucss.cls.php
14.313 KB
June 18 2025 22:15:22
root / root
0644
utility.cls.php
20.819 KB
June 18 2025 22:15:22
root / root
0644
vary.cls.php
20.175 KB
June 18 2025 22:15:22
root / root
0644
vpi.cls.php
7.261 KB
June 18 2025 22:15:22
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF