diff --git a/packages/block-library/src/navigation/menu-items-to-blocks.js b/packages/block-library/src/navigation/menu-items-to-blocks.js index b765f38a7ef84e..08a7dfd2bafe87 100644 --- a/packages/block-library/src/navigation/menu-items-to-blocks.js +++ b/packages/block-library/src/navigation/menu-items-to-blocks.js @@ -7,6 +7,7 @@ import { sortBy } from 'lodash'; * WordPress dependencies */ import { createBlock, parse } from '@wordpress/blocks'; +import { applyFilters } from '@wordpress/hooks'; /** * Convert a flat menu item structure to a nested blocks structure. @@ -21,7 +22,12 @@ export default function menuItemsToBlocks( menuItems ) { } const menuTree = createDataTree( menuItems ); - return mapMenuItemsToBlocks( menuTree ); + const blocks = mapMenuItemsToBlocks( menuTree ); + return applyFilters( + 'blocks.navigation.__unstableMenuItemsToBlocks', + blocks, + menuItems + ); } /**