diff --git src/wp-includes/blocks.php src/wp-includes/blocks.php
index 422b75e945..4b29ae4b12 100644
|
|
function get_comment_delimited_block_content( $block_name = null, $block_attribu |
220 | 220 | * |
221 | 221 | * @since 5.3.1 |
222 | 222 | * |
223 | | * @param WP_Block_Parser_Block $block A single parsed block object. |
| 223 | * @param WP_Block_Parser_Block|array $block A single parsed block object. |
224 | 224 | * @return string String of rendered HTML. |
225 | 225 | */ |
226 | 226 | function serialize_block( $block ) { |
| 227 | if ( $block instanceof WP_Block_Parser_Block ) { |
| 228 | $block = (array) $block; |
| 229 | } |
| 230 | |
227 | 231 | $block_content = ''; |
228 | 232 | |
229 | 233 | $index = 0; |
… |
… |
function serialize_block( $block ) { |
248 | 252 | * |
249 | 253 | * @since 5.3.1 |
250 | 254 | * |
251 | | * @param WP_Block_Parser_Block[] $blocks Parsed block objects. |
| 255 | * @param WP_Block_Parser_Block[]|array[] $blocks Parsed block objects. |
252 | 256 | * @return string String of rendered HTML. |
253 | 257 | */ |
254 | 258 | function serialize_blocks( $blocks ) { |
… |
… |
function filter_block_content( $text, $allowed_html = 'post', $allowed_protocols |
286 | 290 | * |
287 | 291 | * @since 5.3.1 |
288 | 292 | * |
289 | | * @param WP_Block_Parser_Block $block The parsed block object. |
| 293 | * @param WP_Block_Parser_Block|array $block The parsed block object. |
290 | 294 | * @param array[]|string $allowed_html An array of allowed HTML |
291 | 295 | * elements and attributes, or a |
292 | 296 | * context name such as 'post'. |
… |
… |
function filter_block_content( $text, $allowed_html = 'post', $allowed_protocols |
294 | 298 | * @return array The filtered and sanitized block object result. |
295 | 299 | */ |
296 | 300 | function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() ) { |
| 301 | if ( $block instanceof WP_Block_Parser_Block ) { |
| 302 | $block = (array) $block; |
| 303 | } |
| 304 | |
297 | 305 | $block['attrs'] = filter_block_kses_value( $block['attrs'], $allowed_html, $allowed_protocols ); |
298 | 306 | |
299 | 307 | if ( is_array( $block['innerBlocks'] ) ) { |