作者名称。

  • Name: core/post-author-name
  • Category: 主题
  • API Version: 3
  • Block Type: 动态(服务器渲染)

属性

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

属性类型默认值描述
isLinkbooleanfalse角色: content
linkTargetstring"_self"角色: content

支持功能

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

上下文

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

使用的上下文:

  • postType
  • postId

区块标记

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

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

<!-- wp:post-author-name /-->

来源