Make WordPress Core


Ignore:
Timestamp:
09/12/2022 01:12:21 PM (2 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/tests/blocks/register.php

    r53858 r54132  
    390390            array(
    391391                'message' => array(
    392                     'type'     => 'string',
    393                     'source'   => 'html',
    394                     'selector' => '.message',
     392                    'type' => 'string',
    395393                ),
    396394                'lock'    => array( 'type' => 'object' ),
     
    456454            wp_normalize_path( wp_styles()->get_data( 'unit-tests-test-block-style', 'path' ) )
    457455        );
     456
     457        // @ticket 53148
     458        $this->assertIsCallable( $result->render_callback );
    458459    }
    459460
Note: See TracChangeset for help on using the changeset viewer.