mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
Blocks: Add new render property in block.json for block types
New `render` field in `block.json` file that accepts a string value. It allows to pass a path to the PHP file that is going to be used to render the block on the server. Related PR in Gutenberg: https://github.com/WordPress/gutenberg/pull/42430. Props spacedmonkey, luisherranz, welcher, noisysocks, matveb, fabiankaegy, aristath, zieladam. Fixes #53148. git-svn-id: https://develop.svn.wordpress.org/trunk@54132 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -24,9 +24,7 @@
|
||||
"textdomain": "notice",
|
||||
"attributes": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"selector": ".message"
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
@@ -61,5 +59,6 @@
|
||||
"script": "tests-notice-script",
|
||||
"viewScript": "tests-notice-view-script",
|
||||
"editorStyle": "tests-notice-editor-style",
|
||||
"style": "tests-notice-style"
|
||||
"style": "tests-notice-style",
|
||||
"render": "file:./render.php"
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<p <?php echo get_block_wrapper_attributes(); ?>><?php echo esc_html( $attributes['message'] ); ?></p>
|
||||
Reference in New Issue
Block a user