mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/23636. Related WP-CLI PR: https://github.com/wp-cli/i18n-command/pull/210. Related documentation proposal: https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/block-api/block-metadata.md#internationalization-not-implemented Adds programatic i18n support to `register_block_type_from_metadata` function for block settings registered from `block.json` file that provides `textdomain` field. Props swissspidy, ocean90. Fixes #52301. git-svn-id: https://develop.svn.wordpress.org/trunk@49981 602fd350-edb4-49c9-b593-d223f7449a82
54 lines
900 B
JSON
54 lines
900 B
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"
|
|
}
|
|
],
|
|
"example": {
|
|
"attributes": {
|
|
"message": "This is a notice!"
|
|
}
|
|
},
|
|
"editorScript": "tests-notice-editor-script",
|
|
"script": "tests-notice-script",
|
|
"editorStyle": "tests-notice-editor-style",
|
|
"style": "tests-notice-style"
|
|
}
|