Skip to content

Commit

Permalink
Quick hack to add global styles data to block editor settings
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Nov 16, 2023
1 parent 55f4b60 commit 02c98cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/block-editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function gutenberg_get_block_editor_settings( $settings ) {
}

$settings['styles'] = array_merge( $global_styles, get_block_editor_theme_styles() );
$settings['__experimentalStyles'] = gutenberg_get_global_styles();

$settings['__experimentalFeatures'] = gutenberg_get_global_settings();
// These settings may need to be updated based on data coming from theme.json sources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function get_item_schema() {
'__experimentalStyles' => array(
'description' => __( 'Styles consolidated from core, theme, and user origins.', 'gutenberg' ),
'type' => 'object',
'context' => array( 'mobile' ),
'context' => array( 'post-editor', 'site-editor', 'widgets-editor', 'mobile' ),
),

'__experimentalEnableQuoteBlockV2' => array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const BLOCK_EDITOR_SETTINGS = [
'__experimentalBlockDirectory',
'__experimentalDiscussionSettings',
'__experimentalFeatures',
'__experimentalStyles',
'__experimentalGlobalStylesBaseStyles',
'__experimentalPreferredStyleVariations',
'__experimentalSetIsInserterOpened',
Expand Down

0 comments on commit 02c98cc

Please sign in to comment.