Fase 1: Estructura Base y DI Container - Clean Architecture
COMPLETADO: Fase 1 de la migración a Clean Architecture + POO ## Estructura de Carpetas - ✓ Estructura completa de 4 capas (Domain, Application, Infrastructure, Presentation) - ✓ Carpetas de Use Cases (SaveComponent, GetComponent, DeleteComponent, SyncSchema) - ✓ Estructura de tests (Unit, Integration, E2E) - ✓ Carpetas de schemas y templates ## Composer y Autoloading - ✓ PSR-4 autoloading configurado para ROITheme namespace - ✓ Autoloader optimizado regenerado ## DI Container - ✓ DIContainer implementado con patrón Singleton - ✓ Métodos set(), get(), has() para gestión de servicios - ✓ Getters específicos para ComponentRepository, ValidationService, CacheService - ✓ Placeholders que serán implementados en Fase 5 - ✓ Prevención de clonación y deserialización ## Interfaces - ✓ ComponentRepositoryInterface (Domain) - ✓ ValidationServiceInterface (Application) - ✓ CacheServiceInterface (Application) - ✓ Component entity placeholder (Domain) ## Bootstrap - ✓ functions.php actualizado con carga de Composer autoloader - ✓ Inicialización del DIContainer - ✓ Helper function roi_container() disponible globalmente ## Tests - ✓ 10 tests unitarios para DIContainer (100% cobertura) - ✓ Total: 13 tests unitarios, 28 assertions - ✓ Suite de tests pasando correctamente ## Validación - ✓ Script de validación automatizado (48/48 checks pasados) - ✓ 100% de validaciones exitosas La arquitectura base está lista para la Fase 2. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
44
single.php
44
single.php
@@ -5,7 +5,7 @@
|
||||
* Replica EXACTAMENTE la estructura del template RDash (líneas 135-1020)
|
||||
* Sin wrappers extra de WordPress tradicional.
|
||||
*
|
||||
* @package Apus_Theme
|
||||
* @package ROI_Theme
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
@@ -63,7 +63,7 @@ get_header();
|
||||
the_content();
|
||||
|
||||
wp_link_pages(array(
|
||||
'before' => '<div class="page-links">' . esc_html__('Pages:', 'apus-theme'),
|
||||
'before' => '<div class="page-links">' . esc_html__('Pages:', 'roi-theme'),
|
||||
'after' => '</div>',
|
||||
));
|
||||
?>
|
||||
@@ -71,7 +71,7 @@ get_header();
|
||||
|
||||
<!-- Share Buttons (Template líneas 786-810) -->
|
||||
<div class="my-5 py-4 border-top">
|
||||
<p class="mb-3 text-muted"><?php esc_html_e('Compartir:', 'apus-theme'); ?></p>
|
||||
<p class="mb-3 text-muted"><?php esc_html_e('Compartir:', 'roi-theme'); ?></p>
|
||||
<div class="d-flex gap-2 flex-wrap share-buttons">
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode(get_permalink()); ?>"
|
||||
class="btn btn-outline-primary btn-sm"
|
||||
@@ -116,11 +116,11 @@ get_header();
|
||||
</div>
|
||||
|
||||
<!-- CTA A/B Testing -->
|
||||
<?php apus_display_cta(); ?>
|
||||
<?php roi_display_cta(); ?>
|
||||
|
||||
<!-- Related Posts (Template líneas 843-981) -->
|
||||
<div class="my-5 related-posts">
|
||||
<h2 class="h3 mb-4"><?php esc_html_e('Descubre Más Contenido', 'apus-theme'); ?></h2>
|
||||
<h2 class="h3 mb-4"><?php esc_html_e('Descubre Más Contenido', 'roi-theme'); ?></h2>
|
||||
<div class="row g-4">
|
||||
<?php
|
||||
// Query para related posts
|
||||
@@ -154,11 +154,11 @@ get_header();
|
||||
</div>
|
||||
|
||||
<!-- Pagination (Template líneas 957-980) -->
|
||||
<nav aria-label="<?php esc_attr_e('Navegación de posts relacionados', 'apus-theme'); ?>" class="mt-4">
|
||||
<nav aria-label="<?php esc_attr_e('Navegación de posts relacionados', 'roi-theme'); ?>" class="mt-4">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#" aria-label="<?php esc_attr_e('Inicio', 'apus-theme'); ?>">
|
||||
<?php esc_html_e('Inicio', 'apus-theme'); ?>
|
||||
<a class="page-link" href="#" aria-label="<?php esc_attr_e('Inicio', 'roi-theme'); ?>">
|
||||
<?php esc_html_e('Inicio', 'roi-theme'); ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item active" aria-current="page">
|
||||
@@ -169,11 +169,11 @@ get_header();
|
||||
<li class="page-item"><a class="page-link" href="#">4</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">5</a></li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#"><?php esc_html_e('Ver más', 'apus-theme'); ?></a>
|
||||
<a class="page-link" href="#"><?php esc_html_e('Ver más', 'roi-theme'); ?></a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="#" aria-label="<?php esc_attr_e('Fin', 'apus-theme'); ?>">
|
||||
<?php esc_html_e('Fin', 'apus-theme'); ?>
|
||||
<a class="page-link" href="#" aria-label="<?php esc_attr_e('Fin', 'roi-theme'); ?>">
|
||||
<?php esc_html_e('Fin', 'roi-theme'); ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -211,27 +211,27 @@ get_header();
|
||||
<div class="row">
|
||||
<!-- Columna izquierda: Info de contacto -->
|
||||
<div class="col-lg-5 mb-4 mb-lg-0">
|
||||
<h2 class="h3 mb-3"><?php esc_html_e('¿Tienes alguna pregunta?', 'apus-theme'); ?></h2>
|
||||
<p class="mb-4"><?php esc_html_e('Completa el formulario y nuestro equipo te responderá en menos de 24 horas.', 'apus-theme'); ?></p>
|
||||
<h2 class="h3 mb-3"><?php esc_html_e('¿Tienes alguna pregunta?', 'roi-theme'); ?></h2>
|
||||
<p class="mb-4"><?php esc_html_e('Completa el formulario y nuestro equipo te responderá en menos de 24 horas.', 'roi-theme'); ?></p>
|
||||
<div class="contact-info">
|
||||
<div class="d-flex align-items-start mb-3">
|
||||
<i class="bi bi-telephone-fill me-3 fs-5" style="color: #FF8600;"></i>
|
||||
<div>
|
||||
<h6 class="mb-1"><?php esc_html_e('Teléfono', 'apus-theme'); ?></h6>
|
||||
<h6 class="mb-1"><?php esc_html_e('Teléfono', 'roi-theme'); ?></h6>
|
||||
<p class="mb-0 text-muted">+52 55 1234 5678</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-start mb-3">
|
||||
<i class="bi bi-envelope-fill me-3 fs-5" style="color: #FF8600;"></i>
|
||||
<div>
|
||||
<h6 class="mb-1"><?php esc_html_e('Email', 'apus-theme'); ?></h6>
|
||||
<h6 class="mb-1"><?php esc_html_e('Email', 'roi-theme'); ?></h6>
|
||||
<p class="mb-0 text-muted">contacto@apumexico.com</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-start">
|
||||
<i class="bi bi-geo-alt-fill me-3 fs-5" style="color: #FF8600;"></i>
|
||||
<div>
|
||||
<h6 class="mb-1"><?php esc_html_e('Ubicación', 'apus-theme'); ?></h6>
|
||||
<h6 class="mb-1"><?php esc_html_e('Ubicación', 'roi-theme'); ?></h6>
|
||||
<p class="mb-0 text-muted">Ciudad de México, México</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -242,23 +242,23 @@ get_header();
|
||||
<form id="footerContactForm">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="footerFullName" name="fullName" placeholder="<?php esc_attr_e('Nombre completo *', 'apus-theme'); ?>" required>
|
||||
<input type="text" class="form-control" id="footerFullName" name="fullName" placeholder="<?php esc_attr_e('Nombre completo *', 'roi-theme'); ?>" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="footerCompany" name="company" placeholder="<?php esc_attr_e('Empresa', 'apus-theme'); ?>">
|
||||
<input type="text" class="form-control" id="footerCompany" name="company" placeholder="<?php esc_attr_e('Empresa', 'roi-theme'); ?>">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="tel" class="form-control" id="footerWhatsapp" name="whatsapp" placeholder="<?php esc_attr_e('WhatsApp *', 'apus-theme'); ?>" required>
|
||||
<input type="tel" class="form-control" id="footerWhatsapp" name="whatsapp" placeholder="<?php esc_attr_e('WhatsApp *', 'roi-theme'); ?>" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="email" class="form-control" id="footerEmail" name="email" placeholder="<?php esc_attr_e('Correo electrónico *', 'apus-theme'); ?>" required>
|
||||
<input type="email" class="form-control" id="footerEmail" name="email" placeholder="<?php esc_attr_e('Correo electrónico *', 'roi-theme'); ?>" required>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<textarea class="form-control" id="footerComments" name="comments" rows="4" placeholder="<?php esc_attr_e('¿En qué podemos ayudarte?', 'apus-theme'); ?>"></textarea>
|
||||
<textarea class="form-control" id="footerComments" name="comments" rows="4" placeholder="<?php esc_attr_e('¿En qué podemos ayudarte?', 'roi-theme'); ?>"></textarea>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button type="submit" class="btn btn-contact-submit w-100">
|
||||
<i class="bi bi-send-fill me-2"></i><?php esc_html_e('Enviar Mensaje', 'apus-theme'); ?>
|
||||
<i class="bi bi-send-fill me-2"></i><?php esc_html_e('Enviar Mensaje', 'roi-theme'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<div id="footerFormMessage" class="col-12 mt-2 alert" style="display: none;"></div>
|
||||
|
||||
Reference in New Issue
Block a user