block_core_navigation_insert_hooked_blocks


block_core_navigation_insert_hooked_blocks ( $inner_blocks, $post )

Parameters:
  • (array) inner_blocks Parsed inner blocks of a Navigation block.
  • (WP_Post) post `wp_navigation` post object corresponding to the block.
Returns:
  • (string) Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
Defined at:

Description

Insert hooked blocks into a Navigation block.Given a Navigation block's inner blocks and its corresponding `wp_navigation` post object, this function inserts hooked blocks into it, and returns the serialized inner blocks in a mock Navigation block wrapper. If there are any hooked blocks that need to be inserted as the Navigation block's first or last children, the `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is checked to see if any of those hooked blocks should be exempted from insertion.

Related Functions

block_core_navigation_insert_hooked_blocks_into_rest_response, block_core_navigation_filter_out_empty_blocks, block_core_navigation_get_fallback_blocks, block_core_navigation_set_ignored_hooked_blocks_metadata, block_core_navigation_mock_parsed_block

Top Google Results

User discussions

wpseek mobile