setup_theme хук-событиеWP 2.6.0

Fires before the theme is loaded.

Использование

add_action( 'setup_theme', 'wp_kama_setup_theme_action' );

/**
 * Function for `setup_theme` action-hook.
 * 
 * @return void
 */
function wp_kama_setup_theme_action(){

	// action...
}

Список изменений

С версии 2.6.0 Введена.

Где вызывается хук

В файле: /wp-settings.php
setup_theme
wp-settings.php 530
do_action( 'setup_theme' );

Где используется хук в WordPress

wp-includes/blocks/site-logo.php 183
add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_theme', 11 );
wp-includes/class-wp-customize-manager.php 366
add_action( 'setup_theme', array( $this, 'setup_theme' ) );
wp-includes/default-filters.php 516
add_action( 'setup_theme', 'create_initial_theme_features', 0 );
wp-includes/default-filters.php 517
add_action( 'setup_theme', '_add_default_theme_supports', 1 );
wp-includes/default-filters.php 680
add_action( 'setup_theme', 'wp_enable_block_templates' );