';
}
// Store the generated breadcrumb.
$breadcrumb = ob_get_clean();
wp_cache_set( $cache_key, $breadcrumb, 'buddyx_breadcrumb', 12 * HOUR_IN_SECONDS ); // Cache for 12 hours.
}
// Output the breadcrumb.
echo wp_kses_post( $breadcrumb );
}
}
// Site Loader
if ( ! function_exists( 'buddyx_site_loader' ) ) {
function buddyx_site_loader() {
$loader = get_theme_mod( 'site_loader', buddyx_defaults( 'site-loader' ) );
if ( $loader == '1' ) {
echo '
';
}
}
}
// Site Search and WooCommerce Cart Icon.
if ( ! function_exists( 'buddyx_site_menu_icon' ) ) {
/**
* Renders site menu icons, including a search icon and a WooCommerce cart icon.
* The function checks the theme settings to determine if the icons should be displayed.
*/
function buddyx_site_menu_icon() {
// Get the settings for search and cart icons from the theme customizer.
$searchicon = (int) get_theme_mod( 'site_search', buddyx_defaults( 'site-search' ) );
$carticon = (int) get_theme_mod( 'site_cart', buddyx_defaults( 'site-cart' ) );
// Check if either search or cart icon is enabled.
if ( ! empty( $searchicon ) || ! empty( $carticon ) ) :
?>