Sessions 3-4 deliverables. Establishes the Asterion content pipeline :
EN pages generated programmatically from content-source/*-data.php, FR
translations rebuilt natively by Bricks's WPML integration from EN structure
+ WPML strings (no direct FR _bricks_page_content_2 writes).
## tools/_av-bricks-shared.php (the library)
Shared helpers + element atoms (eyebrow/heading/text/button/text-link) +
section builders (hero/prose/list/cards/cta/upsell/closer) + page write
pipeline that handles : write EN content via $wpdb (bypass Bricks's filter),
force Bricks::Elements::load_elements() so controls are populated, fire
wpml_page_builder_register_strings, push dict FR into icl_string_translations
(skip user CTE edits, auto-prefix /fr on internal URLs), trigger Bricks
native FR rebuild via wpml_page_builder_string_translated, and ensure a CTE
job exists (icl_translate_job.editor='wpml' + revision=NULL + populate
icl_translate rows with base64+gzip-encoded EN/FR strings).
## tools/av-generate-{industries,solutions}.php
Thin wrappers : URL trigger (template_redirect, not init — Bricks elements
load on 'wp' hook), add_filter('av_fr_translation_dict', ...) to register
FR strings, content-type-specific hub builder. ~150 FR strings per type.
## tools/av-translate-{industries,solutions}-fr.php
One-shot seeds for the initial FR linked posts via WPML trid mapping.
## tools/av-wpml-* operational mu-plugins
- set-cte : switch doc_translation_method to ICL_TM_TMETHOD_EDITOR (=1)
- create-jobs : reset CTE jobs (status=10 + needs_update=1 + editor=wpml +
revision=NULL). Integrated into pipeline via av_ensure_wpml_cte_job().
- fix-status / repair : align FR posts to correct trid + cleanup orphans.
- push-translations : push dict into icl_string_translations.
- plugins-check / debug / dump-strings / icl-dump / rescan : diagnostics.
## tools/av-fix-link-types.php
One-shot DB migration : convert legacy link.type='internal'+url to 'external'
across all _bricks_page_*_2 meta values (JSON and PHP-serialized). Bricks's
set_link_attributes() only renders href= for type='external' — older session-3
templates lost their href silently.
## Other tools/ mu-plugins
- av-bricks-rest-bridge : pivot — exposes Bricks CPTs over REST, dual-format
read filter (JSON for MCP / array for renderer), auto-mirror content→header/
footer for templates.
- av-apply-bricks-styles, av-cleanup-orphans, av-create-wp-menu, av-debug-meta,
av-dump-bricks, av-fix-template-meta : misc operational scripts.
## Bricks Config/
JSON snapshots of bricks_theme_styles, bricks_color_palette,
bricks_global_settings for diffable inspection.
## .gitignore
Add .mcp.json — holds per-developer WP App Password for the Bricks MCP server.
## wp-content/themes/asterion-bricks/assets/css/utilities.css
Note that all responsive overrides are now emitted natively by the page
generator via Bricks per-breakpoint settings, no custom CSS needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Asterion Bricks — Child theme (minimalist, Bricks-first)
Custom WordPress child theme for asterionvr.com, built on top of Bricks Builder. The whole site is rendered by Bricks Templates and Bricks-edited pages — this theme exists only to give Bricks a design system, GDPR-compliant fonts, and the project's Custom Post Types.
What this theme does
- 🎨 Loads
assets/css/tokens.csson the public frontend AND inside the Bricks builder iframe — so every--color-*,--space-*,--font-*variable defined there is available to Bricks elements via the CSS Class field or Custom CSS panel. - 🔤 Self-hosts Inter Variable (latin subset) for RGPD compliance, with a
<link rel="preload">injected on every page. - 📰 Registers two Custom Post Types —
case_study(slug/customers/) andscenario(slug/scenarios/) — plus the sharedindustrytaxonomy. - 📐 Adds three image sizes :
av-hero(2400×1350),av-card(800×600),av-thumb(400×300). - 🌐 Ships an
asterion-brickstext domain for future i18n.
What this theme does NOT do (intentionally)
- ❌ No
header.php/footer.php/page.php/front-page.php/index.php. Bricks Templates (Header / Footer / Single — Page) drive every screen. - ❌ No Custom Page Templates (
templates/page-*.php). Pages render through their Bricks data (_bricks_page_content_2post meta). - ❌ No PHP renderers, Gutenberg block helpers, shortcodes. Content lives in Bricks data and WPML translations.
If you find yourself adding any of the above back, stop and revisit RESTART-PLAN.md at the repo root — there are usually better Bricks-native alternatives.
File map
asterion-bricks/
├── style.css # WP theme metadata only
├── functions.php # enqueue tokens, preload font, theme support, CPT include
├── theme.json # Gutenberg color/typo palette aligned with tokens.css
├── README.md # this file
├── inc/
│ └── cpt.php # case_study, scenario, industry taxonomy
└── assets/
├── css/
│ ├── tokens.css # design system source of truth (single file, big)
│ └── utilities.css # skip-link, sr-only, focus-visible, reduced motion
├── fonts/
│ ├── Inter-Variable.woff2
│ └── Inter-Variable-Italic.woff2
└── img/
Total : ~10 files, < 700 lines of code (with tokens.css being the lion's share).
Where the content copy lives
The textual copy from the Strategy & Content PDF (page-by-page EN copy, deliverable D.1 to D.29) lives at the repo root in /content-source/. Those are PHP arrays keyed by page slug — they are not loaded at runtime. Their job is twofold:
- Reference when building a Bricks page : copy/paste the appropriate strings into the Bricks elements as you build.
- Source for programmatic generation when we replicate a Bricks-built archetype across its variants (e.g. the 4 industry detail pages, the 6 technology pillars).
Activation
- Install Bricks parent theme (
wp-content/themes/bricks/) — the ZIP lives inThirdParty/. - Install + activate WPML core (also in
ThirdParty/). - WP Admin → Appearance → Themes → activate Asterion Bricks.
- WP Admin → Bricks → Settings → check Page in « Builder access · Post types ».
Tokens to know
The full design system lives in assets/css/tokens.css. The most-referenced tokens:
| Variable | Value |
|---|---|
--color-brand-navy |
#0B1F3A |
--color-brand-gold |
#C9A45A |
--color-text-primary |
#0B1F3A |
--font-display |
Inter Display fallback to Inter |
--font-body |
Inter |
--space-1..32 |
8-pt grid (4px → 128px) |
--container-max |
1280px |
--ease-default |
cubic-bezier(0.16, 1, 0.3, 1) |
--shadow-sm/--shadow-md/--shadow-lg |
navy-tinted elevation |
Reference them inside Bricks via Custom CSS:
%root% {
background: var(--color-brand-navy);
color: var(--color-text-on-dark);
padding-block: var(--space-20);
}
License
GPL v2 or later, matching WordPress core.