From 222ef57251b052aa33316b434d32f8803c6711f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ka=CC=88gy?= Date: Thu, 8 Feb 2024 12:02:58 +0100 Subject: [PATCH] fix rename the new filter to block_core_navigation_listable_blocks --- packages/block-library/src/navigation/index.php | 2 +- phpunit/blocks/class-wp-navigation-block-renderer-test.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index 76634a3c9466c7..07379b2bb94e82 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -118,7 +118,7 @@ private static function does_block_need_a_list_item_wrapper( $block ) { * @param array $needs_list_item_wrapper The list of blocks that need a list item wrapper. * @return array The list of blocks that need a list item wrapper. */ - $needs_list_item_wrapper = apply_filters( 'block_core_navigation_blocks_requiring_list_item_wrapper', static::$needs_list_item_wrapper ); + $needs_list_item_wrapper = apply_filters( 'block_core_navigation_listable_blocks', static::$needs_list_item_wrapper ); return in_array( $block->name, $needs_list_item_wrapper, true ); } diff --git a/phpunit/blocks/class-wp-navigation-block-renderer-test.php b/phpunit/blocks/class-wp-navigation-block-renderer-test.php index 14e552cfa9ceba..63efc3bfe35de0 100644 --- a/phpunit/blocks/class-wp-navigation-block-renderer-test.php +++ b/phpunit/blocks/class-wp-navigation-block-renderer-test.php @@ -130,7 +130,7 @@ public function test_gutenberg_block_is_automatically_wrapped_with_li_tag_when_f }; add_filter( - 'block_core_navigation_blocks_requiring_list_item_wrapper', + 'block_core_navigation_listable_blocks', $filter_needs_list_item_wrapper_function, 10, 1 @@ -154,7 +154,7 @@ public function test_gutenberg_block_is_automatically_wrapped_with_li_tag_when_f $expected = '
  • Hello World
  • '; $this->assertEquals( $expected, $result ); - remove_filter( 'block_core_navigation_blocks_requiring_list_item_wrapper', $filter_needs_list_item_wrapper_function, 10, 1 ); + remove_filter( 'block_core_navigation_listable_blocks', $filter_needs_list_item_wrapper_function, 10, 1 ); unregister_block_type( 'testsuite/sample-block' ); }