Repository navigation
v2.15.3
·
47 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Fixed
- Query loops accept
includeandrand, and page per loop (#403).QueryRuntimetreatsincludeas an alias ofpostInand returns those rows in the requested order, acceptsrandasrandomordering, and pages a loop with aqueryIdon its ownquery-{queryId}-pagevariable, so two loops on one page paginate independently. - Preset classes match the editor's class names for letter–digit slugs (#401). The editor names preset classes with WordPress's kebab case, which splits letters from digits: a
fontSize: "h2"block carrieshas-h-2-font-size.GlobalStylesEmitteremitted only.has-h2-font-size, soh1–h6style size presets (and any color, gradient or font family slug likegray900) didn't apply in the Site Editor canvas. Each preset class now also lists the WordPress kebab-case form when it differs (.has-h2-font-size, .has-h-2-font-size); custom property names are unchanged. The emitter cache key moves tov12. styles.blocksrules forartisanpack/*block forks reach the blocks (#405).GlobalStylesEmittermappedartisanpack/xonly to.wp-block-artisanpack-x. visual-editor's forks of core blocks render the core class (.wp-block-post-content,.wp-block-quote), so their block, element and element-state rules never applied.artisanpack/xnow targets both classes, as visual-editor'sBlockStyleCssCompiler::blockSelectors()does::root :where(.wp-block-x, .wp-block-artisanpack-x)for the block and:root :where(.wp-block-x h2, .wp-block-artisanpack-x h2)for each element. First-party blocks that aren't forks still match through.wp-block-artisanpack-x.core/*and other namespaces are unchanged, and block names are still validated. The emitter cache key moves tov13.- Post blocks inside a record's own content render the record (#407).
HasRenderedBlockContent::renderContent()rendered the block tree with a binding context but skipped visual-editor's entity passes, sopost-title,post-excerpt,post-termsand otherpost-*blocks in a record's content rendered empty wrappers. It now runs them first, in<x-ve-blocks>'s order: synced patterns are inlined, query loops are inlined with the record as host (so a related-posts loop in the content works), andPostResolver::stampTree()stamps the tree against the record. Apost-contentblock inside the record's own content renders empty, and a record already being rendered further up the stack (a loop that lists the record itself) is not rendered again, so neither recurses. Each pass is skipped when visual-editor doesn't provide it, and a pass that throws leaves the tree as it was. - Theme-file template parts take their area from
theme.json(#409).TemplatePartResolvergave a part that exists only asparts/{slug}.htmlorparts/{slug}.blade.phpan area guessed from its slug (header,footer,sidebaroruncategorized) and never read the theme'stemplateParts. Visual-editor's Navigation block renders an overlay part only when its area isnavigation-overlay, so a theme-shipped overlay part never rendered until it had been saved once in the Site Editor. A theme-file part now takes theareaof the active theme'stheme.jsontemplatePartsentry whosenamematches the slug (e.g.{ "name": "mobile-menu", "area": "navigation-overlay" }), and falls back to the slug guess when there is no entry or the entry has no area. A saved part's own area still wins. - Query loops default to published content for every post type.
QueryRuntime::resolve()now lists only published pages and custom-type records, as it already did for posts. Pages came back in every status, becausePageManagerdoesn't default to published for its admin callers. A custom type now uses its model'spublished()scope, orstatus = publishedwhen its table has astatuscolumn; a model with neither is unfiltered as before.resolve()also ignores astatusattribute, since block attributes aren't a trusted source. A host that has already authorized a request to see other statuses can call the newQueryRuntime::resolveTrusted(), which honoursstatus. visual-editor'sCmsFrameworkQueryResolverkeeps callingresolve()and needs no change.