'menu_item_parent', 'id' => 'db_id' ); /** * @var int $columns */ var $columns = 0; /** * @var int $max_columns maximum number of columns within one mega menu */ var $max_columns = 0; /** * @var int $rows holds the number of rows within the mega menu */ var $rows = 1; /** * @var array $rowsCounter holds the number of columns for each row within a multidimensional array */ var $rowsCounter = array(); /** * @var string $mega_active hold information whetever we are currently rendering a mega menu or not */ var $mega_active = 0; /** * @var array $grid_array holds the grid classes that get applied to the mega menu depending on the number of columns */ var $grid_array = array(); /** * @var stores if we already have an active first level main menu item. */ var $active_item = false; /** * @var stores if we got a top or a sidebar main menu. */ var $top_menu = true; /** * @var stores if we got a text menu or a single burger icon */ var $icon_menu = true; /** * @var stores if we got a top or a sidebar main menu. */ var $blog_id = false; /** * @var stores the number of first level menu items */ var $first_level_count = 0; /** * @var stores if mega menu is active */ var $mega_allowed = true; /** * * Constructor that sets the grid variables * */ function __construct($options = array()) { $this->grid_array = array( 1 => "three units", 2 => "six units", 3 => "nine units", 4 => "twelve units", 5 => "twelve units", 6 => "twelve units" ); $this->top_menu = avia_get_option('header_position','header_top') == 'header_top' ? true : false; $this->icon_menu = avia_is_burger_menu(); if(avia_get_option('frontpage') && avia_get_option('blogpage')) { $this->blog_id = avia_get_option('blogpage'); } if(isset($options['megamenu']) && $options['megamenu'] == "disabled") $this->mega_allowed = false; if($this->icon_menu) { //$this->mega_active = false; //$this->mega_allowed = false; } } /** * @see Walker::start_lvl() * * @param string $output Passed by reference. Used to append additional content. * @param int $depth Depth of page. Used for padding. */ function start_lvl(&$output, $depth = 0, $args = array()) { $indent = str_repeat("\t", $depth); if($depth === 0) $output .= "\n{replace_one}\n"; $output .= "\n$indent
\n"; if($depth === 0) { if($this->mega_active && $this->mega_allowed) { $output .= "\n\n"; $output = str_replace("{replace_one}", "