Skip to content

Commit

Permalink
Disable header zoom toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Nov 22, 2024
1 parent e4b995b commit 90f7fae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/editor/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function Header( {
showIconLabels,
hasFixedToolbar,
hasBlockSelection,
canBeZoomedOut,
} = useSelect( ( select ) => {
const { get: getPreference } = select( preferencesStore );
const {
Expand All @@ -80,13 +81,12 @@ function Header( {
hasFixedToolbar: getPreference( 'core', 'fixedToolbar' ),
hasBlockSelection:
!! select( blockEditorStore ).getBlockSelectionStart(),
canBeZoomedOut:
select( blockEditorStore ).getSettings()?.allowZoomLevel &&
[ 'post', 'page', 'wp_template' ].includes( postType ),
};
}, [] );

const canBeZoomedOut = [ 'post', 'page', 'wp_template' ].includes(
postType
);

const disablePreviewOption = [
NAVIGATION_POST_TYPE,
TEMPLATE_PART_POST_TYPE,
Expand Down

0 comments on commit 90f7fae

Please sign in to comment.