Edit File by line
/home/zeestwma/ajeebong.../wp-conte...
File: object-cache.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Plugin Name: LiteSpeed Cache - Object Cache (Drop-in)
[3] Fix | Delete
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
[4] Fix | Delete
* Description: High-performance page caching and site optimization from LiteSpeed.
[5] Fix | Delete
* Version: 6.3
[6] Fix | Delete
* Author: LiteSpeed Technologies
[7] Fix | Delete
* Author URI: https://www.litespeedtech.com
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
defined('WPINC') || exit;
[11] Fix | Delete
/**
[12] Fix | Delete
* LiteSpeed Object Cache
[13] Fix | Delete
*
[14] Fix | Delete
* @since 1.8
[15] Fix | Delete
*/
[16] Fix | Delete
[17] Fix | Delete
!defined('LSCWP_OBJECT_CACHE') && define('LSCWP_OBJECT_CACHE', true);
[18] Fix | Delete
[19] Fix | Delete
// Initialize const `LSCWP_DIR` and locate LSCWP plugin folder
[20] Fix | Delete
$lscwp_dir = (defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins') . '/litespeed-cache/';
[21] Fix | Delete
[22] Fix | Delete
// Use plugin as higher priority than MU plugin
[23] Fix | Delete
if (!file_exists($lscwp_dir . 'litespeed-cache.php')) {
[24] Fix | Delete
// Check if is mu plugin or not
[25] Fix | Delete
$lscwp_dir = (defined('WPMU_PLUGIN_DIR') ? WPMU_PLUGIN_DIR : WP_CONTENT_DIR . '/mu-plugins') . '/litespeed-cache/';
[26] Fix | Delete
if (!file_exists($lscwp_dir . 'litespeed-cache.php')) {
[27] Fix | Delete
$lscwp_dir = '';
[28] Fix | Delete
}
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
$data_file = WP_CONTENT_DIR . '/.litespeed_conf.dat';
[32] Fix | Delete
$lib_file = $lscwp_dir . 'src/object.lib.php';
[33] Fix | Delete
[34] Fix | Delete
// Can't find LSCWP location, terminate object cache process
[35] Fix | Delete
if (!$lscwp_dir || !file_exists($data_file) || (!file_exists($lib_file))) {
[36] Fix | Delete
if (!is_admin()) { // Bypass object cache for frontend
[37] Fix | Delete
require_once ABSPATH . WPINC . '/cache.php';
[38] Fix | Delete
} else {
[39] Fix | Delete
$err = 'Can NOT find LSCWP path for object cache initialization in ' . __FILE__;
[40] Fix | Delete
error_log($err);
[41] Fix | Delete
add_action(is_network_admin() ? 'network_admin_notices' : 'admin_notices', function () use (&$err) {
[42] Fix | Delete
echo $err;
[43] Fix | Delete
});
[44] Fix | Delete
}
[45] Fix | Delete
} else {
[46] Fix | Delete
if (!LSCWP_OBJECT_CACHE) { // Disable cache
[47] Fix | Delete
wp_using_ext_object_cache(false);
[48] Fix | Delete
}
[49] Fix | Delete
// Init object cache & LSCWP
[50] Fix | Delete
else if (file_exists($lib_file)) {
[51] Fix | Delete
require_once $lib_file;
[52] Fix | Delete
}
[53] Fix | Delete
}
[54] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function