Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Disable left nav if megamenu is active
Browse files Browse the repository at this point in the history
  • Loading branch information
szk11001 committed Oct 12, 2015
1 parent b51d236 commit debfcd4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions inc/submenu-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@
foreach($menu_items as $key => $menu_item) {
while(in_array($menu_item->menu_item_parent, $stack) && $menu_item->menu_item_parent != array_pop($stack)) {
$level--;
}
}
$level++;
$stack[] = $menu_item->menu_item_parent;
$stack[] = $menu_item->ID;
$menu_items[$key]->level = $level;

if($menu_item->menu_item_parent == $current_id && $level > 2 || $menu_item->ID == $current_id && $level > 2 && $navoption1 == 'drop'){
$has_sub_menu = true;
}
}
}
//print_r($menu_items);
}
if($has_sub_menu){
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(!is_plugin_active( 'megamenu/megamenu.php' ) && $has_sub_menu){
?>
<div class="row">
<div class="col-sm-3">
Expand Down

0 comments on commit debfcd4

Please sign in to comment.