WordPress at Your Fingertips
function is not described

_excerpt_render_inner_blocks() WP 5.8

Render inner blocks from the allowed wrapper blocks for generating an excerpt.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

String. The rendered inner blocks.

Usage

_excerpt_render_inner_blocks( $parsed_block, $allowed_blocks );
$parsed_block(array) (required)
The parsed block.
$allowed_blocks(array) (required)
The list of allowed inner blocks.

Changelog

Since 5.8 Introduced.

Code of _excerpt_render_inner_blocks() WP 5.8.2

function _excerpt_render_inner_blocks( $parsed_block, $allowed_blocks ) {
	$output = '';

	foreach ( $parsed_block['innerBlocks'] as $inner_block ) {
		if ( ! in_array( $inner_block['blockName'], $allowed_blocks, true ) ) {
			continue;
		}

		if ( empty( $inner_block['innerBlocks'] ) ) {
			$output .= render_block( $inner_block );
		} else {
			$output .= _excerpt_render_inner_blocks( $inner_block, $allowed_blocks );
		}
	}

	return $output;
}