Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/54877: Allow insertion of Buttons in the Navigation Block #55126

Closed
wants to merge 6 commits into from
13 changes: 1 addition & 12 deletions packages/block-library/src/navigation/edit/inner-blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,6 @@ export default function NavigationInnerBlocks( {
'wp_navigation'
);

const shouldDirectInsert = useMemo(
() =>
blocks.every(
( { name } ) =>
name === 'core/navigation-link' ||
name === 'core/navigation-submenu' ||
name === 'core/page-list'
),
[ blocks ]
);

// When the block is selected itself or has a top level item selected that
// doesn't itself have children, show the standard appender. Else show no
// appender.
Expand Down Expand Up @@ -99,7 +88,7 @@ export default function NavigationInnerBlocks( {
allowedBlocks: ALLOWED_BLOCKS,
prioritizedInserterBlocks: PRIORITIZED_INSERTER_BLOCKS,
defaultBlock: DEFAULT_BLOCK,
directInsert: shouldDirectInsert,
directInsert: false,
orientation,
templateLock,

Expand Down