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:
@@ -0,0 +1,32 @@
|
||||
<?php declare( strict_types=1 );
|
||||
|
||||
namespace KadenceWP\KadenceBlocks\Optimizer\Translation;
|
||||
|
||||
use KadenceWP\KadenceBlocks\StellarWP\ProphecyMonorepo\Container\Contracts\Provider as Provider_Contract;
|
||||
|
||||
final class Provider extends Provider_Contract {
|
||||
|
||||
/**
|
||||
* If you update the text repository translations, ensure to match to the
|
||||
* assets/js/optimizer/constant.js file.
|
||||
*/
|
||||
public function register(): void {
|
||||
$this->container->singleton( Text_Repository::class, Text_Repository::class );
|
||||
|
||||
$this->container->when( Text_Repository::class )
|
||||
->needs( '$labels' )
|
||||
->give(
|
||||
static fn(): array => [
|
||||
Text_Repository::RUN_OPTIMIZER => __( 'Run Optimizer', 'kadence-blocks' ),
|
||||
Text_Repository::REMOVE_OPTIMIZATION => __( 'Remove Optimization', 'kadence-blocks' ),
|
||||
Text_Repository::OPTIMIZED => __( 'Optimized', 'kadence-blocks' ),
|
||||
Text_Repository::OPTIMIZING => __( 'Optimizing', 'kadence-blocks' ),
|
||||
Text_Repository::NOT_OPTIMIZED => __( 'Not Optimized', 'kadence-blocks' ),
|
||||
Text_Repository::NOT_OPTIMIZABLE => __( 'Not Optimizable', 'kadence-blocks' ),
|
||||
Text_Repository::EXCLUDED => __( 'Excluded', 'kadence-blocks' ),
|
||||
Text_Repository::OPTIMIZATION_OUTDATED => __( 'Optimization Outdated', 'kadence-blocks' ),
|
||||
Text_Repository::OPTIMIZATION_OUTDATED_RUN => __( 'Optimization Outdated. Run again?', 'kadence-blocks' ),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php declare( strict_types=1 );
|
||||
|
||||
namespace KadenceWP\KadenceBlocks\Optimizer\Translation;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Provides shared translated strings.
|
||||
*/
|
||||
final class Text_Repository {
|
||||
|
||||
public const RUN_OPTIMIZER = 'runOptimizer';
|
||||
public const REMOVE_OPTIMIZATION = 'removeOptimization';
|
||||
public const OPTIMIZED = 'optimized';
|
||||
public const OPTIMIZING = 'optimizing';
|
||||
public const NOT_OPTIMIZED = 'notOptimized';
|
||||
public const NOT_OPTIMIZABLE = 'notOptimizable';
|
||||
public const EXCLUDED = 'excluded';
|
||||
public const OPTIMIZATION_OUTDATED = 'outdated';
|
||||
public const OPTIMIZATION_OUTDATED_RUN = 'outdateRunOptimizer';
|
||||
|
||||
/**
|
||||
* @var array<string, string> $labels Translated labels indexed by the above constants.
|
||||
*/
|
||||
private array $labels;
|
||||
|
||||
/**
|
||||
* @param array<string, string> $labels Translated labels indexed by the above constants.
|
||||
*/
|
||||
public function __construct( array $labels ) {
|
||||
$this->labels = $labels;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a translated label.
|
||||
*
|
||||
* @param string $key
|
||||
*
|
||||
* @throws InvalidArgumentException If passed a key that doesn't exist.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get( string $key ): string {
|
||||
if ( ! isset( $this->labels[ $key ] ) ) {
|
||||
throw new InvalidArgumentException( "Unknown label key: $key" );
|
||||
}
|
||||
|
||||
return $this->labels[ $key ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all labels.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function all(): array {
|
||||
return $this->labels;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user