| Server IP : 145.239.37.162 / Your IP : 216.73.216.4 Web Server : Apache System : Linux webm003.cluster130.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaa ( 38250) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaa/www/wp-content/plugins/cookie-notice/includes/modules/hummingbird/ |
Upload File : |
<?php
// exit if accessed directly
if ( ! defined( 'ABSPATH' ) )
exit;
use Hummingbird\Core\Utils;
/**
* Cookie Notice Modules Hummingbird class.
*
* Compatibility since: 2.1.0
*
* @class Cookie_Notice_Modules_Hummingbird
*/
class Cookie_Notice_Modules_Hummingbird {
/**
* Constructor.
*
* @return void
*/
public function __construct() {
add_action( 'plugins_loaded', [ $this, 'load_module' ], 11 );
}
/**
* Add compatibility to Hummingbird plugin.
*
* @return void
*/
public function load_module() {
// bail if options class is not available
if ( ! class_exists( 'Hummingbird\Core\Utils' ) )
return;
// get caching module
$mod = Utils::get_module( 'page_cache' );
// is caching enabled?
if ( $mod->is_active() ) {
// delete cache files after updating settings or status
add_action( 'cn_configuration_updated', [ $this, 'delete_cache' ] );
}
}
/**
* Delete all cache files.
*
* @return void
*/
public function delete_cache() {
do_action( 'wphb_clear_page_cache' );
}
}
new Cookie_Notice_Modules_Hummingbird();