PluginProbe
QuadMenu – Mega Menu / 1.9.6
QuadMenu – Mega Menu v1.9.6
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 / 3rd / divi / module.php

module.php in QuadMenu – Mega Menu 1.9.6, at includes/3rd/divi/module.php

116 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (class_exists('ET_Builder_Module')) {
4
5 class ET_Builder_Module_QuadMenu extends ET_Builder_Module {
6
7 function init() {
8 $this->name = esc_html__('QuadMenu', 'quadmenu');
9 $this->slug = 'et_pb_quadmenu';
10 $this->fb_support = 'on';
11 $this->fullwidth = true;
12
13 $this->main_css_element = '%%order_class%%.et_pb_quadmenu';
14
15 $this->settings_modal_toggles = array(
16 'general' => array(
17 'toggles' => array(
18 'main_content' => esc_html__('Text', 'quadmenu'),
19 ),
20 ),
21 'advanced' => array(
22 'toggles' => array(
23 'width' => array(
24 'title' => esc_html__('Width', 'quadmenu'),
25 'priority' => 65,
26 ),
27 ),
28 ),
29 );
30
31 $this->advanced_fields = array(
32 //'background' => array(
33 // 'background_image' => false,
34 //),
35 'spacing' => false,
36 'filters' => false,
37 'animation' => false,
38 'text' => false,
39 'borders' => array(
40 'default' => false,
41 ),
42 'margin_padding' => array(
43 'css' => array(
44 'important' => array('custom_margin'), // needed to overwrite last module margin-bottom styling
45 ),
46 ),
47 'text_shadow' => array(
48 // Don't add text-shadow fields since they already are via font-options
49 'default' => false,
50 ),
51 'box_shadow' => array(
52 'default' => false,
53 ),
54 'fonts' => false,
55 'button' => false,
56 );
57 }
58
59 function get_fields() {
60 $fields = array(
61 'menu_id' => array(
62 'label' => esc_html__('Menu', 'quadmenu'),
63 'type' => 'select',
64 'option_category' => 'basic_option',
65 'options' => et_builder_get_nav_menus_options(),
66 'description' => sprintf(
67 '<p class="description">%2$s. <a href="%1$s" target="_blank">%3$s</a>.</p>', esc_url(admin_url('nav-menus.php')), esc_html__('Select a menu that should be used in the module', 'quadmenu'), esc_html__('Click here to create new menu', 'quadmenu')
68 ),
69 'toggle_slug' => 'main_content',
70 'computed_affects' => array(
71 '__menu',
72 ),
73 ),
74 'menu_theme' => array(
75 'label' => esc_html__('Theme', 'quadmenu'),
76 'type' => 'select',
77 'option_category' => 'basic_option',
78 'options' => array_flip(quadmenu_vc_themes()),
79 'description' => sprintf(
80 '<p class="description">%2$s. <a href="%1$s" target="_blank">%3$s</a>.</p>', esc_url(admin_url('admin.php?page=' . QUADMENU_PANEL)), esc_html__('Select a the theme that should be used in the menu', 'quadmenu'), esc_html__('Click here to create new theme', 'quadmenu')
81 ),
82 'toggle_slug' => 'main_content',
83 ),
84 );
85
86 return $fields;
87 }
88
89 function render($attrs, $content = null, $render_slug) {
90
91 if (!is_admin()) {
92
93 $menu_id = $this->props['menu_id'];
94
95 $menu_theme = $this->props['menu_theme'];
96
97 $menu = quadmenu(array(
98 'echo' => false,
99 'menu' => $menu_id,
100 'theme' => $menu_theme,
101 ));
102
103 $output = sprintf('<div class="et_pb_row et_pb_fullwidth_menu clearfix">
104 %1$s
105 </div>
106 ', $menu);
107
108 return $output;
109 }
110 }
111
112 }
113
114 new ET_Builder_Module_QuadMenu;
115 }
116