diff --git a/wp-admin/site-editor.php b/wp-admin/site-editor.php index 64abbdb0cd..6100f5a310 100644 --- a/wp-admin/site-editor.php +++ b/wp-admin/site-editor.php @@ -37,12 +37,18 @@ add_filter( } ); +$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(); $custom_settings = array( 'siteUrl' => site_url(), 'postsPerPage' => get_option( 'posts_per_page' ), 'styles' => get_block_editor_theme_styles(), - 'defaultTemplateTypes' => get_default_block_template_types(), + 'defaultTemplateTypes' => $indexed_template_types, 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), '__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(), '__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(), diff --git a/wp-includes/version.php b/wp-includes/version.php index 0338c2135a..5dceb620a3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-beta1-52335'; +$wp_version = '5.9-beta1-52336'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.