Uma área de pesquisa sobre o WordPress para devs e autores do tema



_excerpt_render_inner_columns_blocks ›

Desde5.2.0
Obsoleton/a
_excerpt_render_inner_columns_blocks ( $columns, $allowed_blocks )
Acesso:
  • private
Parâmetros: (2)
  • (array) $columns The parsed columns block.
    Required: Yes
  • (array) $allowed_blocks The list of allowed inner blocks.
    Required: Yes
Retorna:
  • (string) The rendered inner blocks.
Definido em:
Codex:

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



Fonte

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