Make WordPress Core


Ignore:
Timestamp:
01/26/2023 07:59:16 PM (22 months ago)
Author:
hellofromTonya
Message:

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:

Props ellatrix, alexstine, costdev, dgwyer, glendaviesnz, scruffian.
Fixes #57549.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-editor.php

    r55146 r55147  
    496496
    497497    $editor_settings['__unstableResolvedAssets']         = _wp_get_iframed_editor_assets();
     498    $editor_settings['__unstableIsBlockBasedTheme']      = wp_is_block_theme();
    498499    $editor_settings['localAutosaveInterval']            = 15;
    499500    $editor_settings['disableLayoutStyles']              = current_theme_supports( 'disable-layout-styles' );
Note: See TracChangeset for help on using the changeset viewer.