Last active
August 29, 2015 13:57
-
-
Save fovoc/9840005 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_shoestrap_navbar_slidedown_toggle(){ | |
global $ss_settings, $ss_menus; | |
$hook_navbar_slidedown_toggle = ( $ss_settings['navbar_toggle'] == 'left' ) ? 'shoestrap_pre_content' : 'shoestrap_inside_nav_begin'; | |
remove_action( $hook_navbar_slidedown_toggle, array( $ss_menus, 'navbar_slidedown_toggle' ) ); | |
} | |
add_action( 'wp', 'remove_shoestrap_navbar_slidedown_toggle' ); | |
function my_navbar_slidedown_toggle() { | |
global $ss_settings; | |
$navbar_color = $ss_settings['navbar_bg']; | |
$navbar_mode = $ss_settings['navbar_toggle']; | |
$trigger = ( | |
is_active_sidebar( 'navbar-slide-down-top' ) || | |
is_active_sidebar( 'navbar-slide-down-1' ) || | |
is_active_sidebar( 'navbar-slide-down-2' ) || | |
is_active_sidebar( 'navbar-slide-down-3' ) || | |
is_active_sidebar( 'navbar-slide-down-4' ) | |
) ? true : false; | |
if ( $trigger ) { | |
$class = ( $navbar_mode == 'left' ) ? ' static-left' : ' nav-toggle'; | |
$pre = ( $navbar_mode != 'left' ) ? '<ul class="nav navbar-nav"><li>' : ''; | |
$post = ( $navbar_mode != 'left' ) ? '</li></ul>' : ''; | |
echo $pre . '<a class="toggle-nav' . $class . '" href="#"><i class="el-icon-plus-sign"></i></a>' . $post; | |
} | |
} | |
global $ss_settings; | |
$hook_navbar_slidedown_toggle = ( $ss_settings['navbar_toggle'] == 'left' ) ? 'shoestrap_pre_content' : 'shoestrap_inside_nav_begin'; | |
add_action( $hook_navbar_slidedown_toggle, 'my_navbar_slidedown_toggle' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment