'', 'container' => '', 'menu_class' => 'menu genesis-nav-menu', 'link_before' => genesis_markup( array( 'open' => '', 'context' => 'nav-link-wrap', 'echo' => false, ) ), 'link_after' => genesis_markup( array( 'close' => '', 'context' => 'nav-link-wrap', 'echo' => false, ) ), 'echo' => 0, ) ); // If a menu is not assigned to theme location, abort. if ( ! has_nav_menu( $args['theme_location'] ) ) { return null; } // If genesis-accessibility for 'drop-down-menu' is enabled and the menu doesn't already have the superfish class, add it. if ( genesis_superfish_enabled() && false === strpos( $args['menu_class'], 'js-superfish' ) ) { $args['menu_class'] .= ' js-superfish'; } $sanitized_location = sanitize_key( $args['theme_location'] ); $nav = wp_nav_menu( $args ); // Do nothing if there is nothing to show. if ( ! $nav ) { return null; } $nav_markup_open = genesis_structural_wrap( 'menu-' . $sanitized_location, 'open', 0 ); $nav_markup_close = genesis_structural_wrap( 'menu-' . $sanitized_location, 'close', 0 ); $params = array( 'theme_location' => $args['theme_location'], ); $nav_output = genesis_markup( array( 'open' => '', 'context' => 'nav-' . $sanitized_location, 'content' => $nav_markup_open . $nav . $nav_markup_close, 'echo' => false, 'params' => $params, ) ); $filter_location = $sanitized_location . '_nav'; // Handle back-compat for primary and secondary nav filters. if ( 'primary' === $args['theme_location'] ) { $filter_location = 'do_nav'; } elseif ( 'secondary' === $args['theme_location'] ) { $filter_location = 'do_subnav'; } /** * Filter the navigation markup. * * @since 2.1.0 * * @param string $nav_output Opening container markup, nav, closing container markup. * @param string $nav Navigation list (`