/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
phpunit/fixtures/block.json
47 строк
966 B
Héctor
Block JSON schema & PHP-only blocks: Add `autoRegister` support (#80173)
30 июл 2026, 18:26
Не верифицирован
30 июл 2026, 18:26
fad413f
Код
Авторство
О чём код?
{ "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "my-plugin/notice", "title": "Notice", "category": "common", "parent": [ "core/group" ], "providesContext": { "my-plugin/message": "message" }, "usesContext": [ "groupId" ], "icon": "star", "description": "Shows warning, error or success notices…", "keywords": [ "alert", "message" ], "textdomain": "my-plugin", "attributes": { "message": { "type": "string", "source": "html", "selector": ".message" } }, "supports": { "align": true, "autoRegister": true }, "styles": [ { "name": "default", "label": "Default", "isDefault": true }, { "name": "other", "label": "Other" } ], "example": { "attributes": { "message": "This is a notice!" } }, "editorScript": "my-plugin-notice-editor-script", "script": "my-plugin-notice-script", "editorStyle": "my-plugin-notice-editor-style", "style": "my-plugin-notice-style" }