'', 'container' => '', 'link_before' => sprintf( '', bizznis_attr( 'nav-link-wrap' ) ), 'link_after' => '', 'menu_class' => 'menu menu-bizznis', 'echo' => 0, ) ); # If a menu is not assigned to theme location, abort if ( ! has_nav_menu( $args['theme_location'] ) ) { return; } $sanitized_location = sanitize_key( $args['theme_location'] ); $nav = apply_filters( "nav_{$sanitized_location}_before", '', $args ); $nav .= wp_nav_menu( $args ); $nav .= apply_filters( "nav_{$sanitized_location}_after", '', $args ); # Do nothing if there is nothing to show if ( ! $nav ) { return; } $nav_markup_open = sprintf( ''; $nav_output = $nav_markup_open . $nav . $nav_markup_close; $filter_location = 'bizznis_' . $sanitized_location . '_nav'; # Handle back-compat for primary and secondary nav filters. if ( 'primary' === $args['theme_location'] ) { $filter_location = 'bizznis_do_nav'; } elseif ( 'secondary' === $args['theme_location'] ) { $filter_location = 'bizznis_do_subnav'; } /** * Filter the navigation markup. * * @since 1.1.0 * * @param string $nav_output Opening container markup, nav, closing container markup. * @param string $nav Navigation list (`