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

54 lines
1.1 KiB
PHP

<?php
// exit if accessed directly
if ( ! defined( 'ABSPATH' ) )
exit;
/**
* Cookie Notice Modules WP-Optimize class.
*
* Compatibility since: 3.0.12
*
* @class Cookie_Notice_Modules_WPOptimize
*/
class Cookie_Notice_Modules_WPOptimize {
/**
* Constructor.
*
* @return void
*/
public function __construct() {
// has to be executed on plugins_loaded with priority 0
$this->load_module();
}
/**
* Add compatibility to WP-Optimize plugin.
*
* @return void
*/
public function load_module() {
// get wp-optimize configuration
if ( class_exists( 'WPO_Cache_Config' ) ) {
$options = WPO_Cache_Config::instance()->get();
// is caching enabled?
if ( ! empty( $options['enable_page_caching'] ) )
add_filter( 'wpo_purge_cache_hooks', [ $this, 'add_purge_cache' ] );
}
}
/**
* Add action when cache is purged.
*
* @param array $actions
* @return array
*/
public function add_purge_cache( $actions ) {
$actions[] = 'cn_configuration_updated';
return $actions;
}
}
new Cookie_Notice_Modules_WPOptimize();