Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1220 from colin-marshall/fix-default-mobile-navig…
Browse files Browse the repository at this point in the history
…ation

Make topbar default if mobile nav setting isn't already defined
  • Loading branch information
colin-marshall authored Feb 1, 2018
2 parents 327596e + 3c1a18e commit cafcbe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/custom-nav.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ function wpt_register_theme_customizer( $wp_customize ) {
// Add class to body to help w/ CSS
add_filter( 'body_class', 'mobile_nav_class' );
function mobile_nav_class( $classes ) {
if ( ! get_theme_mod( 'wpt_mobile_menu_layout' ) || get_theme_mod( 'wpt_mobile_menu_layout' ) === 'offcanvas' ) :
$classes[] = 'offcanvas';
elseif ( get_theme_mod( 'wpt_mobile_menu_layout' ) === 'topbar' ) :
if ( ! get_theme_mod( 'wpt_mobile_menu_layout' ) || get_theme_mod( 'wpt_mobile_menu_layout' ) === 'topbar' ) :
$classes[] = 'topbar';
elseif ( get_theme_mod( 'wpt_mobile_menu_layout' ) === 'offcanvas' ) :
$classes[] = 'offcanvas';
endif;
return $classes;
}
Expand Down

0 comments on commit cafcbe7

Please sign in to comment.