All notable changes to WM-WP-base-theme are documented here.
- Vite 5 build pipeline with manifest-based asset loading and HMR via env vars
- TypeScript 5 + SCSS with Tailwind CSS 3 utility layer
- GSAP 3 animation library integrated as a first-class dependency
- Manifest-keyed transient cache (
wm_get_manifest()) for zero-overhead production asset lookups
theme.jsondesign tokens — 5-color palette, 2 typefaces, 6 font sizes, 6 spacing steps, content/wide layout widths- 6 auto-registered block patterns: hero, cards, CTA banner, testimonial, text + image, section divider
- Custom Post Type and taxonomy helpers (
wm_register_cpt()/wm_register_taxonomy()) witharray_replace_recursive()overrides - ACF Flexible Content field group synced to
src/acf-json/with 4 layouts: hero, text columns, image + text, CTA banner - WordPress Customizer panel with brand accent colour (live preview via
postMessage), contact info, social links, and footer copyright - Helper functions:
wm_get_social(),wm_get_contact(),wm_get_footer_text() - Schema.org / JSON-LD output on
wp_head— WebSite, Organization, BreadcrumbList, Article - Native PHP breadcrumbs with Schema.org microdata and configurable separator/class/schema args
- WooCommerce theme support — disabled default styles, hook-based container injection, template overrides for archive, single, cart, and checkout
- Responsive header with GSAP-animated mobile drawer (slides from
x:'100%', 0.35spower3.out) - Hamburger → × CSS transition using
translateY+rotateon.nav-toggle__bar - Focus trap within open drawer; returns focus to trigger on close; Escape, overlay click, and nav link close
- Skip-to-content link targeting
#main-content(WCAG 2.1 SC 2.4.1) - Dark mode toggle:
prefers-color-schemeon first visit, persisted tolocalStorage,aria-pressedupdated
wm_render_react_component()PHP helper — renders[data-island]elements with JSON propssrc/assets/scripts/islands.ts— typed registry (IslandProps,IslandComponent,IslandLoader,IslandRegistry), async dynamic imports,React.createElement()(no unsafe casts)- Shadcn-compatible UI components:
Button(6 CVA variants),Cardsuite,Badge(5 variants),Input,Dialog(zero-dependency, Context-based)
bin/setup.sh— interactive project rename (theme name, text domain, package name), copies.env.example, runsnpm install && npm run build, prints next steps.wp-env.json— Docker-based local WordPress with PHP 8.2,WP_DEBUGenabled, theme auto-mapped towp-content/themes/wm-base-theme.env.exampledocumentingVITE_PORTandVITE_HMR_HOST- Vitest 4 unit test suite — 18 tests across
lib.utils,forms.validation, anddark-modewith jsdom +@testing-library/jest-dom - ESLint, Prettier, Stylelint configs;
type-check,lint,lint:fix,formatscripts
- Core Web Vitals defaults:
fetchpriority="high"on LCP hero images,loading="lazy"on archive/content images,wm_preconnect_originsfilter - Form submissions via
fetchwithAbortControllerper form, nonce validation guard,aria-live="polite"status regions
src/assets/scripts/components/forms.ts— progressive enhancement,AbortControllerper form stored inWeakMap, nonce guard, accessiblearia-livefeedback regions