_excerpt_render_inner_columns_blocks

Advertisement

Private Access Private Access

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.

Summery Summery

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

Syntax Syntax

_excerpt_render_inner_columns_blocks( array $columns, array $allowed_blocks )

Parameters Parameters

$columns

(Required) The parsed columns block.

$allowed_blocks

(Required) The list of allowed inner blocks.

Return Return

(string) The rendered inner blocks.

Source 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;
}

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Advertisement

Leave a Reply