Make WordPress Core


Ignore:
Timestamp:
09/12/2022 01:12:21 PM (4 years ago)
Author:
gziolo
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/data/blocks/notice/block.json

    r53718 r54132  
    2525        "attributes": {
    2626                "message": {
    27                         "type": "string",
    28                         "source": "html",
    29                         "selector": ".message"
     27                        "type": "string"
    3028                }
    3129        },
     
    6260        "viewScript": "tests-notice-view-script",
    6361        "editorStyle": "tests-notice-editor-style",
    64         "style": "tests-notice-style"
     62        "style": "tests-notice-style",
     63        "render": "file:./render.php"
    6564}
Note: See TracChangeset for help on using the changeset viewer.