Skip to content

Commit

Permalink
Advanced styles panel: add an early return
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinan committed Jun 30, 2023
1 parent 5d2fd62 commit ab1625c
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,19 @@ function PushChangesToGlobalStylesControl( {
const withPushChangesToGlobalStyles = createHigherOrderComponent(
( BlockEdit ) => ( props ) => {
const blockEditingMode = useBlockEditingMode();

/**
* Do not show the panel for pattern and template part blocks.
*
* @see https://github.com/WordPress/gutenberg/issues/52139
*/
if (
'core/block' === props.name ||
'core/template-part' === props.name
) {
return <BlockEdit { ...props } />;
}

return (
<>
<BlockEdit { ...props } />
Expand Down

0 comments on commit ab1625c

Please sign in to comment.