From f5eba782f89f32b55508b53324d815c5ccb84311 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 6 Dec 2021 09:50:42 +0100 Subject: [PATCH] Fix e2e tests --- lib/full-site-editing/edit-site-page.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/full-site-editing/edit-site-page.php b/lib/full-site-editing/edit-site-page.php index 6dc5ec37cd4d87..5cf61b6b917509 100644 --- a/lib/full-site-editing/edit-site-page.php +++ b/lib/full-site-editing/edit-site-page.php @@ -148,11 +148,17 @@ static function( $classes ) { } ); + $indexed_template_types = array(); + foreach ( get_default_block_template_types() as $slug => $template_type ) { + $template_type['slug'] = (string) $slug; + $indexed_template_types[] = $template_type; + } + $custom_settings = array( 'siteUrl' => site_url(), 'postsPerPage' => get_option( 'posts_per_page' ), 'styles' => gutenberg_get_editor_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(),