mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 10:22:23 +01:00
2f6eb9d25e
We integrated variations with block types and the corresponding REST API endpoint in #52688. It's a follow-up patch to add missing support to the `block.json` metadata file when using `register_block_type`. Some fields for variations are translatable.Therefore, i18n schema was copied over from Gutenberg: https://github.com/WordPress/gutenberg/blob/trunk/packages/blocks/src/api/i18n-block.json. The accompanying implementation was adapted as `translate_settings_using_i18n_schema`. Props: gwwar, swissspidy, schlessera, jorgefilipecosta. Fixes #53238. Built from https://develop.svn.wordpress.org/trunk@51599 git-svn-id: http://core.svn.wordpress.org/trunk@51210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
18 lines
316 B
JSON
18 lines
316 B
JSON
{
|
|
"title": "block title",
|
|
"description": "block description",
|
|
"keywords": [ "block keyword" ],
|
|
"styles": [
|
|
{
|
|
"label": "block style label"
|
|
}
|
|
],
|
|
"variations": [
|
|
{
|
|
"title": "block variation title",
|
|
"description": "block variation description",
|
|
"keywords": [ "block variation keyword" ]
|
|
}
|
|
]
|
|
}
|