From 7c9aed4113daf9effbeeb9eabf1ec631107e5e54 Mon Sep 17 00:00:00 2001 From: ramon Date: Fri, 30 Aug 2024 15:00:15 +1000 Subject: [PATCH] Removing variations from block inspector panel if template is locked --- .../block-editor/src/components/block-inspector/index.js | 1 - packages/block-editor/src/components/block-switcher/index.js | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/components/block-inspector/index.js b/packages/block-editor/src/components/block-inspector/index.js index 75b5239f47d6cc..76a908630b29b0 100644 --- a/packages/block-editor/src/components/block-inspector/index.js +++ b/packages/block-editor/src/components/block-inspector/index.js @@ -72,7 +72,6 @@ function BlockInspectorLockedBlocks( { topLevelLockedBlock } ) { { ...blockInformation } className={ blockInformation.isSynced && 'is-synced' } /> - { hasBlockStyles && ( diff --git a/packages/block-editor/src/components/block-switcher/index.js b/packages/block-editor/src/components/block-switcher/index.js index da394a9bee767e..982b6e80792d7b 100644 --- a/packages/block-editor/src/components/block-switcher/index.js +++ b/packages/block-editor/src/components/block-switcher/index.js @@ -107,10 +107,9 @@ function BlockSwitcherDropdownMenuContents( { const hasPossibleBlockVariationTransformations = !! blockVariationTransformations?.length; const hasPatternTransformation = !! patterns?.length && canRemove; - /* const hasBlockOrBlockVariationTransforms = + const hasBlockOrBlockVariationTransforms = hasPossibleBlockTransformations || - hasPossibleBlockVariationTransformations;*/ - const hasBlockOrBlockVariationTransforms = false; + hasPossibleBlockVariationTransformations; const hasContents = hasBlockStyles || hasBlockOrBlockVariationTransforms ||