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.
No Hooks.
Returns
String.
Usage
wc_wp_theme_get_element_class_name( $element );
- $element(string) (required)
- The name of the element.
Changelog
| Since 7.0.1 | Introduced. |
wc_wp_theme_get_element_class_name() wc wp theme get element class name code WC 10.3.3
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 '';
}