Print block-based css classes only on fse themes
This commit is contained in:
parent
152f0d3793
commit
0bc31867a4
|
@ -527,7 +527,7 @@ function wc_current_theme_supports_woocommerce_or_fse() {
|
|||
/**
|
||||
* Given an element name, returns a class name.
|
||||
*
|
||||
* If the WP-related function is not defined, return empty string.
|
||||
* If the WP-related function is not defined or current theme is not a FSE theme, return empty string.
|
||||
*
|
||||
* @param string $element The name of the element.
|
||||
*
|
||||
|
@ -535,7 +535,7 @@ function wc_current_theme_supports_woocommerce_or_fse() {
|
|||
* @return string
|
||||
*/
|
||||
function wc_wp_theme_get_element_class_name( $element ) {
|
||||
if ( function_exists( 'wp_theme_get_element_class_name' ) ) {
|
||||
if ( wc_current_theme_is_fse_theme() && function_exists( 'wp_theme_get_element_class_name' ) ) {
|
||||
return wp_theme_get_element_class_name( $element );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue