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( '', 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(); ?>
>
'header_top_bar', 'depth' => 1, 'container' => false, 'menu_id' => 'header-top-bar-menu', 'menu_class' => 'header-top-bar-menu menu', 'fallback_cb' => 'blocksy_link_to_menu_editor', ] ); $output = ob_get_clean(); } if ( $kind === 'custom_text' ) { $output = '
' . get_theme_mod( 'header_top_bar_section_' . $number . '_text', 'Sample text' ) . '
'; } if ( $kind === 'social_icons' ) { $output = blocksy_social_icons( get_theme_mod('header_top_bar_socials_' . $number, [ [ 'id' => 'facebook', 'enabled' => true, ], [ 'id' => 'twitter', 'enabled' => true, ], [ 'id' => 'gplus', 'enabled' => true, ], ]), 'simple' ); } return '
' . $output . '
'; } function blocksy_header_main_menu() { ?> 'header_top_bar', 'depth' => 1, 'container' => false, 'menu_id' => 'header-top-bar-menu', 'menu_class' => 'header-top-bar-menu menu', 'fallback_cb' => 'blocksy_link_to_menu_editor', ] ); $output = '
' . ob_get_clean() . '
'; blocksy_add_customizer_preview_cache( function () use ($output) { return blocksy_html_tag( 'div', [ 'data-id' => 'header-top-bar-menu' ], $output ); } ); $output = '
'; $output .= '
' . get_theme_mod( 'header_top_bar_section_1_text', 'Sample text' ) . '

'; $output .= '
'; blocksy_add_customizer_preview_cache( function () use ($output) { return blocksy_html_tag( 'div', [ 'data-id' => 'header-top-bar-text' ], $output ); } ); blocksy_add_customizer_preview_cache( function () { return blocksy_html_tag( 'div', [ 'data-id' => 'header-top-bar-socials' ], '
' . blocksy_social_icons( null, 'simple' ) . '
' ); } ); }