Version Description
- 2017-09-28
Download this release
Release Info
Developer | themeisle |
Plugin | NavMenu Addon For Elementor |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.1.0
- CHANGELOG.md +14 -0
- LICENSE +674 -674
- base/module-base.php +2 -2
- classes/utils.php +3 -1
- elementor-navmenu.php +66 -44
- includes/modules-manager.php +3 -1
- index.php +1 -1
- modules/branding/module.info.php +4 -2
- modules/branding/module.php +5 -5
- modules/branding/widgets/elementor-branding.php +70 -64
- modules/menus/module.info.php +4 -2
- modules/menus/module.php +5 -5
- modules/menus/widgets/default-navmenu.php +133 -129
- modules/menus/widgets/elementor-branding.php +69 -63
- modules/menus/widgets/elementor-search.php +35 -33
- modules/menus/widgets/mega-menu.php +69 -65
- modules/menus/widgets/navmenu-overlay.php +63 -59
- modules/search/module.info.php +4 -2
- modules/search/module.php +5 -5
- modules/search/widgets/elementor-search.php +36 -34
- plugin.php +41 -34
- readme.md +98 -0
- readme.txt +11 -7
CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
### v1.1.0 - 2017-09-29
|
3 |
+
**Changes:**
|
4 |
+
* Added Themeisle SDK.
|
5 |
+
* Added Continuous Integration.
|
6 |
+
* Changed contributors.
|
7 |
+
* Removed Stable Tag.
|
8 |
+
|
9 |
+
### v1.1.0 - 2017-09-28
|
10 |
+
**Changes:**
|
11 |
+
* Added Themeisle SDK.
|
12 |
+
* Added Continuous Integration.
|
13 |
+
* Changed contributors.
|
14 |
+
|
LICENSE
CHANGED
@@ -1,674 +1,674 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 3, 29 June 2007
|
3 |
-
|
4 |
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
-
Everyone is permitted to copy and distribute verbatim copies
|
6 |
-
of this license document, but changing it is not allowed.
|
7 |
-
|
8 |
-
Preamble
|
9 |
-
|
10 |
-
The GNU General Public License is a free, copyleft license for
|
11 |
-
software and other kinds of works.
|
12 |
-
|
13 |
-
The licenses for most software and other practical works are designed
|
14 |
-
to take away your freedom to share and change the works. By contrast,
|
15 |
-
the GNU General Public License is intended to guarantee your freedom to
|
16 |
-
share and change all versions of a program--to make sure it remains free
|
17 |
-
software for all its users. We, the Free Software Foundation, use the
|
18 |
-
GNU General Public License for most of our software; it applies also to
|
19 |
-
any other work released this way by its authors. You can apply it to
|
20 |
-
your programs, too.
|
21 |
-
|
22 |
-
When we speak of free software, we are referring to freedom, not
|
23 |
-
price. Our General Public Licenses are designed to make sure that you
|
24 |
-
have the freedom to distribute copies of free software (and charge for
|
25 |
-
them if you wish), that you receive source code or can get it if you
|
26 |
-
want it, that you can change the software or use pieces of it in new
|
27 |
-
free programs, and that you know you can do these things.
|
28 |
-
|
29 |
-
To protect your rights, we need to prevent others from denying you
|
30 |
-
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
-
certain responsibilities if you distribute copies of the software, or if
|
32 |
-
you modify it: responsibilities to respect the freedom of others.
|
33 |
-
|
34 |
-
For example, if you distribute copies of such a program, whether
|
35 |
-
gratis or for a fee, you must pass on to the recipients the same
|
36 |
-
freedoms that you received. You must make sure that they, too, receive
|
37 |
-
or can get the source code. And you must show them these terms so they
|
38 |
-
know their rights.
|
39 |
-
|
40 |
-
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
-
(1) assert copyright on the software, and (2) offer you this License
|
42 |
-
giving you legal permission to copy, distribute and/or modify it.
|
43 |
-
|
44 |
-
For the developers' and authors' protection, the GPL clearly explains
|
45 |
-
that there is no warranty for this free software. For both users' and
|
46 |
-
authors' sake, the GPL requires that modified versions be marked as
|
47 |
-
changed, so that their problems will not be attributed erroneously to
|
48 |
-
authors of previous versions.
|
49 |
-
|
50 |
-
Some devices are designed to deny users access to install or run
|
51 |
-
modified versions of the software inside them, although the manufacturer
|
52 |
-
can do so. This is fundamentally incompatible with the aim of
|
53 |
-
protecting users' freedom to change the software. The systematic
|
54 |
-
pattern of such abuse occurs in the area of products for individuals to
|
55 |
-
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
-
have designed this version of the GPL to prohibit the practice for those
|
57 |
-
products. If such problems arise substantially in other domains, we
|
58 |
-
stand ready to extend this provision to those domains in future versions
|
59 |
-
of the GPL, as needed to protect the freedom of users.
|
60 |
-
|
61 |
-
Finally, every program is threatened constantly by software patents.
|
62 |
-
States should not allow patents to restrict development and use of
|
63 |
-
software on general-purpose computers, but in those that do, we wish to
|
64 |
-
avoid the special danger that patents applied to a free program could
|
65 |
-
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
-
patents cannot be used to render the program non-free.
|
67 |
-
|
68 |
-
The precise terms and conditions for copying, distribution and
|
69 |
-
modification follow.
|
70 |
-
|
71 |
-
TERMS AND CONDITIONS
|
72 |
-
|
73 |
-
0. Definitions.
|
74 |
-
|
75 |
-
"This License" refers to version 3 of the GNU General Public License.
|
76 |
-
|
77 |
-
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
-
works, such as semiconductor masks.
|
79 |
-
|
80 |
-
"The Program" refers to any copyrightable work licensed under this
|
81 |
-
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
-
"recipients" may be individuals or organizations.
|
83 |
-
|
84 |
-
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
-
in a fashion requiring copyright permission, other than the making of an
|
86 |
-
exact copy. The resulting work is called a "modified version" of the
|
87 |
-
earlier work or a work "based on" the earlier work.
|
88 |
-
|
89 |
-
A "covered work" means either the unmodified Program or a work based
|
90 |
-
on the Program.
|
91 |
-
|
92 |
-
To "propagate" a work means to do anything with it that, without
|
93 |
-
permission, would make you directly or secondarily liable for
|
94 |
-
infringement under applicable copyright law, except executing it on a
|
95 |
-
computer or modifying a private copy. Propagation includes copying,
|
96 |
-
distribution (with or without modification), making available to the
|
97 |
-
public, and in some countries other activities as well.
|
98 |
-
|
99 |
-
To "convey" a work means any kind of propagation that enables other
|
100 |
-
parties to make or receive copies. Mere interaction with a user through
|
101 |
-
a computer network, with no transfer of a copy, is not conveying.
|
102 |
-
|
103 |
-
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
-
to the extent that it includes a convenient and prominently visible
|
105 |
-
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
-
tells the user that there is no warranty for the work (except to the
|
107 |
-
extent that warranties are provided), that licensees may convey the
|
108 |
-
work under this License, and how to view a copy of this License. If
|
109 |
-
the interface presents a list of user commands or options, such as a
|
110 |
-
menu, a prominent item in the list meets this criterion.
|
111 |
-
|
112 |
-
1. Source Code.
|
113 |
-
|
114 |
-
The "source code" for a work means the preferred form of the work
|
115 |
-
for making modifications to it. "Object code" means any non-source
|
116 |
-
form of a work.
|
117 |
-
|
118 |
-
A "Standard Interface" means an interface that either is an official
|
119 |
-
standard defined by a recognized standards body, or, in the case of
|
120 |
-
interfaces specified for a particular programming language, one that
|
121 |
-
is widely used among developers working in that language.
|
122 |
-
|
123 |
-
The "System Libraries" of an executable work include anything, other
|
124 |
-
than the work as a whole, that (a) is included in the normal form of
|
125 |
-
packaging a Major Component, but which is not part of that Major
|
126 |
-
Component, and (b) serves only to enable use of the work with that
|
127 |
-
Major Component, or to implement a Standard Interface for which an
|
128 |
-
implementation is available to the public in source code form. A
|
129 |
-
"Major Component", in this context, means a major essential component
|
130 |
-
(kernel, window system, and so on) of the specific operating system
|
131 |
-
(if any) on which the executable work runs, or a compiler used to
|
132 |
-
produce the work, or an object code interpreter used to run it.
|
133 |
-
|
134 |
-
The "Corresponding Source" for a work in object code form means all
|
135 |
-
the source code needed to generate, install, and (for an executable
|
136 |
-
work) run the object code and to modify the work, including scripts to
|
137 |
-
control those activities. However, it does not include the work's
|
138 |
-
System Libraries, or general-purpose tools or generally available free
|
139 |
-
programs which are used unmodified in performing those activities but
|
140 |
-
which are not part of the work. For example, Corresponding Source
|
141 |
-
includes interface definition files associated with source files for
|
142 |
-
the work, and the source code for shared libraries and dynamically
|
143 |
-
linked subprograms that the work is specifically designed to require,
|
144 |
-
such as by intimate data communication or control flow between those
|
145 |
-
subprograms and other parts of the work.
|
146 |
-
|
147 |
-
The Corresponding Source need not include anything that users
|
148 |
-
can regenerate automatically from other parts of the Corresponding
|
149 |
-
Source.
|
150 |
-
|
151 |
-
The Corresponding Source for a work in source code form is that
|
152 |
-
same work.
|
153 |
-
|
154 |
-
2. Basic Permissions.
|
155 |
-
|
156 |
-
All rights granted under this License are granted for the term of
|
157 |
-
copyright on the Program, and are irrevocable provided the stated
|
158 |
-
conditions are met. This License explicitly affirms your unlimited
|
159 |
-
permission to run the unmodified Program. The output from running a
|
160 |
-
covered work is covered by this License only if the output, given its
|
161 |
-
content, constitutes a covered work. This License acknowledges your
|
162 |
-
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
-
|
164 |
-
You may make, run and propagate covered works that you do not
|
165 |
-
convey, without conditions so long as your license otherwise remains
|
166 |
-
in force. You may convey covered works to others for the sole purpose
|
167 |
-
of having them make modifications exclusively for you, or provide you
|
168 |
-
with facilities for running those works, provided that you comply with
|
169 |
-
the terms of this License in conveying all material for which you do
|
170 |
-
not control copyright. Those thus making or running the covered works
|
171 |
-
for you must do so exclusively on your behalf, under your direction
|
172 |
-
and control, on terms that prohibit them from making any copies of
|
173 |
-
your copyrighted material outside their relationship with you.
|
174 |
-
|
175 |
-
Conveying under any other circumstances is permitted solely under
|
176 |
-
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
-
makes it unnecessary.
|
178 |
-
|
179 |
-
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
-
|
181 |
-
No covered work shall be deemed part of an effective technological
|
182 |
-
measure under any applicable law fulfilling obligations under article
|
183 |
-
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
-
similar laws prohibiting or restricting circumvention of such
|
185 |
-
measures.
|
186 |
-
|
187 |
-
When you convey a covered work, you waive any legal power to forbid
|
188 |
-
circumvention of technological measures to the extent such circumvention
|
189 |
-
is effected by exercising rights under this License with respect to
|
190 |
-
the covered work, and you disclaim any intention to limit operation or
|
191 |
-
modification of the work as a means of enforcing, against the work's
|
192 |
-
users, your or third parties' legal rights to forbid circumvention of
|
193 |
-
technological measures.
|
194 |
-
|
195 |
-
4. Conveying Verbatim Copies.
|
196 |
-
|
197 |
-
You may convey verbatim copies of the Program's source code as you
|
198 |
-
receive it, in any medium, provided that you conspicuously and
|
199 |
-
appropriately publish on each copy an appropriate copyright notice;
|
200 |
-
keep intact all notices stating that this License and any
|
201 |
-
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
-
keep intact all notices of the absence of any warranty; and give all
|
203 |
-
recipients a copy of this License along with the Program.
|
204 |
-
|
205 |
-
You may charge any price or no price for each copy that you convey,
|
206 |
-
and you may offer support or warranty protection for a fee.
|
207 |
-
|
208 |
-
5. Conveying Modified Source Versions.
|
209 |
-
|
210 |
-
You may convey a work based on the Program, or the modifications to
|
211 |
-
produce it from the Program, in the form of source code under the
|
212 |
-
terms of section 4, provided that you also meet all of these conditions:
|
213 |
-
|
214 |
-
a) The work must carry prominent notices stating that you modified
|
215 |
-
it, and giving a relevant date.
|
216 |
-
|
217 |
-
b) The work must carry prominent notices stating that it is
|
218 |
-
released under this License and any conditions added under section
|
219 |
-
7. This requirement modifies the requirement in section 4 to
|
220 |
-
"keep intact all notices".
|
221 |
-
|
222 |
-
c) You must license the entire work, as a whole, under this
|
223 |
-
License to anyone who comes into possession of a copy. This
|
224 |
-
License will therefore apply, along with any applicable section 7
|
225 |
-
additional terms, to the whole of the work, and all its parts,
|
226 |
-
regardless of how they are packaged. This License gives no
|
227 |
-
permission to license the work in any other way, but it does not
|
228 |
-
invalidate such permission if you have separately received it.
|
229 |
-
|
230 |
-
d) If the work has interactive user interfaces, each must display
|
231 |
-
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
-
interfaces that do not display Appropriate Legal Notices, your
|
233 |
-
work need not make them do so.
|
234 |
-
|
235 |
-
A compilation of a covered work with other separate and independent
|
236 |
-
works, which are not by their nature extensions of the covered work,
|
237 |
-
and which are not combined with it such as to form a larger program,
|
238 |
-
in or on a volume of a storage or distribution medium, is called an
|
239 |
-
"aggregate" if the compilation and its resulting copyright are not
|
240 |
-
used to limit the access or legal rights of the compilation's users
|
241 |
-
beyond what the individual works permit. Inclusion of a covered work
|
242 |
-
in an aggregate does not cause this License to apply to the other
|
243 |
-
parts of the aggregate.
|
244 |
-
|
245 |
-
6. Conveying Non-Source Forms.
|
246 |
-
|
247 |
-
You may convey a covered work in object code form under the terms
|
248 |
-
of sections 4 and 5, provided that you also convey the
|
249 |
-
machine-readable Corresponding Source under the terms of this License,
|
250 |
-
in one of these ways:
|
251 |
-
|
252 |
-
a) Convey the object code in, or embodied in, a physical product
|
253 |
-
(including a physical distribution medium), accompanied by the
|
254 |
-
Corresponding Source fixed on a durable physical medium
|
255 |
-
customarily used for software interchange.
|
256 |
-
|
257 |
-
b) Convey the object code in, or embodied in, a physical product
|
258 |
-
(including a physical distribution medium), accompanied by a
|
259 |
-
written offer, valid for at least three years and valid for as
|
260 |
-
long as you offer spare parts or customer support for that product
|
261 |
-
model, to give anyone who possesses the object code either (1) a
|
262 |
-
copy of the Corresponding Source for all the software in the
|
263 |
-
product that is covered by this License, on a durable physical
|
264 |
-
medium customarily used for software interchange, for a price no
|
265 |
-
more than your reasonable cost of physically performing this
|
266 |
-
conveying of source, or (2) access to copy the
|
267 |
-
Corresponding Source from a network server at no charge.
|
268 |
-
|
269 |
-
c) Convey individual copies of the object code with a copy of the
|
270 |
-
written offer to provide the Corresponding Source. This
|
271 |
-
alternative is allowed only occasionally and noncommercially, and
|
272 |
-
only if you received the object code with such an offer, in accord
|
273 |
-
with subsection 6b.
|
274 |
-
|
275 |
-
d) Convey the object code by offering access from a designated
|
276 |
-
place (gratis or for a charge), and offer equivalent access to the
|
277 |
-
Corresponding Source in the same way through the same place at no
|
278 |
-
further charge. You need not require recipients to copy the
|
279 |
-
Corresponding Source along with the object code. If the place to
|
280 |
-
copy the object code is a network server, the Corresponding Source
|
281 |
-
may be on a different server (operated by you or a third party)
|
282 |
-
that supports equivalent copying facilities, provided you maintain
|
283 |
-
clear directions next to the object code saying where to find the
|
284 |
-
Corresponding Source. Regardless of what server hosts the
|
285 |
-
Corresponding Source, you remain obligated to ensure that it is
|
286 |
-
available for as long as needed to satisfy these requirements.
|
287 |
-
|
288 |
-
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
-
you inform other peers where the object code and Corresponding
|
290 |
-
Source of the work are being offered to the general public at no
|
291 |
-
charge under subsection 6d.
|
292 |
-
|
293 |
-
A separable portion of the object code, whose source code is excluded
|
294 |
-
from the Corresponding Source as a System Library, need not be
|
295 |
-
included in conveying the object code work.
|
296 |
-
|
297 |
-
A "User Product" is either (1) a "consumer product", which means any
|
298 |
-
tangible personal property which is normally used for personal, family,
|
299 |
-
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
-
into a dwelling. In determining whether a product is a consumer product,
|
301 |
-
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
-
product received by a particular user, "normally used" refers to a
|
303 |
-
typical or common use of that class of product, regardless of the status
|
304 |
-
of the particular user or of the way in which the particular user
|
305 |
-
actually uses, or expects or is expected to use, the product. A product
|
306 |
-
is a consumer product regardless of whether the product has substantial
|
307 |
-
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
-
the only significant mode of use of the product.
|
309 |
-
|
310 |
-
"Installation Information" for a User Product means any methods,
|
311 |
-
procedures, authorization keys, or other information required to install
|
312 |
-
and execute modified versions of a covered work in that User Product from
|
313 |
-
a modified version of its Corresponding Source. The information must
|
314 |
-
suffice to ensure that the continued functioning of the modified object
|
315 |
-
code is in no case prevented or interfered with solely because
|
316 |
-
modification has been made.
|
317 |
-
|
318 |
-
If you convey an object code work under this section in, or with, or
|
319 |
-
specifically for use in, a User Product, and the conveying occurs as
|
320 |
-
part of a transaction in which the right of possession and use of the
|
321 |
-
User Product is transferred to the recipient in perpetuity or for a
|
322 |
-
fixed term (regardless of how the transaction is characterized), the
|
323 |
-
Corresponding Source conveyed under this section must be accompanied
|
324 |
-
by the Installation Information. But this requirement does not apply
|
325 |
-
if neither you nor any third party retains the ability to install
|
326 |
-
modified object code on the User Product (for example, the work has
|
327 |
-
been installed in ROM).
|
328 |
-
|
329 |
-
The requirement to provide Installation Information does not include a
|
330 |
-
requirement to continue to provide support service, warranty, or updates
|
331 |
-
for a work that has been modified or installed by the recipient, or for
|
332 |
-
the User Product in which it has been modified or installed. Access to a
|
333 |
-
network may be denied when the modification itself materially and
|
334 |
-
adversely affects the operation of the network or violates the rules and
|
335 |
-
protocols for communication across the network.
|
336 |
-
|
337 |
-
Corresponding Source conveyed, and Installation Information provided,
|
338 |
-
in accord with this section must be in a format that is publicly
|
339 |
-
documented (and with an implementation available to the public in
|
340 |
-
source code form), and must require no special password or key for
|
341 |
-
unpacking, reading or copying.
|
342 |
-
|
343 |
-
7. Additional Terms.
|
344 |
-
|
345 |
-
"Additional permissions" are terms that supplement the terms of this
|
346 |
-
License by making exceptions from one or more of its conditions.
|
347 |
-
Additional permissions that are applicable to the entire Program shall
|
348 |
-
be treated as though they were included in this License, to the extent
|
349 |
-
that they are valid under applicable law. If additional permissions
|
350 |
-
apply only to part of the Program, that part may be used separately
|
351 |
-
under those permissions, but the entire Program remains governed by
|
352 |
-
this License without regard to the additional permissions.
|
353 |
-
|
354 |
-
When you convey a copy of a covered work, you may at your option
|
355 |
-
remove any additional permissions from that copy, or from any part of
|
356 |
-
it. (Additional permissions may be written to require their own
|
357 |
-
removal in certain cases when you modify the work.) You may place
|
358 |
-
additional permissions on material, added by you to a covered work,
|
359 |
-
for which you have or can give appropriate copyright permission.
|
360 |
-
|
361 |
-
Notwithstanding any other provision of this License, for material you
|
362 |
-
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
-
that material) supplement the terms of this License with terms:
|
364 |
-
|
365 |
-
a) Disclaiming warranty or limiting liability differently from the
|
366 |
-
terms of sections 15 and 16 of this License; or
|
367 |
-
|
368 |
-
b) Requiring preservation of specified reasonable legal notices or
|
369 |
-
author attributions in that material or in the Appropriate Legal
|
370 |
-
Notices displayed by works containing it; or
|
371 |
-
|
372 |
-
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
-
requiring that modified versions of such material be marked in
|
374 |
-
reasonable ways as different from the original version; or
|
375 |
-
|
376 |
-
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
-
authors of the material; or
|
378 |
-
|
379 |
-
e) Declining to grant rights under trademark law for use of some
|
380 |
-
trade names, trademarks, or service marks; or
|
381 |
-
|
382 |
-
f) Requiring indemnification of licensors and authors of that
|
383 |
-
material by anyone who conveys the material (or modified versions of
|
384 |
-
it) with contractual assumptions of liability to the recipient, for
|
385 |
-
any liability that these contractual assumptions directly impose on
|
386 |
-
those licensors and authors.
|
387 |
-
|
388 |
-
All other non-permissive additional terms are considered "further
|
389 |
-
restrictions" within the meaning of section 10. If the Program as you
|
390 |
-
received it, or any part of it, contains a notice stating that it is
|
391 |
-
governed by this License along with a term that is a further
|
392 |
-
restriction, you may remove that term. If a license document contains
|
393 |
-
a further restriction but permits relicensing or conveying under this
|
394 |
-
License, you may add to a covered work material governed by the terms
|
395 |
-
of that license document, provided that the further restriction does
|
396 |
-
not survive such relicensing or conveying.
|
397 |
-
|
398 |
-
If you add terms to a covered work in accord with this section, you
|
399 |
-
must place, in the relevant source files, a statement of the
|
400 |
-
additional terms that apply to those files, or a notice indicating
|
401 |
-
where to find the applicable terms.
|
402 |
-
|
403 |
-
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
-
form of a separately written license, or stated as exceptions;
|
405 |
-
the above requirements apply either way.
|
406 |
-
|
407 |
-
8. Termination.
|
408 |
-
|
409 |
-
You may not propagate or modify a covered work except as expressly
|
410 |
-
provided under this License. Any attempt otherwise to propagate or
|
411 |
-
modify it is void, and will automatically terminate your rights under
|
412 |
-
this License (including any patent licenses granted under the third
|
413 |
-
paragraph of section 11).
|
414 |
-
|
415 |
-
However, if you cease all violation of this License, then your
|
416 |
-
license from a particular copyright holder is reinstated (a)
|
417 |
-
provisionally, unless and until the copyright holder explicitly and
|
418 |
-
finally terminates your license, and (b) permanently, if the copyright
|
419 |
-
holder fails to notify you of the violation by some reasonable means
|
420 |
-
prior to 60 days after the cessation.
|
421 |
-
|
422 |
-
Moreover, your license from a particular copyright holder is
|
423 |
-
reinstated permanently if the copyright holder notifies you of the
|
424 |
-
violation by some reasonable means, this is the first time you have
|
425 |
-
received notice of violation of this License (for any work) from that
|
426 |
-
copyright holder, and you cure the violation prior to 30 days after
|
427 |
-
your receipt of the notice.
|
428 |
-
|
429 |
-
Termination of your rights under this section does not terminate the
|
430 |
-
licenses of parties who have received copies or rights from you under
|
431 |
-
this License. If your rights have been terminated and not permanently
|
432 |
-
reinstated, you do not qualify to receive new licenses for the same
|
433 |
-
material under section 10.
|
434 |
-
|
435 |
-
9. Acceptance Not Required for Having Copies.
|
436 |
-
|
437 |
-
You are not required to accept this License in order to receive or
|
438 |
-
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
-
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
-
to receive a copy likewise does not require acceptance. However,
|
441 |
-
nothing other than this License grants you permission to propagate or
|
442 |
-
modify any covered work. These actions infringe copyright if you do
|
443 |
-
not accept this License. Therefore, by modifying or propagating a
|
444 |
-
covered work, you indicate your acceptance of this License to do so.
|
445 |
-
|
446 |
-
10. Automatic Licensing of Downstream Recipients.
|
447 |
-
|
448 |
-
Each time you convey a covered work, the recipient automatically
|
449 |
-
receives a license from the original licensors, to run, modify and
|
450 |
-
propagate that work, subject to this License. You are not responsible
|
451 |
-
for enforcing compliance by third parties with this License.
|
452 |
-
|
453 |
-
An "entity transaction" is a transaction transferring control of an
|
454 |
-
organization, or substantially all assets of one, or subdividing an
|
455 |
-
organization, or merging organizations. If propagation of a covered
|
456 |
-
work results from an entity transaction, each party to that
|
457 |
-
transaction who receives a copy of the work also receives whatever
|
458 |
-
licenses to the work the party's predecessor in interest had or could
|
459 |
-
give under the previous paragraph, plus a right to possession of the
|
460 |
-
Corresponding Source of the work from the predecessor in interest, if
|
461 |
-
the predecessor has it or can get it with reasonable efforts.
|
462 |
-
|
463 |
-
You may not impose any further restrictions on the exercise of the
|
464 |
-
rights granted or affirmed under this License. For example, you may
|
465 |
-
not impose a license fee, royalty, or other charge for exercise of
|
466 |
-
rights granted under this License, and you may not initiate litigation
|
467 |
-
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
-
any patent claim is infringed by making, using, selling, offering for
|
469 |
-
sale, or importing the Program or any portion of it.
|
470 |
-
|
471 |
-
11. Patents.
|
472 |
-
|
473 |
-
A "contributor" is a copyright holder who authorizes use under this
|
474 |
-
License of the Program or a work on which the Program is based. The
|
475 |
-
work thus licensed is called the contributor's "contributor version".
|
476 |
-
|
477 |
-
A contributor's "essential patent claims" are all patent claims
|
478 |
-
owned or controlled by the contributor, whether already acquired or
|
479 |
-
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
-
by this License, of making, using, or selling its contributor version,
|
481 |
-
but do not include claims that would be infringed only as a
|
482 |
-
consequence of further modification of the contributor version. For
|
483 |
-
purposes of this definition, "control" includes the right to grant
|
484 |
-
patent sublicenses in a manner consistent with the requirements of
|
485 |
-
this License.
|
486 |
-
|
487 |
-
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
-
patent license under the contributor's essential patent claims, to
|
489 |
-
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
-
propagate the contents of its contributor version.
|
491 |
-
|
492 |
-
In the following three paragraphs, a "patent license" is any express
|
493 |
-
agreement or commitment, however denominated, not to enforce a patent
|
494 |
-
(such as an express permission to practice a patent or covenant not to
|
495 |
-
sue for patent infringement). To "grant" such a patent license to a
|
496 |
-
party means to make such an agreement or commitment not to enforce a
|
497 |
-
patent against the party.
|
498 |
-
|
499 |
-
If you convey a covered work, knowingly relying on a patent license,
|
500 |
-
and the Corresponding Source of the work is not available for anyone
|
501 |
-
to copy, free of charge and under the terms of this License, through a
|
502 |
-
publicly available network server or other readily accessible means,
|
503 |
-
then you must either (1) cause the Corresponding Source to be so
|
504 |
-
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
-
patent license for this particular work, or (3) arrange, in a manner
|
506 |
-
consistent with the requirements of this License, to extend the patent
|
507 |
-
license to downstream recipients. "Knowingly relying" means you have
|
508 |
-
actual knowledge that, but for the patent license, your conveying the
|
509 |
-
covered work in a country, or your recipient's use of the covered work
|
510 |
-
in a country, would infringe one or more identifiable patents in that
|
511 |
-
country that you have reason to believe are valid.
|
512 |
-
|
513 |
-
If, pursuant to or in connection with a single transaction or
|
514 |
-
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
-
covered work, and grant a patent license to some of the parties
|
516 |
-
receiving the covered work authorizing them to use, propagate, modify
|
517 |
-
or convey a specific copy of the covered work, then the patent license
|
518 |
-
you grant is automatically extended to all recipients of the covered
|
519 |
-
work and works based on it.
|
520 |
-
|
521 |
-
A patent license is "discriminatory" if it does not include within
|
522 |
-
the scope of its coverage, prohibits the exercise of, or is
|
523 |
-
conditioned on the non-exercise of one or more of the rights that are
|
524 |
-
specifically granted under this License. You may not convey a covered
|
525 |
-
work if you are a party to an arrangement with a third party that is
|
526 |
-
in the business of distributing software, under which you make payment
|
527 |
-
to the third party based on the extent of your activity of conveying
|
528 |
-
the work, and under which the third party grants, to any of the
|
529 |
-
parties who would receive the covered work from you, a discriminatory
|
530 |
-
patent license (a) in connection with copies of the covered work
|
531 |
-
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
-
for and in connection with specific products or compilations that
|
533 |
-
contain the covered work, unless you entered into that arrangement,
|
534 |
-
or that patent license was granted, prior to 28 March 2007.
|
535 |
-
|
536 |
-
Nothing in this License shall be construed as excluding or limiting
|
537 |
-
any implied license or other defenses to infringement that may
|
538 |
-
otherwise be available to you under applicable patent law.
|
539 |
-
|
540 |
-
12. No Surrender of Others' Freedom.
|
541 |
-
|
542 |
-
If conditions are imposed on you (whether by court order, agreement or
|
543 |
-
otherwise) that contradict the conditions of this License, they do not
|
544 |
-
excuse you from the conditions of this License. If you cannot convey a
|
545 |
-
covered work so as to satisfy simultaneously your obligations under this
|
546 |
-
License and any other pertinent obligations, then as a consequence you may
|
547 |
-
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
-
to collect a royalty for further conveying from those to whom you convey
|
549 |
-
the Program, the only way you could satisfy both those terms and this
|
550 |
-
License would be to refrain entirely from conveying the Program.
|
551 |
-
|
552 |
-
13. Use with the GNU Affero General Public License.
|
553 |
-
|
554 |
-
Notwithstanding any other provision of this License, you have
|
555 |
-
permission to link or combine any covered work with a work licensed
|
556 |
-
under version 3 of the GNU Affero General Public License into a single
|
557 |
-
combined work, and to convey the resulting work. The terms of this
|
558 |
-
License will continue to apply to the part which is the covered work,
|
559 |
-
but the special requirements of the GNU Affero General Public License,
|
560 |
-
section 13, concerning interaction through a network will apply to the
|
561 |
-
combination as such.
|
562 |
-
|
563 |
-
14. Revised Versions of this License.
|
564 |
-
|
565 |
-
The Free Software Foundation may publish revised and/or new versions of
|
566 |
-
the GNU General Public License from time to time. Such new versions will
|
567 |
-
be similar in spirit to the present version, but may differ in detail to
|
568 |
-
address new problems or concerns.
|
569 |
-
|
570 |
-
Each version is given a distinguishing version number. If the
|
571 |
-
Program specifies that a certain numbered version of the GNU General
|
572 |
-
Public License "or any later version" applies to it, you have the
|
573 |
-
option of following the terms and conditions either of that numbered
|
574 |
-
version or of any later version published by the Free Software
|
575 |
-
Foundation. If the Program does not specify a version number of the
|
576 |
-
GNU General Public License, you may choose any version ever published
|
577 |
-
by the Free Software Foundation.
|
578 |
-
|
579 |
-
If the Program specifies that a proxy can decide which future
|
580 |
-
versions of the GNU General Public License can be used, that proxy's
|
581 |
-
public statement of acceptance of a version permanently authorizes you
|
582 |
-
to choose that version for the Program.
|
583 |
-
|
584 |
-
Later license versions may give you additional or different
|
585 |
-
permissions. However, no additional obligations are imposed on any
|
586 |
-
author or copyright holder as a result of your choosing to follow a
|
587 |
-
later version.
|
588 |
-
|
589 |
-
15. Disclaimer of Warranty.
|
590 |
-
|
591 |
-
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
-
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
-
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
-
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
-
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
-
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
-
|
600 |
-
16. Limitation of Liability.
|
601 |
-
|
602 |
-
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
-
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
-
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
-
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
-
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
-
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
-
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
-
SUCH DAMAGES.
|
611 |
-
|
612 |
-
17. Interpretation of Sections 15 and 16.
|
613 |
-
|
614 |
-
If the disclaimer of warranty and limitation of liability provided
|
615 |
-
above cannot be given local legal effect according to their terms,
|
616 |
-
reviewing courts shall apply local law that most closely approximates
|
617 |
-
an absolute waiver of all civil liability in connection with the
|
618 |
-
Program, unless a warranty or assumption of liability accompanies a
|
619 |
-
copy of the Program in return for a fee.
|
620 |
-
|
621 |
-
END OF TERMS AND CONDITIONS
|
622 |
-
|
623 |
-
How to Apply These Terms to Your New Programs
|
624 |
-
|
625 |
-
If you develop a new program, and you want it to be of the greatest
|
626 |
-
possible use to the public, the best way to achieve this is to make it
|
627 |
-
free software which everyone can redistribute and change under these terms.
|
628 |
-
|
629 |
-
To do so, attach the following notices to the program. It is safest
|
630 |
-
to attach them to the start of each source file to most effectively
|
631 |
-
state the exclusion of warranty; and each file should have at least
|
632 |
-
the "copyright" line and a pointer to where the full notice is found.
|
633 |
-
|
634 |
-
{one line to give the program's name and a brief idea of what it does.}
|
635 |
-
Copyright (C) {year} {name of author}
|
636 |
-
|
637 |
-
This program is free software: you can redistribute it and/or modify
|
638 |
-
it under the terms of the GNU General Public License as published by
|
639 |
-
the Free Software Foundation, either version 3 of the License, or
|
640 |
-
(at your option) any later version.
|
641 |
-
|
642 |
-
This program is distributed in the hope that it will be useful,
|
643 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
-
GNU General Public License for more details.
|
646 |
-
|
647 |
-
You should have received a copy of the GNU General Public License
|
648 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
-
|
650 |
-
Also add information on how to contact you by electronic and paper mail.
|
651 |
-
|
652 |
-
If the program does terminal interaction, make it output a short
|
653 |
-
notice like this when it starts in an interactive mode:
|
654 |
-
|
655 |
-
{project} Copyright (C) {year} {fullname}
|
656 |
-
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
-
This is free software, and you are welcome to redistribute it
|
658 |
-
under certain conditions; type `show c' for details.
|
659 |
-
|
660 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
-
parts of the General Public License. Of course, your program's commands
|
662 |
-
might be different; for a GUI interface, you would use an "about box".
|
663 |
-
|
664 |
-
You should also get your employer (if you work as a programmer) or school,
|
665 |
-
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
-
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
-
<http://www.gnu.org/licenses/>.
|
668 |
-
|
669 |
-
The GNU General Public License does not permit incorporating your program
|
670 |
-
into proprietary programs. If your program is a subroutine library, you
|
671 |
-
may consider it more useful to permit linking proprietary applications with
|
672 |
-
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
-
Public License instead of this License. But first, please read
|
674 |
-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
{one line to give the program's name and a brief idea of what it does.}
|
635 |
+
Copyright (C) {year} {name of author}
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
{project} Copyright (C) {year} {fullname}
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
base/module-base.php
CHANGED
@@ -26,7 +26,7 @@ abstract class Module_Base {
|
|
26 |
*/
|
27 |
public function __clone() {
|
28 |
// Cloning instances of the class is forbidden
|
29 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'elementor
|
30 |
}
|
31 |
|
32 |
/**
|
@@ -37,7 +37,7 @@ abstract class Module_Base {
|
|
37 |
*/
|
38 |
public function __wakeup() {
|
39 |
// Unserializing instances of the class is forbidden
|
40 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'elementor
|
41 |
}
|
42 |
|
43 |
public static function class_name() {
|
26 |
*/
|
27 |
public function __clone() {
|
28 |
// Cloning instances of the class is forbidden
|
29 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'navmenu-addon-for-elementor' ), '1.0.0' );
|
30 |
}
|
31 |
|
32 |
/**
|
37 |
*/
|
38 |
public function __wakeup() {
|
39 |
// Unserializing instances of the class is forbidden
|
40 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'navmenu-addon-for-elementor' ), '1.0.0' );
|
41 |
}
|
42 |
|
43 |
public static function class_name() {
|
classes/utils.php
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
<?php
|
2 |
namespace ElementorMenus\Classes;
|
3 |
|
4 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
5 |
|
6 |
class Utils {
|
7 |
|
1 |
<?php
|
2 |
namespace ElementorMenus\Classes;
|
3 |
|
4 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
5 |
+
exit; // Exit if accessed directly
|
6 |
+
}
|
7 |
|
8 |
class Utils {
|
9 |
|
elementor-navmenu.php
CHANGED
@@ -2,17 +2,21 @@
|
|
2 |
/**
|
3 |
* Plugin Name: NavMenu Addon For Elementor
|
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://
|
6 |
-
* Author:
|
7 |
-
* Version: 1.0
|
8 |
-
* Author URI: https://
|
9 |
*
|
10 |
-
* Text Domain: elementor
|
11 |
-
|
|
|
|
|
12 |
|
13 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
14 |
|
15 |
-
define( 'ELEMENTOR_MENUS_VERSION', '1.0
|
16 |
|
17 |
define( 'ELEMENTOR_MENUS__FILE__', __FILE__ );
|
18 |
define( 'ELEMENTOR_MENUS_PLUGIN_BASE', plugin_basename( ELEMENTOR_MENUS__FILE__ ) );
|
@@ -30,21 +34,24 @@ define( 'ELEMENTOR_MENUS_MODULES_URL', ELEMENTOR_MENUS_URL . 'modules/' );
|
|
30 |
* @return void
|
31 |
*/
|
32 |
function elementor_menus_load_plugin() {
|
33 |
-
load_plugin_textdomain( 'elementor
|
34 |
|
35 |
if ( ! did_action( 'elementor/loaded' ) ) {
|
36 |
add_action( 'admin_notices', 'elementor_menus_fail_load' );
|
|
|
37 |
return;
|
38 |
}
|
39 |
|
40 |
$elementor_version_required = '1.0.6';
|
41 |
if ( ! version_compare( ELEMENTOR_VERSION, $elementor_version_required, '>=' ) ) {
|
42 |
add_action( 'admin_notices', 'elementor_menus_fail_load_out_of_date' );
|
|
|
43 |
return;
|
44 |
}
|
45 |
|
46 |
require( ELEMENTOR_MENUS_PATH . 'plugin.php' );
|
47 |
}
|
|
|
48 |
add_action( 'plugins_loaded', 'elementor_menus_load_plugin' );
|
49 |
|
50 |
/**
|
@@ -69,8 +76,8 @@ function elementor_menus_fail_load() {
|
|
69 |
|
70 |
$activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
|
71 |
|
72 |
-
$message = '<p>' . __( 'Elementor NavMenu is not working because you need to activate the Elementor plugin.', 'elementor
|
73 |
-
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Elementor Now', 'elementor
|
74 |
} else {
|
75 |
if ( ! current_user_can( 'install_plugins' ) ) {
|
76 |
return;
|
@@ -78,8 +85,8 @@ function elementor_menus_fail_load() {
|
|
78 |
|
79 |
$install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
|
80 |
|
81 |
-
$message = '<p>' . __( 'Elementor NavMenu is not working because you need to install the Elemenor plugin', 'elementor
|
82 |
-
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $install_url, __( 'Install Elementor Now', 'elementor
|
83 |
}
|
84 |
|
85 |
echo '<div class="error"><p>' . $message . '</p></div>';
|
@@ -93,8 +100,8 @@ function elementor_menus_fail_load_out_of_date() {
|
|
93 |
$file_path = 'elementor/elementor.php';
|
94 |
|
95 |
$upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path );
|
96 |
-
$message
|
97 |
-
$message
|
98 |
|
99 |
echo '<div class="error">' . $message . '</div>';
|
100 |
}
|
@@ -102,7 +109,7 @@ function elementor_menus_fail_load_out_of_date() {
|
|
102 |
if ( ! function_exists( '_is_elementor_installed' ) ) {
|
103 |
|
104 |
function _is_elementor_installed() {
|
105 |
-
$file_path
|
106 |
$installed_plugins = get_plugins();
|
107 |
|
108 |
return isset( $installed_plugins[ $file_path ] );
|
@@ -110,16 +117,17 @@ if ( ! function_exists( '_is_elementor_installed' ) ) {
|
|
110 |
}
|
111 |
|
112 |
function navmenu_navbar_menu_choices() {
|
113 |
-
|
114 |
$items = array();
|
115 |
-
$i
|
116 |
-
foreach( $menus as $menu ){
|
117 |
-
if($i==0){
|
118 |
$default = $menu->slug;
|
119 |
-
$i++;
|
120 |
}
|
121 |
-
|
122 |
}
|
|
|
123 |
return $items;
|
124 |
}
|
125 |
|
@@ -130,16 +138,18 @@ remove_filter( 'nav_menu_description', 'strip_tags' );
|
|
130 |
*/
|
131 |
function navmenu_nav_description( $item_output, $item, $depth, $args ) {
|
132 |
|
133 |
-
if ( $args->theme_location != 'nav_mega_menu' )
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
139 |
|
140 |
-
|
141 |
|
142 |
}
|
|
|
143 |
add_filter( 'walker_nav_menu_start_el', 'navmenu_nav_description', 10, 4 );
|
144 |
|
145 |
|
@@ -147,30 +157,42 @@ add_filter( 'wp_nav_menu_objects', 'navmenu_thumb_filter_menu', 10, 2 );
|
|
147 |
|
148 |
function navmenu_thumb_filter_menu( $sorted_menu_objects, $args ) {
|
149 |
|
150 |
-
|
151 |
-
if ( $args->theme_location != 'nav_mega_menu' )
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
161 |
}
|
162 |
-
|
|
|
|
|
163 |
|
164 |
-
return $sorted_menu_objects;
|
165 |
-
|
166 |
}
|
167 |
|
168 |
function nav_menu_body_classes( $classes ) {
|
169 |
|
170 |
$classes[] = 'has-navmenu';
|
171 |
$classes[] = 'has-megamenu';
|
172 |
-
|
173 |
return $classes;
|
174 |
}
|
|
|
175 |
add_filter( 'body_class', 'nav_menu_body_classes' );
|
176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* Plugin Name: NavMenu Addon For Elementor
|
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://themeisle.com/
|
6 |
+
* Author: ThemeIsle
|
7 |
+
* Version: 1.1.0
|
8 |
+
* Author URI: https://themeisle.com/
|
9 |
*
|
10 |
+
* Text Domain: navmenu-addon-for-elementor
|
11 |
+
* Requires License: no
|
12 |
+
* WordPress Available: yes
|
13 |
+
*/
|
14 |
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
} // Exit if accessed directly
|
18 |
|
19 |
+
define( 'ELEMENTOR_MENUS_VERSION', '1.1.0' );
|
20 |
|
21 |
define( 'ELEMENTOR_MENUS__FILE__', __FILE__ );
|
22 |
define( 'ELEMENTOR_MENUS_PLUGIN_BASE', plugin_basename( ELEMENTOR_MENUS__FILE__ ) );
|
34 |
* @return void
|
35 |
*/
|
36 |
function elementor_menus_load_plugin() {
|
37 |
+
load_plugin_textdomain( 'navmenu-addon-for-elementor' );
|
38 |
|
39 |
if ( ! did_action( 'elementor/loaded' ) ) {
|
40 |
add_action( 'admin_notices', 'elementor_menus_fail_load' );
|
41 |
+
|
42 |
return;
|
43 |
}
|
44 |
|
45 |
$elementor_version_required = '1.0.6';
|
46 |
if ( ! version_compare( ELEMENTOR_VERSION, $elementor_version_required, '>=' ) ) {
|
47 |
add_action( 'admin_notices', 'elementor_menus_fail_load_out_of_date' );
|
48 |
+
|
49 |
return;
|
50 |
}
|
51 |
|
52 |
require( ELEMENTOR_MENUS_PATH . 'plugin.php' );
|
53 |
}
|
54 |
+
|
55 |
add_action( 'plugins_loaded', 'elementor_menus_load_plugin' );
|
56 |
|
57 |
/**
|
76 |
|
77 |
$activation_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
|
78 |
|
79 |
+
$message = '<p>' . __( 'Elementor NavMenu is not working because you need to activate the Elementor plugin.', 'navmenu-addon-for-elementor' ) . '</p>';
|
80 |
+
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $activation_url, __( 'Activate Elementor Now', 'navmenu-addon-for-elementor' ) ) . '</p>';
|
81 |
} else {
|
82 |
if ( ! current_user_can( 'install_plugins' ) ) {
|
83 |
return;
|
85 |
|
86 |
$install_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
|
87 |
|
88 |
+
$message = '<p>' . __( 'Elementor NavMenu is not working because you need to install the Elemenor plugin', 'navmenu-addon-for-elementor' ) . '</p>';
|
89 |
+
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $install_url, __( 'Install Elementor Now', 'navmenu-addon-for-elementor' ) ) . '</p>';
|
90 |
}
|
91 |
|
92 |
echo '<div class="error"><p>' . $message . '</p></div>';
|
100 |
$file_path = 'elementor/elementor.php';
|
101 |
|
102 |
$upgrade_link = wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file_path, 'upgrade-plugin_' . $file_path );
|
103 |
+
$message = '<p>' . __( 'Elementor NavMenu is not working because you are using an old version of Elementor.', 'navmenu-addon-for-elementor' ) . '</p>';
|
104 |
+
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $upgrade_link, __( 'Update Elementor Now', 'navmenu-addon-for-elementor' ) ) . '</p>';
|
105 |
|
106 |
echo '<div class="error">' . $message . '</div>';
|
107 |
}
|
109 |
if ( ! function_exists( '_is_elementor_installed' ) ) {
|
110 |
|
111 |
function _is_elementor_installed() {
|
112 |
+
$file_path = 'elementor/elementor.php';
|
113 |
$installed_plugins = get_plugins();
|
114 |
|
115 |
return isset( $installed_plugins[ $file_path ] );
|
117 |
}
|
118 |
|
119 |
function navmenu_navbar_menu_choices() {
|
120 |
+
$menus = wp_get_nav_menus();
|
121 |
$items = array();
|
122 |
+
$i = 0;
|
123 |
+
foreach ( $menus as $menu ) {
|
124 |
+
if ( $i == 0 ) {
|
125 |
$default = $menu->slug;
|
126 |
+
$i ++;
|
127 |
}
|
128 |
+
$items[ $menu->slug ] = $menu->name;
|
129 |
}
|
130 |
+
|
131 |
return $items;
|
132 |
}
|
133 |
|
138 |
*/
|
139 |
function navmenu_nav_description( $item_output, $item, $depth, $args ) {
|
140 |
|
141 |
+
if ( $args->theme_location != 'nav_mega_menu' ) {
|
142 |
+
return $item_output;
|
143 |
+
}
|
144 |
+
|
145 |
+
if ( $item->description ) {
|
146 |
+
$item_output = str_replace( $args->link_after . '</a>', '<div class="menu-item-description">' . $item->description . '</div>' . $args->link_after . '</a>', $item_output );
|
147 |
+
}
|
148 |
|
149 |
+
return $item_output;
|
150 |
|
151 |
}
|
152 |
+
|
153 |
add_filter( 'walker_nav_menu_start_el', 'navmenu_nav_description', 10, 4 );
|
154 |
|
155 |
|
157 |
|
158 |
function navmenu_thumb_filter_menu( $sorted_menu_objects, $args ) {
|
159 |
|
160 |
+
// check for the right menu to filter
|
161 |
+
if ( $args->theme_location != 'nav_mega_menu' ) {
|
162 |
+
return $sorted_menu_objects;
|
163 |
+
}
|
164 |
+
// edit the menu objects
|
165 |
+
foreach ( $sorted_menu_objects as $menu_object ) {
|
166 |
+
// searching for menu items linking to posts or pages
|
167 |
+
// can add as many post types to the array
|
168 |
+
if ( in_array( $menu_object->object, array( 'post', 'page', 'product' ) ) ) {
|
169 |
+
// set the title to the post_thumbnail if available
|
170 |
+
// thumbnail size is the second parameter of get_the_post_thumbnail()
|
171 |
+
$menu_object->description = has_post_thumbnail( $menu_object->object_id ) ? get_the_post_thumbnail( $menu_object->object_id, 'medium' ) : $menu_object->description;
|
172 |
}
|
173 |
+
}
|
174 |
+
|
175 |
+
return $sorted_menu_objects;
|
176 |
|
|
|
|
|
177 |
}
|
178 |
|
179 |
function nav_menu_body_classes( $classes ) {
|
180 |
|
181 |
$classes[] = 'has-navmenu';
|
182 |
$classes[] = 'has-megamenu';
|
183 |
+
|
184 |
return $classes;
|
185 |
}
|
186 |
+
|
187 |
add_filter( 'body_class', 'nav_menu_body_classes' );
|
188 |
|
189 |
+
$vendor_file = ELEMENTOR_MENUS_PATH . '/vendor/autoload.php';
|
190 |
+
if ( is_readable( $vendor_file ) ) {
|
191 |
+
require_once $vendor_file;
|
192 |
+
}
|
193 |
+
|
194 |
+
add_filter( 'themeisle_sdk_products', 'navmenu_elementor_register_sdk', 10, 1 );
|
195 |
+
function navmenu_elementor_register_sdk( $products ) {
|
196 |
+
$products[] = ELEMENTOR_MENUS__FILE__;
|
197 |
+
return $products;
|
198 |
+
}
|
includes/modules-manager.php
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
<?php
|
2 |
namespace ElementorMenus;
|
3 |
|
4 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
5 |
|
6 |
final class Manager {
|
7 |
|
1 |
<?php
|
2 |
namespace ElementorMenus;
|
3 |
|
4 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
5 |
+
exit; // Exit if accessed directly
|
6 |
+
}
|
7 |
|
8 |
final class Manager {
|
9 |
|
index.php
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
<?php
|
2 |
-
// Silence is golden.
|
1 |
<?php
|
2 |
+
// Silence is golden.
|
modules/branding/module.info.php
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
3 |
|
4 |
return [
|
5 |
-
'title' => __( 'Branding', 'elementor
|
6 |
'required' => true,
|
7 |
'default_activation' => true,
|
8 |
];
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
|
6 |
return [
|
7 |
+
'title' => __( 'Branding', 'navmenu-addon-for-elementor' ),
|
8 |
'required' => true,
|
9 |
'default_activation' => true,
|
10 |
];
|
modules/branding/module.php
CHANGED
@@ -9,17 +9,17 @@ class Module extends Module_Base {
|
|
9 |
public function __construct() {
|
10 |
parent::__construct();
|
11 |
|
12 |
-
|
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 |
-
}
|
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
CHANGED
@@ -8,7 +8,9 @@ use Elementor\Group_Control_Typography;
|
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
12 |
|
13 |
/**
|
14 |
* Elementor Elementor Navbar
|
@@ -18,15 +20,15 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
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
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
@@ -38,59 +40,58 @@ class Elementor_Branding extends Widget_Base {
|
|
38 |
}
|
39 |
|
40 |
protected function _register_controls() {
|
41 |
-
|
42 |
-
|
43 |
$this->start_controls_section(
|
44 |
'section_content',
|
45 |
[
|
46 |
-
'label' => __( 'Branding', 'elementor
|
47 |
]
|
48 |
);
|
49 |
-
|
50 |
$this->add_control(
|
51 |
'el_site_branding',
|
52 |
[
|
53 |
-
'label' => __( 'Branding Type', 'elementor
|
54 |
-
'description' => __( 'Your theme must declare the "add_theme_support( \'custom-logo\')" for the logo to work', 'elementor
|
55 |
-
'type' => Controls_Manager::SELECT,
|
56 |
-
|
57 |
-
'
|
58 |
-
'logo' => __( 'Logo', 'elementor' ),
|
59 |
],
|
60 |
'default' => 'title',
|
61 |
]
|
62 |
);
|
63 |
-
|
64 |
$this->add_responsive_control(
|
65 |
'align',
|
66 |
[
|
67 |
-
'label' => __( 'Alignment', 'elementor
|
68 |
'type' => Controls_Manager::CHOOSE,
|
69 |
'options' => [
|
70 |
'left' => [
|
71 |
-
'title' => __( 'Left', 'elementor
|
72 |
'icon' => 'fa fa-align-left',
|
73 |
],
|
74 |
'center' => [
|
75 |
-
'title' => __( 'Center', 'elementor
|
76 |
'icon' => 'fa fa-align-center',
|
77 |
],
|
78 |
'right' => [
|
79 |
-
'title' => __( 'Right', 'elementor
|
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
|
94 |
'tab' => Controls_Manager::TAB_STYLE,
|
95 |
]
|
96 |
);
|
@@ -98,7 +99,7 @@ class Elementor_Branding extends Widget_Base {
|
|
98 |
$this->add_control(
|
99 |
'branding_title_color',
|
100 |
[
|
101 |
-
'label' => __( 'Title Color', 'elementor
|
102 |
'type' => Controls_Manager::COLOR,
|
103 |
'condition' => [
|
104 |
'el_site_branding' => 'title',
|
@@ -107,17 +108,17 @@ class Elementor_Branding extends Widget_Base {
|
|
107 |
'type' => Scheme_Color::get_type(),
|
108 |
'value' => Scheme_Color::COLOR_1,
|
109 |
],
|
110 |
-
'default'
|
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
|
121 |
'type' => Controls_Manager::COLOR,
|
122 |
'condition' => [
|
123 |
'el_site_branding' => 'title',
|
@@ -135,7 +136,7 @@ class Elementor_Branding extends Widget_Base {
|
|
135 |
$this->add_control(
|
136 |
'title_padding',
|
137 |
[
|
138 |
-
'label' => __( 'Title Padding - Default 1em', 'elementor
|
139 |
'type' => Controls_Manager::DIMENSIONS,
|
140 |
'condition' => [
|
141 |
'el_site_branding' => 'title',
|
@@ -146,12 +147,12 @@ class Elementor_Branding extends Widget_Base {
|
|
146 |
],
|
147 |
]
|
148 |
);
|
149 |
-
|
150 |
$this->add_group_control(
|
151 |
Group_Control_Typography::get_type(),
|
152 |
[
|
153 |
'name' => 'title_typography',
|
154 |
-
'label' => __( 'Typography', 'elementor
|
155 |
'condition' => [
|
156 |
'el_site_branding' => 'title',
|
157 |
],
|
@@ -159,11 +160,11 @@ class Elementor_Branding extends Widget_Base {
|
|
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
|
167 |
'type' => Controls_Manager::DIMENSIONS,
|
168 |
'condition' => [
|
169 |
'el_site_branding' => 'logo',
|
@@ -176,22 +177,22 @@ class Elementor_Branding extends Widget_Base {
|
|
176 |
);
|
177 |
|
178 |
$this->end_controls_section();
|
179 |
-
|
180 |
$this->start_controls_section(
|
181 |
'section_desc_style',
|
182 |
[
|
183 |
-
'label' => __( 'Description Options', 'elementor
|
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
|
195 |
'type' => Controls_Manager::COLOR,
|
196 |
'condition' => [
|
197 |
'el_site_branding' => 'title',
|
@@ -205,11 +206,11 @@ class Elementor_Branding extends Widget_Base {
|
|
205 |
],
|
206 |
]
|
207 |
);
|
208 |
-
|
209 |
$this->add_control(
|
210 |
'desc_padding',
|
211 |
[
|
212 |
-
'label' => __( 'Description Padding - Default 1em', 'elementor
|
213 |
'type' => Controls_Manager::DIMENSIONS,
|
214 |
'condition' => [
|
215 |
'el_site_branding' => 'title',
|
@@ -220,12 +221,12 @@ class Elementor_Branding extends Widget_Base {
|
|
220 |
],
|
221 |
]
|
222 |
);
|
223 |
-
|
224 |
$this->add_group_control(
|
225 |
Group_Control_Typography::get_type(),
|
226 |
[
|
227 |
'name' => 'desc_typography',
|
228 |
-
'label' => __( 'Typography', 'elementor
|
229 |
'condition' => [
|
230 |
'el_site_branding' => 'title',
|
231 |
],
|
@@ -233,23 +234,22 @@ class Elementor_Branding extends Widget_Base {
|
|
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
|
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
|
253 |
'default' => '1px',
|
254 |
'selector' => '{{WRAPPER}} .elementor-branding',
|
255 |
]
|
@@ -258,65 +258,71 @@ class Elementor_Branding extends Widget_Base {
|
|
258 |
$this->add_control(
|
259 |
'border_radius',
|
260 |
[
|
261 |
-
'label' => __( 'Border Radius', 'elementor
|
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 |
-
|
|
|
296 |
<?php bloginfo( 'name' ); ?>
|
297 |
</a>
|
298 |
</span>
|
299 |
<?php
|
300 |
$description = get_bloginfo( 'description', 'display' );
|
301 |
-
|
|
|
302 |
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
|
303 |
-
<?php
|
|
|
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 |
-
|
|
|
320 |
</div>
|
321 |
<?php
|
322 |
}
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly
|
13 |
+
}
|
14 |
|
15 |
/**
|
16 |
* Elementor Elementor Navbar
|
20 |
* @since 1.0.0
|
21 |
*/
|
22 |
class Elementor_Branding extends Widget_Base {
|
23 |
+
|
24 |
protected $_has_template_content = false;
|
25 |
+
|
26 |
public function get_name() {
|
27 |
return 'elementor-branding';
|
28 |
}
|
29 |
|
30 |
public function get_title() {
|
31 |
+
return __( 'Branding', 'navmenu-addon-for-elementor' );
|
32 |
}
|
33 |
|
34 |
public function get_icon() {
|
40 |
}
|
41 |
|
42 |
protected function _register_controls() {
|
43 |
+
// $menus = $this->get_menus();
|
44 |
+
|
45 |
$this->start_controls_section(
|
46 |
'section_content',
|
47 |
[
|
48 |
+
'label' => __( 'Branding', 'navmenu-addon-for-elementor' ),
|
49 |
]
|
50 |
);
|
51 |
+
|
52 |
$this->add_control(
|
53 |
'el_site_branding',
|
54 |
[
|
55 |
+
'label' => __( 'Branding Type', 'navmenu-addon-for-elementor' ),
|
56 |
+
'description' => __( 'Your theme must declare the "add_theme_support( \'custom-logo\')" for the logo to work', 'navmenu-addon-for-elementor' ),
|
57 |
+
'type' => Controls_Manager::SELECT, 'options' => [
|
58 |
+
'title' => __( 'Title', 'navmenu-addon-for-elementor' ),
|
59 |
+
'logo' => __( 'Logo', 'navmenu-addon-for-elementor' ),
|
|
|
60 |
],
|
61 |
'default' => 'title',
|
62 |
]
|
63 |
);
|
64 |
+
|
65 |
$this->add_responsive_control(
|
66 |
'align',
|
67 |
[
|
68 |
+
'label' => __( 'Alignment', 'navmenu-addon-for-elementor' ),
|
69 |
'type' => Controls_Manager::CHOOSE,
|
70 |
'options' => [
|
71 |
'left' => [
|
72 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
73 |
'icon' => 'fa fa-align-left',
|
74 |
],
|
75 |
'center' => [
|
76 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
77 |
'icon' => 'fa fa-align-center',
|
78 |
],
|
79 |
'right' => [
|
80 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
81 |
'icon' => 'fa fa-align-right',
|
82 |
],
|
83 |
],
|
84 |
'prefix_class' => 'elementor%s-align-',
|
85 |
'default' => '',
|
86 |
]
|
87 |
+
);
|
88 |
|
89 |
$this->end_controls_section();
|
90 |
|
91 |
$this->start_controls_section(
|
92 |
'section_title_style',
|
93 |
[
|
94 |
+
'label' => __( 'Brand', 'navmenu-addon-for-elementor' ),
|
95 |
'tab' => Controls_Manager::TAB_STYLE,
|
96 |
]
|
97 |
);
|
99 |
$this->add_control(
|
100 |
'branding_title_color',
|
101 |
[
|
102 |
+
'label' => __( 'Title Color', 'navmenu-addon-for-elementor' ),
|
103 |
'type' => Controls_Manager::COLOR,
|
104 |
'condition' => [
|
105 |
'el_site_branding' => 'title',
|
108 |
'type' => Scheme_Color::get_type(),
|
109 |
'value' => Scheme_Color::COLOR_1,
|
110 |
],
|
111 |
+
'default' => '#333333',
|
112 |
'selectors' => [
|
113 |
'{{WRAPPER}} .elementor-branding .site-title a' => 'color: {{VALUE}};',
|
114 |
],
|
115 |
]
|
116 |
);
|
117 |
+
|
118 |
$this->add_control(
|
119 |
'branding_title_hover',
|
120 |
[
|
121 |
+
'label' => __( 'Hover', 'navmenu-addon-for-elementor' ),
|
122 |
'type' => Controls_Manager::COLOR,
|
123 |
'condition' => [
|
124 |
'el_site_branding' => 'title',
|
136 |
$this->add_control(
|
137 |
'title_padding',
|
138 |
[
|
139 |
+
'label' => __( 'Title Padding - Default 1em', 'navmenu-addon-for-elementor' ),
|
140 |
'type' => Controls_Manager::DIMENSIONS,
|
141 |
'condition' => [
|
142 |
'el_site_branding' => 'title',
|
147 |
],
|
148 |
]
|
149 |
);
|
150 |
+
|
151 |
$this->add_group_control(
|
152 |
Group_Control_Typography::get_type(),
|
153 |
[
|
154 |
'name' => 'title_typography',
|
155 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
156 |
'condition' => [
|
157 |
'el_site_branding' => 'title',
|
158 |
],
|
160 |
'selector' => '{{WRAPPER}} .elementor-branding .site-title',
|
161 |
]
|
162 |
);
|
163 |
+
|
164 |
$this->add_control(
|
165 |
'logo_padding',
|
166 |
[
|
167 |
+
'label' => __( 'Title Padding - Default 1em', 'navmenu-addon-for-elementor' ),
|
168 |
'type' => Controls_Manager::DIMENSIONS,
|
169 |
'condition' => [
|
170 |
'el_site_branding' => 'logo',
|
177 |
);
|
178 |
|
179 |
$this->end_controls_section();
|
180 |
+
|
181 |
$this->start_controls_section(
|
182 |
'section_desc_style',
|
183 |
[
|
184 |
+
'label' => __( 'Description Options', 'navmenu-addon-for-elementor' ),
|
185 |
'tab' => Controls_Manager::TAB_STYLE,
|
186 |
'condition' => [
|
187 |
'el_site_branding' => 'title',
|
188 |
],
|
189 |
]
|
190 |
);
|
191 |
+
|
192 |
$this->add_control(
|
193 |
'branding_description_color',
|
194 |
[
|
195 |
+
'label' => __( 'Description Color', 'navmenu-addon-for-elementor' ),
|
196 |
'type' => Controls_Manager::COLOR,
|
197 |
'condition' => [
|
198 |
'el_site_branding' => 'title',
|
206 |
],
|
207 |
]
|
208 |
);
|
209 |
+
|
210 |
$this->add_control(
|
211 |
'desc_padding',
|
212 |
[
|
213 |
+
'label' => __( 'Description Padding - Default 1em', 'navmenu-addon-for-elementor' ),
|
214 |
'type' => Controls_Manager::DIMENSIONS,
|
215 |
'condition' => [
|
216 |
'el_site_branding' => 'title',
|
221 |
],
|
222 |
]
|
223 |
);
|
224 |
+
|
225 |
$this->add_group_control(
|
226 |
Group_Control_Typography::get_type(),
|
227 |
[
|
228 |
'name' => 'desc_typography',
|
229 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
230 |
'condition' => [
|
231 |
'el_site_branding' => 'title',
|
232 |
],
|
234 |
'selector' => '{{WRAPPER}} .elementor-branding .site-description',
|
235 |
]
|
236 |
);
|
237 |
+
|
238 |
$this->end_controls_section();
|
|
|
239 |
|
240 |
$this->start_controls_section(
|
241 |
'section_branding_borders',
|
242 |
[
|
243 |
+
'label' => __( 'Branding Border', 'navmenu-addon-for-elementor' ),
|
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', 'navmenu-addon-for-elementor' ),
|
253 |
'default' => '1px',
|
254 |
'selector' => '{{WRAPPER}} .elementor-branding',
|
255 |
]
|
258 |
$this->add_control(
|
259 |
'border_radius',
|
260 |
[
|
261 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
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 |
+
?>
|
292 |
<span class="site-title">
|
293 |
+
<?php
|
294 |
+
$title = get_bloginfo( 'name' );
|
295 |
+
?>
|
296 |
+
|
297 |
+
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( $title ); /* WPCS: xss ok. */ ?>" alt="<?php echo esc_attr( $title ); ?>">
|
298 |
<?php bloginfo( 'name' ); ?>
|
299 |
</a>
|
300 |
</span>
|
301 |
<?php
|
302 |
$description = get_bloginfo( 'description', 'display' );
|
303 |
+
if ( $description || is_customize_preview() ) :
|
304 |
+
?>
|
305 |
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
|
306 |
+
<?php
|
307 |
+
endif;
|
308 |
}
|
309 |
+
|
310 |
protected function render_logo() {
|
311 |
$this->elementor_the_site_logo();
|
312 |
}
|
313 |
|
314 |
protected function render() {
|
315 |
+
|
316 |
+
$settings = $this->get_settings();
|
317 |
+
?>
|
318 |
|
319 |
<div id="elementor-branding" class="elementor-branding">
|
320 |
<div class="header-title">
|
321 |
+
<?php
|
322 |
$this->branding_output();
|
323 |
+
?>
|
324 |
+
|
325 |
+
</div>
|
326 |
</div>
|
327 |
<?php
|
328 |
}
|
modules/menus/module.info.php
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
3 |
|
4 |
return [
|
5 |
-
'title' => __( 'Menus', 'elementor
|
6 |
'required' => true,
|
7 |
'default_activation' => true,
|
8 |
];
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
|
6 |
return [
|
7 |
+
'title' => __( 'Menus', 'navmenu-addon-for-elementor' ),
|
8 |
'required' => true,
|
9 |
'default_activation' => true,
|
10 |
];
|
modules/menus/module.php
CHANGED
@@ -9,9 +9,9 @@ class Module extends Module_Base {
|
|
9 |
public function __construct() {
|
10 |
parent::__construct();
|
11 |
|
12 |
-
|
13 |
}
|
14 |
-
|
15 |
public function get_name() {
|
16 |
return 'elementor-menus';
|
17 |
}
|
@@ -20,8 +20,8 @@ class Module extends Module_Base {
|
|
20 |
return [
|
21 |
'Default_Navmenu',
|
22 |
'Navmenu_Overlay',
|
23 |
-
'Mega_Menu',
|
24 |
];
|
25 |
}
|
26 |
-
|
27 |
-
}
|
9 |
public function __construct() {
|
10 |
parent::__construct();
|
11 |
|
12 |
+
// $this->add_actions();
|
13 |
}
|
14 |
+
|
15 |
public function get_name() {
|
16 |
return 'elementor-menus';
|
17 |
}
|
20 |
return [
|
21 |
'Default_Navmenu',
|
22 |
'Navmenu_Overlay',
|
23 |
+
'Mega_Menu',
|
24 |
];
|
25 |
}
|
26 |
+
|
27 |
+
}
|
modules/menus/widgets/default-navmenu.php
CHANGED
@@ -8,7 +8,9 @@ use Elementor\Group_Control_Typography;
|
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
12 |
|
13 |
/**
|
14 |
* Elementor Elementor Navbar
|
@@ -18,15 +20,15 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
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 |
}
|
27 |
|
28 |
public function get_title() {
|
29 |
-
return __( 'Default Navmenu', 'elementor
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
@@ -38,55 +40,53 @@ class Default_Navmenu extends Widget_Base {
|
|
38 |
}
|
39 |
|
40 |
protected function _register_controls() {
|
41 |
-
|
42 |
-
|
43 |
$this->start_controls_section(
|
44 |
'section_content',
|
45 |
[
|
46 |
-
'label' => __( 'Navigation', 'elementor
|
47 |
]
|
48 |
);
|
49 |
-
|
50 |
$this->add_control(
|
51 |
'el_nav_menu',
|
52 |
[
|
53 |
-
'label' => __( 'Select Menu', 'elementor
|
54 |
-
'type' => Controls_Manager::SELECT,
|
55 |
-
'options' => navmenu_navbar_menu_choices(),
|
56 |
'default' => '',
|
57 |
]
|
58 |
);
|
59 |
-
|
60 |
$this->add_control(
|
61 |
'el_menu_location',
|
62 |
[
|
63 |
-
'label' => __( 'Menu Location', 'elementor
|
64 |
-
'description' => __( 'Select a location for your menu. This option facilitate the ability to create up to 2 mobile enabled menu locations', 'elementor
|
65 |
-
'type' => Controls_Manager::SELECT,
|
66 |
-
|
67 |
-
'
|
68 |
-
'secondary' => __( 'Secondary', 'elementor' ),
|
69 |
],
|
70 |
'default' => 'primary',
|
71 |
]
|
72 |
);
|
73 |
-
|
74 |
$this->add_responsive_control(
|
75 |
'align',
|
76 |
[
|
77 |
-
'label' => __( 'Navbar/Toggle Alignment', 'elementor
|
78 |
'type' => Controls_Manager::CHOOSE,
|
79 |
'options' => [
|
80 |
'left' => [
|
81 |
-
'title' => __( 'Left', 'elementor
|
82 |
'icon' => 'fa fa-align-left',
|
83 |
],
|
84 |
'center' => [
|
85 |
-
'title' => __( 'Center', 'elementor
|
86 |
'icon' => 'fa fa-align-center',
|
87 |
],
|
88 |
'right' => [
|
89 |
-
'title' => __( 'Right', 'elementor
|
90 |
'icon' => 'fa fa-align-right',
|
91 |
],
|
92 |
],
|
@@ -98,19 +98,19 @@ class Default_Navmenu extends Widget_Base {
|
|
98 |
$this->add_responsive_control(
|
99 |
'item_align',
|
100 |
[
|
101 |
-
'label' => __( 'Mobile Item Alignment', 'elementor
|
102 |
'type' => Controls_Manager::CHOOSE,
|
103 |
'options' => [
|
104 |
'left' => [
|
105 |
-
'title' => __( 'Left', 'elementor
|
106 |
'icon' => 'fa fa-align-left',
|
107 |
],
|
108 |
'center' => [
|
109 |
-
'title' => __( 'Center', 'elementor
|
110 |
'icon' => 'fa fa-align-center',
|
111 |
],
|
112 |
'right' => [
|
113 |
-
'title' => __( 'Right', 'elementor
|
114 |
'icon' => 'fa fa-align-right',
|
115 |
],
|
116 |
],
|
@@ -124,7 +124,7 @@ class Default_Navmenu extends Widget_Base {
|
|
124 |
$this->add_control(
|
125 |
'text_padding',
|
126 |
[
|
127 |
-
'label' => __( 'Text Padding - Default 1em', 'elementor
|
128 |
'type' => Controls_Manager::DIMENSIONS,
|
129 |
'size_units' => [ 'px', 'em', '%' ],
|
130 |
'selectors' => [
|
@@ -134,30 +134,30 @@ class Default_Navmenu extends Widget_Base {
|
|
134 |
);
|
135 |
|
136 |
$this->end_controls_section();
|
137 |
-
|
138 |
$this->start_controls_section(
|
139 |
'submenu_content',
|
140 |
[
|
141 |
-
'label' => __( 'Submenu', 'elementor
|
142 |
]
|
143 |
);
|
144 |
-
|
145 |
$this->add_responsive_control(
|
146 |
'submenu_align',
|
147 |
[
|
148 |
-
'label' => __( 'Item Alignment', 'elementor
|
149 |
'type' => Controls_Manager::CHOOSE,
|
150 |
'options' => [
|
151 |
'left' => [
|
152 |
-
'title' => __( 'Left', 'elementor
|
153 |
'icon' => 'fa fa-align-left',
|
154 |
],
|
155 |
'center' => [
|
156 |
-
'title' => __( 'Center', 'elementor
|
157 |
'icon' => 'fa fa-align-center',
|
158 |
],
|
159 |
'right' => [
|
160 |
-
'title' => __( 'Right', 'elementor
|
161 |
'icon' => 'fa fa-align-right',
|
162 |
],
|
163 |
],
|
@@ -167,11 +167,11 @@ class Default_Navmenu extends Widget_Base {
|
|
167 |
],
|
168 |
]
|
169 |
);
|
170 |
-
|
171 |
$this->add_control(
|
172 |
'sub_padding',
|
173 |
[
|
174 |
-
'label' => __( 'Item Padding', 'elementor
|
175 |
'type' => Controls_Manager::DIMENSIONS,
|
176 |
'size_units' => [ 'px', 'em', '%' ],
|
177 |
'selectors' => [
|
@@ -185,21 +185,21 @@ class Default_Navmenu extends Widget_Base {
|
|
185 |
$this->start_controls_section(
|
186 |
'section_menu_style',
|
187 |
[
|
188 |
-
'label' => __( 'Navbar', 'elementor
|
189 |
'tab' => Controls_Manager::TAB_STYLE,
|
190 |
]
|
191 |
);
|
192 |
-
|
193 |
$this->add_control(
|
194 |
'nav_bar_bg',
|
195 |
[
|
196 |
-
'label' => __( 'Navbar Background', 'elementor
|
197 |
'type' => Controls_Manager::COLOR,
|
198 |
'scheme' => [
|
199 |
'type' => Scheme_Color::get_type(),
|
200 |
'value' => Scheme_Color::COLOR_1,
|
201 |
],
|
202 |
-
'default'
|
203 |
'selectors' => [
|
204 |
'{{WRAPPER}} .elementor-menu' => 'background-color: {{VALUE}};',
|
205 |
],
|
@@ -209,39 +209,39 @@ class Default_Navmenu extends Widget_Base {
|
|
209 |
$this->add_control(
|
210 |
'menu_link_color',
|
211 |
[
|
212 |
-
'label' => __( 'Link Color', 'elementor
|
213 |
'type' => Controls_Manager::COLOR,
|
214 |
'scheme' => [
|
215 |
'type' => Scheme_Color::get_type(),
|
216 |
'value' => Scheme_Color::COLOR_1,
|
217 |
],
|
218 |
-
'default'
|
219 |
'selectors' => [
|
220 |
'{{WRAPPER}} .elementor-nav-menu .menu-item a' => 'color: {{VALUE}};',
|
221 |
],
|
222 |
]
|
223 |
);
|
224 |
-
|
225 |
$this->add_control(
|
226 |
'menu_link_bg',
|
227 |
[
|
228 |
-
'label' => __( 'Background', 'elementor
|
229 |
'type' => Controls_Manager::COLOR,
|
230 |
'scheme' => [
|
231 |
'type' => Scheme_Color::get_type(),
|
232 |
'value' => Scheme_Color::COLOR_1,
|
233 |
],
|
234 |
-
'default'
|
235 |
'selectors' => [
|
236 |
'{{WRAPPER}} .elementor-nav-menu .menu-item a' => 'background-color: {{VALUE}};',
|
237 |
],
|
238 |
]
|
239 |
);
|
240 |
-
|
241 |
$this->add_control(
|
242 |
'menu_link_hover_color',
|
243 |
[
|
244 |
-
'label' => __( 'Link Color', 'elementor
|
245 |
'type' => Controls_Manager::COLOR,
|
246 |
'scheme' => [
|
247 |
'type' => Scheme_Color::get_type(),
|
@@ -252,11 +252,11 @@ class Default_Navmenu extends Widget_Base {
|
|
252 |
],
|
253 |
]
|
254 |
);
|
255 |
-
|
256 |
$this->add_control(
|
257 |
'link_hover_bg_color',
|
258 |
[
|
259 |
-
'label' => __( 'Background Color', 'elementor
|
260 |
'type' => Controls_Manager::COLOR,
|
261 |
'scheme' => [
|
262 |
'type' => Scheme_Color::get_type(),
|
@@ -272,7 +272,7 @@ class Default_Navmenu extends Widget_Base {
|
|
272 |
Group_Control_Border::get_type(),
|
273 |
[
|
274 |
'name' => 'menu_border',
|
275 |
-
'label' => __( 'Border', 'elementor
|
276 |
'default' => '1px',
|
277 |
'selector' => '{{WRAPPER}} .elementor-nav-menu .menu-item a',
|
278 |
]
|
@@ -281,7 +281,7 @@ class Default_Navmenu extends Widget_Base {
|
|
281 |
$this->add_control(
|
282 |
'menu_radius',
|
283 |
[
|
284 |
-
'label' => __( 'Border Radius', 'elementor
|
285 |
'type' => Controls_Manager::DIMENSIONS,
|
286 |
'size_units' => [ 'px', '%' ],
|
287 |
'selectors' => [
|
@@ -291,20 +291,20 @@ class Default_Navmenu extends Widget_Base {
|
|
291 |
);
|
292 |
|
293 |
$this->end_controls_section();
|
294 |
-
|
295 |
$this->start_controls_section(
|
296 |
'active_color',
|
297 |
[
|
298 |
-
'label' => __( 'Current/Active', 'elementor
|
299 |
'type' => Controls_Manager::SECTION,
|
300 |
'tab' => Controls_Manager::TAB_STYLE,
|
301 |
]
|
302 |
);
|
303 |
-
|
304 |
$this->add_control(
|
305 |
'menu_link_active_color',
|
306 |
[
|
307 |
-
'label' => __( 'Active Color', 'elementor
|
308 |
'type' => Controls_Manager::COLOR,
|
309 |
'scheme' => [
|
310 |
'type' => Scheme_Color::get_type(),
|
@@ -315,11 +315,11 @@ class Default_Navmenu extends Widget_Base {
|
|
315 |
],
|
316 |
]
|
317 |
);
|
318 |
-
|
319 |
$this->add_control(
|
320 |
'link_active_bg_color',
|
321 |
[
|
322 |
-
'label' => __( 'Active Background', 'elementor
|
323 |
'type' => Controls_Manager::COLOR,
|
324 |
'scheme' => [
|
325 |
'type' => Scheme_Color::get_type(),
|
@@ -330,11 +330,11 @@ class Default_Navmenu extends Widget_Base {
|
|
330 |
],
|
331 |
]
|
332 |
);
|
333 |
-
|
334 |
$this->add_control(
|
335 |
'active_hover_color',
|
336 |
[
|
337 |
-
'label' => __( 'Active Link', 'elementor
|
338 |
'type' => Controls_Manager::COLOR,
|
339 |
'scheme' => [
|
340 |
'type' => Scheme_Color::get_type(),
|
@@ -345,11 +345,11 @@ class Default_Navmenu extends Widget_Base {
|
|
345 |
],
|
346 |
]
|
347 |
);
|
348 |
-
|
349 |
$this->add_control(
|
350 |
'active_hover_bg_color',
|
351 |
[
|
352 |
-
'label' => __( 'Active Background', 'elementor
|
353 |
'type' => Controls_Manager::COLOR,
|
354 |
'scheme' => [
|
355 |
'type' => Scheme_Color::get_type(),
|
@@ -360,12 +360,12 @@ class Default_Navmenu extends Widget_Base {
|
|
360 |
],
|
361 |
]
|
362 |
);
|
363 |
-
|
364 |
$this->add_group_control(
|
365 |
Group_Control_Border::get_type(),
|
366 |
[
|
367 |
'name' => 'active_border',
|
368 |
-
'label' => __( 'Border', 'elementor
|
369 |
'default' => '1px',
|
370 |
'selector' => '{{WRAPPER}} .elementor-nav-menu .current-menu-item > a, .elementor-nav-menu .current_page_item > a',
|
371 |
]
|
@@ -374,7 +374,7 @@ class Default_Navmenu extends Widget_Base {
|
|
374 |
$this->add_control(
|
375 |
'active_radius',
|
376 |
[
|
377 |
-
'label' => __( 'Border Radius', 'elementor
|
378 |
'type' => Controls_Manager::DIMENSIONS,
|
379 |
'size_units' => [ 'px', '%' ],
|
380 |
'selectors' => [
|
@@ -382,54 +382,54 @@ class Default_Navmenu extends Widget_Base {
|
|
382 |
],
|
383 |
]
|
384 |
);
|
385 |
-
|
386 |
$this->end_controls_section();
|
387 |
-
|
388 |
$this->start_controls_section(
|
389 |
'submenu_color',
|
390 |
[
|
391 |
-
'label' => __( 'Submenu', 'elementor
|
392 |
'type' => Controls_Manager::SECTION,
|
393 |
'tab' => Controls_Manager::TAB_STYLE,
|
394 |
]
|
395 |
);
|
396 |
-
|
397 |
$this->add_control(
|
398 |
'submenu_link_color',
|
399 |
[
|
400 |
-
'label' => __( 'Submenu Links', 'elementor
|
401 |
'type' => Controls_Manager::COLOR,
|
402 |
'scheme' => [
|
403 |
'type' => Scheme_Color::get_type(),
|
404 |
'value' => Scheme_Color::COLOR_1,
|
405 |
],
|
406 |
-
'default'
|
407 |
'selectors' => [
|
408 |
'{{WRAPPER}} .elementor-nav-menu .sub-menu .menu-item a' => 'color: {{VALUE}};',
|
409 |
],
|
410 |
]
|
411 |
);
|
412 |
-
|
413 |
$this->add_control(
|
414 |
'submenu_link_bg',
|
415 |
[
|
416 |
-
'label' => __( 'Submenu Background', 'elementor
|
417 |
'type' => Controls_Manager::COLOR,
|
418 |
'scheme' => [
|
419 |
'type' => Scheme_Color::get_type(),
|
420 |
'value' => Scheme_Color::COLOR_1,
|
421 |
],
|
422 |
-
'default'
|
423 |
'selectors' => [
|
424 |
'{{WRAPPER}} .elementor-nav-menu .sub-menu .menu-item a' => 'background-color: {{VALUE}};',
|
425 |
],
|
426 |
]
|
427 |
);
|
428 |
-
|
429 |
$this->add_control(
|
430 |
'submenu_link_hover',
|
431 |
[
|
432 |
-
'label' => __( 'Submenu Link Hover', 'elementor
|
433 |
'type' => Controls_Manager::COLOR,
|
434 |
'scheme' => [
|
435 |
'type' => Scheme_Color::get_type(),
|
@@ -440,11 +440,11 @@ class Default_Navmenu extends Widget_Base {
|
|
440 |
],
|
441 |
]
|
442 |
);
|
443 |
-
|
444 |
$this->add_control(
|
445 |
'submenu_hover_bg_color',
|
446 |
[
|
447 |
-
'label' => __( 'Submenu Hover BG', 'elementor
|
448 |
'type' => Controls_Manager::COLOR,
|
449 |
'scheme' => [
|
450 |
'type' => Scheme_Color::get_type(),
|
@@ -455,12 +455,12 @@ class Default_Navmenu extends Widget_Base {
|
|
455 |
],
|
456 |
]
|
457 |
);
|
458 |
-
|
459 |
$this->add_group_control(
|
460 |
Group_Control_Border::get_type(),
|
461 |
[
|
462 |
'name' => 'submenu_border',
|
463 |
-
'label' => __( 'Border', 'elementor
|
464 |
'default' => '1px',
|
465 |
'selector' => '{{WRAPPER}} .elementor-nav-menu .sub-menu .menu-item a',
|
466 |
]
|
@@ -469,7 +469,7 @@ class Default_Navmenu extends Widget_Base {
|
|
469 |
$this->add_control(
|
470 |
'submenu_radius',
|
471 |
[
|
472 |
-
'label' => __( 'Border Radius', 'elementor
|
473 |
'type' => Controls_Manager::DIMENSIONS,
|
474 |
'size_units' => [ 'px', '%' ],
|
475 |
'selectors' => [
|
@@ -477,22 +477,22 @@ class Default_Navmenu extends Widget_Base {
|
|
477 |
],
|
478 |
]
|
479 |
);
|
480 |
-
|
481 |
$this->end_controls_section();
|
482 |
-
|
483 |
$this->start_controls_section(
|
484 |
'menu_toggle',
|
485 |
[
|
486 |
-
'label' => __( 'Mobile Toggle', 'elementor
|
487 |
'type' => Controls_Manager::SECTION,
|
488 |
'tab' => Controls_Manager::TAB_STYLE,
|
489 |
]
|
490 |
);
|
491 |
-
|
492 |
$this->add_control(
|
493 |
'toggle_icon_color',
|
494 |
[
|
495 |
-
'label' => __( 'Icon Color', 'elementor
|
496 |
'type' => Controls_Manager::COLOR,
|
497 |
'scheme' => [
|
498 |
'type' => Scheme_Color::get_type(),
|
@@ -504,11 +504,11 @@ class Default_Navmenu extends Widget_Base {
|
|
504 |
],
|
505 |
]
|
506 |
);
|
507 |
-
|
508 |
$this->add_control(
|
509 |
'toggle_bg_color',
|
510 |
[
|
511 |
-
'label' => __( 'Background Color', 'elementor
|
512 |
'type' => Controls_Manager::COLOR,
|
513 |
'scheme' => [
|
514 |
'type' => Scheme_Color::get_type(),
|
@@ -520,11 +520,11 @@ class Default_Navmenu extends Widget_Base {
|
|
520 |
],
|
521 |
]
|
522 |
);
|
523 |
-
|
524 |
$this->add_control(
|
525 |
'toggle_icon_hover',
|
526 |
[
|
527 |
-
'label' => __( 'Icon Hover', 'elementor
|
528 |
'type' => Controls_Manager::COLOR,
|
529 |
'scheme' => [
|
530 |
'type' => Scheme_Color::get_type(),
|
@@ -535,11 +535,11 @@ class Default_Navmenu extends Widget_Base {
|
|
535 |
],
|
536 |
]
|
537 |
);
|
538 |
-
|
539 |
$this->add_control(
|
540 |
'toggle_bg_hover',
|
541 |
[
|
542 |
-
'label' => __( 'Background Hover', 'elementor
|
543 |
'type' => Controls_Manager::COLOR,
|
544 |
'scheme' => [
|
545 |
'type' => Scheme_Color::get_type(),
|
@@ -550,11 +550,11 @@ class Default_Navmenu extends Widget_Base {
|
|
550 |
],
|
551 |
]
|
552 |
);
|
553 |
-
|
554 |
$this->add_control(
|
555 |
'toggle_text_padding',
|
556 |
[
|
557 |
-
'label' => __( 'Text Padding - Default 1em', 'elementor' ),
|
558 |
'type' => Controls_Manager::DIMENSIONS,
|
559 |
'size_units' => [ 'px', 'em', '%' ],
|
560 |
'selectors' => [
|
@@ -562,12 +562,12 @@ class Default_Navmenu extends Widget_Base {
|
|
562 |
],
|
563 |
]
|
564 |
);
|
565 |
-
|
566 |
$this->add_group_control(
|
567 |
Group_Control_Border::get_type(),
|
568 |
[
|
569 |
'name' => 'toggle_border',
|
570 |
-
'label' => __( 'Border', 'elementor
|
571 |
'default' => '1px',
|
572 |
'selector' => '{{WRAPPER}} .elementor-menu-toggle',
|
573 |
]
|
@@ -576,79 +576,83 @@ class Default_Navmenu extends Widget_Base {
|
|
576 |
$this->add_control(
|
577 |
'toggle_border_radius',
|
578 |
[
|
579 |
-
'label' => __( 'Border Radius', 'elementor' ),
|
580 |
'type' => Controls_Manager::DIMENSIONS,
|
581 |
'size_units' => [ 'px', '%' ],
|
582 |
'selectors' => [
|
583 |
'{{WRAPPER}} .elementor-menu-toggle' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
584 |
],
|
585 |
]
|
586 |
-
);
|
587 |
-
|
588 |
$this->end_controls_section();
|
589 |
-
|
590 |
$this->start_controls_section(
|
591 |
'menu_typography',
|
592 |
[
|
593 |
-
'label' => __( 'Typography', 'elementor' ),
|
594 |
'type' => Controls_Manager::SECTION,
|
595 |
'tab' => Controls_Manager::TAB_STYLE,
|
596 |
]
|
597 |
);
|
598 |
-
|
599 |
$this->add_group_control(
|
600 |
Group_Control_Typography::get_type(),
|
601 |
[
|
602 |
'name' => 'menu_typography',
|
603 |
-
'label' => __( 'Typography', 'elementor
|
604 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
605 |
'selector' => '{{WRAPPER}} .elementor-nav-menu .menu-item',
|
606 |
]
|
607 |
);
|
608 |
-
|
609 |
$this->end_controls_section();
|
610 |
}
|
611 |
|
612 |
protected function render() {
|
613 |
-
|
614 |
$settings = $this->get_settings();
|
615 |
$menu_location = $settings['el_menu_location'];
|
616 |
// Get menu
|
617 |
$nav_menu = ! empty( $settings['el_nav_menu'] ) ? wp_get_nav_menu_object( $settings['el_nav_menu'] ) : false;
|
618 |
|
619 |
-
if (
|
620 |
return;
|
621 |
-
|
|
|
622 |
$nav_menu_args = array(
|
623 |
-
'fallback_cb'
|
624 |
-
'container'
|
625 |
-
'menu_id'
|
626 |
-
'menu_class'
|
627 |
-
'theme_location'
|
628 |
-
'menu'
|
629 |
-
'echo'
|
630 |
-
'depth'
|
631 |
-
'walker'
|
632 |
-
);
|
633 |
-
|
634 |
echo '<div id="elementor-header-' . $menu_location . '" class="elementor-header">';
|
635 |
?>
|
636 |
<button id="elementor-menu-toggle" class="elementor-menu-toggle"><i class="fa fa-navicon"></i></button>
|
637 |
<div id="elementor-menu" class="elementor-menu">
|
638 |
|
639 |
-
<nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" id="elementor-navigation" class="elementor-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Elementor Menu', 'elementor
|
640 |
-
<?php
|
641 |
-
wp_nav_menu(
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
|
|
|
|
|
|
649 |
</div>
|
650 |
</div>
|
651 |
-
<?php
|
652 |
}
|
653 |
|
654 |
protected function _content_template() {}
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly
|
13 |
+
}
|
14 |
|
15 |
/**
|
16 |
* Elementor Elementor Navbar
|
20 |
* @since 1.0.0
|
21 |
*/
|
22 |
class Default_Navmenu extends Widget_Base {
|
23 |
+
|
24 |
protected $_has_template_content = false;
|
25 |
+
|
26 |
public function get_name() {
|
27 |
return 'default-navmenu';
|
28 |
}
|
29 |
|
30 |
public function get_title() {
|
31 |
+
return __( 'Default Navmenu', 'navmenu-addon-for-elementor' );
|
32 |
}
|
33 |
|
34 |
public function get_icon() {
|
40 |
}
|
41 |
|
42 |
protected function _register_controls() {
|
43 |
+
// $menus = $this->get_menus();
|
44 |
+
|
45 |
$this->start_controls_section(
|
46 |
'section_content',
|
47 |
[
|
48 |
+
'label' => __( 'Navigation', 'navmenu-addon-for-elementor' ),
|
49 |
]
|
50 |
);
|
51 |
+
|
52 |
$this->add_control(
|
53 |
'el_nav_menu',
|
54 |
[
|
55 |
+
'label' => __( 'Select Menu', 'navmenu-addon-for-elementor' ),
|
56 |
+
'type' => Controls_Manager::SELECT, 'options' => navmenu_navbar_menu_choices(),
|
|
|
57 |
'default' => '',
|
58 |
]
|
59 |
);
|
60 |
+
|
61 |
$this->add_control(
|
62 |
'el_menu_location',
|
63 |
[
|
64 |
+
'label' => __( 'Menu Location', 'navmenu-addon-for-elementor' ),
|
65 |
+
'description' => __( 'Select a location for your menu. This option facilitate the ability to create up to 2 mobile enabled menu locations', 'navmenu-addon-for-elementor' ),
|
66 |
+
'type' => Controls_Manager::SELECT, 'options' => [
|
67 |
+
'primary' => __( 'Primary', 'navmenu-addon-for-elementor' ),
|
68 |
+
'secondary' => __( 'Secondary', 'navmenu-addon-for-elementor' ),
|
|
|
69 |
],
|
70 |
'default' => 'primary',
|
71 |
]
|
72 |
);
|
73 |
+
|
74 |
$this->add_responsive_control(
|
75 |
'align',
|
76 |
[
|
77 |
+
'label' => __( 'Navbar/Toggle Alignment', 'navmenu-addon-for-elementor' ),
|
78 |
'type' => Controls_Manager::CHOOSE,
|
79 |
'options' => [
|
80 |
'left' => [
|
81 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
82 |
'icon' => 'fa fa-align-left',
|
83 |
],
|
84 |
'center' => [
|
85 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
86 |
'icon' => 'fa fa-align-center',
|
87 |
],
|
88 |
'right' => [
|
89 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
90 |
'icon' => 'fa fa-align-right',
|
91 |
],
|
92 |
],
|
98 |
$this->add_responsive_control(
|
99 |
'item_align',
|
100 |
[
|
101 |
+
'label' => __( 'Mobile Item Alignment', 'navmenu-addon-for-elementor' ),
|
102 |
'type' => Controls_Manager::CHOOSE,
|
103 |
'options' => [
|
104 |
'left' => [
|
105 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
106 |
'icon' => 'fa fa-align-left',
|
107 |
],
|
108 |
'center' => [
|
109 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
110 |
'icon' => 'fa fa-align-center',
|
111 |
],
|
112 |
'right' => [
|
113 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
114 |
'icon' => 'fa fa-align-right',
|
115 |
],
|
116 |
],
|
124 |
$this->add_control(
|
125 |
'text_padding',
|
126 |
[
|
127 |
+
'label' => __( 'Text Padding - Default 1em', 'navmenu-addon-for-elementor' ),
|
128 |
'type' => Controls_Manager::DIMENSIONS,
|
129 |
'size_units' => [ 'px', 'em', '%' ],
|
130 |
'selectors' => [
|
134 |
);
|
135 |
|
136 |
$this->end_controls_section();
|
137 |
+
|
138 |
$this->start_controls_section(
|
139 |
'submenu_content',
|
140 |
[
|
141 |
+
'label' => __( 'Submenu', 'navmenu-addon-for-elementor' ),
|
142 |
]
|
143 |
);
|
144 |
+
|
145 |
$this->add_responsive_control(
|
146 |
'submenu_align',
|
147 |
[
|
148 |
+
'label' => __( 'Item Alignment', 'navmenu-addon-for-elementor' ),
|
149 |
'type' => Controls_Manager::CHOOSE,
|
150 |
'options' => [
|
151 |
'left' => [
|
152 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
153 |
'icon' => 'fa fa-align-left',
|
154 |
],
|
155 |
'center' => [
|
156 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
157 |
'icon' => 'fa fa-align-center',
|
158 |
],
|
159 |
'right' => [
|
160 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
161 |
'icon' => 'fa fa-align-right',
|
162 |
],
|
163 |
],
|
167 |
],
|
168 |
]
|
169 |
);
|
170 |
+
|
171 |
$this->add_control(
|
172 |
'sub_padding',
|
173 |
[
|
174 |
+
'label' => __( 'Item Padding', 'navmenu-addon-for-elementor' ),
|
175 |
'type' => Controls_Manager::DIMENSIONS,
|
176 |
'size_units' => [ 'px', 'em', '%' ],
|
177 |
'selectors' => [
|
185 |
$this->start_controls_section(
|
186 |
'section_menu_style',
|
187 |
[
|
188 |
+
'label' => __( 'Navbar', 'navmenu-addon-for-elementor' ),
|
189 |
'tab' => Controls_Manager::TAB_STYLE,
|
190 |
]
|
191 |
);
|
192 |
+
|
193 |
$this->add_control(
|
194 |
'nav_bar_bg',
|
195 |
[
|
196 |
+
'label' => __( 'Navbar Background', 'navmenu-addon-for-elementor' ),
|
197 |
'type' => Controls_Manager::COLOR,
|
198 |
'scheme' => [
|
199 |
'type' => Scheme_Color::get_type(),
|
200 |
'value' => Scheme_Color::COLOR_1,
|
201 |
],
|
202 |
+
'default' => '#00215e',
|
203 |
'selectors' => [
|
204 |
'{{WRAPPER}} .elementor-menu' => 'background-color: {{VALUE}};',
|
205 |
],
|
209 |
$this->add_control(
|
210 |
'menu_link_color',
|
211 |
[
|
212 |
+
'label' => __( 'Link Color', 'navmenu-addon-for-elementor' ),
|
213 |
'type' => Controls_Manager::COLOR,
|
214 |
'scheme' => [
|
215 |
'type' => Scheme_Color::get_type(),
|
216 |
'value' => Scheme_Color::COLOR_1,
|
217 |
],
|
218 |
+
'default' => '#ffffff',
|
219 |
'selectors' => [
|
220 |
'{{WRAPPER}} .elementor-nav-menu .menu-item a' => 'color: {{VALUE}};',
|
221 |
],
|
222 |
]
|
223 |
);
|
224 |
+
|
225 |
$this->add_control(
|
226 |
'menu_link_bg',
|
227 |
[
|
228 |
+
'label' => __( 'Background', 'navmenu-addon-for-elementor' ),
|
229 |
'type' => Controls_Manager::COLOR,
|
230 |
'scheme' => [
|
231 |
'type' => Scheme_Color::get_type(),
|
232 |
'value' => Scheme_Color::COLOR_1,
|
233 |
],
|
234 |
+
'default' => '#00215e',
|
235 |
'selectors' => [
|
236 |
'{{WRAPPER}} .elementor-nav-menu .menu-item a' => 'background-color: {{VALUE}};',
|
237 |
],
|
238 |
]
|
239 |
);
|
240 |
+
|
241 |
$this->add_control(
|
242 |
'menu_link_hover_color',
|
243 |
[
|
244 |
+
'label' => __( 'Link Color', 'navmenu-addon-for-elementor' ),
|
245 |
'type' => Controls_Manager::COLOR,
|
246 |
'scheme' => [
|
247 |
'type' => Scheme_Color::get_type(),
|
252 |
],
|
253 |
]
|
254 |
);
|
255 |
+
|
256 |
$this->add_control(
|
257 |
'link_hover_bg_color',
|
258 |
[
|
259 |
+
'label' => __( 'Background Color', 'navmenu-addon-for-elementor' ),
|
260 |
'type' => Controls_Manager::COLOR,
|
261 |
'scheme' => [
|
262 |
'type' => Scheme_Color::get_type(),
|
272 |
Group_Control_Border::get_type(),
|
273 |
[
|
274 |
'name' => 'menu_border',
|
275 |
+
'label' => __( 'Border', 'navmenu-addon-for-elementor' ),
|
276 |
'default' => '1px',
|
277 |
'selector' => '{{WRAPPER}} .elementor-nav-menu .menu-item a',
|
278 |
]
|
281 |
$this->add_control(
|
282 |
'menu_radius',
|
283 |
[
|
284 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
285 |
'type' => Controls_Manager::DIMENSIONS,
|
286 |
'size_units' => [ 'px', '%' ],
|
287 |
'selectors' => [
|
291 |
);
|
292 |
|
293 |
$this->end_controls_section();
|
294 |
+
|
295 |
$this->start_controls_section(
|
296 |
'active_color',
|
297 |
[
|
298 |
+
'label' => __( 'Current/Active', 'navmenu-addon-for-elementor' ),
|
299 |
'type' => Controls_Manager::SECTION,
|
300 |
'tab' => Controls_Manager::TAB_STYLE,
|
301 |
]
|
302 |
);
|
303 |
+
|
304 |
$this->add_control(
|
305 |
'menu_link_active_color',
|
306 |
[
|
307 |
+
'label' => __( 'Active Color', 'navmenu-addon-for-elementor' ),
|
308 |
'type' => Controls_Manager::COLOR,
|
309 |
'scheme' => [
|
310 |
'type' => Scheme_Color::get_type(),
|
315 |
],
|
316 |
]
|
317 |
);
|
318 |
+
|
319 |
$this->add_control(
|
320 |
'link_active_bg_color',
|
321 |
[
|
322 |
+
'label' => __( 'Active Background', 'navmenu-addon-for-elementor' ),
|
323 |
'type' => Controls_Manager::COLOR,
|
324 |
'scheme' => [
|
325 |
'type' => Scheme_Color::get_type(),
|
330 |
],
|
331 |
]
|
332 |
);
|
333 |
+
|
334 |
$this->add_control(
|
335 |
'active_hover_color',
|
336 |
[
|
337 |
+
'label' => __( 'Active Link', 'navmenu-addon-for-elementor' ),
|
338 |
'type' => Controls_Manager::COLOR,
|
339 |
'scheme' => [
|
340 |
'type' => Scheme_Color::get_type(),
|
345 |
],
|
346 |
]
|
347 |
);
|
348 |
+
|
349 |
$this->add_control(
|
350 |
'active_hover_bg_color',
|
351 |
[
|
352 |
+
'label' => __( 'Active Background', 'navmenu-addon-for-elementor' ),
|
353 |
'type' => Controls_Manager::COLOR,
|
354 |
'scheme' => [
|
355 |
'type' => Scheme_Color::get_type(),
|
360 |
],
|
361 |
]
|
362 |
);
|
363 |
+
|
364 |
$this->add_group_control(
|
365 |
Group_Control_Border::get_type(),
|
366 |
[
|
367 |
'name' => 'active_border',
|
368 |
+
'label' => __( 'Border', 'navmenu-addon-for-elementor' ),
|
369 |
'default' => '1px',
|
370 |
'selector' => '{{WRAPPER}} .elementor-nav-menu .current-menu-item > a, .elementor-nav-menu .current_page_item > a',
|
371 |
]
|
374 |
$this->add_control(
|
375 |
'active_radius',
|
376 |
[
|
377 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
378 |
'type' => Controls_Manager::DIMENSIONS,
|
379 |
'size_units' => [ 'px', '%' ],
|
380 |
'selectors' => [
|
382 |
],
|
383 |
]
|
384 |
);
|
385 |
+
|
386 |
$this->end_controls_section();
|
387 |
+
|
388 |
$this->start_controls_section(
|
389 |
'submenu_color',
|
390 |
[
|
391 |
+
'label' => __( 'Submenu', 'navmenu-addon-for-elementor' ),
|
392 |
'type' => Controls_Manager::SECTION,
|
393 |
'tab' => Controls_Manager::TAB_STYLE,
|
394 |
]
|
395 |
);
|
396 |
+
|
397 |
$this->add_control(
|
398 |
'submenu_link_color',
|
399 |
[
|
400 |
+
'label' => __( 'Submenu Links', 'navmenu-addon-for-elementor' ),
|
401 |
'type' => Controls_Manager::COLOR,
|
402 |
'scheme' => [
|
403 |
'type' => Scheme_Color::get_type(),
|
404 |
'value' => Scheme_Color::COLOR_1,
|
405 |
],
|
406 |
+
'default' => '#ffffff',
|
407 |
'selectors' => [
|
408 |
'{{WRAPPER}} .elementor-nav-menu .sub-menu .menu-item a' => 'color: {{VALUE}};',
|
409 |
],
|
410 |
]
|
411 |
);
|
412 |
+
|
413 |
$this->add_control(
|
414 |
'submenu_link_bg',
|
415 |
[
|
416 |
+
'label' => __( 'Submenu Background', 'navmenu-addon-for-elementor' ),
|
417 |
'type' => Controls_Manager::COLOR,
|
418 |
'scheme' => [
|
419 |
'type' => Scheme_Color::get_type(),
|
420 |
'value' => Scheme_Color::COLOR_1,
|
421 |
],
|
422 |
+
'default' => '#00215e',
|
423 |
'selectors' => [
|
424 |
'{{WRAPPER}} .elementor-nav-menu .sub-menu .menu-item a' => 'background-color: {{VALUE}};',
|
425 |
],
|
426 |
]
|
427 |
);
|
428 |
+
|
429 |
$this->add_control(
|
430 |
'submenu_link_hover',
|
431 |
[
|
432 |
+
'label' => __( 'Submenu Link Hover', 'navmenu-addon-for-elementor' ),
|
433 |
'type' => Controls_Manager::COLOR,
|
434 |
'scheme' => [
|
435 |
'type' => Scheme_Color::get_type(),
|
440 |
],
|
441 |
]
|
442 |
);
|
443 |
+
|
444 |
$this->add_control(
|
445 |
'submenu_hover_bg_color',
|
446 |
[
|
447 |
+
'label' => __( 'Submenu Hover BG', 'navmenu-addon-for-elementor' ),
|
448 |
'type' => Controls_Manager::COLOR,
|
449 |
'scheme' => [
|
450 |
'type' => Scheme_Color::get_type(),
|
455 |
],
|
456 |
]
|
457 |
);
|
458 |
+
|
459 |
$this->add_group_control(
|
460 |
Group_Control_Border::get_type(),
|
461 |
[
|
462 |
'name' => 'submenu_border',
|
463 |
+
'label' => __( 'Border', 'navmenu-addon-for-elementor' ),
|
464 |
'default' => '1px',
|
465 |
'selector' => '{{WRAPPER}} .elementor-nav-menu .sub-menu .menu-item a',
|
466 |
]
|
469 |
$this->add_control(
|
470 |
'submenu_radius',
|
471 |
[
|
472 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
473 |
'type' => Controls_Manager::DIMENSIONS,
|
474 |
'size_units' => [ 'px', '%' ],
|
475 |
'selectors' => [
|
477 |
],
|
478 |
]
|
479 |
);
|
480 |
+
|
481 |
$this->end_controls_section();
|
482 |
+
|
483 |
$this->start_controls_section(
|
484 |
'menu_toggle',
|
485 |
[
|
486 |
+
'label' => __( 'Mobile Toggle', 'navmenu-addon-for-elementor' ),
|
487 |
'type' => Controls_Manager::SECTION,
|
488 |
'tab' => Controls_Manager::TAB_STYLE,
|
489 |
]
|
490 |
);
|
491 |
+
|
492 |
$this->add_control(
|
493 |
'toggle_icon_color',
|
494 |
[
|
495 |
+
'label' => __( 'Icon Color', 'navmenu-addon-for-elementor' ),
|
496 |
'type' => Controls_Manager::COLOR,
|
497 |
'scheme' => [
|
498 |
'type' => Scheme_Color::get_type(),
|
504 |
],
|
505 |
]
|
506 |
);
|
507 |
+
|
508 |
$this->add_control(
|
509 |
'toggle_bg_color',
|
510 |
[
|
511 |
+
'label' => __( 'Background Color', 'navmenu-addon-for-elementor' ),
|
512 |
'type' => Controls_Manager::COLOR,
|
513 |
'scheme' => [
|
514 |
'type' => Scheme_Color::get_type(),
|
520 |
],
|
521 |
]
|
522 |
);
|
523 |
+
|
524 |
$this->add_control(
|
525 |
'toggle_icon_hover',
|
526 |
[
|
527 |
+
'label' => __( 'Icon Hover', 'navmenu-addon-for-elementor' ),
|
528 |
'type' => Controls_Manager::COLOR,
|
529 |
'scheme' => [
|
530 |
'type' => Scheme_Color::get_type(),
|
535 |
],
|
536 |
]
|
537 |
);
|
538 |
+
|
539 |
$this->add_control(
|
540 |
'toggle_bg_hover',
|
541 |
[
|
542 |
+
'label' => __( 'Background Hover', 'navmenu-addon-for-elementor' ),
|
543 |
'type' => Controls_Manager::COLOR,
|
544 |
'scheme' => [
|
545 |
'type' => Scheme_Color::get_type(),
|
550 |
],
|
551 |
]
|
552 |
);
|
553 |
+
|
554 |
$this->add_control(
|
555 |
'toggle_text_padding',
|
556 |
[
|
557 |
+
'label' => __( 'Text Padding - Default 1em', 'navmenu-addon-for-elementor' ),
|
558 |
'type' => Controls_Manager::DIMENSIONS,
|
559 |
'size_units' => [ 'px', 'em', '%' ],
|
560 |
'selectors' => [
|
562 |
],
|
563 |
]
|
564 |
);
|
565 |
+
|
566 |
$this->add_group_control(
|
567 |
Group_Control_Border::get_type(),
|
568 |
[
|
569 |
'name' => 'toggle_border',
|
570 |
+
'label' => __( 'Border', 'navmenu-addon-for-elementor' ),
|
571 |
'default' => '1px',
|
572 |
'selector' => '{{WRAPPER}} .elementor-menu-toggle',
|
573 |
]
|
576 |
$this->add_control(
|
577 |
'toggle_border_radius',
|
578 |
[
|
579 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
580 |
'type' => Controls_Manager::DIMENSIONS,
|
581 |
'size_units' => [ 'px', '%' ],
|
582 |
'selectors' => [
|
583 |
'{{WRAPPER}} .elementor-menu-toggle' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
584 |
],
|
585 |
]
|
586 |
+
);
|
587 |
+
|
588 |
$this->end_controls_section();
|
589 |
+
|
590 |
$this->start_controls_section(
|
591 |
'menu_typography',
|
592 |
[
|
593 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
594 |
'type' => Controls_Manager::SECTION,
|
595 |
'tab' => Controls_Manager::TAB_STYLE,
|
596 |
]
|
597 |
);
|
598 |
+
|
599 |
$this->add_group_control(
|
600 |
Group_Control_Typography::get_type(),
|
601 |
[
|
602 |
'name' => 'menu_typography',
|
603 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
604 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
605 |
'selector' => '{{WRAPPER}} .elementor-nav-menu .menu-item',
|
606 |
]
|
607 |
);
|
608 |
+
|
609 |
$this->end_controls_section();
|
610 |
}
|
611 |
|
612 |
protected function render() {
|
613 |
+
|
614 |
$settings = $this->get_settings();
|
615 |
$menu_location = $settings['el_menu_location'];
|
616 |
// Get menu
|
617 |
$nav_menu = ! empty( $settings['el_nav_menu'] ) ? wp_get_nav_menu_object( $settings['el_nav_menu'] ) : false;
|
618 |
|
619 |
+
if ( ! $nav_menu ) {
|
620 |
return;
|
621 |
+
}
|
622 |
+
|
623 |
$nav_menu_args = array(
|
624 |
+
'fallback_cb' => false,
|
625 |
+
'container' => false,
|
626 |
+
'menu_id' => 'elementor-navmenu',
|
627 |
+
'menu_class' => 'elementor-nav-menu',
|
628 |
+
'theme_location' => 'default_navmenu', // creating a fake location for better functional control
|
629 |
+
'menu' => $nav_menu,
|
630 |
+
'echo' => true,
|
631 |
+
'depth' => 0,
|
632 |
+
'walker' => '',
|
633 |
+
);
|
634 |
+
|
635 |
echo '<div id="elementor-header-' . $menu_location . '" class="elementor-header">';
|
636 |
?>
|
637 |
<button id="elementor-menu-toggle" class="elementor-menu-toggle"><i class="fa fa-navicon"></i></button>
|
638 |
<div id="elementor-menu" class="elementor-menu">
|
639 |
|
640 |
+
<nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" id="elementor-navigation" class="elementor-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Elementor Menu', 'navmenu-addon-for-elementor' ); ?>">
|
641 |
+
<?php
|
642 |
+
wp_nav_menu(
|
643 |
+
apply_filters(
|
644 |
+
'widget_nav_menu_args',
|
645 |
+
$nav_menu_args,
|
646 |
+
$nav_menu,
|
647 |
+
$settings
|
648 |
+
)
|
649 |
+
);
|
650 |
+
?>
|
651 |
+
|
652 |
+
</nav>
|
653 |
</div>
|
654 |
</div>
|
655 |
+
<?php
|
656 |
}
|
657 |
|
658 |
protected function _content_template() {}
|
modules/menus/widgets/elementor-branding.php
CHANGED
@@ -8,7 +8,9 @@ use Elementor\Group_Control_Typography;
|
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
12 |
|
13 |
/**
|
14 |
* Elementor Elementor Navbar
|
@@ -18,13 +20,13 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
18 |
* @since 1.0.0
|
19 |
*/
|
20 |
class Elementor_Branding extends Widget_Base {
|
21 |
-
|
22 |
public function get_name() {
|
23 |
return 'elementor-branding';
|
24 |
}
|
25 |
|
26 |
public function get_title() {
|
27 |
-
return __( 'Branding', 'elementor
|
28 |
}
|
29 |
|
30 |
public function get_icon() {
|
@@ -36,59 +38,58 @@ class Elementor_Branding extends Widget_Base {
|
|
36 |
}
|
37 |
|
38 |
protected function _register_controls() {
|
39 |
-
|
40 |
-
|
41 |
$this->start_controls_section(
|
42 |
'section_content',
|
43 |
[
|
44 |
-
'label' => __( 'Branding', 'elementor
|
45 |
]
|
46 |
);
|
47 |
-
|
48 |
$this->add_control(
|
49 |
'el_site_branding',
|
50 |
[
|
51 |
-
'label' => __( 'Branding Type', 'elementor
|
52 |
-
'description' => __( 'Your theme must declare the "add_theme_support( \'custom-logo\')" for the logo to work', 'elementor
|
53 |
-
'type' => Controls_Manager::SELECT,
|
54 |
-
|
55 |
-
'
|
56 |
-
'logo' => __( 'Logo', 'elementor' ),
|
57 |
],
|
58 |
'default' => 'title',
|
59 |
]
|
60 |
);
|
61 |
-
|
62 |
$this->add_responsive_control(
|
63 |
'align',
|
64 |
[
|
65 |
-
'label' => __( 'Alignment', 'elementor
|
66 |
'type' => Controls_Manager::CHOOSE,
|
67 |
'options' => [
|
68 |
'left' => [
|
69 |
-
'title' => __( 'Left', 'elementor
|
70 |
'icon' => 'fa fa-align-left',
|
71 |
],
|
72 |
'center' => [
|
73 |
-
'title' => __( 'Center', 'elementor
|
74 |
'icon' => 'fa fa-align-center',
|
75 |
],
|
76 |
'right' => [
|
77 |
-
'title' => __( 'Right', 'elementor
|
78 |
'icon' => 'fa fa-align-right',
|
79 |
],
|
80 |
],
|
81 |
'prefix_class' => 'elementor%s-align-',
|
82 |
'default' => '',
|
83 |
]
|
84 |
-
);
|
85 |
|
86 |
$this->end_controls_section();
|
87 |
|
88 |
$this->start_controls_section(
|
89 |
'section_title_style',
|
90 |
[
|
91 |
-
'label' => __( 'Brand', 'elementor
|
92 |
'tab' => Controls_Manager::TAB_STYLE,
|
93 |
]
|
94 |
);
|
@@ -96,7 +97,7 @@ class Elementor_Branding extends Widget_Base {
|
|
96 |
$this->add_control(
|
97 |
'branding_title_color',
|
98 |
[
|
99 |
-
'label' => __( 'Title Color', 'elementor
|
100 |
'type' => Controls_Manager::COLOR,
|
101 |
'condition' => [
|
102 |
'el_site_branding' => 'title',
|
@@ -105,17 +106,17 @@ class Elementor_Branding extends Widget_Base {
|
|
105 |
'type' => Scheme_Color::get_type(),
|
106 |
'value' => Scheme_Color::COLOR_1,
|
107 |
],
|
108 |
-
'default'
|
109 |
'selectors' => [
|
110 |
'{{WRAPPER}} .elementor-branding .site-title a' => 'color: {{VALUE}};',
|
111 |
],
|
112 |
]
|
113 |
);
|
114 |
-
|
115 |
$this->add_control(
|
116 |
'branding_title_hover',
|
117 |
[
|
118 |
-
'label' => __( 'Hover', 'elementor
|
119 |
'type' => Controls_Manager::COLOR,
|
120 |
'condition' => [
|
121 |
'el_site_branding' => 'title',
|
@@ -133,7 +134,7 @@ class Elementor_Branding extends Widget_Base {
|
|
133 |
$this->add_control(
|
134 |
'title_padding',
|
135 |
[
|
136 |
-
'label' => __( 'Title Padding - Default 1em', 'elementor
|
137 |
'type' => Controls_Manager::DIMENSIONS,
|
138 |
'condition' => [
|
139 |
'el_site_branding' => 'title',
|
@@ -144,12 +145,12 @@ class Elementor_Branding extends Widget_Base {
|
|
144 |
],
|
145 |
]
|
146 |
);
|
147 |
-
|
148 |
$this->add_group_control(
|
149 |
Group_Control_Typography::get_type(),
|
150 |
[
|
151 |
'name' => 'title_typography',
|
152 |
-
'label' => __( 'Typography', 'elementor
|
153 |
'condition' => [
|
154 |
'el_site_branding' => 'title',
|
155 |
],
|
@@ -157,11 +158,11 @@ class Elementor_Branding extends Widget_Base {
|
|
157 |
'selector' => '{{WRAPPER}} .elementor-branding .site-title',
|
158 |
]
|
159 |
);
|
160 |
-
|
161 |
$this->add_control(
|
162 |
'logo_padding',
|
163 |
[
|
164 |
-
'label' => __( 'Title Padding - Default 1em', 'elementor
|
165 |
'type' => Controls_Manager::DIMENSIONS,
|
166 |
'condition' => [
|
167 |
'el_site_branding' => 'logo',
|
@@ -174,22 +175,22 @@ class Elementor_Branding extends Widget_Base {
|
|
174 |
);
|
175 |
|
176 |
$this->end_controls_section();
|
177 |
-
|
178 |
$this->start_controls_section(
|
179 |
'section_desc_style',
|
180 |
[
|
181 |
-
'label' => __( 'Description Options', 'elementor
|
182 |
'tab' => Controls_Manager::TAB_STYLE,
|
183 |
'condition' => [
|
184 |
'el_site_branding' => 'title',
|
185 |
],
|
186 |
]
|
187 |
);
|
188 |
-
|
189 |
$this->add_control(
|
190 |
'branding_description_color',
|
191 |
[
|
192 |
-
'label' => __( 'Description Color', 'elementor
|
193 |
'type' => Controls_Manager::COLOR,
|
194 |
'condition' => [
|
195 |
'el_site_branding' => 'title',
|
@@ -203,11 +204,11 @@ class Elementor_Branding extends Widget_Base {
|
|
203 |
],
|
204 |
]
|
205 |
);
|
206 |
-
|
207 |
$this->add_control(
|
208 |
'desc_padding',
|
209 |
[
|
210 |
-
'label' => __( 'Description Padding - Default 1em', 'elementor
|
211 |
'type' => Controls_Manager::DIMENSIONS,
|
212 |
'condition' => [
|
213 |
'el_site_branding' => 'title',
|
@@ -218,12 +219,12 @@ class Elementor_Branding extends Widget_Base {
|
|
218 |
],
|
219 |
]
|
220 |
);
|
221 |
-
|
222 |
$this->add_group_control(
|
223 |
Group_Control_Typography::get_type(),
|
224 |
[
|
225 |
'name' => 'desc_typography',
|
226 |
-
'label' => __( 'Typography', 'elementor
|
227 |
'condition' => [
|
228 |
'el_site_branding' => 'title',
|
229 |
],
|
@@ -231,23 +232,22 @@ class Elementor_Branding extends Widget_Base {
|
|
231 |
'selector' => '{{WRAPPER}} .elementor-branding .site-description',
|
232 |
]
|
233 |
);
|
234 |
-
|
235 |
$this->end_controls_section();
|
236 |
-
|
237 |
|
238 |
$this->start_controls_section(
|
239 |
'section_branding_borders',
|
240 |
[
|
241 |
-
'label' => __( 'Branding Border', 'elementor
|
242 |
'tab' => Controls_Manager::TAB_STYLE,
|
243 |
]
|
244 |
);
|
245 |
-
|
246 |
$this->add_group_control(
|
247 |
Group_Control_Border::get_type(),
|
248 |
[
|
249 |
'name' => 'border',
|
250 |
-
'label' => __( 'Border', 'elementor
|
251 |
'default' => '1px',
|
252 |
'selector' => '{{WRAPPER}} .elementor-branding',
|
253 |
]
|
@@ -256,65 +256,71 @@ class Elementor_Branding extends Widget_Base {
|
|
256 |
$this->add_control(
|
257 |
'border_radius',
|
258 |
[
|
259 |
-
'label' => __( 'Border Radius', 'elementor
|
260 |
'type' => Controls_Manager::DIMENSIONS,
|
261 |
'size_units' => [ 'px', '%' ],
|
262 |
'selectors' => [
|
263 |
'{{WRAPPER}} .elementor-branding' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
264 |
],
|
265 |
]
|
266 |
-
);
|
267 |
-
|
268 |
$this->end_controls_section();
|
269 |
-
|
270 |
}
|
271 |
-
|
272 |
protected function branding_output() {
|
273 |
$settings = $this->get_settings();
|
274 |
-
|
275 |
if ( $settings['el_site_branding'] == 'title' ) {
|
276 |
$this->render_title();
|
277 |
} elseif ( $settings['el_site_branding'] == 'logo' ) {
|
278 |
$this->render_logo();
|
279 |
}
|
280 |
}
|
281 |
-
|
282 |
protected function elementor_the_site_logo() {
|
283 |
if ( function_exists( 'the_custom_logo' ) ) {
|
284 |
the_custom_logo();
|
285 |
}
|
286 |
}
|
287 |
-
|
288 |
-
protected function render_title() {
|
|
|
289 |
<span class="site-title">
|
290 |
-
<?php
|
291 |
-
$title = get_bloginfo('name');
|
292 |
-
?>
|
293 |
-
|
|
|
294 |
<?php bloginfo( 'name' ); ?>
|
295 |
</a>
|
296 |
</span>
|
297 |
<?php
|
298 |
$description = get_bloginfo( 'description', 'display' );
|
299 |
-
|
|
|
300 |
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
|
301 |
-
<?php
|
|
|
302 |
}
|
303 |
-
|
304 |
protected function render_logo() {
|
305 |
$this->elementor_the_site_logo();
|
306 |
}
|
307 |
|
308 |
protected function render() {
|
309 |
-
|
310 |
-
$settings = $this->get_settings();
|
|
|
311 |
|
312 |
<div id="elementor-branding" class="elementor-branding">
|
313 |
<div class="header-title">
|
314 |
-
<?php
|
315 |
$this->branding_output();
|
316 |
-
?>
|
317 |
-
|
|
|
318 |
</div>
|
319 |
<?php
|
320 |
}
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly
|
13 |
+
}
|
14 |
|
15 |
/**
|
16 |
* Elementor Elementor Navbar
|
20 |
* @since 1.0.0
|
21 |
*/
|
22 |
class Elementor_Branding extends Widget_Base {
|
23 |
+
|
24 |
public function get_name() {
|
25 |
return 'elementor-branding';
|
26 |
}
|
27 |
|
28 |
public function get_title() {
|
29 |
+
return __( 'Branding', 'navmenu-addon-for-elementor' );
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
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', 'navmenu-addon-for-elementor' ),
|
47 |
]
|
48 |
);
|
49 |
+
|
50 |
$this->add_control(
|
51 |
'el_site_branding',
|
52 |
[
|
53 |
+
'label' => __( 'Branding Type', 'navmenu-addon-for-elementor' ),
|
54 |
+
'description' => __( 'Your theme must declare the "add_theme_support( \'custom-logo\')" for the logo to work', 'navmenu-addon-for-elementor' ),
|
55 |
+
'type' => Controls_Manager::SELECT, 'options' => [
|
56 |
+
'title' => __( 'Title', 'navmenu-addon-for-elementor' ),
|
57 |
+
'logo' => __( 'Logo', 'navmenu-addon-for-elementor' ),
|
|
|
58 |
],
|
59 |
'default' => 'title',
|
60 |
]
|
61 |
);
|
62 |
+
|
63 |
$this->add_responsive_control(
|
64 |
'align',
|
65 |
[
|
66 |
+
'label' => __( 'Alignment', 'navmenu-addon-for-elementor' ),
|
67 |
'type' => Controls_Manager::CHOOSE,
|
68 |
'options' => [
|
69 |
'left' => [
|
70 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
71 |
'icon' => 'fa fa-align-left',
|
72 |
],
|
73 |
'center' => [
|
74 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
75 |
'icon' => 'fa fa-align-center',
|
76 |
],
|
77 |
'right' => [
|
78 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
79 |
'icon' => 'fa fa-align-right',
|
80 |
],
|
81 |
],
|
82 |
'prefix_class' => 'elementor%s-align-',
|
83 |
'default' => '',
|
84 |
]
|
85 |
+
);
|
86 |
|
87 |
$this->end_controls_section();
|
88 |
|
89 |
$this->start_controls_section(
|
90 |
'section_title_style',
|
91 |
[
|
92 |
+
'label' => __( 'Brand', 'navmenu-addon-for-elementor' ),
|
93 |
'tab' => Controls_Manager::TAB_STYLE,
|
94 |
]
|
95 |
);
|
97 |
$this->add_control(
|
98 |
'branding_title_color',
|
99 |
[
|
100 |
+
'label' => __( 'Title Color', 'navmenu-addon-for-elementor' ),
|
101 |
'type' => Controls_Manager::COLOR,
|
102 |
'condition' => [
|
103 |
'el_site_branding' => 'title',
|
106 |
'type' => Scheme_Color::get_type(),
|
107 |
'value' => Scheme_Color::COLOR_1,
|
108 |
],
|
109 |
+
'default' => '#333333',
|
110 |
'selectors' => [
|
111 |
'{{WRAPPER}} .elementor-branding .site-title a' => 'color: {{VALUE}};',
|
112 |
],
|
113 |
]
|
114 |
);
|
115 |
+
|
116 |
$this->add_control(
|
117 |
'branding_title_hover',
|
118 |
[
|
119 |
+
'label' => __( 'Hover', 'navmenu-addon-for-elementor' ),
|
120 |
'type' => Controls_Manager::COLOR,
|
121 |
'condition' => [
|
122 |
'el_site_branding' => 'title',
|
134 |
$this->add_control(
|
135 |
'title_padding',
|
136 |
[
|
137 |
+
'label' => __( 'Title Padding - Default 1em', 'navmenu-addon-for-elementor' ),
|
138 |
'type' => Controls_Manager::DIMENSIONS,
|
139 |
'condition' => [
|
140 |
'el_site_branding' => 'title',
|
145 |
],
|
146 |
]
|
147 |
);
|
148 |
+
|
149 |
$this->add_group_control(
|
150 |
Group_Control_Typography::get_type(),
|
151 |
[
|
152 |
'name' => 'title_typography',
|
153 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
154 |
'condition' => [
|
155 |
'el_site_branding' => 'title',
|
156 |
],
|
158 |
'selector' => '{{WRAPPER}} .elementor-branding .site-title',
|
159 |
]
|
160 |
);
|
161 |
+
|
162 |
$this->add_control(
|
163 |
'logo_padding',
|
164 |
[
|
165 |
+
'label' => __( 'Title Padding - Default 1em', 'navmenu-addon-for-elementor' ),
|
166 |
'type' => Controls_Manager::DIMENSIONS,
|
167 |
'condition' => [
|
168 |
'el_site_branding' => 'logo',
|
175 |
);
|
176 |
|
177 |
$this->end_controls_section();
|
178 |
+
|
179 |
$this->start_controls_section(
|
180 |
'section_desc_style',
|
181 |
[
|
182 |
+
'label' => __( 'Description Options', 'navmenu-addon-for-elementor' ),
|
183 |
'tab' => Controls_Manager::TAB_STYLE,
|
184 |
'condition' => [
|
185 |
'el_site_branding' => 'title',
|
186 |
],
|
187 |
]
|
188 |
);
|
189 |
+
|
190 |
$this->add_control(
|
191 |
'branding_description_color',
|
192 |
[
|
193 |
+
'label' => __( 'Description Color', 'navmenu-addon-for-elementor' ),
|
194 |
'type' => Controls_Manager::COLOR,
|
195 |
'condition' => [
|
196 |
'el_site_branding' => 'title',
|
204 |
],
|
205 |
]
|
206 |
);
|
207 |
+
|
208 |
$this->add_control(
|
209 |
'desc_padding',
|
210 |
[
|
211 |
+
'label' => __( 'Description Padding - Default 1em', 'navmenu-addon-for-elementor' ),
|
212 |
'type' => Controls_Manager::DIMENSIONS,
|
213 |
'condition' => [
|
214 |
'el_site_branding' => 'title',
|
219 |
],
|
220 |
]
|
221 |
);
|
222 |
+
|
223 |
$this->add_group_control(
|
224 |
Group_Control_Typography::get_type(),
|
225 |
[
|
226 |
'name' => 'desc_typography',
|
227 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
228 |
'condition' => [
|
229 |
'el_site_branding' => 'title',
|
230 |
],
|
232 |
'selector' => '{{WRAPPER}} .elementor-branding .site-description',
|
233 |
]
|
234 |
);
|
235 |
+
|
236 |
$this->end_controls_section();
|
|
|
237 |
|
238 |
$this->start_controls_section(
|
239 |
'section_branding_borders',
|
240 |
[
|
241 |
+
'label' => __( 'Branding Border', 'navmenu-addon-for-elementor' ),
|
242 |
'tab' => Controls_Manager::TAB_STYLE,
|
243 |
]
|
244 |
);
|
245 |
+
|
246 |
$this->add_group_control(
|
247 |
Group_Control_Border::get_type(),
|
248 |
[
|
249 |
'name' => 'border',
|
250 |
+
'label' => __( 'Border', 'navmenu-addon-for-elementor' ),
|
251 |
'default' => '1px',
|
252 |
'selector' => '{{WRAPPER}} .elementor-branding',
|
253 |
]
|
256 |
$this->add_control(
|
257 |
'border_radius',
|
258 |
[
|
259 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
260 |
'type' => Controls_Manager::DIMENSIONS,
|
261 |
'size_units' => [ 'px', '%' ],
|
262 |
'selectors' => [
|
263 |
'{{WRAPPER}} .elementor-branding' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
264 |
],
|
265 |
]
|
266 |
+
);
|
267 |
+
|
268 |
$this->end_controls_section();
|
269 |
+
|
270 |
}
|
271 |
+
|
272 |
protected function branding_output() {
|
273 |
$settings = $this->get_settings();
|
274 |
+
|
275 |
if ( $settings['el_site_branding'] == 'title' ) {
|
276 |
$this->render_title();
|
277 |
} elseif ( $settings['el_site_branding'] == 'logo' ) {
|
278 |
$this->render_logo();
|
279 |
}
|
280 |
}
|
281 |
+
|
282 |
protected function elementor_the_site_logo() {
|
283 |
if ( function_exists( 'the_custom_logo' ) ) {
|
284 |
the_custom_logo();
|
285 |
}
|
286 |
}
|
287 |
+
|
288 |
+
protected function render_title() {
|
289 |
+
?>
|
290 |
<span class="site-title">
|
291 |
+
<?php
|
292 |
+
$title = get_bloginfo( 'name' );
|
293 |
+
?>
|
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 |
+
?>
|
303 |
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
|
304 |
+
<?php
|
305 |
+
endif;
|
306 |
}
|
307 |
+
|
308 |
protected function render_logo() {
|
309 |
$this->elementor_the_site_logo();
|
310 |
}
|
311 |
|
312 |
protected function render() {
|
313 |
+
|
314 |
+
$settings = $this->get_settings();
|
315 |
+
?>
|
316 |
|
317 |
<div id="elementor-branding" class="elementor-branding">
|
318 |
<div class="header-title">
|
319 |
+
<?php
|
320 |
$this->branding_output();
|
321 |
+
?>
|
322 |
+
|
323 |
+
</div>
|
324 |
</div>
|
325 |
<?php
|
326 |
}
|
modules/menus/widgets/elementor-search.php
CHANGED
@@ -8,7 +8,9 @@ use Elementor\Group_Control_Typography;
|
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
12 |
|
13 |
/**
|
14 |
* Elementor Elementor Navbar
|
@@ -18,13 +20,13 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
18 |
* @since 1.0.0
|
19 |
*/
|
20 |
class Elementor_Search extends Widget_Base {
|
21 |
-
|
22 |
public function get_name() {
|
23 |
return 'elementor-search';
|
24 |
}
|
25 |
|
26 |
public function get_title() {
|
27 |
-
return __( 'Search Box', 'elementor
|
28 |
}
|
29 |
|
30 |
public function get_icon() {
|
@@ -36,31 +38,31 @@ class Elementor_Search extends Widget_Base {
|
|
36 |
}
|
37 |
|
38 |
protected function _register_controls() {
|
39 |
-
|
40 |
-
|
41 |
$this->start_controls_section(
|
42 |
'section_content',
|
43 |
[
|
44 |
-
'label' => __( 'Search', 'elementor
|
45 |
]
|
46 |
);
|
47 |
-
|
48 |
$this->add_responsive_control(
|
49 |
'align',
|
50 |
[
|
51 |
-
'label' => __( 'Alignment', 'elementor
|
52 |
'type' => Controls_Manager::CHOOSE,
|
53 |
'options' => [
|
54 |
'left' => [
|
55 |
-
'title' => __( 'Left', 'elementor
|
56 |
'icon' => 'fa fa-align-left',
|
57 |
],
|
58 |
'center' => [
|
59 |
-
'title' => __( 'Center', 'elementor
|
60 |
'icon' => 'fa fa-align-center',
|
61 |
],
|
62 |
'right' => [
|
63 |
-
'title' => __( 'Right', 'elementor
|
64 |
'icon' => 'fa fa-align-right',
|
65 |
],
|
66 |
],
|
@@ -73,7 +75,7 @@ class Elementor_Search extends Widget_Base {
|
|
73 |
Group_Control_Typography::get_type(),
|
74 |
[
|
75 |
'name' => 'search_typography',
|
76 |
-
'label' => __( 'Typography', 'elementor
|
77 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
78 |
'selector' => '{{WRAPPER}} .elementor-search',
|
79 |
]
|
@@ -84,7 +86,7 @@ class Elementor_Search extends Widget_Base {
|
|
84 |
$this->start_controls_section(
|
85 |
'section_search_style',
|
86 |
[
|
87 |
-
'label' => __( 'Search', 'elementor
|
88 |
'tab' => Controls_Manager::TAB_STYLE,
|
89 |
]
|
90 |
);
|
@@ -92,62 +94,62 @@ class Elementor_Search extends Widget_Base {
|
|
92 |
$this->add_control(
|
93 |
'search_text_color',
|
94 |
[
|
95 |
-
'label' => __( 'Box Color', 'elementor
|
96 |
'type' => Controls_Manager::COLOR,
|
97 |
'scheme' => [
|
98 |
'type' => Scheme_Color::get_type(),
|
99 |
'value' => Scheme_Color::COLOR_1,
|
100 |
],
|
101 |
-
'default'
|
102 |
'selectors' => [
|
103 |
'{{WRAPPER}} .elementor-search, .elementor-search textarea, .elementor-search input' => 'color: {{VALUE}};',
|
104 |
],
|
105 |
]
|
106 |
);
|
107 |
-
|
108 |
$this->add_control(
|
109 |
'search_bg_color',
|
110 |
[
|
111 |
-
'label' => __( 'Box Background', 'elementor
|
112 |
'type' => Controls_Manager::COLOR,
|
113 |
'scheme' => [
|
114 |
'type' => Scheme_Color::get_type(),
|
115 |
'value' => Scheme_Color::COLOR_1,
|
116 |
],
|
117 |
-
'default'
|
118 |
'selectors' => [
|
119 |
'{{WRAPPER}} .elementor-search' => 'background-color: {{VALUE}};',
|
120 |
],
|
121 |
]
|
122 |
);
|
123 |
-
|
124 |
$this->add_control(
|
125 |
'box_padding',
|
126 |
[
|
127 |
-
'label' => __( 'Search Padding', 'elementor
|
128 |
'type' => Controls_Manager::DIMENSIONS,
|
129 |
'size_units' => [ 'px', 'em', '%' ],
|
130 |
'selectors' => [
|
131 |
'{{WRAPPER}} .elementor-search' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
132 |
],
|
133 |
]
|
134 |
-
);
|
135 |
|
136 |
$this->end_controls_section();
|
137 |
-
|
138 |
$this->start_controls_section(
|
139 |
'section_search_borders',
|
140 |
[
|
141 |
-
'label' => __( 'Border', 'elementor
|
142 |
'tab' => Controls_Manager::TAB_STYLE,
|
143 |
]
|
144 |
);
|
145 |
-
|
146 |
$this->add_group_control(
|
147 |
Group_Control_Border::get_type(),
|
148 |
[
|
149 |
'name' => 'border',
|
150 |
-
'label' => __( 'Border', 'elementor
|
151 |
'default' => '1px',
|
152 |
'selector' => '{{WRAPPER}} .elementor-search',
|
153 |
]
|
@@ -156,21 +158,21 @@ class Elementor_Search extends Widget_Base {
|
|
156 |
$this->add_control(
|
157 |
'border_radius',
|
158 |
[
|
159 |
-
'label' => __( 'Border Radius', 'elementor
|
160 |
'type' => Controls_Manager::DIMENSIONS,
|
161 |
'size_units' => [ 'px', '%' ],
|
162 |
'selectors' => [
|
163 |
'{{WRAPPER}} .elementor-search' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
164 |
],
|
165 |
]
|
166 |
-
);
|
167 |
-
|
168 |
$this->end_controls_section();
|
169 |
-
|
170 |
}
|
171 |
|
172 |
protected function render() {
|
173 |
-
|
174 |
$settings = $this->get_settings(); ?>
|
175 |
|
176 |
<div class="elementor-search">
|
@@ -178,15 +180,15 @@ class Elementor_Search extends Widget_Base {
|
|
178 |
<div class="form">
|
179 |
<form method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
180 |
<label>
|
181 |
-
<span class="screen-reader-text"><?php apply_filters( 'elementor_search_label', _ex( 'Search:', 'label', 'elementor
|
182 |
-
<input type="search" class="input search-field" placeholder="<?php echo apply_filters( 'elementor_search_placeholder', _x( 'Type keyword & hit enter to search;', 'placeholder', 'elementor
|
183 |
</label>
|
184 |
<input type="submit" class="btn fa" value="">
|
185 |
</form>
|
186 |
</div>
|
187 |
<div class="label">
|
188 |
<i class="fa fa-search ib-m"></i>
|
189 |
-
<span class="ib-m"><?php apply_filters( 'elementor_search_label', _ex( 'Search:', 'label', 'elementor
|
190 |
</div>
|
191 |
<div class="dismiss">
|
192 |
<i class="fa fa-times ib-m"></i>
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly
|
13 |
+
}
|
14 |
|
15 |
/**
|
16 |
* Elementor Elementor Navbar
|
20 |
* @since 1.0.0
|
21 |
*/
|
22 |
class Elementor_Search extends Widget_Base {
|
23 |
+
|
24 |
public function get_name() {
|
25 |
return 'elementor-search';
|
26 |
}
|
27 |
|
28 |
public function get_title() {
|
29 |
+
return __( 'Search Box', 'navmenu-addon-for-elementor' );
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
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', 'navmenu-addon-for-elementor' ),
|
47 |
]
|
48 |
);
|
49 |
+
|
50 |
$this->add_responsive_control(
|
51 |
'align',
|
52 |
[
|
53 |
+
'label' => __( 'Alignment', 'navmenu-addon-for-elementor' ),
|
54 |
'type' => Controls_Manager::CHOOSE,
|
55 |
'options' => [
|
56 |
'left' => [
|
57 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
58 |
'icon' => 'fa fa-align-left',
|
59 |
],
|
60 |
'center' => [
|
61 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
62 |
'icon' => 'fa fa-align-center',
|
63 |
],
|
64 |
'right' => [
|
65 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
66 |
'icon' => 'fa fa-align-right',
|
67 |
],
|
68 |
],
|
75 |
Group_Control_Typography::get_type(),
|
76 |
[
|
77 |
'name' => 'search_typography',
|
78 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
79 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
80 |
'selector' => '{{WRAPPER}} .elementor-search',
|
81 |
]
|
86 |
$this->start_controls_section(
|
87 |
'section_search_style',
|
88 |
[
|
89 |
+
'label' => __( 'Search', 'navmenu-addon-for-elementor' ),
|
90 |
'tab' => Controls_Manager::TAB_STYLE,
|
91 |
]
|
92 |
);
|
94 |
$this->add_control(
|
95 |
'search_text_color',
|
96 |
[
|
97 |
+
'label' => __( 'Box Color', 'navmenu-addon-for-elementor' ),
|
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', 'navmenu-addon-for-elementor' ),
|
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', 'navmenu-addon-for-elementor' ),
|
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', 'navmenu-addon-for-elementor' ),
|
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', 'navmenu-addon-for-elementor' ),
|
153 |
'default' => '1px',
|
154 |
'selector' => '{{WRAPPER}} .elementor-search',
|
155 |
]
|
158 |
$this->add_control(
|
159 |
'border_radius',
|
160 |
[
|
161 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
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">
|
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', 'navmenu-addon-for-elementor' ) ); ?></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', 'navmenu-addon-for-elementor' ) ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php apply_filters( 'elementor_search_label', _ex( 'Search for:', 'label', 'navmenu-addon-for-elementor' ) ); ?>">
|
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', 'navmenu-addon-for-elementor' ) ); ?></span>
|
192 |
</div>
|
193 |
<div class="dismiss">
|
194 |
<i class="fa fa-times ib-m"></i>
|
modules/menus/widgets/mega-menu.php
CHANGED
@@ -8,7 +8,9 @@ use Elementor\Group_Control_Typography;
|
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
12 |
|
13 |
/**
|
14 |
* Elementor Starter Widget
|
@@ -18,15 +20,15 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
18 |
* @since 1.0.0
|
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 |
}
|
27 |
|
28 |
public function get_title() {
|
29 |
-
return __( 'Mega Menu', 'elementor
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
@@ -38,40 +40,39 @@ class Mega_Menu extends Widget_Base {
|
|
38 |
}
|
39 |
|
40 |
protected function _register_controls() {
|
41 |
-
|
42 |
$this->start_controls_section(
|
43 |
'navbar_content',
|
44 |
[
|
45 |
-
'label' => __( 'Navbar Content', 'elementor
|
46 |
]
|
47 |
);
|
48 |
-
|
49 |
$this->add_control(
|
50 |
'el_mega_menu',
|
51 |
[
|
52 |
-
'label' => __( 'Select Menu', 'elementor
|
53 |
-
'type' => Controls_Manager::SELECT,
|
54 |
-
'options' => navmenu_navbar_menu_choices(),
|
55 |
'default' => '',
|
56 |
]
|
57 |
);
|
58 |
-
|
59 |
$this->add_responsive_control(
|
60 |
'align',
|
61 |
[
|
62 |
-
'label' => __( 'Alignment', 'elementor
|
63 |
'type' => Controls_Manager::CHOOSE,
|
64 |
'options' => [
|
65 |
'left' => [
|
66 |
-
'title' => __( 'Left', 'elementor
|
67 |
'icon' => 'fa fa-align-left',
|
68 |
],
|
69 |
'center' => [
|
70 |
-
'title' => __( 'Center', 'elementor
|
71 |
'icon' => 'fa fa-align-center',
|
72 |
],
|
73 |
'right' => [
|
74 |
-
'title' => __( 'Right', 'elementor
|
75 |
'icon' => 'fa fa-align-right',
|
76 |
],
|
77 |
],
|
@@ -84,26 +85,26 @@ class Mega_Menu extends Widget_Base {
|
|
84 |
Group_Control_Typography::get_type(),
|
85 |
[
|
86 |
'name' => 'navbar_typography',
|
87 |
-
'label' => __( 'Typography', 'elementor
|
88 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
89 |
'selector' => '{{WRAPPER}} .cbp-hsmenu',
|
90 |
]
|
91 |
);
|
92 |
-
|
93 |
$this->end_controls_section();
|
94 |
-
|
95 |
$this->start_controls_section(
|
96 |
'megamenu_content',
|
97 |
[
|
98 |
-
'label' => __( 'MegaMenu Content', 'elementor
|
99 |
]
|
100 |
);
|
101 |
-
|
102 |
$this->add_group_control(
|
103 |
Group_Control_Typography::get_type(),
|
104 |
[
|
105 |
'name' => 'megamenu_typography',
|
106 |
-
'label' => __( 'Typography', 'elementor
|
107 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
108 |
'selector' => '{{WRAPPER}} .cbp-hssubmenu',
|
109 |
]
|
@@ -114,7 +115,7 @@ class Mega_Menu extends Widget_Base {
|
|
114 |
$this->start_controls_section(
|
115 |
'navbar_style',
|
116 |
[
|
117 |
-
'label' => __( 'NavBar', 'elementor
|
118 |
'tab' => Controls_Manager::TAB_STYLE,
|
119 |
]
|
120 |
);
|
@@ -122,98 +123,98 @@ class Mega_Menu extends Widget_Base {
|
|
122 |
$this->add_control(
|
123 |
'navbar_color',
|
124 |
[
|
125 |
-
'label' => __( 'Color', 'elementor
|
126 |
'type' => Controls_Manager::COLOR,
|
127 |
'scheme' => [
|
128 |
'type' => Scheme_Color::get_type(),
|
129 |
'value' => Scheme_Color::COLOR_1,
|
130 |
],
|
131 |
-
'default'
|
132 |
'selectors' => [
|
133 |
'{{WRAPPER}} .cbp-hsmenu > li > a' => 'color: {{VALUE}};',
|
134 |
],
|
135 |
]
|
136 |
);
|
137 |
-
|
138 |
$this->add_control(
|
139 |
'navbar_bg_color',
|
140 |
[
|
141 |
-
'label' => __( 'Background', 'elementor
|
142 |
'type' => Controls_Manager::COLOR,
|
143 |
'scheme' => [
|
144 |
'type' => Scheme_Color::get_type(),
|
145 |
'value' => Scheme_Color::COLOR_1,
|
146 |
],
|
147 |
-
'default'
|
148 |
'selectors' => [
|
149 |
'{{WRAPPER}} .cbp-hsinner' => 'background-color: {{VALUE}};',
|
150 |
],
|
151 |
]
|
152 |
);
|
153 |
-
|
154 |
$this->add_control(
|
155 |
'navbar_padding',
|
156 |
[
|
157 |
-
'label' => __( 'Padding', 'elementor
|
158 |
'type' => Controls_Manager::DIMENSIONS,
|
159 |
'size_units' => [ 'px', 'em', '%' ],
|
160 |
'selectors' => [
|
161 |
'{{WRAPPER}} .cbp-hsmenu > li > a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
162 |
],
|
163 |
]
|
164 |
-
);
|
165 |
|
166 |
$this->end_controls_section();
|
167 |
-
|
168 |
$this->start_controls_section(
|
169 |
'megamenu_style',
|
170 |
[
|
171 |
-
'label' => __( 'MegaMenu', 'elementor
|
172 |
]
|
173 |
);
|
174 |
-
|
175 |
$this->add_control(
|
176 |
'megamenu_color',
|
177 |
[
|
178 |
-
'label' => __( 'Color', 'elementor
|
179 |
'type' => Controls_Manager::COLOR,
|
180 |
'scheme' => [
|
181 |
'type' => Scheme_Color::get_type(),
|
182 |
'value' => Scheme_Color::COLOR_1,
|
183 |
],
|
184 |
-
'default'
|
185 |
'selectors' => [
|
186 |
'{{WRAPPER}} #cbp-hsmenu-wrapper ul.sub-menu > li a, .cbp-hssubmenu > li a' => 'color: {{VALUE}};',
|
187 |
],
|
188 |
]
|
189 |
);
|
190 |
-
|
191 |
$this->add_control(
|
192 |
'megamenu_hover',
|
193 |
[
|
194 |
-
'label' => __( 'hover', 'elementor
|
195 |
'type' => Controls_Manager::COLOR,
|
196 |
'scheme' => [
|
197 |
'type' => Scheme_Color::get_type(),
|
198 |
'value' => Scheme_Color::COLOR_1,
|
199 |
],
|
200 |
-
'default'
|
201 |
'selectors' => [
|
202 |
'{{WRAPPER}} #cbp-hsmenu-wrapper ul.sub-menu > li a:hover, #cbp-hsmenu-wrapper ul.sub-menu li a:focus, .no-touch .cbp-hssubmenu > li a:hover, .no-touch .cbp-hssubmenu > li a:focus' => 'color: {{VALUE}};',
|
203 |
],
|
204 |
]
|
205 |
);
|
206 |
-
|
207 |
$this->add_control(
|
208 |
'megamenu_bg_color',
|
209 |
[
|
210 |
-
'label' => __( 'Background', 'elementor
|
211 |
'type' => Controls_Manager::COLOR,
|
212 |
'scheme' => [
|
213 |
'type' => Scheme_Color::get_type(),
|
214 |
'value' => Scheme_Color::COLOR_1,
|
215 |
],
|
216 |
-
'default'
|
217 |
'selectors' => [
|
218 |
'{{WRAPPER}} .cbp-hsmenubg, .cbp-hsmenu > li.cbp-hsitem-open .cbp-hssubmenu' => 'background-color: {{VALUE}};',
|
219 |
],
|
@@ -221,46 +222,49 @@ class Mega_Menu extends Widget_Base {
|
|
221 |
);
|
222 |
|
223 |
$this->end_controls_section();
|
224 |
-
|
225 |
}
|
226 |
|
227 |
protected function render() {
|
228 |
-
|
229 |
-
$settings = $this->get_settings();
|
230 |
// Get menu
|
231 |
$mega_menu = ! empty( $settings['el_mega_menu'] ) ? wp_get_nav_menu_object( $settings['el_mega_menu'] ) : false;
|
232 |
|
233 |
-
if (
|
234 |
return;
|
235 |
-
|
|
|
236 |
$args = array(
|
237 |
-
'fallback_cb'
|
238 |
-
'container'
|
239 |
-
'before'
|
240 |
-
'after'
|
241 |
-
'menu_id'
|
242 |
-
'menu_class'
|
243 |
-
'theme_location'
|
244 |
-
'menu'
|
245 |
-
'echo'
|
246 |
-
'depth'
|
247 |
-
'walker'
|
248 |
);
|
249 |
?>
|
250 |
|
251 |
<nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" class="cbp-hsmenu-wrapper" id="cbp-hsmenu-wrapper">
|
252 |
<div class="cbp-hsinner">
|
253 |
-
<?php
|
254 |
-
wp_nav_menu(
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
|
|
|
|
260 |
?>
|
261 |
</div>
|
262 |
</nav>
|
263 |
-
<?php
|
264 |
}
|
265 |
|
266 |
protected function _content_template() {}
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly
|
13 |
+
}
|
14 |
|
15 |
/**
|
16 |
* Elementor Starter Widget
|
20 |
* @since 1.0.0
|
21 |
*/
|
22 |
class Mega_Menu extends Widget_Base {
|
23 |
+
|
24 |
protected $_has_template_content = false;
|
25 |
+
|
26 |
public function get_name() {
|
27 |
return 'mega-menu';
|
28 |
}
|
29 |
|
30 |
public function get_title() {
|
31 |
+
return __( 'Mega Menu', 'navmenu-addon-for-elementor' );
|
32 |
}
|
33 |
|
34 |
public function get_icon() {
|
40 |
}
|
41 |
|
42 |
protected function _register_controls() {
|
43 |
+
|
44 |
$this->start_controls_section(
|
45 |
'navbar_content',
|
46 |
[
|
47 |
+
'label' => __( 'Navbar Content', 'navmenu-addon-for-elementor' ),
|
48 |
]
|
49 |
);
|
50 |
+
|
51 |
$this->add_control(
|
52 |
'el_mega_menu',
|
53 |
[
|
54 |
+
'label' => __( 'Select Menu', 'navmenu-addon-for-elementor' ),
|
55 |
+
'type' => Controls_Manager::SELECT, 'options' => navmenu_navbar_menu_choices(),
|
|
|
56 |
'default' => '',
|
57 |
]
|
58 |
);
|
59 |
+
|
60 |
$this->add_responsive_control(
|
61 |
'align',
|
62 |
[
|
63 |
+
'label' => __( 'Alignment', 'navmenu-addon-for-elementor' ),
|
64 |
'type' => Controls_Manager::CHOOSE,
|
65 |
'options' => [
|
66 |
'left' => [
|
67 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
68 |
'icon' => 'fa fa-align-left',
|
69 |
],
|
70 |
'center' => [
|
71 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
72 |
'icon' => 'fa fa-align-center',
|
73 |
],
|
74 |
'right' => [
|
75 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
76 |
'icon' => 'fa fa-align-right',
|
77 |
],
|
78 |
],
|
85 |
Group_Control_Typography::get_type(),
|
86 |
[
|
87 |
'name' => 'navbar_typography',
|
88 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
89 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
90 |
'selector' => '{{WRAPPER}} .cbp-hsmenu',
|
91 |
]
|
92 |
);
|
93 |
+
|
94 |
$this->end_controls_section();
|
95 |
+
|
96 |
$this->start_controls_section(
|
97 |
'megamenu_content',
|
98 |
[
|
99 |
+
'label' => __( 'MegaMenu Content', 'navmenu-addon-for-elementor' ),
|
100 |
]
|
101 |
);
|
102 |
+
|
103 |
$this->add_group_control(
|
104 |
Group_Control_Typography::get_type(),
|
105 |
[
|
106 |
'name' => 'megamenu_typography',
|
107 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
108 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
109 |
'selector' => '{{WRAPPER}} .cbp-hssubmenu',
|
110 |
]
|
115 |
$this->start_controls_section(
|
116 |
'navbar_style',
|
117 |
[
|
118 |
+
'label' => __( 'NavBar', 'navmenu-addon-for-elementor' ),
|
119 |
'tab' => Controls_Manager::TAB_STYLE,
|
120 |
]
|
121 |
);
|
123 |
$this->add_control(
|
124 |
'navbar_color',
|
125 |
[
|
126 |
+
'label' => __( 'Color', 'navmenu-addon-for-elementor' ),
|
127 |
'type' => Controls_Manager::COLOR,
|
128 |
'scheme' => [
|
129 |
'type' => Scheme_Color::get_type(),
|
130 |
'value' => Scheme_Color::COLOR_1,
|
131 |
],
|
132 |
+
'default' => '#ffffff',
|
133 |
'selectors' => [
|
134 |
'{{WRAPPER}} .cbp-hsmenu > li > a' => 'color: {{VALUE}};',
|
135 |
],
|
136 |
]
|
137 |
);
|
138 |
+
|
139 |
$this->add_control(
|
140 |
'navbar_bg_color',
|
141 |
[
|
142 |
+
'label' => __( 'Background', 'navmenu-addon-for-elementor' ),
|
143 |
'type' => Controls_Manager::COLOR,
|
144 |
'scheme' => [
|
145 |
'type' => Scheme_Color::get_type(),
|
146 |
'value' => Scheme_Color::COLOR_1,
|
147 |
],
|
148 |
+
'default' => '#00275e',
|
149 |
'selectors' => [
|
150 |
'{{WRAPPER}} .cbp-hsinner' => 'background-color: {{VALUE}};',
|
151 |
],
|
152 |
]
|
153 |
);
|
154 |
+
|
155 |
$this->add_control(
|
156 |
'navbar_padding',
|
157 |
[
|
158 |
+
'label' => __( 'Padding', 'navmenu-addon-for-elementor' ),
|
159 |
'type' => Controls_Manager::DIMENSIONS,
|
160 |
'size_units' => [ 'px', 'em', '%' ],
|
161 |
'selectors' => [
|
162 |
'{{WRAPPER}} .cbp-hsmenu > li > a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
163 |
],
|
164 |
]
|
165 |
+
);
|
166 |
|
167 |
$this->end_controls_section();
|
168 |
+
|
169 |
$this->start_controls_section(
|
170 |
'megamenu_style',
|
171 |
[
|
172 |
+
'label' => __( 'MegaMenu', 'navmenu-addon-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE,
|
173 |
]
|
174 |
);
|
175 |
+
|
176 |
$this->add_control(
|
177 |
'megamenu_color',
|
178 |
[
|
179 |
+
'label' => __( 'Color', 'navmenu-addon-for-elementor' ),
|
180 |
'type' => Controls_Manager::COLOR,
|
181 |
'scheme' => [
|
182 |
'type' => Scheme_Color::get_type(),
|
183 |
'value' => Scheme_Color::COLOR_1,
|
184 |
],
|
185 |
+
'default' => '#a2a2a2',
|
186 |
'selectors' => [
|
187 |
'{{WRAPPER}} #cbp-hsmenu-wrapper ul.sub-menu > li a, .cbp-hssubmenu > li a' => 'color: {{VALUE}};',
|
188 |
],
|
189 |
]
|
190 |
);
|
191 |
+
|
192 |
$this->add_control(
|
193 |
'megamenu_hover',
|
194 |
[
|
195 |
+
'label' => __( 'hover', 'navmenu-addon-for-elementor' ),
|
196 |
'type' => Controls_Manager::COLOR,
|
197 |
'scheme' => [
|
198 |
'type' => Scheme_Color::get_type(),
|
199 |
'value' => Scheme_Color::COLOR_1,
|
200 |
],
|
201 |
+
'default' => '#a2a2a2',
|
202 |
'selectors' => [
|
203 |
'{{WRAPPER}} #cbp-hsmenu-wrapper ul.sub-menu > li a:hover, #cbp-hsmenu-wrapper ul.sub-menu li a:focus, .no-touch .cbp-hssubmenu > li a:hover, .no-touch .cbp-hssubmenu > li a:focus' => 'color: {{VALUE}};',
|
204 |
],
|
205 |
]
|
206 |
);
|
207 |
+
|
208 |
$this->add_control(
|
209 |
'megamenu_bg_color',
|
210 |
[
|
211 |
+
'label' => __( 'Background', 'navmenu-addon-for-elementor' ),
|
212 |
'type' => Controls_Manager::COLOR,
|
213 |
'scheme' => [
|
214 |
'type' => Scheme_Color::get_type(),
|
215 |
'value' => Scheme_Color::COLOR_1,
|
216 |
],
|
217 |
+
'default' => '#f7f7f7',
|
218 |
'selectors' => [
|
219 |
'{{WRAPPER}} .cbp-hsmenubg, .cbp-hsmenu > li.cbp-hsitem-open .cbp-hssubmenu' => 'background-color: {{VALUE}};',
|
220 |
],
|
222 |
);
|
223 |
|
224 |
$this->end_controls_section();
|
225 |
+
|
226 |
}
|
227 |
|
228 |
protected function render() {
|
229 |
+
|
230 |
+
$settings = $this->get_settings();
|
231 |
// Get menu
|
232 |
$mega_menu = ! empty( $settings['el_mega_menu'] ) ? wp_get_nav_menu_object( $settings['el_mega_menu'] ) : false;
|
233 |
|
234 |
+
if ( ! $mega_menu ) {
|
235 |
return;
|
236 |
+
}
|
237 |
+
|
238 |
$args = array(
|
239 |
+
'fallback_cb' => false,
|
240 |
+
'container' => false,
|
241 |
+
'before' => '',
|
242 |
+
'after' => '',
|
243 |
+
'menu_id' => 'mega-menu',
|
244 |
+
'menu_class' => 'cbp-hsmenu',
|
245 |
+
'theme_location' => 'nav_mega_menu', // creating a fake location for better functional control
|
246 |
+
'menu' => $mega_menu,
|
247 |
+
'echo' => true,
|
248 |
+
'depth' => 0,
|
249 |
+
'walker' => '',
|
250 |
);
|
251 |
?>
|
252 |
|
253 |
<nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" class="cbp-hsmenu-wrapper" id="cbp-hsmenu-wrapper">
|
254 |
<div class="cbp-hsinner">
|
255 |
+
<?php
|
256 |
+
wp_nav_menu(
|
257 |
+
apply_filters(
|
258 |
+
'widget_nav_menu_args',
|
259 |
+
$args,
|
260 |
+
$mega_menu,
|
261 |
+
$settings
|
262 |
+
)
|
263 |
+
);
|
264 |
?>
|
265 |
</div>
|
266 |
</nav>
|
267 |
+
<?php
|
268 |
}
|
269 |
|
270 |
protected function _content_template() {}
|
modules/menus/widgets/navmenu-overlay.php
CHANGED
@@ -8,7 +8,9 @@ use Elementor\Group_Control_Typography;
|
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
12 |
|
13 |
/**
|
14 |
* Elementor Overlay NavMenu
|
@@ -18,15 +20,15 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
18 |
* @since 1.0.0
|
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 |
}
|
27 |
|
28 |
public function get_title() {
|
29 |
-
return __( 'Overlay NavMenu', 'elementor
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
@@ -38,40 +40,39 @@ class Navmenu_Overlay extends Widget_Base {
|
|
38 |
}
|
39 |
|
40 |
protected function _register_controls() {
|
41 |
-
|
42 |
$this->start_controls_section(
|
43 |
'overlay_content',
|
44 |
[
|
45 |
-
'label' => __( 'Menu', 'elementor
|
46 |
]
|
47 |
);
|
48 |
-
|
49 |
$this->add_control(
|
50 |
'el_overlay_menu',
|
51 |
[
|
52 |
-
'label' => __( 'Select Menu', 'elementor
|
53 |
-
'type' => Controls_Manager::SELECT,
|
54 |
-
'options' => navmenu_navbar_menu_choices(),
|
55 |
'default' => '',
|
56 |
]
|
57 |
);
|
58 |
-
|
59 |
$this->add_responsive_control(
|
60 |
'item_align',
|
61 |
[
|
62 |
-
'label' => __( 'Item Alignment', 'elementor
|
63 |
'type' => Controls_Manager::CHOOSE,
|
64 |
'options' => [
|
65 |
'left' => [
|
66 |
-
'title' => __( 'Left', 'elementor
|
67 |
'icon' => 'fa fa-align-left',
|
68 |
],
|
69 |
'center' => [
|
70 |
-
'title' => __( 'Center', 'elementor
|
71 |
'icon' => 'fa fa-align-center',
|
72 |
],
|
73 |
'right' => [
|
74 |
-
'title' => __( 'Right', 'elementor
|
75 |
'icon' => 'fa fa-align-right',
|
76 |
],
|
77 |
],
|
@@ -86,7 +87,7 @@ class Navmenu_Overlay extends Widget_Base {
|
|
86 |
Group_Control_Typography::get_type(),
|
87 |
[
|
88 |
'name' => 'search_typography',
|
89 |
-
'label' => __( 'Typography', 'elementor
|
90 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
91 |
'selector' => '{{WRAPPER}} .overlay-navigation a',
|
92 |
]
|
@@ -97,7 +98,7 @@ class Navmenu_Overlay extends Widget_Base {
|
|
97 |
$this->start_controls_section(
|
98 |
'section_style',
|
99 |
[
|
100 |
-
'label' => __( 'Overlay Style', 'elementor
|
101 |
'tab' => Controls_Manager::TAB_STYLE,
|
102 |
]
|
103 |
);
|
@@ -105,69 +106,69 @@ class Navmenu_Overlay extends Widget_Base {
|
|
105 |
$this->add_control(
|
106 |
'item_color',
|
107 |
[
|
108 |
-
'label' => __( 'Color', 'elementor
|
109 |
'type' => Controls_Manager::COLOR,
|
110 |
'scheme' => [
|
111 |
'type' => Scheme_Color::get_type(),
|
112 |
'value' => Scheme_Color::COLOR_1,
|
113 |
],
|
114 |
-
'default'
|
115 |
'selectors' => [
|
116 |
'{{WRAPPER}} .overlay-navigation a' => 'color: {{VALUE}};',
|
117 |
],
|
118 |
]
|
119 |
);
|
120 |
-
|
121 |
$this->add_control(
|
122 |
'item_hover',
|
123 |
[
|
124 |
-
'label' => __( 'Hover', 'elementor
|
125 |
'type' => Controls_Manager::COLOR,
|
126 |
'scheme' => [
|
127 |
'type' => Scheme_Color::get_type(),
|
128 |
'value' => Scheme_Color::COLOR_1,
|
129 |
],
|
130 |
-
'default'
|
131 |
'selectors' => [
|
132 |
'{{WRAPPER}} .overlay-navigation a:hover' => 'color: {{VALUE}};',
|
133 |
],
|
134 |
]
|
135 |
);
|
136 |
-
|
137 |
$this->add_control(
|
138 |
'overlay_bg_color',
|
139 |
[
|
140 |
-
'label' => __( 'Overlay Background', 'elementor
|
141 |
'type' => Controls_Manager::COLOR,
|
142 |
'scheme' => [
|
143 |
'type' => Scheme_Color::get_type(),
|
144 |
'value' => Scheme_Color::COLOR_1,
|
145 |
],
|
146 |
-
'default'
|
147 |
'selectors' => [
|
148 |
'{{WRAPPER}} .overlay-navigation' => 'background-color: {{VALUE}};',
|
149 |
],
|
150 |
]
|
151 |
);
|
152 |
-
|
153 |
$this->add_control(
|
154 |
'section_padding',
|
155 |
[
|
156 |
-
'label' => __( 'Padding', 'elementor
|
157 |
'type' => Controls_Manager::DIMENSIONS,
|
158 |
'size_units' => [ 'px', 'em', '%' ],
|
159 |
'selectors' => [
|
160 |
'{{WRAPPER}} .overlay-navigation ul li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
161 |
],
|
162 |
]
|
163 |
-
);
|
164 |
|
165 |
$this->end_controls_section();
|
166 |
-
|
167 |
$this->start_controls_section(
|
168 |
'toggle_style',
|
169 |
[
|
170 |
-
'label' => __( 'Toggle Style', 'elementor
|
171 |
'tab' => Controls_Manager::TAB_STYLE,
|
172 |
]
|
173 |
);
|
@@ -175,29 +176,29 @@ class Navmenu_Overlay extends Widget_Base {
|
|
175 |
$this->add_control(
|
176 |
'toggle_color',
|
177 |
[
|
178 |
-
'label' => __( 'Color', 'elementor
|
179 |
'type' => Controls_Manager::COLOR,
|
180 |
'scheme' => [
|
181 |
'type' => Scheme_Color::get_type(),
|
182 |
'value' => Scheme_Color::COLOR_1,
|
183 |
],
|
184 |
-
'default'
|
185 |
'selectors' => [
|
186 |
'{{WRAPPER}} #touch-menu span,#touch-menu span:after,#touch-menu span:before,#touch-menu.on span:before,#touch-menu.on span:after' => 'background-color: {{VALUE}};',
|
187 |
],
|
188 |
]
|
189 |
);
|
190 |
-
|
191 |
$this->add_control(
|
192 |
'toggle_bg_color',
|
193 |
[
|
194 |
-
'label' => __( 'Background', 'elementor
|
195 |
'type' => Controls_Manager::COLOR,
|
196 |
'scheme' => [
|
197 |
'type' => Scheme_Color::get_type(),
|
198 |
'value' => Scheme_Color::COLOR_1,
|
199 |
],
|
200 |
-
'default'
|
201 |
'selectors' => [
|
202 |
'{{WRAPPER}} #touch-menu' => 'background-color: {{VALUE}};',
|
203 |
],
|
@@ -207,7 +208,7 @@ class Navmenu_Overlay extends Widget_Base {
|
|
207 |
$this->add_control(
|
208 |
'border_radius',
|
209 |
[
|
210 |
-
'label' => __( 'Border Radius', 'elementor
|
211 |
'type' => Controls_Manager::DIMENSIONS,
|
212 |
'size_units' => [ 'px', '%' ],
|
213 |
'selectors' => [
|
@@ -217,44 +218,47 @@ class Navmenu_Overlay extends Widget_Base {
|
|
217 |
);
|
218 |
|
219 |
$this->end_controls_section();
|
220 |
-
|
221 |
}
|
222 |
|
223 |
protected function render() {
|
224 |
-
|
225 |
$settings = $this->get_settings();
|
226 |
// Get menu
|
227 |
$overlay_menu = ! empty( $settings['el_overlay_menu'] ) ? wp_get_nav_menu_object( $settings['el_overlay_menu'] ) : false;
|
228 |
|
229 |
-
if (
|
230 |
return;
|
231 |
-
|
|
|
232 |
$overlay_menu_args = array(
|
233 |
-
'fallback_cb'
|
234 |
-
'container'
|
235 |
-
'menu_id'
|
236 |
-
'menu_class'
|
237 |
-
'theme_location'
|
238 |
-
'menu'
|
239 |
-
'echo'
|
240 |
-
'depth'
|
241 |
-
'walker'
|
242 |
-
);
|
243 |
?>
|
244 |
<!--<div class="navmenu-overlay">-->
|
245 |
<span id="touch-menu" class="mobile-menu"><span></span></span>
|
246 |
-
<nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" class="overlay-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Elementor Menu', 'elementor
|
247 |
-
<?php
|
248 |
-
wp_nav_menu(
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
|
|
254 |
?>
|
255 |
</nav>
|
256 |
<!--</div>-->
|
257 |
-
<?php
|
258 |
}
|
259 |
|
260 |
protected function _content_template() {}
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly
|
13 |
+
}
|
14 |
|
15 |
/**
|
16 |
* Elementor Overlay NavMenu
|
20 |
* @since 1.0.0
|
21 |
*/
|
22 |
class Navmenu_Overlay extends Widget_Base {
|
23 |
+
|
24 |
protected $_has_template_content = false;
|
25 |
+
|
26 |
public function get_name() {
|
27 |
return 'navmenu-overlay';
|
28 |
}
|
29 |
|
30 |
public function get_title() {
|
31 |
+
return __( 'Overlay NavMenu', 'navmenu-addon-for-elementor' );
|
32 |
}
|
33 |
|
34 |
public function get_icon() {
|
40 |
}
|
41 |
|
42 |
protected function _register_controls() {
|
43 |
+
|
44 |
$this->start_controls_section(
|
45 |
'overlay_content',
|
46 |
[
|
47 |
+
'label' => __( 'Menu', 'navmenu-addon-for-elementor' ),
|
48 |
]
|
49 |
);
|
50 |
+
|
51 |
$this->add_control(
|
52 |
'el_overlay_menu',
|
53 |
[
|
54 |
+
'label' => __( 'Select Menu', 'navmenu-addon-for-elementor' ),
|
55 |
+
'type' => Controls_Manager::SELECT, 'options' => navmenu_navbar_menu_choices(),
|
|
|
56 |
'default' => '',
|
57 |
]
|
58 |
);
|
59 |
+
|
60 |
$this->add_responsive_control(
|
61 |
'item_align',
|
62 |
[
|
63 |
+
'label' => __( 'Item Alignment', 'navmenu-addon-for-elementor' ),
|
64 |
'type' => Controls_Manager::CHOOSE,
|
65 |
'options' => [
|
66 |
'left' => [
|
67 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
68 |
'icon' => 'fa fa-align-left',
|
69 |
],
|
70 |
'center' => [
|
71 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
72 |
'icon' => 'fa fa-align-center',
|
73 |
],
|
74 |
'right' => [
|
75 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
76 |
'icon' => 'fa fa-align-right',
|
77 |
],
|
78 |
],
|
87 |
Group_Control_Typography::get_type(),
|
88 |
[
|
89 |
'name' => 'search_typography',
|
90 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
91 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
92 |
'selector' => '{{WRAPPER}} .overlay-navigation a',
|
93 |
]
|
98 |
$this->start_controls_section(
|
99 |
'section_style',
|
100 |
[
|
101 |
+
'label' => __( 'Overlay Style', 'navmenu-addon-for-elementor' ),
|
102 |
'tab' => Controls_Manager::TAB_STYLE,
|
103 |
]
|
104 |
);
|
106 |
$this->add_control(
|
107 |
'item_color',
|
108 |
[
|
109 |
+
'label' => __( 'Color', 'navmenu-addon-for-elementor' ),
|
110 |
'type' => Controls_Manager::COLOR,
|
111 |
'scheme' => [
|
112 |
'type' => Scheme_Color::get_type(),
|
113 |
'value' => Scheme_Color::COLOR_1,
|
114 |
],
|
115 |
+
'default' => '#ffffff',
|
116 |
'selectors' => [
|
117 |
'{{WRAPPER}} .overlay-navigation a' => 'color: {{VALUE}};',
|
118 |
],
|
119 |
]
|
120 |
);
|
121 |
+
|
122 |
$this->add_control(
|
123 |
'item_hover',
|
124 |
[
|
125 |
+
'label' => __( 'Hover', 'navmenu-addon-for-elementor' ),
|
126 |
'type' => Controls_Manager::COLOR,
|
127 |
'scheme' => [
|
128 |
'type' => Scheme_Color::get_type(),
|
129 |
'value' => Scheme_Color::COLOR_1,
|
130 |
],
|
131 |
+
'default' => '#ffffff',
|
132 |
'selectors' => [
|
133 |
'{{WRAPPER}} .overlay-navigation a:hover' => 'color: {{VALUE}};',
|
134 |
],
|
135 |
]
|
136 |
);
|
137 |
+
|
138 |
$this->add_control(
|
139 |
'overlay_bg_color',
|
140 |
[
|
141 |
+
'label' => __( 'Overlay Background', 'navmenu-addon-for-elementor' ),
|
142 |
'type' => Controls_Manager::COLOR,
|
143 |
'scheme' => [
|
144 |
'type' => Scheme_Color::get_type(),
|
145 |
'value' => Scheme_Color::COLOR_1,
|
146 |
],
|
147 |
+
'default' => '',
|
148 |
'selectors' => [
|
149 |
'{{WRAPPER}} .overlay-navigation' => 'background-color: {{VALUE}};',
|
150 |
],
|
151 |
]
|
152 |
);
|
153 |
+
|
154 |
$this->add_control(
|
155 |
'section_padding',
|
156 |
[
|
157 |
+
'label' => __( 'Padding', 'navmenu-addon-for-elementor' ),
|
158 |
'type' => Controls_Manager::DIMENSIONS,
|
159 |
'size_units' => [ 'px', 'em', '%' ],
|
160 |
'selectors' => [
|
161 |
'{{WRAPPER}} .overlay-navigation ul li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
162 |
],
|
163 |
]
|
164 |
+
);
|
165 |
|
166 |
$this->end_controls_section();
|
167 |
+
|
168 |
$this->start_controls_section(
|
169 |
'toggle_style',
|
170 |
[
|
171 |
+
'label' => __( 'Toggle Style', 'navmenu-addon-for-elementor' ),
|
172 |
'tab' => Controls_Manager::TAB_STYLE,
|
173 |
]
|
174 |
);
|
176 |
$this->add_control(
|
177 |
'toggle_color',
|
178 |
[
|
179 |
+
'label' => __( 'Color', 'navmenu-addon-for-elementor' ),
|
180 |
'type' => Controls_Manager::COLOR,
|
181 |
'scheme' => [
|
182 |
'type' => Scheme_Color::get_type(),
|
183 |
'value' => Scheme_Color::COLOR_1,
|
184 |
],
|
185 |
+
'default' => '#ffffff',
|
186 |
'selectors' => [
|
187 |
'{{WRAPPER}} #touch-menu span,#touch-menu span:after,#touch-menu span:before,#touch-menu.on span:before,#touch-menu.on span:after' => 'background-color: {{VALUE}};',
|
188 |
],
|
189 |
]
|
190 |
);
|
191 |
+
|
192 |
$this->add_control(
|
193 |
'toggle_bg_color',
|
194 |
[
|
195 |
+
'label' => __( 'Background', 'navmenu-addon-for-elementor' ),
|
196 |
'type' => Controls_Manager::COLOR,
|
197 |
'scheme' => [
|
198 |
'type' => Scheme_Color::get_type(),
|
199 |
'value' => Scheme_Color::COLOR_1,
|
200 |
],
|
201 |
+
'default' => '#000000',
|
202 |
'selectors' => [
|
203 |
'{{WRAPPER}} #touch-menu' => 'background-color: {{VALUE}};',
|
204 |
],
|
208 |
$this->add_control(
|
209 |
'border_radius',
|
210 |
[
|
211 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
212 |
'type' => Controls_Manager::DIMENSIONS,
|
213 |
'size_units' => [ 'px', '%' ],
|
214 |
'selectors' => [
|
218 |
);
|
219 |
|
220 |
$this->end_controls_section();
|
221 |
+
|
222 |
}
|
223 |
|
224 |
protected function render() {
|
225 |
+
|
226 |
$settings = $this->get_settings();
|
227 |
// Get menu
|
228 |
$overlay_menu = ! empty( $settings['el_overlay_menu'] ) ? wp_get_nav_menu_object( $settings['el_overlay_menu'] ) : false;
|
229 |
|
230 |
+
if ( ! $overlay_menu ) {
|
231 |
return;
|
232 |
+
}
|
233 |
+
|
234 |
$overlay_menu_args = array(
|
235 |
+
'fallback_cb' => false,
|
236 |
+
'container' => false,
|
237 |
+
'menu_id' => '',
|
238 |
+
'menu_class' => '',
|
239 |
+
'theme_location' => 'nav_overlay_menu', // creating a fake location for better functional control
|
240 |
+
'menu' => $overlay_menu,
|
241 |
+
'echo' => true,
|
242 |
+
'depth' => 1,
|
243 |
+
'walker' => '',
|
244 |
+
);
|
245 |
?>
|
246 |
<!--<div class="navmenu-overlay">-->
|
247 |
<span id="touch-menu" class="mobile-menu"><span></span></span>
|
248 |
+
<nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" class="overlay-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Elementor Menu', 'navmenu-addon-for-elementor' ); ?>">
|
249 |
+
<?php
|
250 |
+
wp_nav_menu(
|
251 |
+
apply_filters(
|
252 |
+
'widget_nav_menu_args',
|
253 |
+
$overlay_menu_args,
|
254 |
+
$overlay_menu,
|
255 |
+
$settings
|
256 |
+
)
|
257 |
+
);
|
258 |
?>
|
259 |
</nav>
|
260 |
<!--</div>-->
|
261 |
+
<?php
|
262 |
}
|
263 |
|
264 |
protected function _content_template() {}
|
modules/search/module.info.php
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
3 |
|
4 |
return [
|
5 |
-
'title' => __( 'Search', 'elementor
|
6 |
'required' => true,
|
7 |
'default_activation' => true,
|
8 |
];
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
|
6 |
return [
|
7 |
+
'title' => __( 'Search', 'navmenu-addon-for-elementor' ),
|
8 |
'required' => true,
|
9 |
'default_activation' => true,
|
10 |
];
|
modules/search/module.php
CHANGED
@@ -9,17 +9,17 @@ class Module extends Module_Base {
|
|
9 |
public function __construct() {
|
10 |
parent::__construct();
|
11 |
|
12 |
-
|
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 |
-
}
|
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
CHANGED
@@ -8,7 +8,9 @@ use Elementor\Group_Control_Typography;
|
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
|
|
|
|
12 |
|
13 |
/**
|
14 |
* Elementor Elementor Navbar
|
@@ -18,15 +20,15 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
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
|
30 |
}
|
31 |
|
32 |
public function get_icon() {
|
@@ -38,31 +40,31 @@ class Elementor_Search extends Widget_Base {
|
|
38 |
}
|
39 |
|
40 |
protected function _register_controls() {
|
41 |
-
|
42 |
-
|
43 |
$this->start_controls_section(
|
44 |
'section_content',
|
45 |
[
|
46 |
-
'label' => __( 'Search', 'elementor
|
47 |
]
|
48 |
);
|
49 |
-
|
50 |
$this->add_responsive_control(
|
51 |
'align',
|
52 |
[
|
53 |
-
'label' => __( 'Alignment', 'elementor
|
54 |
'type' => Controls_Manager::CHOOSE,
|
55 |
'options' => [
|
56 |
'left' => [
|
57 |
-
'title' => __( 'Left', 'elementor
|
58 |
'icon' => 'fa fa-align-left',
|
59 |
],
|
60 |
'center' => [
|
61 |
-
'title' => __( 'Center', 'elementor
|
62 |
'icon' => 'fa fa-align-center',
|
63 |
],
|
64 |
'right' => [
|
65 |
-
'title' => __( 'Right', 'elementor
|
66 |
'icon' => 'fa fa-align-right',
|
67 |
],
|
68 |
],
|
@@ -75,7 +77,7 @@ class Elementor_Search extends Widget_Base {
|
|
75 |
Group_Control_Typography::get_type(),
|
76 |
[
|
77 |
'name' => 'search_typography',
|
78 |
-
'label' => __( 'Typography', 'elementor
|
79 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
80 |
'selector' => '{{WRAPPER}} .elementor-search',
|
81 |
]
|
@@ -86,7 +88,7 @@ class Elementor_Search extends Widget_Base {
|
|
86 |
$this->start_controls_section(
|
87 |
'section_search_style',
|
88 |
[
|
89 |
-
'label' => __( 'Search', 'elementor
|
90 |
'tab' => Controls_Manager::TAB_STYLE,
|
91 |
]
|
92 |
);
|
@@ -94,62 +96,62 @@ class Elementor_Search extends Widget_Base {
|
|
94 |
$this->add_control(
|
95 |
'search_text_color',
|
96 |
[
|
97 |
-
'label' => __( 'Box Color', 'elementor
|
98 |
'type' => Controls_Manager::COLOR,
|
99 |
'scheme' => [
|
100 |
'type' => Scheme_Color::get_type(),
|
101 |
'value' => Scheme_Color::COLOR_1,
|
102 |
],
|
103 |
-
'default'
|
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
|
114 |
'type' => Controls_Manager::COLOR,
|
115 |
'scheme' => [
|
116 |
'type' => Scheme_Color::get_type(),
|
117 |
'value' => Scheme_Color::COLOR_1,
|
118 |
],
|
119 |
-
'default'
|
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
|
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
|
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
|
153 |
'default' => '1px',
|
154 |
'selector' => '{{WRAPPER}} .elementor-search',
|
155 |
]
|
@@ -158,21 +160,21 @@ class Elementor_Search extends Widget_Base {
|
|
158 |
$this->add_control(
|
159 |
'border_radius',
|
160 |
[
|
161 |
-
'label' => __( 'Border Radius', 'elementor
|
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">
|
@@ -180,15 +182,15 @@ class Elementor_Search extends Widget_Base {
|
|
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
|
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
|
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
|
192 |
</div>
|
193 |
<div class="dismiss">
|
194 |
<i class="fa fa-times ib-m"></i>
|
8 |
use Elementor\Scheme_Color;
|
9 |
use Elementor\Scheme_Typography;
|
10 |
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
exit; // Exit if accessed directly
|
13 |
+
}
|
14 |
|
15 |
/**
|
16 |
* Elementor Elementor Navbar
|
20 |
* @since 1.0.0
|
21 |
*/
|
22 |
class Elementor_Search extends Widget_Base {
|
23 |
+
|
24 |
protected $_has_template_content = false;
|
25 |
+
|
26 |
public function get_name() {
|
27 |
return 'elementor-search';
|
28 |
}
|
29 |
|
30 |
public function get_title() {
|
31 |
+
return __( 'Search Box', 'navmenu-addon-for-elementor' );
|
32 |
}
|
33 |
|
34 |
public function get_icon() {
|
40 |
}
|
41 |
|
42 |
protected function _register_controls() {
|
43 |
+
// $menus = $this->get_menus();
|
44 |
+
|
45 |
$this->start_controls_section(
|
46 |
'section_content',
|
47 |
[
|
48 |
+
'label' => __( 'Search', 'navmenu-addon-for-elementor' ),
|
49 |
]
|
50 |
);
|
51 |
+
|
52 |
$this->add_responsive_control(
|
53 |
'align',
|
54 |
[
|
55 |
+
'label' => __( 'Alignment', 'navmenu-addon-for-elementor' ),
|
56 |
'type' => Controls_Manager::CHOOSE,
|
57 |
'options' => [
|
58 |
'left' => [
|
59 |
+
'title' => __( 'Left', 'navmenu-addon-for-elementor' ),
|
60 |
'icon' => 'fa fa-align-left',
|
61 |
],
|
62 |
'center' => [
|
63 |
+
'title' => __( 'Center', 'navmenu-addon-for-elementor' ),
|
64 |
'icon' => 'fa fa-align-center',
|
65 |
],
|
66 |
'right' => [
|
67 |
+
'title' => __( 'Right', 'navmenu-addon-for-elementor' ),
|
68 |
'icon' => 'fa fa-align-right',
|
69 |
],
|
70 |
],
|
77 |
Group_Control_Typography::get_type(),
|
78 |
[
|
79 |
'name' => 'search_typography',
|
80 |
+
'label' => __( 'Typography', 'navmenu-addon-for-elementor' ),
|
81 |
'scheme' => Scheme_Typography::TYPOGRAPHY_1,
|
82 |
'selector' => '{{WRAPPER}} .elementor-search',
|
83 |
]
|
88 |
$this->start_controls_section(
|
89 |
'section_search_style',
|
90 |
[
|
91 |
+
'label' => __( 'Search', 'navmenu-addon-for-elementor' ),
|
92 |
'tab' => Controls_Manager::TAB_STYLE,
|
93 |
]
|
94 |
);
|
96 |
$this->add_control(
|
97 |
'search_text_color',
|
98 |
[
|
99 |
+
'label' => __( 'Box Color', 'navmenu-addon-for-elementor' ),
|
100 |
'type' => Controls_Manager::COLOR,
|
101 |
'scheme' => [
|
102 |
'type' => Scheme_Color::get_type(),
|
103 |
'value' => Scheme_Color::COLOR_1,
|
104 |
],
|
105 |
+
'default' => '#333333',
|
106 |
'selectors' => [
|
107 |
'{{WRAPPER}} .elementor-search, .elementor-search textarea, .elementor-search input' => 'color: {{VALUE}};',
|
108 |
],
|
109 |
]
|
110 |
);
|
111 |
+
|
112 |
$this->add_control(
|
113 |
'search_bg_color',
|
114 |
[
|
115 |
+
'label' => __( 'Box Background', 'navmenu-addon-for-elementor' ),
|
116 |
'type' => Controls_Manager::COLOR,
|
117 |
'scheme' => [
|
118 |
'type' => Scheme_Color::get_type(),
|
119 |
'value' => Scheme_Color::COLOR_1,
|
120 |
],
|
121 |
+
'default' => '#ffffff',
|
122 |
'selectors' => [
|
123 |
'{{WRAPPER}} .elementor-search' => 'background-color: {{VALUE}};',
|
124 |
],
|
125 |
]
|
126 |
);
|
127 |
+
|
128 |
$this->add_control(
|
129 |
'box_padding',
|
130 |
[
|
131 |
+
'label' => __( 'Search Padding', 'navmenu-addon-for-elementor' ),
|
132 |
'type' => Controls_Manager::DIMENSIONS,
|
133 |
'size_units' => [ 'px', 'em', '%' ],
|
134 |
'selectors' => [
|
135 |
'{{WRAPPER}} .elementor-search' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
136 |
],
|
137 |
]
|
138 |
+
);
|
139 |
|
140 |
$this->end_controls_section();
|
141 |
+
|
142 |
$this->start_controls_section(
|
143 |
'section_search_borders',
|
144 |
[
|
145 |
+
'label' => __( 'Border', 'navmenu-addon-for-elementor' ),
|
146 |
'tab' => Controls_Manager::TAB_STYLE,
|
147 |
]
|
148 |
);
|
149 |
+
|
150 |
$this->add_group_control(
|
151 |
Group_Control_Border::get_type(),
|
152 |
[
|
153 |
'name' => 'border',
|
154 |
+
'label' => __( 'Border', 'navmenu-addon-for-elementor' ),
|
155 |
'default' => '1px',
|
156 |
'selector' => '{{WRAPPER}} .elementor-search',
|
157 |
]
|
160 |
$this->add_control(
|
161 |
'border_radius',
|
162 |
[
|
163 |
+
'label' => __( 'Border Radius', 'navmenu-addon-for-elementor' ),
|
164 |
'type' => Controls_Manager::DIMENSIONS,
|
165 |
'size_units' => [ 'px', '%' ],
|
166 |
'selectors' => [
|
167 |
'{{WRAPPER}} .elementor-search' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
168 |
],
|
169 |
]
|
170 |
+
);
|
171 |
+
|
172 |
$this->end_controls_section();
|
173 |
+
|
174 |
}
|
175 |
|
176 |
protected function render() {
|
177 |
+
|
178 |
$settings = $this->get_settings(); ?>
|
179 |
|
180 |
<div class="elementor-search">
|
182 |
<div class="form">
|
183 |
<form method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
184 |
<label>
|
185 |
+
<span class="screen-reader-text"><?php apply_filters( 'elementor_search_label', _ex( 'Search:', 'label', 'navmenu-addon-for-elementor' ) ); ?></span>
|
186 |
+
<input type="search" class="input search-field" placeholder="<?php echo apply_filters( 'elementor_search_placeholder', _x( 'Type keyword & hit enter to search;', 'placeholder', 'navmenu-addon-for-elementor' ) ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php apply_filters( 'elementor_search_label', _ex( 'Search for:', 'label', 'navmenu-addon-for-elementor' ) ); ?>">
|
187 |
</label>
|
188 |
<input type="submit" class="btn fa" value="">
|
189 |
</form>
|
190 |
</div>
|
191 |
<div class="label">
|
192 |
<i class="fa fa-search ib-m"></i>
|
193 |
+
<span class="ib-m"><?php apply_filters( 'elementor_search_label', _ex( 'Search:', 'label', 'navmenu-addon-for-elementor' ) ); ?></span>
|
194 |
</div>
|
195 |
<div class="dismiss">
|
196 |
<i class="fa fa-times ib-m"></i>
|
plugin.php
CHANGED
@@ -4,7 +4,8 @@ namespace ElementorMenus;
|
|
4 |
use Elementor\Utils;
|
5 |
use Elementor\Controls_Manager;
|
6 |
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
8 |
|
9 |
/**
|
10 |
* Main class plugin
|
@@ -44,7 +45,7 @@ class Plugin {
|
|
44 |
*/
|
45 |
public function __clone() {
|
46 |
// Cloning instances of the class is forbidden
|
47 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'elementor
|
48 |
}
|
49 |
|
50 |
/**
|
@@ -55,7 +56,7 @@ class Plugin {
|
|
55 |
*/
|
56 |
public function __wakeup() {
|
57 |
// Unserializing instances of the class is forbidden
|
58 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'elementor
|
59 |
}
|
60 |
|
61 |
/**
|
@@ -70,11 +71,11 @@ class Plugin {
|
|
70 |
}
|
71 |
|
72 |
private function _includes() {
|
73 |
-
require ELEMENTOR_MENUS_PATH . 'includes/modules-manager.php';
|
74 |
|
75 |
-
//if ( is_admin() ) {
|
76 |
-
//require ELEMENTOR_MENUS_PATH . 'includes/admin.php';
|
77 |
-
//}
|
78 |
}
|
79 |
|
80 |
public function autoload( $class ) {
|
@@ -140,7 +141,7 @@ class Plugin {
|
|
140 |
|
141 |
public function enqueue_scripts() {
|
142 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
143 |
-
|
144 |
wp_enqueue_script(
|
145 |
'elementor-menus-modernizer',
|
146 |
ELEMENTOR_MENUS_URL . 'assets/js/modernizr.custom.js',
|
@@ -170,16 +171,16 @@ class Plugin {
|
|
170 |
]
|
171 |
);
|
172 |
}
|
173 |
-
|
174 |
public function enqueue_panel_scripts() {
|
175 |
-
|
176 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
177 |
-
|
178 |
wp_enqueue_script(
|
179 |
'elementor-menus-modernizer',
|
180 |
ELEMENTOR_MENUS_URL . 'assets/js/modernizr.custom.js',
|
181 |
[
|
182 |
-
//'jquery',
|
183 |
],
|
184 |
ELEMENTOR_MENUS_VERSION,
|
185 |
false
|
@@ -195,14 +196,14 @@ class Plugin {
|
|
195 |
ELEMENTOR_MENUS_VERSION,
|
196 |
true
|
197 |
);
|
198 |
-
|
199 |
wp_localize_script(
|
200 |
'elementor-menus',
|
201 |
'ElementorMenusConfig',
|
202 |
apply_filters( 'elementor_menus/editor/localize_settings', [] ),
|
203 |
[
|
204 |
-
'expand' => __( 'expand child menu', 'elementor
|
205 |
-
'collapse' => __( 'collapse child menu', 'elementor
|
206 |
]
|
207 |
);
|
208 |
}
|
@@ -214,31 +215,37 @@ class Plugin {
|
|
214 |
'elementor-menus-editor',
|
215 |
ELEMENTOR_MENUS_URL . 'assets/css/editor' . $suffix . '.css',
|
216 |
[
|
217 |
-
'elementor-editor'
|
218 |
],
|
219 |
ELEMENTOR_MENUS_VERSION
|
220 |
);
|
221 |
}
|
222 |
-
|
223 |
public function enqueue_default_scripts() {
|
224 |
-
wp_localize_script(
|
225 |
-
'
|
226 |
-
|
227 |
-
|
|
|
|
|
228 |
}
|
229 |
-
|
230 |
public function enqueue_default_secondary_scripts() {
|
231 |
-
wp_localize_script(
|
232 |
-
'
|
233 |
-
|
234 |
-
|
|
|
|
|
235 |
}
|
236 |
-
|
237 |
public function enqueue_panel_default_scripts() {
|
238 |
-
wp_localize_script(
|
239 |
-
'
|
240 |
-
|
241 |
-
|
|
|
|
|
242 |
}
|
243 |
|
244 |
public function elementor_init() {
|
@@ -248,7 +255,7 @@ class Plugin {
|
|
248 |
\Elementor\Plugin::instance()->elements_manager->add_category(
|
249 |
'branding-elements',
|
250 |
[
|
251 |
-
'title' => __( 'Header Elements', 'elementor
|
252 |
'icon' => 'font',
|
253 |
],
|
254 |
1
|
@@ -279,8 +286,8 @@ class Plugin {
|
|
279 |
$this->add_actions();
|
280 |
|
281 |
if ( is_admin() ) {
|
282 |
-
//new Admin();
|
283 |
-
//new License\Admin();
|
284 |
}
|
285 |
}
|
286 |
}
|
4 |
use Elementor\Utils;
|
5 |
use Elementor\Controls_Manager;
|
6 |
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit; } // Exit if accessed directly
|
9 |
|
10 |
/**
|
11 |
* Main class plugin
|
45 |
*/
|
46 |
public function __clone() {
|
47 |
// Cloning instances of the class is forbidden
|
48 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'navmenu-addon-for-elementor' ), '1.0.5' );
|
49 |
}
|
50 |
|
51 |
/**
|
56 |
*/
|
57 |
public function __wakeup() {
|
58 |
// Unserializing instances of the class is forbidden
|
59 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'navmenu-addon-for-elementor' ), '1.0.5' );
|
60 |
}
|
61 |
|
62 |
/**
|
71 |
}
|
72 |
|
73 |
private function _includes() {
|
74 |
+
require ELEMENTOR_MENUS_PATH . 'includes/modules-manager.php';
|
75 |
|
76 |
+
// if ( is_admin() ) {
|
77 |
+
// require ELEMENTOR_MENUS_PATH . 'includes/admin.php';
|
78 |
+
// }
|
79 |
}
|
80 |
|
81 |
public function autoload( $class ) {
|
141 |
|
142 |
public function enqueue_scripts() {
|
143 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
144 |
+
|
145 |
wp_enqueue_script(
|
146 |
'elementor-menus-modernizer',
|
147 |
ELEMENTOR_MENUS_URL . 'assets/js/modernizr.custom.js',
|
171 |
]
|
172 |
);
|
173 |
}
|
174 |
+
|
175 |
public function enqueue_panel_scripts() {
|
176 |
+
// $suffix = Utils::is_script_debug() ? '' : '.min';
|
177 |
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
178 |
+
|
179 |
wp_enqueue_script(
|
180 |
'elementor-menus-modernizer',
|
181 |
ELEMENTOR_MENUS_URL . 'assets/js/modernizr.custom.js',
|
182 |
[
|
183 |
+
// 'jquery',
|
184 |
],
|
185 |
ELEMENTOR_MENUS_VERSION,
|
186 |
false
|
196 |
ELEMENTOR_MENUS_VERSION,
|
197 |
true
|
198 |
);
|
199 |
+
|
200 |
wp_localize_script(
|
201 |
'elementor-menus',
|
202 |
'ElementorMenusConfig',
|
203 |
apply_filters( 'elementor_menus/editor/localize_settings', [] ),
|
204 |
[
|
205 |
+
'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
|
206 |
+
'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
|
207 |
]
|
208 |
);
|
209 |
}
|
215 |
'elementor-menus-editor',
|
216 |
ELEMENTOR_MENUS_URL . 'assets/css/editor' . $suffix . '.css',
|
217 |
[
|
218 |
+
'elementor-editor',
|
219 |
],
|
220 |
ELEMENTOR_MENUS_VERSION
|
221 |
);
|
222 |
}
|
223 |
+
|
224 |
public function enqueue_default_scripts() {
|
225 |
+
wp_localize_script(
|
226 |
+
'elementor-menus-frontend', 'elementorScreenReaderText', array(
|
227 |
+
'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
|
228 |
+
'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
|
229 |
+
)
|
230 |
+
);
|
231 |
}
|
232 |
+
|
233 |
public function enqueue_default_secondary_scripts() {
|
234 |
+
wp_localize_script(
|
235 |
+
'elementor-menus-frontend', 'elementorSecondaryScreenReaderText', array(
|
236 |
+
'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
|
237 |
+
'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
|
238 |
+
)
|
239 |
+
);
|
240 |
}
|
241 |
+
|
242 |
public function enqueue_panel_default_scripts() {
|
243 |
+
wp_localize_script(
|
244 |
+
'elementor-menus', 'elementorScreenReaderText', array(
|
245 |
+
'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
|
246 |
+
'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
|
247 |
+
)
|
248 |
+
);
|
249 |
}
|
250 |
|
251 |
public function elementor_init() {
|
255 |
\Elementor\Plugin::instance()->elements_manager->add_category(
|
256 |
'branding-elements',
|
257 |
[
|
258 |
+
'title' => __( 'Header Elements', 'navmenu-addon-for-elementor' ),
|
259 |
'icon' => 'font',
|
260 |
],
|
261 |
1
|
286 |
$this->add_actions();
|
287 |
|
288 |
if ( is_admin() ) {
|
289 |
+
// new Admin();
|
290 |
+
// new License\Admin();
|
291 |
}
|
292 |
}
|
293 |
}
|
readme.md
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# NavMenu Addon For Elementor #
|
2 |
+
|
3 |
+
**Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [codeinwp](https://profiles.wordpress.org/codeinwp)
|
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 |
+
**License:** GPLv3
|
8 |
+
**License URI:** https://www.gnu.org/licenses/gpl-3.0.html
|
9 |
+
|
10 |
+
Adds new NavMenus to the Elementor Page Builder plugin. Now with Site Branding options
|
11 |
+
|
12 |
+
## Description ##
|
13 |
+
Custom WordPress navmenu specifically designed for the [Elementor Page Builder](https://wordpress.org/plugins/elementor/) - Now with Site Branding options, search box, basic MegaMenu and Fullscreen Menu Overlay
|
14 |
+
|
15 |
+
## Installation ##
|
16 |
+
* These instructions assumes you already have a WordPress site and the Elementor plugin installed and activated. Also, it is assumed that you already have at least a menu created.
|
17 |
+
|
18 |
+
1. Install using the WordPress built-in Plugin installer, or Extract the zip file and drop the contents in the `wp-content/plugins/` directory of your WordPress installation.
|
19 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
20 |
+
3. Go to Pages > Add New
|
21 |
+
4. While in the Elementor Editor, drag and drop the NavMenu widget to the location of your choice
|
22 |
+
4. Configure as desired and save.
|
23 |
+
5. Done! Enjoy :)
|
24 |
+
|
25 |
+
## Frequently Asked Questions ##
|
26 |
+
|
27 |
+
**I've added the menu element but I do not see the menus in the dropdown box**
|
28 |
+
|
29 |
+
Make sure that you have created your menus under Appearance >> Menus
|
30 |
+
|
31 |
+
**In the Branding module, I've selected the logo but it does not appear**
|
32 |
+
|
33 |
+
Make sure a) your theme supports the custom logo options and b) that a logo has been set in the theme's customizer.
|
34 |
+
|
35 |
+
**How do I make a split navigation with the Site title/logo in the middle?**
|
36 |
+
|
37 |
+
a: Go to Appearance >> Menus (if not already done so) and create two sets of menus - for brevity will call them Left Menu and Right Menu
|
38 |
+
b: Go to create a page (if not already done so), give it a title say Navigation Bar 1 and click Edit with Elementor. It is recommended to use a blank template for this - if your theme does not have you can use the Page Template plugin.
|
39 |
+
c: In the Edit mode insert a 3 column section into the page, adjust the middle column to be slight narrower than the 2 outer ones.
|
40 |
+
e: Drag and drop the NavMenu widget in to each of the outer columns and adjust setting as desired. Now drag and drop the Branding element into the middle column - adjust settings accordingly and save.
|
41 |
+
Done! :)
|
42 |
+
|
43 |
+
## Screenshots ##
|
44 |
+
|
45 |
+
1. Header With Twin Navigation.
|
46 |
+
2. Fullscreen Overlay Menu
|
47 |
+
3. MegaMenu Structure On the Menu edit screen.
|
48 |
+
4. MegaMenu Frontend
|
49 |
+
|
50 |
+
## Known Issues ##
|
51 |
+
|
52 |
+
* Currently both the Overlay and MegaMenu content are not viewable while in Edit Mode - this is due to both having an on.Click event to display content which does not seem to work in the Editor.
|
53 |
+
* 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!
|
54 |
+
|
55 |
+
## Changelog ##
|
56 |
+
### 1.1.0 - 2017-09-28 ###
|
57 |
+
|
58 |
+
* Added Themeisle SDK.
|
59 |
+
* Added Continuous Integration.
|
60 |
+
* Changed contributors.
|
61 |
+
|
62 |
+
|
63 |
+
### 1.0.7 ###
|
64 |
+
* FIXED: Missing widget icon due to updated icons in Elementor
|
65 |
+
* FIXED: Disbaled the _content_template() functions as they are not in use.
|
66 |
+
* TWEAK: Moved Branding and Search widgets into their own modules for future enhancements
|
67 |
+
|
68 |
+
### 1.0.6 ###
|
69 |
+
* 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!
|
70 |
+
|
71 |
+
### 1.0.5 ###
|
72 |
+
* FIXED: Fatal error when active theme is Element Theme!
|
73 |
+
|
74 |
+
### 1.0.4 ###
|
75 |
+
* NEW: Added options for alignment and padding for submenu items
|
76 |
+
|
77 |
+
### 1.0.3 ###
|
78 |
+
* FIXED: Bug that cause drop down menu to fall behind elements in some designs.
|
79 |
+
|
80 |
+
### 1.0.2 ###
|
81 |
+
* Enhanced and improved how menus are styled.
|
82 |
+
* Changed behavior of dropdown menu floats - by default they now float to the right. So left and center aligned menu will float right and right aligned menus will float left.
|
83 |
+
* NEW: Added option for mobile menu item alignment.
|
84 |
+
* NEW: Added background setting for the navbar
|
85 |
+
* NEW: Added a Fullscreen Overlay Menu
|
86 |
+
* NEW: Added a search box widget - this is still a work in progress
|
87 |
+
* NEW: Added a basic MegaMenu options
|
88 |
+
* TWEAKES: Added and tweaked some styling options for the Default NavMenu module.
|
89 |
+
|
90 |
+
### 1.0.1 ###
|
91 |
+
* NEW: Revised the plugin structure to me more modular and facilitate more element additions.
|
92 |
+
* NEW: Created a plugin specific elements category.
|
93 |
+
* NEW: Added option to select a menu location (up to 2) with both being mobile ready!
|
94 |
+
* NEW: Added a site branding module - you can now insert either the Site Title or the set Custom Logo in your headers.
|
95 |
+
* TWEAKS: Tiny but significant tweaks to make the whole experience more user friendly :)
|
96 |
+
|
97 |
+
### 1.0.0 ###
|
98 |
+
* Initial release.
|
readme.txt
CHANGED
@@ -1,11 +1,10 @@
|
|
1 |
=== NavMenu Addon For Elementor ===
|
2 |
|
3 |
-
Contributors:
|
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 |
-
|
8 |
-
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
11 |
Adds new NavMenus to the Elementor Page Builder plugin. Now with Site Branding options
|
@@ -54,6 +53,13 @@ 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.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.
|
@@ -89,6 +95,4 @@ Done! :)
|
|
89 |
* TWEAKS: Tiny but significant tweaks to make the whole experience more user friendly :)
|
90 |
|
91 |
= 1.0.0 =
|
92 |
-
* Initial release.
|
93 |
-
|
94 |
-
Copyright: WPDevHQ https://wpdevhq.com
|
1 |
=== NavMenu Addon For Elementor ===
|
2 |
|
3 |
+
Contributors: themeisle, codeinwp
|
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 |
+
License: GPLv3
|
|
|
8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
10 |
Adds new NavMenus to the Elementor Page Builder plugin. Now with Site Branding options
|
53 |
* 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!
|
54 |
|
55 |
== Changelog ==
|
56 |
+
= 1.1.0 - 2017-09-28 =
|
57 |
+
|
58 |
+
* Added Themeisle SDK.
|
59 |
+
* Added Continuous Integration.
|
60 |
+
* Changed contributors.
|
61 |
+
|
62 |
+
|
63 |
= 1.0.7 =
|
64 |
* FIXED: Missing widget icon due to updated icons in Elementor
|
65 |
* FIXED: Disbaled the _content_template() functions as they are not in use.
|
95 |
* TWEAKS: Tiny but significant tweaks to make the whole experience more user friendly :)
|
96 |
|
97 |
= 1.0.0 =
|
98 |
+
* Initial release.
|
|
|
|