HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: /home/mirz4654/www/wp-content/plugins/wp-rocket/inc/3rd-party/themes/avada.php
<?php
defined( 'ABSPATH' ) || die( 'Cheatin&#8217; uh?' );

$current_theme = wp_get_theme();

if ( 'Avada' === $current_theme->get( 'Name' ) ) {
	// When Avada theme purge its own cache.
	add_action( 'avada_clear_dynamic_css_cache',  'rocket_clean_domain' );

	/**
	 * Exclude fusion styles from cache busting to prevent cache dir issues
	 *
	 * @author Remy Perona
	 *
	 * @param array $excluded_files An array of excluded files.
	 * @return array
	 */
	function rocket_exclude_avada_dynamic_css( $excluded_files ) {
		$upload_dir = wp_upload_dir();

		$excluded_files[] = rocket_clean_exclude_file( $upload_dir['baseurl'] . '/fusion-styles/(.*)' );

		return $excluded_files;
	}
	add_filter( 'rocket_exclude_cache_busting', 'rocket_exclude_avada_dynamic_css' );

	/**
	 * Deactivate WP Rocket lazyload if Avada lazyload is enabled
	 *
	 * @since 3.3.4
	 * @author Remy Perona
	 *
	 * @param string $old_value Previous Avada option value.
	 * @param string $value New Avada option value.
	 * @return void
	 */
	function rocket_avada_maybe_deactivate_lazyload( $old_value, $value ) {
		if ( empty( $old_value['lazy_load'] ) && ! empty( $value['lazy_load'] ) ) {
			update_rocket_option( 'lazyload', 0 );
		}
	}
	add_action( 'update_option_fusion_options', 'rocket_avada_maybe_deactivate_lazyload', 10, 2 );
}

/**
 * Disable WP Rocket lazyload field if Avada lazyload is enabled
 *
 * @since 3.3.4
 * @author Remy Perona
 *
 * @return bool
 */
function rocket_avada_maybe_disable_lazyload() {
	$avada_options = get_option( 'fusion_options' );
	$current_theme = wp_get_theme();

	if ( 'Avada' === $current_theme->get( 'Name' ) && ! empty( $avada_options['lazy_load'] ) ) {
		return true;
	}

	return false;
}

/**
 * Clears WP Rocket's cache after Avada's Fusion Patcher flushes their caches
 *
 * @since 3.3.5
 * @author Vasilis Manthos
 */
function rocket_avada_clear_cache_fusion_patcher() {
	rocket_clean_domain();
}
add_action( 'fusion_cache_reset_after', 'rocket_avada_clear_cache_fusion_patcher' );