Skip to content

Commit 2c077ec

Browse files
committed
Add temporary formatting and comments for readability and development
- source https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-block-parser.php
1 parent 2c11541 commit 2c077ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

quick-weblog.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,13 @@ function quick_weblog_submit_form() {
156156
$block_name = 'core/paragraph';
157157
$innerHTML = 'Sample paragraph text.';
158158

159-
$converted_block = new WP_Block_Parser_Block( $block_name, array(), array(), $innerHTML, array( $innerHTML ) );
159+
$converted_block = new WP_Block_Parser_Block(
160+
$block_name, // Name of block @example "core/paragraph"
161+
array(), // Optional set of attributes from block comment delimiters @example array( 'columns' => 3 )
162+
array(), // List of inner blocks (of this same class)
163+
$innerHTML, // Resultant HTML from inside block comment delimiters after removing inner blocks
164+
array( $innerHTML ) // List of string fragments and null markers where inner blocks were found
165+
);
160166
// WP_CLI::log( print_r( $converted_block, true ) );
161167

162168
$serialized_block = serialize_block( (array) $converted_block );

0 commit comments

Comments
 (0)