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

Make topbar default if mobile nav setting isn't already defined #1220

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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