/** * Main site navigation * mobile navigation toggle button */ function theme_site_navigation() { echo '<nav id="site-navigation"' . main_nav_class() . ' role="navigation" data-ui-component="site-main-navigation">'; echo '<button class="site-nav__toggler" data-ui-component="menu-toggle-button">'; echo esc_html('Menu', 'wps-prime'); echo '</button>'; wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'site-nav__list', 'walker' => new Theme_Menu_Object())); echo '</nav><!-- #site-navigation -->'; }
/** * Override main navigation with pluggable function * this function override must happen as fast as possible, using it on child theme setup will throw an error */ function theme_site_nav() { echo '<nav id="site-nav-prime"' . main_nav_class() . ' role="navigation" data-ui-component="site-main-navigation">'; wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'mt_site-nav__list main-primary-nav', 'depth' => 0, 'walker' => new Wps_Module_Mt_Walker())); echo '</nav><!-- #site-navigation -->'; }