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: 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. * * @since 1.0.12 * @access public * @global string $pagenow */ public static function redirect( $url = false ) { global $pagenow; if ( ! empty( $_GET[ '_litespeed_ori' ] ) ) { wp_redirect( $_SERVER[ 'HTTP_REFERER' ] ); 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; } }
Upload File
Create Folder