HEX
Server: LiteSpeed
System: Linux atali.colombiahosting.com.co 5.14.0-570.12.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 13 06:11:55 EDT 2025 x86_64
User: coopserp (1713)
PHP: 8.2.29
Disabled: dl,exec,passthru,proc_open,proc_close,shell_exec,memory_limit,system,popen,curl_multi_exec,show_source,symlink,link,leak,listen,diskfreespace,tmpfile,ignore_user_abord,highlight_file,source,show_source,fpaththru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setid,posix_times,posix_ttyname,posix_uname,proc_get_status,proc_nice,proc_terminate
Upload Files
File: /home/coopserp/public_html/wp-content/plugins/speedycache-pro/main/prooptimizations.php
<?php

namespace SpeedyCache;

if(!defined('ABSPATH')){
	die('HACKING ATTEMPT');
}

class ProOptimizations{
	static $content = '';

	// function init(&$content){
		// self::$content = $content;
	// }
	
	static function defer_js(&$content){
		global $speedycache;

		\SpeedyCache\Enhanced::init();
		$content = \SpeedyCache\Enhanced::render_blocking($content);
	}
	
	static function delay_js(&$content){
		global $speedycache;

		\SpeedyCache\Enhanced::init();
		if(empty($speedycache->enhanced)){
			$speedycache->enhanced['html'] = $content;
		}

		$content = \SpeedyCache\Enhanced::delay_js($content);
	}
	
	static function unused_css(){
		$url = esc_url(speedycache_optserver('HTTP_HOST'). speedycache_optserver('REQUEST_URI'));

		if(strpos($url, '?test_speedycache') !== FALSE){
			\SpeedyCache\UnusedCss::generate(array($url));
		} else {
			\SpeedyCache\UnusedCss::schedule('speedycache_unused_css', array($url));
		}
	}
	
	static function critical_css(){
		$url = esc_url(speedycache_optserver('HTTP_HOST'). speedycache_optserver('REQUEST_URI'));

		if(strpos($url, '?test_speedycache') !== FALSE){
			\SpeedyCache\CriticalCss::generate(array($url));
		} else {
			\SpeedyCache\CriticalCss::schedule('speedycache_generate_ccss', array($url));
		}
	}
	
	static function img_lazy_load(&$content){

		// to disable for Ajax Load More on the pages
		if(speedycache_is_plugin_active('ajax-load-more/ajax-load-more.php') && !empty($_SERVER['REQUEST_URI']) && preg_match("/\/page\/\d+\//", sanitize_url(wp_unslash($_SERVER['REQUEST_URI'])))){
			return;
		}

		$content = \SpeedyCache\Enhanced::lazy_load($content);
		$lazy_load_js = '';
		
		if(file_exists(SPEEDYCACHE_PRO_DIR . '/main/lazyload.php')){
			$lazy_load_js = \SpeedyCache\LazyLoad::get_js_source();
		}

		$content = preg_replace("/\s*<\/head\s*>/i", $lazy_load_js.'</head>', $content, 1);
	}
	
	static function remove_gfonts(&$content){
		if(!empty($speedycache->bloat['remove_gfonts'])){
			$content = preg_replace('/<link[^<>]*\/\/fonts\.(googleapis|google|gstatic)\.com[^<>]*>/i', '', $content);
		}
	}
}