显示完成阅读该帖子所需的分钟数。也可以显示字数统计。
属性
通过 block.json 中的 attributes 属性定义。
支持功能
通过 block.json 中的 supports 属性定义。
anchor:truebackground:backgroundImage:truebackgroundSize:truegradient:true
color:gradients:true
dimensions:minHeight:trueminWidth:true
html:falseshadow:truespacing:margin:truepadding:true
typography:fontSize:truelineHeight:truetextAlign:true
interactivity:clientNavigation:true
上下文
通过 block.json 中的 usesContext 和 providesContext 属性定义。
使用的上下文:
postIdpostType
块标记
这是一个 动态块。它在服务器上渲染,不会将 HTML 保存到帖子内容中。
在帖子内容中,它存储为块注释:
<!-- wp:post-time-to-read /-->
来源
- block.json (参考)
- 源目录 — 浏览
edit和save源文件、index.php等。