block_core_navigation_block_contains_core_navigation()WP 6.2.0

Deprecated since 7.0.0. It is no longer supported and may be removed in future releases. Use block_core_navigation_block_tree_has_block_type() instead.

Returns true if the navigation block contains a nested navigation block.

No Hooks.

Returns

true|false. true if the navigation block contains a nested navigation block.

Usage

block_core_navigation_block_contains_core_navigation( $inner_blocks );
$inner_blocks(WP_Block_List) (required)
Inner block instance to be normalized.

Changelog

Since 6.2.0 Introduced.
Deprecated since 7.0.0 Use block_core_navigation_block_tree_has_block_type() instead.

block_core_navigation_block_contains_core_navigation() code WP 7.0

function block_core_navigation_block_contains_core_navigation( $inner_blocks ) {
	_deprecated_function( __FUNCTION__, '7.0.0', 'block_core_navigation_block_tree_has_block_type()' );

	return block_core_navigation_block_tree_has_block_type(
		$inner_blocks,
		'core/navigation'
	);
}