feat: initial ACRIB WordPress deployment

- WordPress 6.9.4 (es_ES) with Kadence theme
- Homepage: Hero, La Asociación, Pilares, Beneficios, Eventos, Miembros, Hazte Miembro, Contacto
- Brand identity: #13294b navy, #a12932 burgundy, #c69c48 gold
- Fonts: Raleway (headings) + Source Sans 3 (body) + Lato (UI)
- Plugins: Kadence Blocks, Polylang, Contact Form 7
- Custom CSS with full brand styling and responsive layout
- HTTPS enforced via wp-config.php proxy detection
This commit is contained in:
Malin
2026-05-19 19:25:59 +02:00
commit f3ff7b7186
6119 changed files with 1984255 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php declare( strict_types=1 );
namespace KadenceWP\KadenceBlocks\Optimizer\Request;
use KadenceWP\KadenceBlocks\StellarWP\ProphecyMonorepo\Container\Contracts\Provider as Provider_Contract;
final class Provider extends Provider_Contract {
public function register(): void {
$this->register_request();
$this->register_request_anonymizer();
}
private function register_request(): void {
$this->container->singleton( Request::class, Request::class );
}
private function register_request_anonymizer(): void {
$this->container->singleton( Request_Anonymizer::class, Request_Anonymizer::class );
add_action(
'plugins_loaded',
function () {
$this->container->get( Request_Anonymizer::class )->force_anonymous_request();
},
2
);
}
}

View File

@@ -0,0 +1,36 @@
<?php declare( strict_types=1 );
namespace KadenceWP\KadenceBlocks\Optimizer\Request;
use KadenceWP\KadenceBlocks\StellarWP\SuperGlobals\SuperGlobals as SG;
final class Request {
public const QUERY_NOCACHE = 'nocache';
public const QUERY_TOKEN = 'perf_token';
public const QUERY_OPTIMIZER_PREVIEW = 'kb_optimizer_preview';
public const MIN_LENGTH = 5;
/**
* Check if this request is an optimizer request.
*
* @return bool
*/
public function is_optimizer_request(): bool {
$no_cache = SG::get_get_var( self::QUERY_NOCACHE );
$token = SG::get_get_var( self::QUERY_TOKEN );
return $this->is_valid_param( $no_cache ) && $this->is_valid_param( $token );
}
/**
* Validate a request parameter: must be an alphanumeric string and a minimum length.
*
* @param mixed $value The query parameter value.
*
* @return bool
*/
private function is_valid_param( $value ): bool {
return is_string( $value ) && strlen( $value ) >= self::MIN_LENGTH && ctype_alnum( $value );
}
}

View File

@@ -0,0 +1,51 @@
<?php declare( strict_types=1 );
namespace KadenceWP\KadenceBlocks\Optimizer\Request;
use KadenceWP\KadenceBlocks\Optimizer\Nonce\Nonce;
use KadenceWP\KadenceBlocks\StellarWP\SuperGlobals\SuperGlobals as SG;
/**
* Handles the anonymization of authenticated requests for performance optimization.
*
* This class detects optimizer requests using a nonce-based query parameter and
* forces them to run as anonymous (logged-out) requests. This ensures that
* performance testing through iframes captures the public-facing version of
* pages without any user-specific customizations or cached content.
*/
final class Request_Anonymizer {
private Nonce $nonce;
public function __construct( Nonce $nonce ) {
$this->nonce = $nonce;
}
/**
* Detect if this is an optimizer request, and log the user out for that request so
* we're loading the public version of the URL through the iframe.
*
* @filter plugins_loaded
*
* @return void
*/
public function force_anonymous_request(): void {
$nonce = SG::get_get_var( Request::QUERY_TOKEN );
if ( ! $nonce ) {
return;
}
// If using a browser that supports IFrame credentialless, they will be logged out already.
if ( ! is_user_logged_in() ) {
return;
}
if ( ! $this->nonce->verify( $nonce ) ) {
wp_die( 'Invalid optimizer nonce.', 403 );
}
// Override the current user for the remainder of this request.
wp_set_current_user( 0 );
}
}