Skip to content

Commit

Permalink
Editor: Add is block theme setting to get_block_editor_settings().
Browse files Browse the repository at this point in the history
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:
* WordPress/gutenberg#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
  • Loading branch information
hellofromtonya authored and dmsnell committed Feb 1, 2023
1 parent 027f3e4 commit fc252a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wp-includes/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit fc252a7

Please sign in to comment.