Skip to content

Commit

Permalink
feat: Add menu name next to Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
im3dabasia committed Jan 1, 2025
1 parent e5dca54 commit 8689580
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ const MenuInspectorControls = ( props ) => {
blockEditingMode,
} = props;

const { navigationMenu } = useNavigationMenu( currentMenuId );
const menuTitle = navigationMenu?.title || __( 'Untitled menu' );

return (
<InspectorControls group="list">
<PanelBody title={ null }>
Expand All @@ -152,7 +155,7 @@ const MenuInspectorControls = ( props ) => {
className="wp-block-navigation-off-canvas-editor__title"
level={ 2 }
>
{ __( 'Menu' ) }
{ __( 'Menu' ) } ({ menuTitle })
</Heading>
{ blockEditingMode === 'default' && (
<NavigationMenuSelector
Expand Down

0 comments on commit 8689580

Please sign in to comment.