function woocommerce_header_add_to_cart_fragment($fragments) { global $woocommerce; ob_start(); kds_woocommerce_cart_botton(); $fragments['a#cart'] = ob_get_clean(); return $fragments; }
} else { if (strstr($topbar_plus, '|')) { $topbar_plus_elements = explode('|', $topbar_plus); } else { $topbar_plus_elements = array($topbar_plus); } } foreach ($topbar_plus_elements as $element) { // Trak last and middle elements if (strlen($element) + strpos($topbar_plus, $element) === strlen($topbar_plus)) { $last = true; } else { $last = false; } $middle = !$last && !empty($secondary_menu); // Show menu echo '<div id="' . $element . '-wrapper" class="desktop-only span' . (empty($secondary_menu) ? '4' : '3') . ($last ? ' textalignright last' : '') . ($middle ? ' textaligncenter' : '') . '">'; switch ($element) { case 'cart': kds_woocommerce_cart_botton(); break; case 'social': header_social_links(); break; } echo '</div>'; } ?> </div><!-- #masthead-top-inner --> </div><!-- #masthead-top -->