Skip to content

Commit

Permalink
Backport the changes to the site editor intialization
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Feb 7, 2023
1 parent 07fc9b2 commit 08629ea
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/wp-admin/site-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,8 @@ static function( $classes ) {
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
'supportsLayout' => wp_theme_has_theme_json(),
'supportsTemplatePartsMode' => ! wp_is_block_theme() && current_theme_supports( 'block-template-parts' ),
'__unstableHomeTemplate' => $home_template,
);

/**
* Home template resolution is not needed when block template parts are supported.
* Set the value to `true` to satisfy the editor initialization guard clause.
*/
if ( $custom_settings['supportsTemplatePartsMode'] ) {
$custom_settings['__unstableHomeTemplate'] = true;
}

// Add additional back-compat patterns registered by `current_screen` et al.
$custom_settings['__experimentalAdditionalBlockPatterns'] = WP_Block_Patterns_Registry::get_instance()->get_all_registered( true );
$custom_settings['__experimentalAdditionalBlockPatternCategories'] = WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered( true );
Expand Down

0 comments on commit 08629ea

Please sign in to comment.