显示一张图片以代表此站点。更新此区块,更改将应用于所有位置。
属性
通过 block.json 中的 attributes 属性定义。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
width | number | — | — |
isLink | boolean | true | 角色: content |
linkTarget | string | "_self" | 角色: content |
shouldSyncIcon | boolean | — | — |
支持功能
通过 block.json 中的 supports 属性定义。
anchor:truehtml:falsealign:truealignWide:falsecolor:text:falsebackground:false
spacing:margin:truepadding:true
interactivity:clientNavigation:true
filter:duotone:true
区块样式
通过 block.json 中的 styles 属性定义。
| 样式名称 | 标签 | 默认值 |
|---|---|---|
default | 默认 | 是 |
rounded | 圆角 | 否 |
CSS 选择器
通过 block.json 中的 selectors 属性定义。
- filter:
- duotone:
.wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before
- duotone:
区块标记
这是一个 动态区块。它在服务器上渲染,不会在帖子内容中保存 HTML。
在帖子内容中,它存储为区块注释:
<!-- wp:site-logo /-->
来源
- block.json (参考)
- 源代码目录 — 浏览
edit和save源文件、index.php等。