From: Anthony Talarico Date: Tue, 16 Feb 2016 15:06:07 +0000 (-0500) Subject: off canvas navigation: home link added in with topbar links X-Git-Tag: v1.0.0^2~177 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d4514a301f713d0f369cdcfd30f7bbf161d720ef;p=WP-Themes%2FDiscoverKZOO.git off canvas navigation: home link added in with topbar links --- diff --git a/lib/navigation.php b/lib/navigation.php index 1380c34..f0843f6 100644 --- a/lib/navigation.php +++ b/lib/navigation.php @@ -33,24 +33,29 @@ if ( ! function_exists( 'glm_theme_mobile_off_canvas' ) ) { function glm_theme_mobile_off_canvas() { echo '
'; echo '
'; } } - +function glm_get_mobile_nav_menu( $theme_location ) +{ + $menu = wp_nav_menu(array( + 'echo' => false, // don't echo + 'container' => false, // remove nav container + 'container_class' => '', // class of container + 'menu' => '', // menu name + 'menu_class' => 'off-canvas-list', // adding custom nav class + 'theme_location' => $theme_location, // where it's located in the theme + 'before' => '', // before each link + 'after' => '', // after each link + 'link_before' => '', // before each link text + 'link_after' => '', // after each link text + 'depth' => 5, // limit the depth of the nav + 'fallback_cb' => false, // fallback function (see below) + 'walker' => new Glm_Theme_Off_Canvas_Walker() + )); + return preg_replace( array( '%^]*>%', '%$%' ), '', $menu ); +} /** * Footer */