HEX
Server: Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
System: Linux sv2.tribox.net.br 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64
User: bucalon (1051)
PHP: 8.2.13
Disabled: system,exec,shell_exec,popen,passthru,proc_open,posix_getpwnam,posix_getpwuid,posix_kill,pcntl_fork,escapeshellarg,escapeshellcmd,proc_close,dl,show_source,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,pcntl_exec,expect_popen,pcntl_signal_get_handler,pcntl_async_signals,link,symlink,syslog,ld,mb_send_mail,imap_open,imap_mail,libvirt_connect,gnupg_init,stream_socket_sendto,stream_socket_client,parse_ini_file,curl_multi_exec
Upload Files
File: /home/bucalon/public_html/wp-content/plugins/foobox-image-lightbox/compatibility/class-wprocket.php
<?php

if ( ! class_exists( 'foobox_compatibilty_wprocket' ) ) {

	class foobox_compatibilty_wprocket {

		public function __construct() {
			add_action( 'plugins_loaded', array( $this, 'init' ) );
		}

		function init() {
			if ( defined( 'WP_ROCKET_VERSION') ) {
				add_filter( 'rocket_excluded_inline_js_content', array( $this, 'add_foobox_to_excluded_inline_js' ) );
				add_filter( 'rocket_delay_js_scripts', array( $this, 'remove_allowed_keywords' ) );
				add_filter( 'rocket_defer_inline_exclusions', array( $this, 'add_foobox_to_defer_inline_exclusions') );
			}
		}

		function add_foobox_to_defer_inline_exclusions( $regex ) {
			return $regex . '|FOOBOX';
		}

		function remove_allowed_keywords( $delay_js_scripts ) {
			if ( is_array( $delay_js_scripts ) ) {
				//these defaults are causing FooBox script to be delayed, which breaks FooBox
				unset( $delay_js_scripts[ array_search( "ga( '", $delay_js_scripts ) ] );
				unset( $delay_js_scripts[ array_search( "ga('", $delay_js_scripts ) ] );
			}

			return $delay_js_scripts;
		}

		function add_foobox_to_excluded_inline_js( $excluded_inline ) {
			if ( is_array( $excluded_inline ) ) {
				$excluded_inline[] = 'FOOBOX';
			}

			return $excluded_inline;
		}
	}
}