header_classes(); ?> get_transparent_nav_class(); $class .= $this->get_nav_alignment_class(); $class .= $this->get_full_screen_menu_class(); $class .= $this->get_top_bar_enabled_class(); if ( ! is_front_page() ) { $class .= ' navbar-not-transparent'; } return $class; } /** * Get the header alignment class. * * @return string */ private function get_nav_alignment_class() { $header_alignment = get_theme_mod( 'hestia_header_alignment', apply_filters( 'hestia_header_alignment_default', 'left' ) ); if ( ! empty( $header_alignment ) ) { return ' hestia_' . $header_alignment; } return ''; } /** * Render primary menu markup. */ private function render_primary_menu() { wp_nav_menu( array( 'theme_location' => 'primary', 'container' => 'div', 'container_class' => 'collapse navbar-collapse', 'container_id' => 'main-navigation', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'Hestia_Bootstrap_Navwalker::fallback', 'walker' => new Hestia_Bootstrap_Navwalker(), ) ); } /** * Render navbar toggle markup. */ private function render_navbar_toggle() { if ( ! has_nav_menu( 'primary' ) && current_user_can( 'edit_theme_options' ) ) { return; } ?>
is_full_screen_menu() ) { return ' full-screen-menu'; } return ''; } /** * Utility to check if is full screen menu. * * @return bool */ protected function is_full_screen_menu() { $has_full_screen_menu = get_theme_mod( 'hestia_full_screen_menu', false ); if ( (bool) $has_full_screen_menu === true ) { return true; } return false; } /** * Get the header class if top bar is enabled. * * @return string */ private function get_top_bar_enabled_class() { $is_top_bar_hidden = get_theme_mod( 'hestia_top_bar_hide', true ); if ( (bool) $is_top_bar_hidden === false ) { return ' header-with-topbar'; } return ''; } /** * Do the navbar header. */ private function navbar_header() { ?> '; } else { $logo = '' . get_bloginfo( 'name' ) . '
'; } return $logo; } /** * Filter Primary Navigation to add navigation cart and search. * * @param string $markup the markup for the navigation addons. * * @access public * @return mixed */ public function modify_primary_menu( $markup ) { if ( 'primary' !== $markup['theme_location'] ) { return $markup; } $markup['items_wrap'] = $this->display_filtered_navigation(); return $markup; } /** * Display navigation. * * @return string */ private function display_filtered_navigation() { $nav = '