wc_wp_theme_get_element_class_name()WC 7.0.1

Given an element name, returns a class name.

If the WP-related function is not defined or current theme is not a FSE theme, return empty string.

Хуков нет.

Возвращает

Строку.

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

wc_wp_theme_get_element_class_name( $element );
$element(строка) (обязательный)
The name of the element.

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

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

Код wc_wp_theme_get_element_class_name() WC 8.7.0

function wc_wp_theme_get_element_class_name( $element ) {
	if ( wc_current_theme_is_fse_theme() && function_exists( 'wp_theme_get_element_class_name' ) ) {
		return wp_theme_get_element_class_name( $element );
	}

	return '';
}