| Server IP : 167.179.152.94 / Your IP : 216.73.216.169 Web Server : Apache/2.4.66 (Debian) System : Linux 6d8cbb3dc321 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : ( 1000) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/visual-portfolio/classes/3rd/plugins/ |
Upload File : |
<?php
/**
* WP Rocket Plugin.
*
* @package visual-portfolio
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class Visual_Portfolio_3rd_WP_Rocket
*/
class Visual_Portfolio_3rd_WP_Rocket {
/**
* Visual_Portfolio_3rd_WP_Rocket constructor.
*/
public function __construct() {
// Fix conflict with lazy loading.
add_filter( 'rocket_delay_js_exclusions', array( $this, 'rocket_delay_js_exclusions' ) );
}
/**
* Exclude all our lazysizes scripts from delayed loading,
* because WP Rocket excluded lazysizes automatically, but not other assets,
* this causes problems with lazy loading.
*
* @param array $excluded excluded scripts.
*
* @return array
*/
public function rocket_delay_js_exclusions( $excluded ) {
$excluded[] = 'visual-portfolio/build/assets/js/lazysizes';
$excluded[] = 'visual-portfolio-pro/core-plugin/build/assets/js/lazysizes';
return $excluded;
}
}
new Visual_Portfolio_3rd_WP_Rocket();