Skip to content

Commit

Permalink
Navigation block: Use apply-block-hooks-to-content
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Sep 26, 2024
1 parent 3b99bb6 commit 1282aad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,12 @@ function block_core_navigation_mock_parsed_block( $inner_blocks, $post ) {
*/
function block_core_navigation_insert_hooked_blocks( $inner_blocks, $post ) {
$mock_navigation_block = block_core_navigation_mock_parsed_block( $inner_blocks, $post );

if ( function_exists( 'apply_block_hooks_to_content' ) ) {
$mock_navigation_block_markup = serialize_block( $mock_navigation_block );
return apply_block_hooks_to_content( $mock_navigation_block_markup, $post, 'insert_hooked_blocks' );
}

$hooked_blocks = get_hooked_blocks();

Check warning on line 1508 in packages/block-library/src/navigation/index.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Equals sign not aligned with surrounding assignments; expected 8 spaces but found 9 spaces
$before_block_visitor = null;

Check warning on line 1509 in packages/block-library/src/navigation/index.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
$after_block_visitor = null;

Check warning on line 1510 in packages/block-library/src/navigation/index.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Equals sign not aligned with surrounding assignments; expected 2 spaces but found 3 spaces
Expand Down

0 comments on commit 1282aad

Please sign in to comment.