wpseek.com
A WordPress-centric search engine for devs and theme authors
block_core_navigation_insert_hooked_blocks › WordPress Function
Since6.5.0
Deprecatedn/a
› block_core_navigation_insert_hooked_blocks ( $inner_blocks, $post )
Parameters: (2) |
|
Returns: |
|
Defined at: |
|
Codex: |
Insert hooked blocks into a Navigation block.
Given a Navigation block's inner blocks and its correspondingwp_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.Source
function block_core_navigation_insert_hooked_blocks( $inner_blocks, $post ) { $mock_navigation_block = block_core_navigation_mock_parsed_block( $inner_blocks, $post ); $mock_navigation_block_markup = serialize_block( $mock_navigation_block ); return apply_block_hooks_to_content( $mock_navigation_block_markup, $post, 'insert_hooked_blocks' ); }