Files
Malin 6daabcab65 feat: caching, optimization, legal pages & footer
- WP Super Cache enabled (PHP mode, gzip, Nginx compatible)
- Autoptimize: CSS/HTML minification + deferred JS + Google Fonts optimization
- Cookie Notice: GDPR/LOPD banner styled with brand colors (navy/burgundy/gold)
- Legal pages: Aviso Legal, Política de Privacidad, Política de Cookies (ES)
- MU-plugin: custom footer with legal links + Cloud Host credit
- Footer: copyright, legal nav, Hosted & Maintained by Cloud Host (cloudhost.es)
- Security: X-Frame-Options, X-Content-Type, Referrer-Policy headers
- Security: XML-RPC disabled, REST user enumeration blocked
- Performance: emoji scripts removed, post revisions limited to 3
2026-05-19 19:58:11 +02:00

60 lines
1.2 KiB
PHP

<?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();