该区块已弃用,不应在新内容中使用。请使用头像(Avatar)区块代替。
  • 名称: core/comment-author-avatar
  • 类别: theme
  • API 版本: 3
  • 区块类型: Dynamic (server-rendered)

区块关系

Ancestor 区块:
– core/comment-template

属性

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

属性TypeDefault描述
widthnumber96—
heightnumber96—

支持功能

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

上下文

通过 block.json 中的 usesContext 和 providesContext 属性定义。

使用的上下文:

  • commentId

区块标记

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

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

<!-- wp:comment-author-avatar {"width":120,"height":120,"style":{"border":{"width":"3px","style":"solid","radius":"100px"}},"borderColor":"recommended-color-02","backgroundColor":"text-color"} /-->

来源