block_core_navigation_filter_out_empty_blocks


block_core_navigation_filter_out_empty_blocks ( $parsed_blocks )

Parameters:
  • (array) parsed_blocks the parsed blocks to be normalized.
Returns:
  • (array) the normalized parsed blocks.
Defined at:

Description

Filter out empty "null" blocks from the block list.'parse_blocks' includes a null block with '\n\n' as the content when it encounters whitespace. This is not a bug but rather how the parser is designed.

Related Functions

block_core_navigation_insert_hooked_blocks, block_core_navigation_get_fallback_blocks, block_core_navigation_from_block_get_post_ids, block_core_navigation_link_filter_variations, block_core_navigation_get_post_ids

Top Google Results

User discussions

wpseek mobile