true,
'tablet' => true,
'mobile' => false,
])
);
ob_start();
?>
');
wp_nav_menu(
[
'theme_location' => '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',
]
);
echo '';
$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,
],
])
);
}
return '';
}
function blocksy_header_top_bar_sections_cache() {
ob_start();
wp_nav_menu(
[
'theme_location' => '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 = '';
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() . ''
);
}
);
}