显示您最近的评论列表。
属性
通过 attributes 属性在 block.json 中定义。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
commentsToShow | number | 5 | — |
displayAvatar | boolean | true | — |
displayDate | boolean | true | — |
displayContent | string | "excerpt" | 枚举:none、excerpt、full |
支持
通过 supports 属性在 block.json 中定义。
anchor:truealign:truebackground:backgroundImage:truebackgroundSize:truegradient:true
color:dimensions:minHeight:trueminWidth:true
html:falsespacing:margin:truepadding:true
shadow:truetypography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
块标记
这是一个 动态块。它在服务器上渲染,不会将 HTML 保存到帖子内容中。
在帖子内容中,它存储为块注释:
<!-- wp:latest-comments {"displayAvatar":true,"displayExcerpt":true,"displayTimestamp":true} /-->
来源
- block.json (参考)
- 源代码目录 — 浏览
edit和save源文件、index.php等。