WP_Navigation_Block_Renderer::get_inner_blocks_from_fallback()private staticWP 6.5.0

Gets the inner blocks for the navigation block from the fallback.

Method of the class: WP_Navigation_Block_Renderer{}

No Hooks.

Return

WP_Block_List. Returns the inner blocks for the navigation block.

Usage

$result = WP_Navigation_Block_Renderer::get_inner_blocks_from_fallback( $attributes );
$attributes(array) (required)
The block attributes.

Changelog

Since 6.5.0 Introduced.

WP_Navigation_Block_Renderer::get_inner_blocks_from_fallback() code WP 6.7.1

private static function get_inner_blocks_from_fallback( $attributes ) {
	$fallback_blocks = block_core_navigation_get_fallback_blocks();

	// Fallback my have been filtered so do basic test for validity.
	if ( empty( $fallback_blocks ) || ! is_array( $fallback_blocks ) ) {
		return new WP_Block_List( array(), $attributes );
	}

	return new WP_Block_List( $fallback_blocks, $attributes );
}