Appearance
Theme Architecture
High-level overview of how Webentor Core integrates with a Sage theme.
Boot flow
- init.php: defines paths and loads Core modules (blocks, images, utils, build glue).
- Block registration: scans
resources/blocks/**/block.jsonin theme and Core, registers each block. - Frontend assets: for each block, matches Vite manifest to add
script.tsandstyle.csshandles, injected into block metadata. - Server-side rendering: blocks render via Blade views (
resources/blocks/<slug>/view.blade.php) with computed classes and optionaladditional_data.
Editor boot
- Theme editor entry (
resources/scripts/editor.ts) imports Core editor filters/components and auto-imports all*.block.tsxfiles. - JS filters provide Tailwind-like tokens (
twTheme), breakpoints, and extend UI (button variants, display settings, icon picker colors).
Rendering pipeline (frontend)
- A Gutenberg block is parsed on the server.
- Core computes wrapper and background classes from attributes and breakpoints.
- Blade view is selected from theme (override) or Core and rendered.
render_blade_blockfilters can post-process the final HTML.
Categories and patterns
- Adds Webentor block categories (
webentor-blocks,webentor-elements,webentor-layout). - Removes selected core patterns; adds Webentor pattern categories.
Visibility
- If the Block Visibility plugin is present, Core respects its settings and augments classes when visible.
Images
- PHP helpers support Cloudinary fetch URLs and
<img>/<picture>HTML, with graceful fallbacks to WP/BIS.
Key files
webentor-core/app/blocks-init.php- registration + SSR + categorieswebentor-core/docs/*- this documentationresources/scripts/editor.ts- theme editor entry