<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly.
}
?>
<div id="navi-wrap" class="site-header">
    <div id="navbar" class="navbar">
        <nav id="site-navigation" class="navigation main-navigation" role="navigation">
            <button class="menu-toggle"><span class="menu-text"><?php _e( 'Menu', 'pmthemes' ); ?></span></button>
            <?php wp_nav_menu( array(
                'theme_location' => 'primary',
                'container' => false,
                'menu_class' => 'nav-menu',
                'echo' => true,
                'fallback_cb' => 'pmthemes_default_menu'));
            ?>
            <?php $theme_options = pmthemes_theme_options();
            if ( isset($theme_options['search_icon']) and $theme_options['search_icon'] == true ) : ?>
                <div class="search-main-menu search-top">
                    <span class="search-icon"></span>
                    <div class="search-form-top">
                        <?php get_search_form(); ?>
                    </div>
                </div>
            <?php endif; ?>
        </nav>
    </div>
</div>