From fc252a7a2d697d44e12a11844e9de0fde50d9caf Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Thu, 26 Jan 2023 19:59:16 +0000 Subject: [PATCH] Editor: Add is block theme setting to get_block_editor_settings(). The block editor's iframe needs to know if the theme is a block theme. This changeset adds a setting to `get_block_editor_settings()`. Reference: * https://github.com/WordPress/gutenberg/pull/46212 Props ellatrix, alexstine, costdev, dgwyer, glendaviesnz, scruffian. Fixes #57549. git-svn-id: https://develop.svn.wordpress.org/trunk@55147 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-editor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/block-editor.php b/src/wp-includes/block-editor.php index 1a5e8f6e2d1a1..62ad62049ce14 100644 --- a/src/wp-includes/block-editor.php +++ b/src/wp-includes/block-editor.php @@ -495,6 +495,7 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex } $editor_settings['__unstableResolvedAssets'] = _wp_get_iframed_editor_assets(); + $editor_settings['__unstableIsBlockBasedTheme'] = wp_is_block_theme(); $editor_settings['localAutosaveInterval'] = 15; $editor_settings['disableLayoutStyles'] = current_theme_supports( 'disable-layout-styles' ); $editor_settings['__experimentalDiscussionSettings'] = array(