Version Description
- FIXED: Missing widget icon due to updated icons in Elementor
- FIXED: Disbaled the _content_template() functions as they are not in use.
- TWEAK: Moved Branding and Search widgets into their own modules for future enhancements
Download this release
Release Info
Developer | WPDevHQ |
Plugin | NavMenu Addon For Elementor |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
- assets/js/frontend.min.js +2 -1
- elementor-navmenu.php +1 -1
- includes/modules-manager.php +2 -0
- modules/branding/module.info.php +8 -0
- modules/branding/module.php +25 -0
- modules/branding/widgets/elementor-branding.php +325 -0
- modules/menus/module.php +1 -3
- modules/menus/widgets/default-navmenu.php +4 -2
- modules/menus/widgets/mega-menu.php +3 -1
- modules/menus/widgets/navmenu-overlay.php +3 -1
- modules/search/module.info.php +8 -0
- modules/search/module.php +25 -0
- modules/search/widgets/elementor-search.php +202 -0
- readme.txt +7 -2
assets/js/frontend.min.js
CHANGED
@@ -343,6 +343,7 @@
|
|
343 |
}
|
344 |
|
345 |
function cbpHorizontalSlideOutMenu( el, options ) {
|
|
|
346 |
this.el = el;
|
347 |
this.options = extend( this.defaults, options );
|
348 |
this._init();
|
@@ -352,7 +353,7 @@
|
|
352 |
|
353 |
defaults : {},
|
354 |
_init : function() {
|
355 |
-
|
356 |
this.current = -1;
|
357 |
this.touch = Modernizr.touch;
|
358 |
this.menu = this.el.querySelector( '.cbp-hsmenu' );
|
343 |
}
|
344 |
|
345 |
function cbpHorizontalSlideOutMenu( el, options ) {
|
346 |
+
var el;
|
347 |
this.el = el;
|
348 |
this.options = extend( this.defaults, options );
|
349 |
this._init();
|
353 |
|
354 |
defaults : {},
|
355 |
_init : function() {
|
356 |
+
var el;
|
357 |
this.current = -1;
|
358 |
this.touch = Modernizr.touch;
|
359 |
this.menu = this.el.querySelector( '.cbp-hsmenu' );
|
elementor-navmenu.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Description: Adds new NavMenus to the Elementor Page Builder plugin. Now with Site Branding options, search box, basic MegaMenu and Fullscreen Menu Overlay
|
5 |
* Plugin URI: https://wpdevhq.com/
|
6 |
* Author: WPDevHQ
|
7 |
-
* Version: 1.0.
|
8 |
* Author URI: https://wpdevhq.com/
|
9 |
*
|
10 |
* Text Domain: elementor-menus
|
4 |
* Description: Adds new NavMenus to the Elementor Page Builder plugin. Now with Site Branding options, search box, basic MegaMenu and Fullscreen Menu Overlay
|
5 |
* Plugin URI: https://wpdevhq.com/
|
6 |
* Author: WPDevHQ
|
7 |
+
* Version: 1.0.7
|
8 |
* Author URI: https://wpdevhq.com/
|
9 |
*
|
10 |
* Text Domain: elementor-menus
|
includes/modules-manager.php
CHANGED
@@ -27,7 +27,9 @@ final class Manager {
|
|
27 |
|
28 |
public function __construct() {
|
29 |
$modules = [
|
|
|
30 |
'menus',
|
|
|
31 |
];
|
32 |
|
33 |
// Fetch all modules data
|
27 |
|
28 |
public function __construct() {
|
29 |
$modules = [
|
30 |
+
'branding',
|
31 |
'menus',
|
32 |
+
'search',
|
33 |
];
|
34 |
|
35 |
// Fetch all modules data
|
modules/branding/module.info.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
3 |
+
|
4 |
+
return [
|
5 |
+
'title' => __( 'Branding', 'elementor-menus' ),
|
6 |
+
'required' => true,
|
7 |
+
'default_activation' => true,
|
8 |
+
];
|
modules/branding/module.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ElementorMenus\Modules\Branding;
|
3 |
+
|
4 |
+
use Elementor\Plugin;
|
5 |
+
use ElementorMenus\Base\Module_Base;
|
6 |
+
|
7 |
+
class Module extends Module_Base {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
parent::__construct();
|
11 |
+
|
12 |
+
//$this->add_actions();
|
13 |
+
}
|
14 |
+
|
15 |
+
public function get_name() {
|
16 |
+
return 'elementor-branding';
|
17 |
+
}
|
18 |
+
|
19 |
+
public function get_widgets() {
|
20 |
+
return [
|
21 |
+
'Elementor_Branding',
|
22 |
+
];
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
modules/branding/widgets/elementor-branding.php
ADDED
@@ -0,0 +1,325 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ElementorMenus\Modules\Branding\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Group_Control_Border;
|
7 |
+
use Elementor\Group_Control_Typography;
|
8 |
+
use Elementor\Scheme_Color;
|
9 |
+
use Elementor\Scheme_Typography;
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Elementor Elementor Navbar
|
15 |
+
*
|
16 |
+
* Elementor widget for hello world.
|
17 |
+
*
|
18 |
+
* @since 1.0.0
|
19 |
+
*/
|
20 |
+
class Elementor_Branding extends Widget_Base {
|
21 |
+
|
22 |
+
protected $_has_template_content = false;
|
23 |
+
|
24 |
+
public function get_name() {
|
25 |
+
return 'elementor-branding';
|
26 |
+
}
|
27 |
+
|
28 |
+
public function get_title() {
|
29 |
+
return __( 'Branding', 'elementor-navmenu' );
|
30 |
+
}
|
31 |
+
|
32 |
+
public function get_icon() {
|
33 |
+
return 'eicon-banner';
|
34 |
+
}
|
35 |
+
|
36 |
+
public function get_categories() {
|
37 |
+
return [ 'branding-elements' ];
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function _register_controls() {
|
41 |
+
//$menus = $this->get_menus();
|
42 |
+
|
43 |
+
$this->start_controls_section(
|
44 |
+
'section_content',
|
45 |
+
[
|
46 |
+
'label' => __( 'Branding', 'elementor-navmenu' ),
|
47 |
+
]
|
48 |
+
);
|
49 |
+
|
50 |
+
$this->add_control(
|
51 |
+
'el_site_branding',
|
52 |
+
[
|
53 |
+
'label' => __( 'Branding Type', 'elementor-navmenu' ),
|
54 |
+
'description' => __( 'Your theme must declare the "add_theme_support( \'custom-logo\')" for the logo to work', 'elementor-navmenu' ),
|
55 |
+
'type' => Controls_Manager::SELECT,
|
56 |
+
'options' => [
|
57 |
+
'title' => __( 'Title', 'elementor' ),
|
58 |
+
'logo' => __( 'Logo', 'elementor' ),
|
59 |
+
],
|
60 |
+
'default' => 'title',
|
61 |
+
]
|
62 |
+
);
|
63 |
+
|
64 |
+
$this->add_responsive_control(
|
65 |
+
'align',
|
66 |
+
[
|
67 |
+
'label' => __( 'Alignment', 'elementor-navmenu' ),
|
68 |
+
'type' => Controls_Manager::CHOOSE,
|
69 |
+
'options' => [
|
70 |
+
'left' => [
|
71 |
+
'title' => __( 'Left', 'elementor-navmenu' ),
|
72 |
+
'icon' => 'fa fa-align-left',
|
73 |
+
],
|
74 |
+
'center' => [
|
75 |
+
'title' => __( 'Center', 'elementor-navmenu' ),
|
76 |
+
'icon' => 'fa fa-align-center',
|
77 |
+
],
|
78 |
+
'right' => [
|
79 |
+
'title' => __( 'Right', 'elementor-navmenu' ),
|
80 |
+
'icon' => 'fa fa-align-right',
|
81 |
+
],
|
82 |
+
],
|
83 |
+
'prefix_class' => 'elementor%s-align-',
|
84 |
+
'default' => '',
|
85 |
+
]
|
86 |
+
);
|
87 |
+
|
88 |
+
$this->end_controls_section();
|
89 |
+
|
90 |
+
$this->start_controls_section(
|
91 |
+
'section_title_style',
|
92 |
+
[
|
93 |
+
'label' => __( 'Brand', 'elementor-navmenu' ),
|
94 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
95 |
+
]
|
96 |
+
);
|
97 |
+
|
98 |
+
$this->add_control(
|
99 |
+
'branding_title_color',
|
100 |
+
[
|
101 |
+
'label' => __( 'Title Color', 'elementor-navmenu' ),
|
102 |
+
'type' => Controls_Manager::COLOR,
|
103 |
+
'condition' => [
|
104 |
+
'el_site_branding' => 'title',
|
105 |
+
],
|
106 |
+
'scheme' => [
|
107 |
+
'type' => Scheme_Color::get_type(),
|
108 |
+
'value' => Scheme_Color::COLOR_1,
|
109 |
+
],
|
110 |
+
'default' => '#333333',
|
111 |
+
'selectors' => [
|
112 |
+
'{{WRAPPER}} .elementor-branding .site-title a' => 'color: {{VALUE}};',
|
113 |
+
],
|
114 |
+
]
|
115 |
+
);
|
116 |
+
|
117 |
+
$this->add_control(
|
118 |
+
'branding_title_hover',
|
119 |
+
[
|
120 |
+
'label' => __( 'Hover', 'elementor-navmenu' ),
|
121 |
+
'type' => Controls_Manager::COLOR,
|
122 |
+
'condition' => [
|
123 |
+
'el_site_branding' => 'title',
|
124 |
+
],
|
125 |
+
'scheme' => [
|
126 |
+
'type' => Scheme_Color::get_type(),
|
127 |
+
'value' => Scheme_Color::COLOR_1,
|
128 |
+
],
|
129 |
+
'selectors' => [
|
130 |
+
'{{WRAPPER}} .elementor-branding .site-title a:hover' => 'color: {{VALUE}};',
|
131 |
+
],
|
132 |
+
]
|
133 |
+
);
|
134 |
+
|
135 |
+
$this->add_control(
|
136 |
+
'title_padding',
|
137 |
+
[
|
138 |
+
'label' => __( 'Title Padding - Default 1em', 'elementor-navmenu' ),
|
139 |
+
'type' => Controls_Manager::DIMENSIONS,
|
140 |
+
'condition' => [
|
141 |
+
'el_site_branding' => 'title',
|
142 |
+
],
|
143 |
+
'size_units' => [ 'px', 'em', '%' ],
|
144 |
+
'selectors' => [
|
145 |
+
'{{WRAPPER}} .elementor-branding .site-title a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
146 |
+
],
|
147 |
+
]
|
148 |
+
);
|
149 |
+
|
150 |
+
$this->add_group_control(
|
151 |
+
Group_Control_Typography::get_type(),
|
152 |
+
[
|
153 |
+
'name' => 'title_typography',
|
154 |
+
'label' => __( 'Typography', 'elementor-navmenu' ),
|
155 |
+
'condition' => [
|
156 |
+
'el_site_branding' => 'title',
|
157 |
+
],
|
158 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
159 |
+
'selector' => '{{WRAPPER}} .elementor-branding .site-title',
|
160 |
+
]
|
161 |
+
);
|
162 |
+
|
163 |
+
$this->add_control(
|
164 |
+
'logo_padding',
|
165 |
+
[
|
166 |
+
'label' => __( 'Title Padding - Default 1em', 'elementor-navmenu' ),
|
167 |
+
'type' => Controls_Manager::DIMENSIONS,
|
168 |
+
'condition' => [
|
169 |
+
'el_site_branding' => 'logo',
|
170 |
+
],
|
171 |
+
'size_units' => [ 'px', 'em', '%' ],
|
172 |
+
'selectors' => [
|
173 |
+
'{{WRAPPER}} .elementor-branding .custom-logo' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
174 |
+
],
|
175 |
+
]
|
176 |
+
);
|
177 |
+
|
178 |
+
$this->end_controls_section();
|
179 |
+
|
180 |
+
$this->start_controls_section(
|
181 |
+
'section_desc_style',
|
182 |
+
[
|
183 |
+
'label' => __( 'Description Options', 'elementor-navmenu' ),
|
184 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
185 |
+
'condition' => [
|
186 |
+
'el_site_branding' => 'title',
|
187 |
+
],
|
188 |
+
]
|
189 |
+
);
|
190 |
+
|
191 |
+
$this->add_control(
|
192 |
+
'branding_description_color',
|
193 |
+
[
|
194 |
+
'label' => __( 'Description Color', 'elementor-navmenu' ),
|
195 |
+
'type' => Controls_Manager::COLOR,
|
196 |
+
'condition' => [
|
197 |
+
'el_site_branding' => 'title',
|
198 |
+
],
|
199 |
+
'scheme' => [
|
200 |
+
'type' => Scheme_Color::get_type(),
|
201 |
+
'value' => Scheme_Color::COLOR_1,
|
202 |
+
],
|
203 |
+
'selectors' => [
|
204 |
+
'{{WRAPPER}} .elementor-branding .site-description' => 'color: {{VALUE}};',
|
205 |
+
],
|
206 |
+
]
|
207 |
+
);
|
208 |
+
|
209 |
+
$this->add_control(
|
210 |
+
'desc_padding',
|
211 |
+
[
|
212 |
+
'label' => __( 'Description Padding - Default 1em', 'elementor-navmenu' ),
|
213 |
+
'type' => Controls_Manager::DIMENSIONS,
|
214 |
+
'condition' => [
|
215 |
+
'el_site_branding' => 'title',
|
216 |
+
],
|
217 |
+
'size_units' => [ 'px', 'em', '%' ],
|
218 |
+
'selectors' => [
|
219 |
+
'{{WRAPPER}} .elementor-branding .site-description' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
220 |
+
],
|
221 |
+
]
|
222 |
+
);
|
223 |
+
|
224 |
+
$this->add_group_control(
|
225 |
+
Group_Control_Typography::get_type(),
|
226 |
+
[
|
227 |
+
'name' => 'desc_typography',
|
228 |
+
'label' => __( 'Typography', 'elementor-navmenu' ),
|
229 |
+
'condition' => [
|
230 |
+
'el_site_branding' => 'title',
|
231 |
+
],
|
232 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
233 |
+
'selector' => '{{WRAPPER}} .elementor-branding .site-description',
|
234 |
+
]
|
235 |
+
);
|
236 |
+
|
237 |
+
$this->end_controls_section();
|
238 |
+
|
239 |
+
|
240 |
+
$this->start_controls_section(
|
241 |
+
'section_branding_borders',
|
242 |
+
[
|
243 |
+
'label' => __( 'Branding Border', 'elementor-navmenu' ),
|
244 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
245 |
+
]
|
246 |
+
);
|
247 |
+
|
248 |
+
$this->add_group_control(
|
249 |
+
Group_Control_Border::get_type(),
|
250 |
+
[
|
251 |
+
'name' => 'border',
|
252 |
+
'label' => __( 'Border', 'elementor-navmenu' ),
|
253 |
+
'default' => '1px',
|
254 |
+
'selector' => '{{WRAPPER}} .elementor-branding',
|
255 |
+
]
|
256 |
+
);
|
257 |
+
|
258 |
+
$this->add_control(
|
259 |
+
'border_radius',
|
260 |
+
[
|
261 |
+
'label' => __( 'Border Radius', 'elementor-navmenu' ),
|
262 |
+
'type' => Controls_Manager::DIMENSIONS,
|
263 |
+
'size_units' => [ 'px', '%' ],
|
264 |
+
'selectors' => [
|
265 |
+
'{{WRAPPER}} .elementor-branding' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
266 |
+
],
|
267 |
+
]
|
268 |
+
);
|
269 |
+
|
270 |
+
$this->end_controls_section();
|
271 |
+
|
272 |
+
}
|
273 |
+
|
274 |
+
protected function branding_output() {
|
275 |
+
$settings = $this->get_settings();
|
276 |
+
|
277 |
+
if ( $settings['el_site_branding'] == 'title' ) {
|
278 |
+
$this->render_title();
|
279 |
+
} elseif ( $settings['el_site_branding'] == 'logo' ) {
|
280 |
+
$this->render_logo();
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
protected function elementor_the_site_logo() {
|
285 |
+
if ( function_exists( 'the_custom_logo' ) ) {
|
286 |
+
the_custom_logo();
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
protected function render_title() { ?>
|
291 |
+
<span class="site-title">
|
292 |
+
<?php
|
293 |
+
$title = get_bloginfo('name');
|
294 |
+
?>
|
295 |
+
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( $title ); /* WPCS: xss ok. */ ?>" alt="<?php echo esc_attr( $title ); ?>">
|
296 |
+
<?php bloginfo( 'name' ); ?>
|
297 |
+
</a>
|
298 |
+
</span>
|
299 |
+
<?php
|
300 |
+
$description = get_bloginfo( 'description', 'display' );
|
301 |
+
if ( $description || is_customize_preview() ) : ?>
|
302 |
+
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
|
303 |
+
<?php endif;
|
304 |
+
}
|
305 |
+
|
306 |
+
protected function render_logo() {
|
307 |
+
$this->elementor_the_site_logo();
|
308 |
+
}
|
309 |
+
|
310 |
+
protected function render() {
|
311 |
+
|
312 |
+
$settings = $this->get_settings(); ?>
|
313 |
+
|
314 |
+
<div id="elementor-branding" class="elementor-branding">
|
315 |
+
<div class="header-title">
|
316 |
+
<?php
|
317 |
+
$this->branding_output();
|
318 |
+
?>
|
319 |
+
</div>
|
320 |
+
</div>
|
321 |
+
<?php
|
322 |
+
}
|
323 |
+
|
324 |
+
protected function _content_template() {}
|
325 |
+
}
|
modules/menus/module.php
CHANGED
@@ -18,11 +18,9 @@ class Module extends Module_Base {
|
|
18 |
|
19 |
public function get_widgets() {
|
20 |
return [
|
21 |
-
'Elementor_Branding',
|
22 |
'Default_Navmenu',
|
23 |
'Navmenu_Overlay',
|
24 |
-
'Mega_Menu',
|
25 |
-
'Elementor_Search',
|
26 |
];
|
27 |
}
|
28 |
|
18 |
|
19 |
public function get_widgets() {
|
20 |
return [
|
|
|
21 |
'Default_Navmenu',
|
22 |
'Navmenu_Overlay',
|
23 |
+
'Mega_Menu',
|
|
|
24 |
];
|
25 |
}
|
26 |
|
modules/menus/widgets/default-navmenu.php
CHANGED
@@ -13,12 +13,14 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
13 |
/**
|
14 |
* Elementor Elementor Navbar
|
15 |
*
|
16 |
-
* Elementor widget for
|
17 |
*
|
18 |
* @since 1.0.0
|
19 |
*/
|
20 |
class Default_Navmenu extends Widget_Base {
|
21 |
|
|
|
|
|
22 |
public function get_name() {
|
23 |
return 'default-navmenu';
|
24 |
}
|
@@ -28,7 +30,7 @@ class Default_Navmenu extends Widget_Base {
|
|
28 |
}
|
29 |
|
30 |
public function get_icon() {
|
31 |
-
return 'eicon-menu';
|
32 |
}
|
33 |
|
34 |
public function get_categories() {
|
13 |
/**
|
14 |
* Elementor Elementor Navbar
|
15 |
*
|
16 |
+
* Elementor widget for Default Navmenu.
|
17 |
*
|
18 |
* @since 1.0.0
|
19 |
*/
|
20 |
class Default_Navmenu extends Widget_Base {
|
21 |
|
22 |
+
protected $_has_template_content = false;
|
23 |
+
|
24 |
public function get_name() {
|
25 |
return 'default-navmenu';
|
26 |
}
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
33 |
+
return 'eicon-nav-menu';
|
34 |
}
|
35 |
|
36 |
public function get_categories() {
|
modules/menus/widgets/mega-menu.php
CHANGED
@@ -19,6 +19,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
19 |
*/
|
20 |
class Mega_Menu extends Widget_Base {
|
21 |
|
|
|
|
|
22 |
public function get_name() {
|
23 |
return 'mega-menu';
|
24 |
}
|
@@ -28,7 +30,7 @@ class Mega_Menu extends Widget_Base {
|
|
28 |
}
|
29 |
|
30 |
public function get_icon() {
|
31 |
-
return 'eicon-menu';
|
32 |
}
|
33 |
|
34 |
public function get_categories() {
|
19 |
*/
|
20 |
class Mega_Menu extends Widget_Base {
|
21 |
|
22 |
+
protected $_has_template_content = false;
|
23 |
+
|
24 |
public function get_name() {
|
25 |
return 'mega-menu';
|
26 |
}
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
33 |
+
return 'eicon-nav-menu';
|
34 |
}
|
35 |
|
36 |
public function get_categories() {
|
modules/menus/widgets/navmenu-overlay.php
CHANGED
@@ -19,6 +19,8 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
19 |
*/
|
20 |
class Navmenu_Overlay extends Widget_Base {
|
21 |
|
|
|
|
|
22 |
public function get_name() {
|
23 |
return 'navmenu-overlay';
|
24 |
}
|
@@ -28,7 +30,7 @@ class Navmenu_Overlay extends Widget_Base {
|
|
28 |
}
|
29 |
|
30 |
public function get_icon() {
|
31 |
-
return 'eicon-menu';
|
32 |
}
|
33 |
|
34 |
public function get_categories() {
|
19 |
*/
|
20 |
class Navmenu_Overlay extends Widget_Base {
|
21 |
|
22 |
+
protected $_has_template_content = false;
|
23 |
+
|
24 |
public function get_name() {
|
25 |
return 'navmenu-overlay';
|
26 |
}
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
33 |
+
return 'eicon-nav-menu';
|
34 |
}
|
35 |
|
36 |
public function get_categories() {
|
modules/search/module.info.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
3 |
+
|
4 |
+
return [
|
5 |
+
'title' => __( 'Search', 'elementor-menus' ),
|
6 |
+
'required' => true,
|
7 |
+
'default_activation' => true,
|
8 |
+
];
|
modules/search/module.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ElementorMenus\Modules\Search;
|
3 |
+
|
4 |
+
use Elementor\Plugin;
|
5 |
+
use ElementorMenus\Base\Module_Base;
|
6 |
+
|
7 |
+
class Module extends Module_Base {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
parent::__construct();
|
11 |
+
|
12 |
+
//$this->add_actions();
|
13 |
+
}
|
14 |
+
|
15 |
+
public function get_name() {
|
16 |
+
return 'elementor-search';
|
17 |
+
}
|
18 |
+
|
19 |
+
public function get_widgets() {
|
20 |
+
return [
|
21 |
+
'Elementor_Search',
|
22 |
+
];
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
modules/search/widgets/elementor-search.php
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ElementorMenus\Modules\Search\Widgets;
|
3 |
+
|
4 |
+
use Elementor\Widget_Base;
|
5 |
+
use Elementor\Controls_Manager;
|
6 |
+
use Elementor\Group_Control_Border;
|
7 |
+
use Elementor\Group_Control_Typography;
|
8 |
+
use Elementor\Scheme_Color;
|
9 |
+
use Elementor\Scheme_Typography;
|
10 |
+
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Elementor Elementor Navbar
|
15 |
+
*
|
16 |
+
* Elementor widget for hello world.
|
17 |
+
*
|
18 |
+
* @since 1.0.0
|
19 |
+
*/
|
20 |
+
class Elementor_Search extends Widget_Base {
|
21 |
+
|
22 |
+
protected $_has_template_content = false;
|
23 |
+
|
24 |
+
public function get_name() {
|
25 |
+
return 'elementor-search';
|
26 |
+
}
|
27 |
+
|
28 |
+
public function get_title() {
|
29 |
+
return __( 'Search Box', 'elementor-navmenu' );
|
30 |
+
}
|
31 |
+
|
32 |
+
public function get_icon() {
|
33 |
+
return 'eicon-search';
|
34 |
+
}
|
35 |
+
|
36 |
+
public function get_categories() {
|
37 |
+
return [ 'branding-elements' ];
|
38 |
+
}
|
39 |
+
|
40 |
+
protected function _register_controls() {
|
41 |
+
//$menus = $this->get_menus();
|
42 |
+
|
43 |
+
$this->start_controls_section(
|
44 |
+
'section_content',
|
45 |
+
[
|
46 |
+
'label' => __( 'Search', 'elementor-navmenu' ),
|
47 |
+
]
|
48 |
+
);
|
49 |
+
|
50 |
+
$this->add_responsive_control(
|
51 |
+
'align',
|
52 |
+
[
|
53 |
+
'label' => __( 'Alignment', 'elementor-navmenu' ),
|
54 |
+
'type' => Controls_Manager::CHOOSE,
|
55 |
+
'options' => [
|
56 |
+
'left' => [
|
57 |
+
'title' => __( 'Left', 'elementor-navmenu' ),
|
58 |
+
'icon' => 'fa fa-align-left',
|
59 |
+
],
|
60 |
+
'center' => [
|
61 |
+
'title' => __( 'Center', 'elementor-navmenu' ),
|
62 |
+
'icon' => 'fa fa-align-center',
|
63 |
+
],
|
64 |
+
'right' => [
|
65 |
+
'title' => __( 'Right', 'elementor-navmenu' ),
|
66 |
+
'icon' => 'fa fa-align-right',
|
67 |
+
],
|
68 |
+
],
|
69 |
+
'prefix_class' => 'elementor%s-align-',
|
70 |
+
'default' => '',
|
71 |
+
]
|
72 |
+
);
|
73 |
+
|
74 |
+
$this->add_group_control(
|
75 |
+
Group_Control_Typography::get_type(),
|
76 |
+
[
|
77 |
+
'name' => 'search_typography',
|
78 |
+
'label' => __( 'Typography', 'elementor-navmenu' ),
|
79 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
80 |
+
'selector' => '{{WRAPPER}} .elementor-search',
|
81 |
+
]
|
82 |
+
);
|
83 |
+
|
84 |
+
$this->end_controls_section();
|
85 |
+
|
86 |
+
$this->start_controls_section(
|
87 |
+
'section_search_style',
|
88 |
+
[
|
89 |
+
'label' => __( 'Search', 'elementor-navmenu' ),
|
90 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
91 |
+
]
|
92 |
+
);
|
93 |
+
|
94 |
+
$this->add_control(
|
95 |
+
'search_text_color',
|
96 |
+
[
|
97 |
+
'label' => __( 'Box Color', 'elementor-navmenu' ),
|
98 |
+
'type' => Controls_Manager::COLOR,
|
99 |
+
'scheme' => [
|
100 |
+
'type' => Scheme_Color::get_type(),
|
101 |
+
'value' => Scheme_Color::COLOR_1,
|
102 |
+
],
|
103 |
+
'default' => '#333333',
|
104 |
+
'selectors' => [
|
105 |
+
'{{WRAPPER}} .elementor-search, .elementor-search textarea, .elementor-search input' => 'color: {{VALUE}};',
|
106 |
+
],
|
107 |
+
]
|
108 |
+
);
|
109 |
+
|
110 |
+
$this->add_control(
|
111 |
+
'search_bg_color',
|
112 |
+
[
|
113 |
+
'label' => __( 'Box Background', 'elementor-navmenu' ),
|
114 |
+
'type' => Controls_Manager::COLOR,
|
115 |
+
'scheme' => [
|
116 |
+
'type' => Scheme_Color::get_type(),
|
117 |
+
'value' => Scheme_Color::COLOR_1,
|
118 |
+
],
|
119 |
+
'default' => '#ffffff',
|
120 |
+
'selectors' => [
|
121 |
+
'{{WRAPPER}} .elementor-search' => 'background-color: {{VALUE}};',
|
122 |
+
],
|
123 |
+
]
|
124 |
+
);
|
125 |
+
|
126 |
+
$this->add_control(
|
127 |
+
'box_padding',
|
128 |
+
[
|
129 |
+
'label' => __( 'Search Padding', 'elementor-navmenu' ),
|
130 |
+
'type' => Controls_Manager::DIMENSIONS,
|
131 |
+
'size_units' => [ 'px', 'em', '%' ],
|
132 |
+
'selectors' => [
|
133 |
+
'{{WRAPPER}} .elementor-search' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
134 |
+
],
|
135 |
+
]
|
136 |
+
);
|
137 |
+
|
138 |
+
$this->end_controls_section();
|
139 |
+
|
140 |
+
$this->start_controls_section(
|
141 |
+
'section_search_borders',
|
142 |
+
[
|
143 |
+
'label' => __( 'Border', 'elementor-navmenu' ),
|
144 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
145 |
+
]
|
146 |
+
);
|
147 |
+
|
148 |
+
$this->add_group_control(
|
149 |
+
Group_Control_Border::get_type(),
|
150 |
+
[
|
151 |
+
'name' => 'border',
|
152 |
+
'label' => __( 'Border', 'elementor-navmenu' ),
|
153 |
+
'default' => '1px',
|
154 |
+
'selector' => '{{WRAPPER}} .elementor-search',
|
155 |
+
]
|
156 |
+
);
|
157 |
+
|
158 |
+
$this->add_control(
|
159 |
+
'border_radius',
|
160 |
+
[
|
161 |
+
'label' => __( 'Border Radius', 'elementor-navmenu' ),
|
162 |
+
'type' => Controls_Manager::DIMENSIONS,
|
163 |
+
'size_units' => [ 'px', '%' ],
|
164 |
+
'selectors' => [
|
165 |
+
'{{WRAPPER}} .elementor-search' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
166 |
+
],
|
167 |
+
]
|
168 |
+
);
|
169 |
+
|
170 |
+
$this->end_controls_section();
|
171 |
+
|
172 |
+
}
|
173 |
+
|
174 |
+
protected function render() {
|
175 |
+
|
176 |
+
$settings = $this->get_settings(); ?>
|
177 |
+
|
178 |
+
<div class="elementor-search">
|
179 |
+
<div class="search cf">
|
180 |
+
<div class="form">
|
181 |
+
<form method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
182 |
+
<label>
|
183 |
+
<span class="screen-reader-text"><?php apply_filters( 'elementor_search_label', _ex( 'Search:', 'label', 'elementor-navmenu' ) ); ?></span>
|
184 |
+
<input type="search" class="input search-field" placeholder="<?php echo apply_filters( 'elementor_search_placeholder', _x( 'Type keyword & hit enter to search;', 'placeholder', 'elementor-navmenu' ) ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php apply_filters( 'elementor_search_label', _ex( 'Search for:', 'label', 'elementor-navmenu' ) ); ?>">
|
185 |
+
</label>
|
186 |
+
<input type="submit" class="btn fa" value="">
|
187 |
+
</form>
|
188 |
+
</div>
|
189 |
+
<div class="label">
|
190 |
+
<i class="fa fa-search ib-m"></i>
|
191 |
+
<span class="ib-m"><?php apply_filters( 'elementor_search_label', _ex( 'Search:', 'label', 'elementor-navmenu' ) ); ?></span>
|
192 |
+
</div>
|
193 |
+
<div class="dismiss">
|
194 |
+
<i class="fa fa-times ib-m"></i>
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
<?php
|
199 |
+
}
|
200 |
+
|
201 |
+
protected function _content_template() {}
|
202 |
+
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Contributors: WPDevHQ
|
4 |
Tags: elementor, pagebuilder, page builder, page builder menu, page builder navmenu, menu builder, builder navigation menus, navigation, menus, navmenu, nav menu
|
5 |
Requires at least: 4.4
|
6 |
-
Tested up to: 4.8.
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -54,6 +54,11 @@ Done! :)
|
|
54 |
* For the time being, any changes made to both of the above can be viewed on the frontend of the site. A fix is being sought and will be implemented as soon as a viable solution is found!
|
55 |
|
56 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
57 |
= 1.0.6 =
|
58 |
* FIXED: Bug on the new UI column selectors in Elementor V1.5.0 - removed the z-index hack as this will now be taken care of by core!
|
59 |
|
3 |
Contributors: WPDevHQ
|
4 |
Tags: elementor, pagebuilder, page builder, page builder menu, page builder navmenu, menu builder, builder navigation menus, navigation, menus, navmenu, nav menu
|
5 |
Requires at least: 4.4
|
6 |
+
Tested up to: 4.8.1
|
7 |
+
Stable tag: 1.0.7
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
54 |
* For the time being, any changes made to both of the above can be viewed on the frontend of the site. A fix is being sought and will be implemented as soon as a viable solution is found!
|
55 |
|
56 |
== Changelog ==
|
57 |
+
= 1.0.7 =
|
58 |
+
* FIXED: Missing widget icon due to updated icons in Elementor
|
59 |
+
* FIXED: Disbaled the _content_template() functions as they are not in use.
|
60 |
+
* TWEAK: Moved Branding and Search widgets into their own modules for future enhancements
|
61 |
+
|
62 |
= 1.0.6 =
|
63 |
* FIXED: Bug on the new UI column selectors in Elementor V1.5.0 - removed the z-index hack as this will now be taken care of by core!
|
64 |
|