* Copyright Swift Ideas 2015 - http://www.swiftideas.com * * Output for header-2 * */ $header_right_output = sf_header_aux('right'); ?> <header id="header" class="clearfix"> <div class="container"> <div class="row"> <?php echo sf_logo('col-sm-4 logo-left'); ?> <div class="header-right col-sm-8"> <?php echo $header_right_output; ?> </div> </div> <!-- CLOSE .row --> </div> <!-- CLOSE .container --> </header> <div id="main-nav" class="sticky-header"> <?php echo sf_main_menu('main-navigation', 'full'); ?> </div>
<?php /* * * Header Vertical * ------------------------------------------------ * Copyright Swift Ideas 2015 - http://www.swiftideas.com * * Output for header-vert * */ ?> <header id="header" class="clearfix"> <?php echo sf_logo('logo-center'); ?> </header> <div id="vertical-nav" class="vertical-menu"> <?php echo sf_main_menu('main-navigation', 'vertical'); ?> </div>
function sf_header($header_layout) { // VARIABLES $options = get_option('sf_dante_options'); $show_cart = $options['show_cart']; $show_wishlist = $options['show_wishlist']; $header_left_text = __($options['header_left_text'], 'swiftframework'); $header_output = $main_menu = ''; if ($header_layout == "header-1") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= '<div class="header-left col-sm-4">' . do_shortcode($header_left_text) . '</div>' . "\n"; $header_output .= sf_logo('col-sm-4 logo-center'); $header_output .= '<div class="header-right col-sm-4">' . sf_aux_links('header-menu', TRUE, "header-1") . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; $header_output .= '<div id="main-nav" class="sticky-header">' . "\n"; $header_output .= sf_main_menu('main-navigation', 'full'); $header_output .= '</div>' . "\n"; } else { if ($header_layout == "header-2") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('col-sm-4 logo-left'); $header_output .= '<div class="header-right col-sm-8">' . sf_aux_links('header-menu', FALSE, "header-1") . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; $header_output .= '<div id="main-nav" class="sticky-header">' . "\n"; $header_output .= sf_main_menu('main-navigation', 'full'); $header_output .= '</div>' . "\n"; } else { if ($header_layout == "header-3") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container header-container sticky-header">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">'; $header_output .= sf_main_menu('main-navigation', 'with-search'); $header_output .= '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-4") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= sf_top_header(); $header_output .= '<div class="container header-container sticky-header">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">'; $header_output .= sf_main_menu('main-navigation', 'with-search'); $header_output .= '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-5") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container sticky-header">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">'; $header_output .= sf_main_menu('main-navigation', 'with-search'); $header_output .= '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-6") { $header_output .= '<header id="header" class="sticky-header clearfix">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">' . sf_main_menu('main-navigation', 'with-search') . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= sf_top_header(); $header_output .= '<div class="sticky-header">' . "\n"; $header_output .= '<div class="container header-container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">' . sf_main_menu('main-navigation', 'with-search') . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</div>' . "\n"; $header_output .= '</header>' . "\n"; } } } } } } // HEADER RETURN return $header_output; }
<header id="header" class="sticky-header clearfix"> <?php } ?> <div class="container"> <div class="row"> <div class="header-left col-sm-4"> <?php echo $header_left_output; ?> </div> <?php echo sf_logo('logo-center'); ?> <?php echo sf_main_menu('main-navigation', 'float-2'); ?> <div class="header-right col-sm-4"> <?php echo $header_right_output; ?> </div> </div> <!-- CLOSE .row --> </div> <!-- CLOSE .container --> </header>
function sf_header($header_layout) { // VARIABLES global $sf_options; $header_output = $main_menu = ''; $fullwidth_header = $sf_options['fullwidth_header']; $header_left_output = sf_header_aux('left') . "\n"; $header_right_output = sf_header_aux('right') . "\n"; if ($header_layout == "header-1") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= '<div class="header-left col-sm-4">' . $header_left_output . '</div>' . "\n"; $header_output .= sf_logo('col-sm-4 logo-center'); $header_output .= '<div class="header-right col-sm-4">' . $header_right_output . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; $header_output .= '<div id="main-nav" class="sticky-header">' . "\n"; $header_output .= sf_main_menu('main-navigation', 'full'); $header_output .= '</div>' . "\n"; } else { if ($header_layout == "header-2") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('col-sm-4 logo-left'); $header_output .= '<div class="header-right col-sm-8">' . $header_right_output . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; $header_output .= '<div id="main-nav" class="sticky-header">' . "\n"; $header_output .= sf_main_menu('main-navigation', 'full'); $header_output .= '</div>' . "\n"; } else { if ($header_layout == "header-3") { if ($fullwidth_header) { $header_output .= '<header id="header" class="sticky-header fw-header clearfix">' . "\n"; } else { $header_output .= '<header id="header" class="sticky-header clearfix">' . "\n"; } $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('col-sm-4 logo-left'); $header_output .= sf_main_menu('main-navigation', 'float-2'); $header_output .= '<div class="header-right col-sm-4">' . $header_right_output . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-4") { if ($fullwidth_header) { $header_output .= '<header id="header" class="sticky-header fw-header clearfix">' . "\n"; } else { $header_output .= '<header id="header" class="sticky-header clearfix">' . "\n"; } $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('col-sm-4 logo-left'); if (sf_theme_opts_name() == "sf_atelier_options") { $header_output .= '<div class="header-right">' . $header_right_output . '</div>' . "\n"; } $header_output .= sf_main_menu('main-navigation', 'float-2'); $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-5") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container sticky-header">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('col-sm-4 logo-left'); $header_output .= sf_main_menu('main-navigation', 'float-2'); $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-6") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= '<div class="header-left col-sm-4">' . $header_left_output . '</div>' . "\n"; $header_output .= sf_logo('col-sm-4 logo-center'); $header_output .= '<div class="header-right col-sm-4">' . $header_right_output . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; $header_output .= '<div id="main-nav" class="sticky-header center-menu">' . "\n"; $header_output .= sf_main_menu('main-navigation', 'full'); $header_output .= '</div>' . "\n"; } else { if ($header_layout == "header-7") { if ($fullwidth_header) { $header_output .= '<header id="header" class="sticky-header fw-header clearfix">' . "\n"; } else { $header_output .= '<header id="header" class="sticky-header clearfix">' . "\n"; } $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('col-sm-4 logo-left'); $header_output .= '<div class="header-right col-sm-8">' . $header_right_output . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-8") { if ($fullwidth_header) { $header_output .= '<header id="header" class="sticky-header fw-header clearfix">' . "\n"; } else { $header_output .= '<header id="header" class="sticky-header clearfix">' . "\n"; } $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= '<div class="header-left col-sm-4">' . $header_left_output . '</div>' . "\n"; $header_output .= sf_logo('col-sm-4 logo-center'); $header_output .= '<div class="header-right col-sm-4">' . $header_right_output . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-9") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= sf_logo('col-sm-12 logo-center'); $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; $header_output .= '<div id="main-nav" class="sticky-header center-menu">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= sf_main_menu('main-navigation', 'float-2'); $header_output .= '</div>' . "\n"; $header_output .= '</div>' . "\n"; } else { if ($header_layout == "header-vert") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= sf_logo('logo-center'); $header_output .= '</header>' . "\n"; $header_output .= '<div id="vertical-nav" class="vertical-menu">' . "\n"; $header_output .= sf_main_menu('main-navigation', 'vertical'); $header_output .= '</div>' . "\n"; } else { if ($header_layout == "header-vert-right") { $header_output .= '<header id="header" class="clearfix">' . "\n"; $header_output .= sf_logo('logo-center'); $header_output .= '</header>' . "\n"; $header_output .= '<div id="vertical-nav" class="vertical-menu vertical-menu-right">' . "\n"; $header_output .= sf_main_menu('main-navigation', 'vertical'); $header_output .= '</div>' . "\n"; } else { if ($header_layout == "header-split") { if ($fullwidth_header) { $header_output .= '<header id="header" class="sticky-header fw-header clearfix">' . "\n"; } else { $header_output .= '<header id="header" class="sticky-header clearfix">' . "\n"; } $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= '<div class="header-left col-sm-4">' . $header_left_output . '</div>' . "\n"; $header_output .= sf_logo('logo-center'); $header_output .= sf_main_menu('main-navigation', 'float-2'); $header_output .= '<div class="header-right col-sm-4">' . $header_right_output . '</div>' . "\n"; $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } else { if ($header_layout == "header-4-alt") { $header_output .= '<header id="header" class="sticky-header fw-header clearfix">' . "\n"; $header_output .= '<div class="container">' . "\n"; $header_output .= '<div class="row">' . "\n"; $header_output .= '<div class="header-left">' . $header_left_output . '</div>' . "\n"; $header_output .= sf_logo('col-sm-4 logo-left'); $header_output .= '<div class="header-right">' . $header_right_output . '</div>' . "\n"; $header_output .= sf_main_menu('main-navigation', 'float-2'); $header_output .= '</div> <!-- CLOSE .row -->' . "\n"; $header_output .= '</div> <!-- CLOSE .container -->' . "\n"; $header_output .= '</header>' . "\n"; } } } } } } } } } } } } } // HEADER RETURN return $header_output; }