-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editor: Introduce new API method that register block from `block.json…
…` metadata file Backports changes added to Gutenberg in: - WordPress/gutenberg#20794 - WordPress/gutenberg#22519 `register_block_type_from_metadata` function is going to be used to register all blocks on the server using `block.json` metadata files. Props ocean90, azaozz, aduth, mcsf, jorgefilipecosta, spacedmonkey, nosolosw, swissspidy and noahtallen. Fixes #50263. git-svn-id: https://develop.svn.wordpress.org/trunk@48141 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information
gziolo
committed
Jun 23, 2020
1 parent
5df79a9
commit 63ec8de
Showing
6 changed files
with
513 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
return array( | ||
'dependencies' => array(), | ||
'version' => 'test', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Test CSS file */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* Test JavaScript file. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"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, | ||
"lightBlockWrapper": 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" | ||
} |
Oops, something went wrong.