W3cubDocs

/WordPress

_excerpt_render_inner_columns_blocks( array $columns, array $allowed_blocks )

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Render inner blocks from the core/columns block for generating an excerpt.

Description

Parameters

$columns

(array) (Required) The parsed columns block.

$allowed_blocks

(array) (Required) The list of allowed inner blocks.

Return

(string) The rendered inner blocks.

Source

File: wp-includes/blocks.php

function _excerpt_render_inner_columns_blocks( $columns, $allowed_blocks ) {
	$output = '';

	foreach ( $columns['innerBlocks'] as $column ) {
		foreach ( $column['innerBlocks'] as $inner_block ) {
			if ( in_array( $inner_block['blockName'], $allowed_blocks, true ) && empty( $inner_block['innerBlocks'] ) ) {
				$output .= render_block( $inner_block );
			}
		}
	}

	return $output;
}

Changelog

Version Description
5.2.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_excerpt_render_inner_columns_blocks