mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@51599 602fd350-edb4-49c9-b593-d223f7449a82
63 lines
1.1 KiB
JSON
63 lines
1.1 KiB
JSON
{
|
|
"apiVersion": 2,
|
|
"name": "tests/notice",
|
|
"title": "Notice",
|
|
"category": "common",
|
|
"parent": [
|
|
"core/group"
|
|
],
|
|
"providesContext": {
|
|
"tests/message": "message"
|
|
},
|
|
"usesContext": [
|
|
"groupId"
|
|
],
|
|
"icon": "star",
|
|
"description": "Shows warning, error or success notices…",
|
|
"keywords": [
|
|
"alert",
|
|
"message"
|
|
],
|
|
"textdomain": "notice",
|
|
"attributes": {
|
|
"message": {
|
|
"type": "string",
|
|
"source": "html",
|
|
"selector": ".message"
|
|
}
|
|
},
|
|
"supports": {
|
|
"align": true,
|
|
"lightBlockWrapper": true
|
|
},
|
|
"styles": [
|
|
{
|
|
"name": "default",
|
|
"label": "Default",
|
|
"isDefault": true
|
|
},
|
|
{
|
|
"name": "other",
|
|
"label": "Other"
|
|
}
|
|
],
|
|
"variations": [
|
|
{
|
|
"name": "error",
|
|
"title": "Error",
|
|
"description": "Shows error.",
|
|
"keywords": [ "failure" ]
|
|
}
|
|
],
|
|
"example": {
|
|
"attributes": {
|
|
"message": "This is a notice!"
|
|
}
|
|
},
|
|
"editorScript": "tests-notice-editor-script",
|
|
"script": "tests-notice-script",
|
|
"viewScript": "tests-notice-view-script",
|
|
"editorStyle": "tests-notice-editor-style",
|
|
"style": "tests-notice-style"
|
|
}
|