From 95694c50b69b422378f4f072f991544acd8d5630 Mon Sep 17 00:00:00 2001 From: Jordan Diaz Date: Wed, 1 Apr 2026 14:08:23 +0000 Subject: [PATCH] de codex --- CLAUDE.md | 2 ++ docs/css-js-conventions.md | 13 +++++++++++++ docs/hooks-and-api.md | 23 +++++++++++++++++++++++ docs/module-creation-guide.md | 12 +++++++++++- 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index 0bc5830..e93b751 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -80,10 +80,12 @@ There are two valid hook locations: How to reference them: - Global hook `hooks/hooks.calcular_precio.php` -> endpoint `/hooks/calcular_precio/` - Module hook `template/estandar/modulos/hero_banner/hook.php` -> endpoint `/hooks/hero_banner/` +- Module hook `template/estandar/modulos/buscadorapartados_hjd8s/hook.php` -> endpoint `/hooks/buscadorapartados_hjd8s/` Rule of thumb: - If the logic is only used by one module, prefer that module's `hook.php` - If the logic will be reused by several modules/pages, create a global hook in `hooks/` +- Return arrays from hooks; do not use `echo json_encode(...)` or `exit` See [docs/hooks-and-api.md](docs/hooks-and-api.md) for usage. diff --git a/docs/css-js-conventions.md b/docs/css-js-conventions.md index 8460082..ee45004 100644 --- a/docs/css-js-conventions.md +++ b/docs/css-js-conventions.md @@ -72,6 +72,10 @@ Patrón para colores configurables por el usuario: JavaScript scopeado al módulo usando `section_id`: +This is the default and expected place for module JavaScript. +Do NOT embed `