function iva_tabs($atts, $content = null, $code) { extract(shortcode_atts(array('type' => '', 'position' => '', 'animation' => ''), $atts)); $icons = $out = $customtabcolor = $customtabtextcolor = ''; if ($type == "vertical") { $type = 'vertical'; } else { $type = ""; } switch ($position) { case 'centertabs': $positiontype = "centertabs"; break; case 'righttabs': $positiontype = "righttabs"; break; default: $positiontype = ""; } if (!preg_match_all("/(.?)\\[(tab)\\b(.*?)(?:(\\/))?\\](?:(.+?)\\[\\/tab\\])?(.?)/s", $content, $matches)) { return do_shortcode($content); } else { for ($i = 0; $i < count($matches[0]); $i++) { $matches[3][$i] = shortcode_parse_atts($matches[3][$i]); } // Animation Effects //-------------------------------------------------------- $animation = $animation ? ' data-id="' . $animation . '"' : ''; $tabid = 'tab' . rand(1, 99); $out .= '<div ' . $animation . ' id="' . $tabid . '" class="iva_anim systabspane ' . $type . '">'; $out .= '<ul class="tabs">'; for ($i = 0; $i < count($matches[0]); $i++) { if (isset($matches[3][$i]['tabcolor'])) { if (strpos($matches[3][$i]['tabcolor'], '#') !== false) { $customtabcolor = ' style="background-color:' . $matches[3][$i]['tabcolor'] . '"'; } } if (isset($matches[3][$i]['textcolor'])) { if (strpos($matches[3][$i]['textcolor'], '#') !== false) { $customtabtextcolor = ' style="color:' . $matches[3][$i]['textcolor'] . '"'; } } if (isset($matches[3][$i]['icon'])) { $icons = $matches[3][$i]['icon']; } $out .= '<li class="' . $icons . '" id="#' . $tabid . $i . '" ' . $customtabcolor . ' ><a ' . $customtabtextcolor . '>' . $matches[3][$i]['title'] . '</a></li>'; } $out .= '</ul>'; $out .= '<div class="panes">'; for ($i = 0; $i < count($matches[0]); $i++) { $out .= '<div class="tab_content" id="' . $tabid . $i . '" >' . pre_process_shortcode(do_shortcode(trim($matches[5][$i]))) . '</div>'; } $out .= '</div></div>'; return $out; } }
<?php global $woocommerce; ?> <a href="<?php echo $woocommerce->cart->get_cart_url(); ?> " id="header-cart" title="<?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count); ?> "></a> <?php } ?> <div class="slogan"><?php echo pre_process_shortcode($data['text_header2slogan']); ?> </div> </div> </div> <div id="navigation" class="sixteen columns clearfix alpha omega"> <div class="container"> <div class="sixteen columns"> <?php wp_nav_menu(array('theme_location' => 'main_navigation', 'menu_id' => 'nav')); ?> </div> </div>
<?php if ($data['check_searchform'] == true) { ?> <form action="<?php echo home_url(); ?> /" id="header-searchform" method="get"> <input type="text" id="header-s" name="s" value="" autocomplete="off" /> <input type="submit" value="Search" id="header-searchsubmit" /> </form> <?php } ?> <div class="slogan"><?php echo pre_process_shortcode($data['text_hv4slogan']); ?> </div> </div> </div> <div id="navigation" class="sixteen columns clearfix alpha omega"> <div class="container"> <div class="sixteen columns"> <?php wp_nav_menu(array('theme_location' => 'main_navigation', 'menu_id' => 'nav')); ?> </div> </div>