- 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
35 lines
743 B
PHP
35 lines
743 B
PHP
<?php
|
|
/**
|
|
* WP-CLI commands for Autoptimize.
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
// This is a WP-CLI command, so bail if it's not available.
|
|
if ( ! defined( 'WP_CLI' ) ) {
|
|
return;
|
|
}
|
|
|
|
class autoptimizeCLI extends \WP_CLI_Command
|
|
{
|
|
/**
|
|
* Clears the cache.
|
|
*
|
|
* @subcommand clear
|
|
*
|
|
* @param array $args Args.
|
|
* @param array $args_assoc Associative args.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function clear( $args, $args_assoc ) {
|
|
WP_CLI::line( esc_html__( 'Flushing the cache...', 'autoptimize' ) );
|
|
autoptimizeCache::clearall();
|
|
WP_CLI::success( esc_html__( 'Cache flushed.', 'autoptimize' ) );
|
|
}
|
|
}
|
|
|
|
WP_CLI::add_command( 'autoptimize', 'autoptimizeCLI' );
|