Skip to content

Commit

Permalink
Use env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Feb 15, 2023
1 parent bc1a948 commit 9b16bc9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/compat/wordpress-6.2/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ function( $settings ) {
// We must override what core is passing now.
$settings['__unstableResolvedAssets'] = gutenberg_resolve_assets_override();
$settings['__unstableIsBlockBasedTheme'] = wp_is_block_theme();
// As the name suggests, this shouldn't be backported to core.
$settings['__unstableIsGutenbergPlugin'] = IS_GUTENBERG_PLUGIN;
return $settings;
},
100
Expand Down
4 changes: 2 additions & 2 deletions packages/edit-post/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ import { store as coreStore } from '@wordpress/core-data';
*/
import { store as editPostStore } from '../../store';

const isGutenbergPlugin = process.env.IS_GUTENBERG_PLUGIN ? true : false;

function MaybeIframe( { children, contentRef, shouldIframe, styles, style } ) {
const ref = useMouseMoveTypingReset();

Expand Down Expand Up @@ -110,7 +112,6 @@ export default function VisualEditor( { styles } ) {
wrapperBlockName,
wrapperUniqueId,
isBlockBasedTheme,
isGutenbergPlugin,
} = useSelect( ( select ) => {
const {
isFeatureActive,
Expand Down Expand Up @@ -149,7 +150,6 @@ export default function VisualEditor( { styles } ) {
wrapperBlockName: _wrapperBlockName,
wrapperUniqueId: getCurrentPostId(),
isBlockBasedTheme: editorSettings.__unstableIsBlockBasedTheme,
isGutenbergPlugin: editorSettings.__unstableIsGutenbergPlugin,
};
}, [] );
const { isCleanNewPost } = useSelect( editorStore );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ const BLOCK_EDITOR_SETTINGS = [
'__unstableIsPreviewMode',
'__unstableResolvedAssets',
'__unstableIsBlockBasedTheme',
'__unstableIsGutenbergPlugin',
];

/**
Expand Down

0 comments on commit 9b16bc9

Please sign in to comment.