v2.7.2
·
96 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Added
ThemeFileBlockParser(Modules\SiteEditor\Support) — the seam that turns a block theme's raw.htmlmarkup into the block treeResolvedEntity::$blockscarries. Prefers visual-editor'sBlockMarkupHydrator(resolved out of the container by name, so visual-editor stays a non-dependency) and falls back toBlockMarkupParser's WPparse_blocks()output when it is absent. A hydrator that throws is logged and degrades to the fallback rather than taking the template down.
Changed
Deprecated
Removed
Fixed
- Theme-file templates and parts now resolve to a populated block tree (#274) —
TemplateResolverandTemplatePartResolverput a theme file's markup inResolvedEntity::$rawand left$blocksempty, but every consumer in the stack reads$blocksand ignores$raw. On a fresh activation thetemplatestable is empty, so every template and part in a block theme resolved to[]and the front end rendered no theme markup at all — visual-editor'sTemplatePartInlinerinlined empty<header>wrappers, and the public render pipeline produced nothing. Both resolvers now parse the file on resolve via the newThemeFileBlockParser, making$blocksauthoritative regardless of source. With visual-editor ≥ 1.5.5 installed the tree comes back in the same editor shape DB rows store, with block text recovered from the saved HTML (visual-editor#688); standalone, it comes back in the WPparse_blocks()shape. Theme files are parsed on every resolve — there is no parse cache, matchingPatternResolver's existing behavior.GET /api/v1/templates/{slug}for a theme-file slug consequently returns a populatedcontent.blockswhere it previously returned[].