$current_screen->
is_block_editor( true
);
// Default to is-fullscreen-mode to avoid jumps in the UI.
add_filter( 'admin_body_class',
static function( $classes ) { return "
$classes is-fullscreen-mode";
});
$indexed_template_types = array
();
foreach ( get_default_block_template_types() as $slug =>
$template_type ) { $template_type['slug'
] =
(string) $slug;
$indexed_template_types[] =
$template_type;
}$block_editor_context =
new WP_Block_Editor_Context( array
( 'name' => 'core/edit-site'
) );
$custom_settings = array
( 'siteUrl' =>
site_url(),
'postsPerPage' =>
get_option( 'posts_per_page'
),
'styles' =>
get_block_editor_theme_styles(),
'defaultTemplateTypes' =>
$indexed_template_types,
'defaultTemplatePartAreas' =>
get_allowed_block_template_part_areas(),