<?php
/**
 * The template part for displaying the Primary Menus.
 * 
 * @package Newsxo
 * 
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {	exit; }

if (!function_exists('newsxo_header_menu_section')) :
/**
 *  Header
 *
 * @since newsxo
 *
 */
  function newsxo_header_menu_section() {
    
    $home_icon_disable = get_theme_mod('newsxo_home_icon',true); ?> 
    <div class="navbar-wp">
      <button class="menu-btn">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <nav id="main-nav" class="nav-wp mobile-nav justify-center">
        <?php newsxo_target_element('panel', 'nav_menus', 'Click To Edit Menus.'); ?>
        <!-- Sample menu definition -->
        <?php 
          if(is_rtl()) { $smRTL = ' sm-rtl'; } else { $smRTL = ''; }
            wp_nav_menu( array(
              'theme_location' => 'primary',
              'container'  => '',
              'menu_class' =>'sm sm-clean'.$smRTL.'',
              'fallback_cb' => 'newsxo_fallback_page_menu',
              'walker' => new newsxo_nav_walker()
            ) ); 
          ?>
      </nav> 
    </div>
  <?php }
endif;
add_action('newsxo_action_header_menu_section', 'newsxo_header_menu_section', 6);
?>

<!-- Main Menu Area-->
    <?php do_action('newsxo_action_header_menu_section'); ?>
<!-- /Main Menu Area-->