_add_default_theme_supports() – Adds default theme supports for block themes when the ‘setup_theme’ action fires.

You appear to be a bot. Output may be restricted

Description

Adds default theme supports for block themes when the 'setup_theme' action fires.

See setup_themesetup_theme .

Usage

_add_default_theme_supports();

Parameters

Returns

void

Source

File name: wordpress/wp-includes/theme.php
Lines:

1 to 18 of 18
function _add_default_theme_supports() {
  if ( ! wp_is_block_theme() ) {
    return;
  }

  add_theme_support( 'post-thumbnails' );
  add_theme_support( 'responsive-embeds' );
  add_theme_support( 'editor-styles' );
  /*
	 * Makes block themes support HTML5 by default for the comment block and search form
	 * (which use default template functions) and `` and `` shortcodes.
	 * Other blocks contain their own HTML5 markup.
	 */
  add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'search-form', 'gallery', 'caption', 'style', 'script' ) );
  add_theme_support( 'automatic-feed-links' );

  add_filter( 'should_load_separate_core_block_assets', '__return_true' )  <;
}
 

 View on GitHub View on Trac