mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Related issue in Gutenberg: https://github.com/WordPress/gutenberg/issues/54491. For block scripts there was already `script`, `viewScript` and `editorScript`. For block styles there was only `style` and `editorStyle`. This brings the parity. Props gaambo. Fixes #59673. git-svn-id: https://develop.svn.wordpress.org/trunk@57493 602fd350-edb4-49c9-b593-d223f7449a82
76 lines
1.4 KiB
JSON
76 lines
1.4 KiB
JSON
{
|
|
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
"apiVersion": 2,
|
|
"name": "tests/notice",
|
|
"title": "Notice",
|
|
"category": "common",
|
|
"parent": [
|
|
"tests/group"
|
|
],
|
|
"ancestor": [
|
|
"tests/section"
|
|
],
|
|
"providesContext": {
|
|
"tests/message": "message"
|
|
},
|
|
"usesContext": [
|
|
"groupId"
|
|
],
|
|
"icon": "star",
|
|
"description": "Shows warning, error or success notices…",
|
|
"keywords": [
|
|
"alert",
|
|
"message"
|
|
],
|
|
"textdomain": "notice",
|
|
"attributes": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"selectors": {
|
|
"root": ".wp-block-notice"
|
|
},
|
|
"blockHooks": {
|
|
"tests/before": "before",
|
|
"tests/after": "after",
|
|
"tests/first-child": "firstChild",
|
|
"tests/last-child": "lastChild"
|
|
},
|
|
"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", "tests-notice-view-script-2" ],
|
|
"editorStyle": "tests-notice-editor-style",
|
|
"style": [ "tests-notice-style", "tests-notice-style-2" ],
|
|
"viewStyle": [ "tests-notice-view-style" ],
|
|
"render": "file:./render.php"
|
|
}
|