diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index fda548ed54..6e98a069fd 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -514,6 +514,7 @@ add_action( 'init', 'wp_sitemaps_get_server' ); */ // Theme. add_action( 'setup_theme', 'create_initial_theme_features', 0 ); +add_action( 'setup_theme', '_add_default_theme_supports', 1 ); add_action( 'wp_loaded', '_custom_header_background_just_in_time' ); add_action( 'wp_head', '_custom_logo_header_styles' ); add_action( 'plugins_loaded', '_wp_customize_include' ); diff --git a/wp-includes/theme.php b/wp-includes/theme.php index e4256f00a1..351d7c8546 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -4164,3 +4164,20 @@ function create_initial_theme_features() { function wp_is_block_theme() { return wp_get_theme()->is_block_theme(); } + +/** + * Adds default theme supports for block themes when the 'setup_theme' action fires. + * + * @since 5.9.0 + * @access private + */ +function _add_default_theme_supports() { + if ( wp_is_block_theme() ) { + add_theme_support( 'post-thumbnails' ); + add_theme_support( 'responsive-embeds' ); + add_theme_support( 'editor-styles' ); + add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'style', 'script' ) ); + add_theme_support( 'automatic-feed-links' ); + add_filter( 'should_load_separate_core_block_assets', '__return_true' ); + } +} diff --git a/wp-includes/version.php b/wp-includes/version.php index 69701c2600..65c5c4c81c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-beta2-52368'; +$wp_version = '5.9-beta2-52369'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.