在适用时,显示分页导航以跳转到下一页/上一页的评论集。
块关系
父级块(直接):
– core/comments
允许的内部块:
– core/comments-pagination-previous
– core/comments-pagination-numbers
– core/comments-pagination-next
属性
通过 block.json 中的 attributes 属性定义。
支持
通过 block.json 中的 supports 属性定义。
anchor:truealign:truereusable:falsehtml:falsebackground:gradients:true
color:layout:allowSwitching:falseallowInheriting:falsedefault:{"type":"flex"}
spacing:padding:truemargin:trueblockGap:true
typography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
上下文
通过 block.json 中的 usesContext 和 providesContext 属性定义。
提供上下文:
comments/paginationArrow→ 属性paginationArrow
块标记
这是一个 混合块。它保存静态标记,服务器在渲染时可能会对其进行增强。
<!-- wp:comments-pagination {"paginationArrow":"chevron","style":{"elements":{"link":{"color":{"text":"var:preset|color|background"}}}},"backgroundColor":"foreground","textColor":"background"} -->
<!-- wp:comments-pagination-previous {"label":"Previous label comments"} /-->
<!-- wp:comments-pagination-numbers /-->
<!-- wp:comments-pagination-next {"label":"Next label comments"} /-->
<!-- /wp:comments-pagination -->
来源
- block.json (参考)
- 源目录 — 浏览
edit和save源文件、index.php等。