本文档介绍了 WordPress 区块模式分类的 Schema 定义和 API 端点,用于管理和检索区块模式分类记录。
GET /wp/v2/block-patterns/categories
$ curl https://example.com/wp-json/wp/v2/block-patterns/categories The schema defines all the fields that exist within a block pattern category record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.
name
|
The category name.
JSON data type: string Read only Context: |
label
|
The category label, in human readable format.
JSON data type: string Read only Context: |
description
|
The category description, in human readable format.
JSON data type: string Read only Context: |
GET /wp/v2/block-patterns/categories
Query this endpoint to retrieve a specific block pattern category record.
$ curl https://example.com/wp-json/wp/v2/block-patterns/categories