Skip to content

Commit

Permalink
Enable theme supports automatically for FSE theme (#35593)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Oct 14, 2021
1 parent 2d79bb9 commit 16633ff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/compat/wordpress-5.9/default-theme-supports.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Loads default theme supports for block themes.
*
* @package gutenberg
*/

if ( gutenberg_is_fse_theme() ) {
add_theme_support( 'post-thumbnails' );
add_theme_support( 'responsive-embeds' );
add_theme_support( 'editor-styles' );
add_theme_support(
'html5',
array(
'style',
'script',
)
);
add_theme_support( 'automatic-feed-links' );
add_filter( 'should_load_separate_core_block_assets', '__return_true' );
}
1 change: 1 addition & 0 deletions lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/full-site-editing/template-loader.php';
require __DIR__ . '/full-site-editing/edit-site-page.php';
require __DIR__ . '/full-site-editing/edit-site-export.php';
require __DIR__ . '/compat/wordpress-5.9/default-theme-supports.php';

require __DIR__ . '/blocks.php';
require __DIR__ . '/block-patterns.php';
Expand Down

0 comments on commit 16633ff

Please sign in to comment.