Server IP : 85.214.239.14 / Your IP : 216.73.216.26 Web Server : Apache/2.4.65 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/wordpress/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() { // actions add_action( 'init', [ $this, 'load_module' ] ); } /** * 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' ); // valid object? if ( is_a( $mod, 'Hummingbird\Core\Modules\Page_Cache' ) && method_exists( $mod, 'is_active' ) ) { // 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();