Un motore di ricerca WordPress per sviluppatori e autori di temi



_excerpt_render_inner_columns_blocks ›

Da5.2.0
Deprecaton/a
_excerpt_render_inner_columns_blocks ( $columns, $allowed_blocks )
Accedi:
  • private
Parametri: (2)
  • (array) $columns The parsed columns block.
    Richiesto:
  • (array) $allowed_blocks The list of allowed inner blocks.
    Richiesto:
Ritorna:
  • (string) The rendered inner blocks.
Definito a:
Codex:

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



Sorgenti

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