de codex
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user