在适用时,显示分页导航以跳转到下一页/上一页的评论集。

  • 名称: core/comments-pagination
  • 类别: 主题
  • API 版本: 3
  • 块类型: 混合(静态保存 + 服务器增强)

块关系

父级块(直接):
– core/comments

允许的内部块:
– core/comments-pagination-previous
– core/comments-pagination-numbers
– core/comments-pagination-next

属性

通过 block.json 中的 attributes 属性定义。

属性类型默认值描述
paginationArrowstring"none"—

支持

通过 block.json 中的 supports 属性定义。

上下文

通过 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 -->

来源