From 74e8d69d8677c5f243131e9dbfcd262b3899640b Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 21 Aug 2024 10:58:57 +0200 Subject: [PATCH] Remove check for hook added to rest_insert_wp_navigation action --- packages/block-library/src/navigation/index.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index 7a4b2f8bc8fd64..ccadd5c4a222d4 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -1626,15 +1626,6 @@ function block_core_navigation_update_ignore_hooked_blocks_meta( $post ) { add_filter( 'rest_pre_insert_wp_navigation', 'block_core_navigation_update_ignore_hooked_blocks_meta' ); } -/* - * Previous versions of Gutenberg were attaching the block_core_navigation_update_ignore_hooked_blocks_meta - * function to the `rest_insert_wp_navigation` _action_ (rather than the `rest_pre_insert_wp_navigation` _filter_). - * To avoid collisions, we need to remove the filter from that action if it's present. - */ -if ( has_filter( 'rest_insert_wp_navigation', $rest_insert_wp_navigation_core_callback ) ) { - remove_filter( 'rest_insert_wp_navigation', $rest_insert_wp_navigation_core_callback ); -} - /** * Hooks into the REST API response for the core/navigation block and adds the first and last inner blocks. *