包含用于渲染帖子内容的块元素,例如标题、日期、特色图片、内容或摘要等。
块关系
祖先块:
– core/query
属性
通过 block.json 中的 attributes 属性定义。
此块没有自定义属性。
支持功能
通过 block.json 中的 supports 属性定义。
anchor:truereusable:falsehtml:falsealign:"wide","full"layout:truebackground:backgroundImage:truebackgroundSize:truegradients:true
color:typography:fontSize:truelineHeight:true
spacing:margin:truepadding:trueblockGap:{"__experimentalDefault":"1.25em"}
interactivity:clientNavigation:true
shadow:true
上下文
通过 block.json 中的 usesContext 和 providesContext 属性定义。
使用的上下文:
queryIdquerydisplayLayouttemplateSlugpreviewPostTypeenhancedPaginationpostTypepostId
块标记
这是一个 混合块。它保存静态标记,服务器在渲染期间可能会对其进行增强。
<!-- wp:post-template /-->
来源
- block.json (参考)
- 源代码目录 — 浏览
edit和save源文件、index.php等。