显示文章、页面或其他任何内容类型的链接。
属性
通过 attributes 属性在 block.json 中定义。
支持
通过 supports 属性在 block.json 中定义。
anchor:truehtml:falsebackground:backgroundImage:truebackgroundSize:truegradient:true
color:typography:fontSize:truelineHeight:true
dimensions:minHeight:trueminWidth:true
spacing:margin:["top","bottom"]padding:true
shadow:trueinteractivity:clientNavigation:true
上下文
通过 usesContext 和 providesContext 属性在 block.json 中定义。
使用的上下文:
postId
块标记
这是一个 动态块。它在服务器上渲染,不会在文章内容中保存 HTML。
在文章内容中,它存储为块注释:
<!-- wp:read-more /-->
来源
- block.json (参考)
- 源目录 — 浏览
edit和save源文件、index.php等。