/** * @param array $args * @param array $instance */ public function widget($args, $instance) { // Get menu $nav_menu = !empty($instance['nav_menu']) ? hq_get_nav_menu_object($instance['nav_menu']) : false; if (!$nav_menu) { return; } /** This filter is documented in hq-includes/default-widgets.php */ $instance['title'] = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); echo $args['before_widget']; if (!empty($instance['title'])) { echo $args['before_title'] . $instance['title'] . $args['after_title']; } $nav_menu_args = array('fallback_cb' => '', 'menu' => $nav_menu); /** * Filter the arguments for the Custom Menu widget. * * @since 0.0.1 * * @param array $nav_menu_args { * An array of arguments passed to hq_nav_menu() to retrieve a custom menu. * * @type callback|bool $fallback_cb Callback to fire if the menu doesn't exist. Default empty. * @type mixed $menu Menu ID, slug, or name. * } * @param stdClass $nav_menu Nav menu object for the current menu. * @param array $args Display arguments for the current widget. */ hq_nav_menu(apply_filters('widget_nav_menu_args', $nav_menu_args, $nav_menu, $args)); echo $args['after_widget']; }
<a class="assistive-text" href="#content"><?php _e('Skip to primary content', 'hivequeen'); ?> </a> </div> <?php if (!is_singular()) { ?> <div class="skip-link"> <a class="assistive-text" href="#secondary"><?php _e('Skip to secondary content', 'hivequeen'); ?> </a> </div> <?php } ?> <?php /* Our navigation menu. If one isn't filled out, hq_nav_menu falls back to hq_page_menu. The menu assigned to the primary location is the one used. If one isn't assigned, the menu with the lowest ID is used. */ ?> <?php hq_nav_menu(array('theme_location' => 'primary')); ?> </nav> <!-- #access --> </header><!-- #branding --> <div id="main">