Skip to content

Commit

Permalink
Switching to experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Apr 29, 2024
1 parent dab63c1 commit a11f67b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ export function useGlobalStylesOutputWithConfig( mergedConfig = {} ) {
const { themeDirURI, disableLayoutStyles } = useSelect( ( select ) => {
const _settings = select( blockEditorStore ).getSettings();
return {
themeDirURI: _settings?.currentTheme?.stylesheetURI,
themeDirURI: _settings?.__experimentalCurrentTheme?.stylesheetURI,
disableLayoutStyles: !! _settings.disableLayoutStyles,
};
} );
Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ function useBlockProps( { name, style } ) {
const { themeDirURI } = useSelect( ( select ) => {
const _settings = select( blockEditorStore ).getSettings();
return {
themeDirURI: _settings?.currentTheme?.stylesheetURI,
themeDirURI: _settings?.__experimentalCurrentTheme?.stylesheetURI,
};
} );
const blockElementsContainerIdentifier = `wp-elements-${ useInstanceId(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const BLOCK_EDITOR_SETTINGS = [
'clearBlockSelection',
'codeEditingEnabled',
'colors',
'currentTheme',
'disableCustomColors',
'disableCustomFontSizes',
'disableCustomSpacingSizes',
Expand Down Expand Up @@ -159,9 +158,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
postType,
postId
)?._links?.hasOwnProperty( 'wp:action-unfiltered-html' ),
currentTheme: {
stylesheetURI: _currentTheme?.stylesheet_uri,
},
currentTheme: _currentTheme,
focusMode: get( 'core', 'focusMode' ),
hasFixedToolbar:
get( 'core', 'fixedToolbar' ) || ! isLargeViewport,
Expand Down Expand Up @@ -268,7 +265,6 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
),
allowedBlockTypes,
allowRightClickOverrides,
currentTheme,
focusMode: focusMode && ! forceDisableFocusMode,
hasFixedToolbar,
isDistractionFree,
Expand Down Expand Up @@ -298,6 +294,9 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
// Check these two properties: they were not present in the site editor.
__experimentalCreatePageEntity: createPageEntity,
__experimentalUserCanCreatePages: userCanCreatePages,
__experimentalCurrentTheme: {
stylesheetURI: currentTheme?.stylesheet_uri,
},
pageOnFront,
pageForPosts,
__experimentalPreferPatternsOnRoot: postType === 'wp_template',
Expand All @@ -316,6 +315,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
}, [
allowedBlockTypes,
allowRightClickOverrides,
currentTheme,
focusMode,
forceDisableFocusMode,
hasFixedToolbar,
Expand Down

0 comments on commit a11f67b

Please sign in to comment.