PluginProbe
QuadMenu – Mega Menu / 1.8.4
QuadMenu – Mega Menu v1.8.4
3.3.7 3.3.6 trunk 1.8.4 1.8.5 1.8.7 1.8.8 1.8.9 1.9.0 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 All 87 releases
quadmenu / includes / frontend / walker / QuadMenuItemMega.class.php

QuadMenuItemMega.class.php in QuadMenu – Mega Menu 1.8.4, at includes/frontend/walker/QuadMenuItemMega.class.php

66 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) {
4 die('-1');
5 }
6
7 class QuadMenuItemMega extends QuadMenuItem {
8
9 protected $type = 'mega';
10
11 function init() {
12 $this->args->has_background = (0 === $this->depth && isset($this->item->background['thumbnail-id']) && is_array(wp_get_attachment_image_src($this->item->background['thumbnail-id'], 'full')));
13 }
14
15 function get_start_el() {
16
17 $item_output = '';
18
19 $this->add_item_classes();
20
21 $this->add_item_classes_prefix();
22
23 $this->add_item_classes_quadmenu();
24
25 $this->add_item_classes_maxheight();
26
27 $this->add_item_dropdown_width();
28
29 $id = $this->get_item_id();
30
31 $class = $this->get_item_classes();
32
33 $item_output .= '<li' . $id . $class . '>';
34
35 $this->add_link_atts();
36
37 $this->add_link_atts_toggle();
38
39 $item_output .= $this->get_link();
40
41 //$this->add_dropdown_background();
42
43 return $item_output;
44 }
45
46 function add_item_dropdown_width() {
47
48 if (!empty($this->item->stretch)) {
49 $this->dropdown_classes[] = 'quadmenu-dropdown-stretch-' . $this->item->stretch;
50 }
51
52 if (empty($this->item->stretch) && !empty($this->item->columns)) {
53 $this->dropdown_classes = array_merge($this->dropdown_classes, $this->item->columns);
54 }
55
56 if (empty($this->item->stretch) && empty($this->item->columns)) {
57 $this->dropdown_classes[] = 'quadmenu-dropdown-stretch-boxed';
58 }
59 }
60
61 function add_item_dropdown_ul_classes() {
62 $this->dropdown_ul_classes[] = 'quadmenu-row';
63 }
64
65 }
66