wpseek.com
A WordPress-centric search engine for devs and theme authors



block_core_navigation_remove_serialized_parent_block › WordPress Function

Since6.5.0
Deprecatedn/a
block_core_navigation_remove_serialized_parent_block ( $serialized_block )
Parameters:
  • (string) $serialized_block The serialized markup of a block and its inner blocks.
    Required: Yes
Returns:
  • (string)
Defined at:
Codex:

Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks.



Source

function block_core_navigation_remove_serialized_parent_block( $serialized_block ) {
	$start = strpos( $serialized_block, '-->' ) + strlen( '-->' );
	$end   = strrpos( $serialized_block, '<!--' );
	return substr( $serialized_block, $start, $end - $start );
}