add_theme_support( string $feature, mixed $args )
Рекомендую використовувати з хуком ‘after_setup_theme’, бо ‘init’ може спрацьовувати запізно для багатьох функцій. Використовується в functions.php або у вкладених в цей файл файлах типа inc/theme-support.php
add_theme_support( 'title-tag' );
add_theme_support( 'custom-logo', array(
'height' => 480,
'width' => 720,
) );
$feature
:
(string)
Required
$args
:
()
Optional
void|false //Void якщо все ок, false якщо щось не так.
'admin-bar'
'align-wide'
'appearance-tools'
'automatic-feed-links'
'block-templates'
'block-template-parts'
'border'
'core-block-patterns'
'custom-background'
'custom-header'
'custom-line-height'
'custom-logo'
'customize-selective-refresh-widgets'
'custom-spacing'
'custom-units'
'dark-editor-style'
'disable-custom-colors'
'disable-custom-font-sizes'
'disable-custom-gradients'
'disable-layout-styles'
'editor-color-palette'
'editor-gradient-presets'
'editor-font-sizes'
'editor-styles'
'featured-content'
'html5'
'link-color'
'menus'
'post-formats'
'post-thumbnails'
'responsive-embeds'
'starter-content'
'title-tag'
'widgets'
'widgets-block-editor'
'wp-block-styles'