true, 'tablet' => true, 'mobile' => false, ]); $cart_visibility = [ 'desktop' => false, 'tablet' => false, 'mobile' => false, ]; if (function_exists('woocommerce_mini_cart')) { $cart_visibility = get_theme_mod('header_cart_visibility', [ 'desktop' => true, 'tablet' => true, 'mobile' => false, ]); } $special_elements_class .= ' ' . blocksy_visibility_matching( $search_visibility, $cart_visibility ); return trim($special_elements_class); } function blocksy_output_site_branding() { ?>
'custom-logo', 'itemprop' => 'logo', ); /* * If the logo alt attribute is empty, get the site title and explicitly * pass it to the attributes used by wp_get_attachment_image(). */ $image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true ); if ( empty( $image_alt ) ) { $custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' ); } /* * If the alt attribute is not empty, there's no need to explicitly pass * it because wp_get_attachment_image() already adds the alt attribute. */ $html = sprintf( '%2$s', esc_url( home_url( '/' ) ), wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr ) ); } return $html; } function blocksy_output_header_top_bar() { $columns_output = ''; $header_section_1 = get_theme_mod( 'header_top_bar_section_1', 'header_menu' ); $header_section_2 = get_theme_mod( 'header_top_bar_section_2', 'social_icons' ); if ( $header_section_1 !== 'disabled' && $header_section_2 !== 'disabled' ) { $columns_output = 'data-columns="2"'; } else { if ( $header_section_1 !== 'disabled' || $header_section_2 !== 'disabled' ) { $columns_output = 'data-columns="1"'; } } $container_class = ( get_theme_mod( 'top_bar_container', 'fixed' ) === 'fixed' ) ? 'ct-container' : 'ct-container-fluid'; $main_class = 'header-top-bar'; $main_class .= ' ' . blocksy_visibility_classes( get_theme_mod('top_bar_visibility', [ 'desktop' => true, 'tablet' => true, 'mobile' => false, ]) ); $stacking_output = blocksy_stacking( get_theme_mod('top_bar_stacking', [ 'tablet' => true, 'mobile' => true, ]) ); ob_start(); ?>