feat(templates): add archive-header and post-grid components
- Add ArchiveHeader component (schema, renderer, formbuilder) - Add PostGrid component (schema, renderer, formbuilder) - Unify archive templates (home, archive, category, tag, author, date, search) - Add page visibility system with VisibilityDefaults - Register components in AdminDashboardRenderer - Fix boolean conversion in functions-addon.php - All 172 unit tests passed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ final class MigratePageVisibilityService
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Ejecuta la migración para todos los componentes
|
||||
* Ejecuta la migracion para todos los componentes
|
||||
*
|
||||
* @return array{created: int, skipped: int}
|
||||
*/
|
||||
@@ -37,10 +37,10 @@ final class MigratePageVisibilityService
|
||||
continue;
|
||||
}
|
||||
|
||||
// Usar constante compartida (DRY)
|
||||
// Usar defaults especificos por componente si existen
|
||||
$this->visibilityRepository->createDefaultVisibility(
|
||||
$componentName,
|
||||
VisibilityDefaults::DEFAULT_VISIBILITY
|
||||
VisibilityDefaults::getForComponent($componentName)
|
||||
);
|
||||
$created++;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,10 @@ final class WordPressPageTypeDetector implements PageTypeDetectorInterface
|
||||
|
||||
public function isHome(): bool
|
||||
{
|
||||
return is_front_page();
|
||||
// is_front_page() = pagina de inicio configurada
|
||||
// is_home() = pagina de posts (blog)
|
||||
// Ambas cuentan como "home" para visibilidad
|
||||
return is_front_page() || is_home();
|
||||
}
|
||||
|
||||
public function isPost(): bool
|
||||
|
||||
Reference in New Issue
Block a user