wc_wp_theme_get_element_class_name()
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 wp theme get element class name WC 10.7.0
function wc_wp_theme_get_element_class_name( $element ) {
if ( wp_is_block_theme() && function_exists( 'wp_theme_get_element_class_name' ) ) {
return wp_theme_get_element_class_name( $element );
}
return '';
}