diff --git a/lib/class-wp-rest-block-editor-settings-controller.php b/lib/class-wp-rest-block-editor-settings-controller.php index 1d66d1f903b0e5..8207d1b6bacbc6 100644 --- a/lib/class-wp-rest-block-editor-settings-controller.php +++ b/lib/class-wp-rest-block-editor-settings-controller.php @@ -140,8 +140,8 @@ public function get_item_schema() { 'context' => array( 'site-editor' ), ), - '__experimentalGlobalStylesBaseStyles' => array( - 'description' => __( 'Global styles settings.', 'gutenberg' ), + '__experimentalGlobalStylesBaseConfig' => array( + 'description' => __( 'Settings and styles consolidated from core and theme origins.', 'gutenberg' ), 'type' => 'object', 'context' => array( 'site-editor' ), ), diff --git a/lib/global-styles.php b/lib/global-styles.php index 7374fecb104b08..e33f79bb758b8a 100644 --- a/lib/global-styles.php +++ b/lib/global-styles.php @@ -125,8 +125,9 @@ function_exists( 'gutenberg_is_edit_site_page' ) && $theme = WP_Theme_JSON_Resolver_Gutenberg::get_merged_data( $settings, 'theme' ); $user_cpt_id = WP_Theme_JSON_Resolver_Gutenberg::get_user_custom_post_type_id(); - $settings['__experimentalGlobalStylesUserEntityId'] = $user_cpt_id; - $settings['__experimentalGlobalStylesBaseStyles'] = $theme->get_raw_data(); + $settings['__experimentalGlobalStylesUserEntityId'] = $user_cpt_id; + $settings['__experimentalGlobalStylesBaseConfig']['styles'] = $theme->get_raw_data()['styles']; + $settings['__experimentalGlobalStylesBaseConfig']['settings'] = $theme->get_settings(); } if ( 'other' === $context ) { diff --git a/packages/edit-site/src/components/global-styles/hooks.js b/packages/edit-site/src/components/global-styles/hooks.js index 8e807a53ecc531..f8ffdb40176e45 100644 --- a/packages/edit-site/src/components/global-styles/hooks.js +++ b/packages/edit-site/src/components/global-styles/hooks.js @@ -137,7 +137,7 @@ function useGlobalStylesUserConfig() { function useGlobalStylesBaseConfig() { const baseConfig = useSelect( ( select ) => { return select( editSiteStore ).getSettings() - .__experimentalGlobalStylesBaseStyles; + .__experimentalGlobalStylesBaseConfig; }, [] ); return baseConfig; diff --git a/packages/editor/src/components/provider/use-block-editor-settings.js b/packages/editor/src/components/provider/use-block-editor-settings.js index 01ad73c7063800..03cd44e35f2af6 100644 --- a/packages/editor/src/components/provider/use-block-editor-settings.js +++ b/packages/editor/src/components/provider/use-block-editor-settings.js @@ -94,7 +94,7 @@ function useBlockEditorSettings( settings, hasTemplate ) { '__experimentalBlockPatternCategories', '__experimentalBlockPatterns', '__experimentalFeatures', - '__experimentalGlobalStylesBaseStyles', + '__experimentalGlobalStylesBaseConfig', '__experimentalGlobalStylesUserEntityId', '__experimentalPreferredStyleVariations', '__experimentalSetIsInserterOpened',