mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
When registering block through PHP, using `register_block_type` function, newly introduced `ancestor` block setting in `block.json` was not recognised. It worked though, when block is registered from JavaScript. Props lovor, annezazu. Fixes #56184. git-svn-id: https://develop.svn.wordpress.org/trunk@53718 602fd350-edb4-49c9-b593-d223f7449a82
66 lines
1.1 KiB
JSON
66 lines
1.1 KiB
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",
|
|
"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"
|
|
}
|