显示您最近的评论列表。

  • 名称: core/latest-comments
  • 类别: 小部件
  • API 版本: 3
  • 块类型: 动态(服务器渲染)
  • 关键词: recent comments

属性

通过 attributes 属性在 block.json 中定义。

属性类型默认值描述
commentsToShownumber5—
displayAvatarbooleantrue—
displayDatebooleantrue—
displayContentstring"excerpt"枚举:none、excerpt、full

支持

通过 supports 属性在 block.json 中定义。

块标记

这是一个 动态块。它在服务器上渲染,不会将 HTML 保存到帖子内容中。

在帖子内容中,它存储为块注释:

<!-- wp:latest-comments {"displayAvatar":true,"displayExcerpt":true,"displayTimestamp":true} /-->

来源