一组热门关键词云,每个关键词的大小由其出现频率决定。
属性
通过 block.json 中的 attributes 属性定义。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
numberOfTags | number | 45 | — |
taxonomy | string | "post_tag" | — |
showTagCounts | boolean | false | — |
smallestFontSize | string | "8pt" | — |
largestFontSize | string | "22pt" | — |
支持功能
通过 block.json 中的 supports 属性定义。
anchor:truebackground:backgroundImage:truebackgroundSize:truegradient:true
html:falsealign:truecolor:background:truelink:truetext:false
shadow:truespacing:margin:truepadding:true
typography:lineHeight:true
interactivity:clientNavigation:true
块样式
通过 block.json 中的 styles 属性定义。
| 样式名称 | 标签 | 默认值 |
|---|---|---|
default | 默认 | 是 |
outline | 轮廓 | 否 |
块标记
这是一个 动态块。它在服务器上渲染,不会在帖子内容中保存 HTML。
在帖子内容中,它存储为块注释:
<!-- wp:tag-cloud {"taxonomy":"category"} /-->
来源
- block.json (参考)
- 源目录 — 浏览
edit和save源文件、index.php等。