// Create an array representation simulating the output of parse_blocks.
$block = array
( 'blockName' =>
$request['name'
],
'attrs' =>
$attributes,
'innerHTML' => '',
'innerContent' => array
(),
);
// Render using render_block to ensure all relevant filters are used.
$data = array
( 'rendered' =>
render_block( $block ),
);
return rest_ensure_response( $data );
} /**
* Retrieves block's output schema, conforming to JSON Schema.
*
* @since 5.0.0
*
* @return array Item schema data.
*/