wp_enqueue_classic_theme_styles() │ WP 6.1.0

Loads classic theme styles when the current theme lacks a theme.json file.

This is used for backwards compatibility for Button and File blocks specifically.

Хуков нет.

Возвращает

null. Ничего (null).

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

wp_enqueue_classic_theme_styles();

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

С версии 6.1.0 Введена.
С версии 6.2.0 Added File block styles.
С версии 6.8.0 Moved stylesheet registration outside of this function.

Код wp_enqueue_classic_theme_styles() WP 7.1.4

function wp_enqueue_classic_theme_styles() {
	if ( ! wp_theme_has_theme_json() ) {
		wp_enqueue_style( 'classic-theme-styles' );
	}
}