创建一个始终指向站点首页的链接。如果标题栏中已经存在站点标题链接,通常不需要此操作。
块关系
父级块(直接):
– core/navigation
属性
通过 attributes 属性在 block.json 中定义。
支持功能
通过 supports 属性在 block.json 中定义。
anchor:truereusable:falsehtml:falsebackground:backgroundImage:truebackgroundSize:truegradient:true
typography:fontSize:truelineHeight:true
shadow:truedimensions:minHeight:trueminWidth:true
spacing:margin:truepadding:true
interactivity:clientNavigation:true
上下文
通过 usesContext 和 providesContext 属性在 block.json 中定义。
使用的上下文:
textColorcustomTextColorbackgroundColorcustomBackgroundColorfontSizecustomFontSizestyle
块标记
这是一个 混合块。它保存静态标记,服务器在渲染时可能会对其进行增强。
<!-- wp:home-link {"label":"Home"} /-->
来源
- block.json (参考)
- 源代码目录 — 浏览
edit和save源文件、index.php等。