Skip to content

Commit

Permalink
Restore metaboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 8, 2024
1 parent ed4259d commit 7f8d9ba
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/edit-post/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ function Layout( { initialPost } ) {
hasHistory,
hasBlockBreadcrumbs,
blockEditorMode,
isEditingTemplate,
} = useSelect( ( select ) => {
const { get } = select( preferencesStore );
const { getEditorSettings, getPostTypeLabel } = select( editorStore );
Expand Down Expand Up @@ -198,6 +199,8 @@ function Layout( { initialPost } ) {
hasBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),
blockEditorMode:
select( blockEditorStore ).__unstableGetEditorMode(),
isEditingTemplate:
select( editorStore ).getCurrentPostType() === 'wp_template',
};
}, [] );

Expand Down Expand Up @@ -372,7 +375,13 @@ function Layout( { initialPost } ) {
<WelcomeGuide />
<InitPatternModal />
<PluginArea onError={ onPluginAreaError } />
{ ! isDistractionFree && <Sidebar /> }
{ ! isDistractionFree && (
<Sidebar
extraPanels={
! isEditingTemplate && <MetaBoxes location="side" />
}
/>
) }
</>
);
}
Expand Down

0 comments on commit 7f8d9ba

Please sign in to comment.