WP init
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Includes;
|
||||
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Conditions_Manager setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Conditions_Manager {
|
||||
|
||||
/**
|
||||
** Header & Footer Conditions
|
||||
*/
|
||||
public static function header_footer_display_conditions( $conditions ) {
|
||||
$template = NULL;
|
||||
|
||||
// Custom
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code() ) {
|
||||
if ( !empty($conditions) ) {
|
||||
$conditions['caller-header-footer'] = ['true'];
|
||||
|
||||
// Archive Pages (includes search)
|
||||
if ( !is_null( \WprAddonsPro\Classes\Pro_Modules::archive_templates_conditions( $conditions ) ) ) {
|
||||
$template = \WprAddonsPro\Classes\Pro_Modules::archive_templates_conditions( $conditions );
|
||||
}
|
||||
|
||||
// Single Pages
|
||||
if ( !is_null( \WprAddonsPro\Classes\Pro_Modules::single_templates_conditions( $conditions ) ) ) {
|
||||
$template = \WprAddonsPro\Classes\Pro_Modules::single_templates_conditions( $conditions );
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
$template = Utilities::get_template_slug( $conditions, 'global' );
|
||||
}
|
||||
|
||||
if ( \Elementor\Plugin::$instance->preview->is_preview_mode() ) {
|
||||
$template_type = Utilities::get_wpr_template_type(get_the_ID());
|
||||
|
||||
if ( 'header' === $template_type || 'footer' === $template_type || is_singular('wpr_mega_menu') ) {
|
||||
$template = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'on' === get_option('wpr_hide_head_foot_on_maintenenace', 'on') ) {
|
||||
if ( !current_user_can('administrator') && ('maintenance' == get_option('elementor_maintenance_mode_mode') || 'coming_soon' == get_option('elementor_maintenance_mode_mode')) ) {
|
||||
$template = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
/**
|
||||
** Canvas Content Conditions
|
||||
*/
|
||||
public static function canvas_page_content_display_conditions() {
|
||||
$template = NULL;
|
||||
|
||||
// Get Conditions
|
||||
if ( class_exists( 'WooCommerce' ) && is_woocommerce() ) {
|
||||
$archives = json_decode( get_option( 'wpr_product_archive_conditions' ), true );
|
||||
$singles = json_decode( get_option( 'wpr_product_single_conditions' ), true );
|
||||
} else {
|
||||
$archives = json_decode( get_option( 'wpr_archive_conditions' ), true );
|
||||
$singles = json_decode( get_option( 'wpr_single_conditions' ), true );
|
||||
}
|
||||
|
||||
if ( empty($archives) && empty($singles) ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Custom
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code() ) {
|
||||
|
||||
// Archive Pages (includes search)
|
||||
if ( !is_null( \WprAddonsPro\Classes\Pro_Modules::archive_templates_conditions( $archives ) ) ) {
|
||||
$template = \WprAddonsPro\Classes\Pro_Modules::archive_templates_conditions( $archives );
|
||||
}
|
||||
|
||||
// Single Pages
|
||||
if ( !is_null( \WprAddonsPro\Classes\Pro_Modules::single_templates_conditions( $singles ) ) ) {
|
||||
$template = \WprAddonsPro\Classes\Pro_Modules::single_templates_conditions( $singles );
|
||||
}
|
||||
} else {
|
||||
// Archive Pages (includes search)
|
||||
if ( !is_null( WPR_Conditions_Manager::archive_templates_conditions_free($archives) ) ) {
|
||||
$template = WPR_Conditions_Manager::archive_templates_conditions_free($archives);
|
||||
}
|
||||
|
||||
// Single Pages
|
||||
if ( !is_null( WPR_Conditions_Manager::single_templates_conditions_free($singles) ) ) {
|
||||
$template = WPR_Conditions_Manager::single_templates_conditions_free($singles);
|
||||
}
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
** Archive Pages Templates Conditions Free
|
||||
*/
|
||||
public static function archive_templates_conditions_free( $conditions ) {
|
||||
$term_id = '';
|
||||
$term_name = '';
|
||||
$queried_object = get_queried_object();
|
||||
|
||||
// Get Terms
|
||||
if ( ! is_null( $queried_object ) ) {
|
||||
if ( isset( $queried_object->term_id ) && isset( $queried_object->taxonomy ) ) {
|
||||
$term_id = $queried_object->term_id;
|
||||
$term_name = $queried_object->taxonomy;
|
||||
}
|
||||
}
|
||||
|
||||
// Reset
|
||||
$template = NULL;
|
||||
|
||||
// Archive Pages (includes search)
|
||||
if ( is_archive() || is_search() ) {
|
||||
if ( ! is_search() ) {
|
||||
// Author
|
||||
if ( is_author() ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'archive/author' );
|
||||
// Date
|
||||
} elseif ( is_date() ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'archive/date' );
|
||||
// Category
|
||||
} elseif ( is_category() ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'archive/categories', $term_id );
|
||||
// Tag
|
||||
} elseif ( is_tag() ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'archive/tags', $term_id );
|
||||
// Products
|
||||
} elseif ( class_exists( 'WooCommerce' ) && is_woocommerce() ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'product_archive/products' );
|
||||
}
|
||||
|
||||
// Search Page
|
||||
} else {
|
||||
$template = Utilities::get_template_slug( $conditions, 'archive/search' );
|
||||
}
|
||||
|
||||
// Posts Page
|
||||
} elseif ( Utilities::is_blog_archive() ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'archive/posts' );
|
||||
}
|
||||
|
||||
// Global - For All Archives
|
||||
if ( is_null($template) ) {
|
||||
$all_archives = Utilities::get_template_slug( $conditions, 'archive/all_archives' );
|
||||
|
||||
if ( ! is_null($all_archives) ) {
|
||||
if ( class_exists( 'WooCommerce' ) && is_shop() ) {
|
||||
$template = null;
|
||||
} else {
|
||||
if ( is_archive() || is_search() || Utilities::is_blog_archive() ) {
|
||||
$template = $all_archives;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
/**
|
||||
** Single Pages Templates Conditions - Free
|
||||
*/
|
||||
public static function single_templates_conditions_free( $conditions ) {
|
||||
global $post;
|
||||
|
||||
// Get Posts
|
||||
$post_id = is_null($post) ? '' : $post->ID;
|
||||
$post_type = is_null($post) ? '' : $post->post_type;
|
||||
|
||||
// Reset
|
||||
$template = NULL;
|
||||
|
||||
// Single Pages
|
||||
if ( is_single() || is_front_page() || is_page() || is_404() ) {
|
||||
|
||||
if ( is_single() ) {
|
||||
// Blog Posts
|
||||
if ( 'post' == $post_type ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'single/posts', $post_id );
|
||||
} elseif ( 'product' == $post_type ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'product_single/product', $post_id );
|
||||
}
|
||||
} else {
|
||||
// Front page
|
||||
if ( is_front_page() && ! Utilities::is_blog_archive() ) {//TODO: is it a good check? - is_blog_archive()
|
||||
$template = Utilities::get_template_slug( $conditions, 'single/front_page' );
|
||||
// Error 404 Page
|
||||
} elseif ( is_404() ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'single/page_404' );
|
||||
// Single Page
|
||||
} elseif ( is_page() ) {
|
||||
$template = Utilities::get_template_slug( $conditions, 'single/pages', $post_id );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Includes;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Editor_Hooks
|
||||
*
|
||||
* Handles Elementor editor hooks and modifications
|
||||
* Including removal of Elementor Pro promotion widgets
|
||||
*/
|
||||
class WPR_Editor_Hooks {
|
||||
|
||||
/**
|
||||
* Instance of this class
|
||||
*
|
||||
* @var WPR_Editor_Hooks
|
||||
*/
|
||||
private static $_instance = null;
|
||||
|
||||
/**
|
||||
* Get instance
|
||||
*
|
||||
* @return WPR_Editor_Hooks
|
||||
*/
|
||||
public static function instance() {
|
||||
if ( is_null( self::$_instance ) ) {
|
||||
self::$_instance = new self();
|
||||
}
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
private function __construct() {
|
||||
$this->add_hooks();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all hooks
|
||||
*/
|
||||
private function add_hooks() {
|
||||
// Remove Elementor Pro Promotion Widgets - Only in editor (not during import)
|
||||
if ( current_user_can('administrator') ) {
|
||||
add_action('elementor/editor/before_enqueue_scripts', [$this, 'conditional_remove_elementor_pro_promotions'], 1);
|
||||
// Detect widgets when page is saved
|
||||
add_action('elementor/editor/after_save', [$this, 'detect_widgets_on_save'], 10, 2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove pro widgets from Elementor transient
|
||||
*
|
||||
* @param mixed $transient Transient data
|
||||
* @return mixed Modified transient data
|
||||
*/
|
||||
public function remove_pro_widgets_from_transient($transient) {
|
||||
// Remove pro_widgets from the Elementor API data
|
||||
if ($transient && isset($transient['pro_widgets'])) {
|
||||
$transient['pro_widgets'] = [];
|
||||
}
|
||||
return $transient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Conditionally remove Elementor Pro promotions
|
||||
* Uses persistent flag for performance - once Royal widgets are used, always hide promotions
|
||||
*/
|
||||
public function conditional_remove_elementor_pro_promotions() {
|
||||
// Check persistent flag first (most efficient) - works everywhere
|
||||
$flag = get_option('wpr_has_used_royal_widgets');
|
||||
|
||||
if ($flag) {
|
||||
$this->remove_elementor_promotions();
|
||||
return;
|
||||
}
|
||||
|
||||
// Only continue for first-time detection in actual Elementor editor (not during imports)
|
||||
$is_editor = isset(\Elementor\Plugin::$instance->editor);
|
||||
$is_edit_mode = $is_editor && \Elementor\Plugin::$instance->editor->is_edit_mode();
|
||||
|
||||
if (!$is_editor || !$is_edit_mode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fallback: Check current page for first-time detection
|
||||
$post_id = get_the_ID();
|
||||
|
||||
if (!$post_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if this page uses Royal widgets
|
||||
$has_widgets = $this->page_has_royal_widgets($post_id);
|
||||
|
||||
if ($has_widgets) {
|
||||
// Set persistent flag for future use
|
||||
update_option('wpr_has_used_royal_widgets', time());
|
||||
|
||||
// Remove promotions
|
||||
$this->remove_elementor_promotions();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect Royal widgets when page is saved and set persistent flag
|
||||
*
|
||||
* @param int $post_id Post ID that was saved
|
||||
* @param array $data Elementor data being saved
|
||||
*/
|
||||
public function detect_widgets_on_save($post_id, $data) {
|
||||
// Skip if flag already set
|
||||
if (get_option('wpr_has_used_royal_widgets')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear cache to force fresh detection
|
||||
delete_transient('wpr_has_widgets_' . $post_id);
|
||||
|
||||
// Check if this page has Royal widgets
|
||||
if ($this->page_has_royal_widgets($post_id)) {
|
||||
update_option('wpr_has_used_royal_widgets', time());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply filters to remove Elementor promotions
|
||||
*/
|
||||
private function remove_elementor_promotions() {
|
||||
add_filter('pre_transient_elementor_remote_info_api_data_' . ELEMENTOR_VERSION,
|
||||
[$this, 'remove_pro_widgets_from_transient'], 999);
|
||||
add_filter('transient_elementor_remote_info_api_data_' . ELEMENTOR_VERSION,
|
||||
[$this, 'remove_pro_widgets_from_transient'], 999);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a page has Royal Addons widgets
|
||||
*
|
||||
* @param int $post_id Post ID to check
|
||||
* @return bool True if Royal widgets found
|
||||
*/
|
||||
private function page_has_royal_widgets($post_id) {
|
||||
// Check cache first
|
||||
$cache_key = 'wpr_has_widgets_' . $post_id;
|
||||
$cached = get_transient($cache_key);
|
||||
if (false !== $cached) {
|
||||
return $cached === 'yes';
|
||||
}
|
||||
|
||||
$has_widgets = false;
|
||||
|
||||
// Method 1: Check _elementor_controls_usage (fastest and most reliable)
|
||||
$controls_usage = get_post_meta($post_id, '_elementor_controls_usage', true);
|
||||
|
||||
if (is_array($controls_usage)) {
|
||||
foreach ($controls_usage as $widget_type => $data) {
|
||||
if (is_string($widget_type) && strpos($widget_type, 'wpr-') === 0) {
|
||||
$has_widgets = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Method 2: Fallback to _elementor_data for unsaved pages
|
||||
if (!$has_widgets) {
|
||||
$elementor_data = get_post_meta($post_id, '_elementor_data', true);
|
||||
|
||||
if (!empty($elementor_data)) {
|
||||
// Handle both array (during import) and string (normal) cases
|
||||
if (is_array($elementor_data)) {
|
||||
$elementor_data = wp_json_encode($elementor_data);
|
||||
}
|
||||
|
||||
if (is_string($elementor_data)) {
|
||||
if (strpos($elementor_data, '"widgetType":"wpr-') !== false) {
|
||||
$has_widgets = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Cache result for 1 hour
|
||||
$cache_value = $has_widgets ? 'yes' : 'no';
|
||||
set_transient($cache_key, $cache_value, HOUR_IN_SECONDS);
|
||||
|
||||
return $has_widgets;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Initialize
|
||||
WPR_Editor_Hooks::instance();
|
||||
@@ -0,0 +1,306 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Includes;
|
||||
|
||||
use WprAddons\Classes\Utilities;
|
||||
use Elementor\Core\Base\Elements_Iteration_Actions\Assets;
|
||||
use Elementor\Core\Files\CSS\Post as Post_CSS;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Render_Templates setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Render_Templates {
|
||||
|
||||
/**
|
||||
** Instance of Elemenntor Frontend class.
|
||||
*
|
||||
** @var \Elementor\Frontend()
|
||||
*/
|
||||
private static $elementor_instance;
|
||||
|
||||
/**
|
||||
** Get Current Theme.
|
||||
*/
|
||||
public $current_theme;
|
||||
|
||||
/**
|
||||
** Royal Themes Array.
|
||||
*/
|
||||
public $royal_themes;
|
||||
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct( $only_hf = false ) {
|
||||
|
||||
// Elementor Frontend
|
||||
self::$elementor_instance = \Elementor\Plugin::instance();
|
||||
|
||||
// Ative Theme
|
||||
$this->current_theme = get_template();
|
||||
|
||||
// Royal Themes
|
||||
$this->royal_themes = ['ashe', 'ashe-pro', 'ashe-pro-premium', 'bard', 'bard-pro', 'bard-pro-premium'];
|
||||
|
||||
// Popular Themes
|
||||
if ( 'astra' === $this->current_theme ) {
|
||||
require_once(__DIR__ . '/../templates/views/astra/class-astra-compat.php');
|
||||
|
||||
} elseif ( 'generatepress' === $this->current_theme ) {
|
||||
require_once(__DIR__ . '/../templates/views/generatepress/class-generatepress-compat.php');
|
||||
|
||||
} elseif ( 'oceanwp' === $this->current_theme ) {
|
||||
require_once(__DIR__ . '/../templates/views/oceanwp/class-oceanwp-compat.php');
|
||||
|
||||
} elseif ( 'storefront' === $this->current_theme ) {
|
||||
require_once(__DIR__ . '/../templates/views/storefront/class-storefront-compat.php');
|
||||
|
||||
// Other Themes
|
||||
} else {
|
||||
add_action( 'wp', [ $this, 'global_compatibility' ] );
|
||||
}
|
||||
|
||||
// Scripts and Styles
|
||||
add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ] );
|
||||
|
||||
// Theme Builder
|
||||
if ( !$only_hf ) { // Prevent Loading in Header or Footer Templates
|
||||
add_filter( 'template_include', [ $this, 'convert_to_canvas' ], 12 ); // 12 after WP Pages and WooCommerce.
|
||||
add_action( 'elementor/page_templates/canvas/wpr_print_content', [ $this, 'canvas_page_content_display' ] );
|
||||
}
|
||||
}
|
||||
|
||||
public function global_compatibility() {
|
||||
add_action( 'get_header', [ $this, 'replace_header' ] );
|
||||
add_action( 'elementor/page_templates/canvas/before_content', [ $this, 'add_canvas_header' ] );
|
||||
|
||||
add_action( 'get_footer', [ $this, 'replace_footer' ] );
|
||||
add_action( 'elementor/page_templates/canvas/after_content', [ $this, 'add_canvas_footer' ], 9 );
|
||||
}
|
||||
|
||||
/**
|
||||
** Check if a Template has Conditions
|
||||
*/
|
||||
public function is_template_available( $type ) {
|
||||
if ( 'content' === $type ) {
|
||||
return !is_null(WPR_Conditions_Manager::canvas_page_content_display_conditions()) ? true : false;
|
||||
} else {
|
||||
$conditions = json_decode( get_option('wpr_'. $type .'_conditions', '[]'), true );
|
||||
$template = WPR_Conditions_Manager::header_footer_display_conditions( $conditions );
|
||||
|
||||
return (!empty( $conditions ) && !is_null($template)) ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Header
|
||||
*/
|
||||
public function replace_header() {
|
||||
if ( $this->is_template_available('header') ) {
|
||||
if ( ! in_array($this->current_theme, $this->royal_themes) ) {
|
||||
require __DIR__ . '/../templates/views/theme-header.php';
|
||||
} else {
|
||||
require __DIR__ . '/../templates/views/royal/theme-header-royal.php';
|
||||
}
|
||||
|
||||
$templates = [];
|
||||
$templates[] = 'header.php';
|
||||
|
||||
remove_all_actions( 'wp_head' ); // Avoid running wp_head hooks again.
|
||||
|
||||
ob_start();
|
||||
locate_template( $templates, true );
|
||||
ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
public function add_canvas_header() {
|
||||
if ( $this->is_template_available('header') ) {
|
||||
$conditions = json_decode( get_option('wpr_header_conditions', '[]'), true );
|
||||
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
||||
$template_id = Utilities::get_template_id($template_slug);
|
||||
|
||||
if ( defined('ICL_LANGUAGE_CODE') ) {
|
||||
$default_language_code = apply_filters('wpml_default_language', null);
|
||||
$current_language_code = apply_filters( 'wpml_current_language', NULL );
|
||||
|
||||
IF ( ICL_LANGUAGE_CODE !== $default_language_code ) {
|
||||
$template_id = apply_filters('wpml_object_id', $template_id, 'wpr_templates', true, $default_language_code);
|
||||
}
|
||||
}
|
||||
|
||||
$show_on_canvas = get_post_meta($template_id, 'wpr_header_show_on_canvas', true);
|
||||
|
||||
// if ( !empty($show_on_canvas) && 'true' === $show_on_canvas && 0 === strpos($template_slug, 'user-header-') ) {
|
||||
if ( !empty($show_on_canvas) && 'true' === $show_on_canvas && !is_null($template_slug) ) {
|
||||
Utilities::render_elementor_template($template_slug);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Footer
|
||||
*/
|
||||
public function replace_footer() {
|
||||
if ( $this->is_template_available('footer') ) {
|
||||
if ( ! in_array($this->current_theme, $this->royal_themes) ) {
|
||||
require __DIR__ . '/../templates/views/theme-footer.php';
|
||||
} else {
|
||||
require __DIR__ . '/../templates/views/royal/theme-footer-royal.php';
|
||||
}
|
||||
|
||||
$templates = [];
|
||||
$templates[] = 'footer.php';
|
||||
|
||||
remove_all_actions( 'wp_footer' ); // Avoid running wp_footer hooks again.
|
||||
|
||||
ob_start();
|
||||
locate_template( $templates, true );
|
||||
ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
||||
public function add_canvas_footer() {
|
||||
if ( $this->is_template_available('footer') ) {
|
||||
$conditions = json_decode( get_option('wpr_footer_conditions', '[]'), true );
|
||||
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
||||
$template_id = Utilities::get_template_id($template_slug);
|
||||
|
||||
if ( defined('ICL_LANGUAGE_CODE') ) {
|
||||
$default_language_code = apply_filters('wpml_default_language', null);
|
||||
$current_language_code = apply_filters( 'wpml_current_language', NULL );
|
||||
|
||||
IF ( ICL_LANGUAGE_CODE !== $default_language_code ) {
|
||||
$template_id = apply_filters('wpml_object_id', $template_id, 'wpr_templates', true, $default_language_code);
|
||||
}
|
||||
}
|
||||
|
||||
$show_on_canvas = get_post_meta($template_id, 'wpr_footer_show_on_canvas', true);
|
||||
|
||||
// if ( !empty($show_on_canvas) && 'true' === $show_on_canvas && 0 === strpos($template_slug, 'user-footer-') ) {
|
||||
if ( !empty($show_on_canvas) && 'true' === $show_on_canvas && !is_null($template_slug) ) {
|
||||
Utilities::render_elementor_template($template_slug);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function convert_to_canvas( $template ) {
|
||||
$is_theme_builder_edit = \Elementor\Plugin::$instance->preview->is_preview_mode() && Utilities::is_theme_builder_template() ? true : false;
|
||||
$_wp_page_template = get_post_meta(get_the_ID(), '_wp_page_template', true);
|
||||
|
||||
if ( $this->is_template_available('content') || $is_theme_builder_edit ) {
|
||||
if ( (is_page() || is_single()) && 'elementor_canvas' === $_wp_page_template && !$is_theme_builder_edit ) {
|
||||
return $template;
|
||||
} else {
|
||||
return WPR_ADDONS_PATH . 'admin/templates/wpr-canvas.php';
|
||||
}
|
||||
} else {
|
||||
return $template;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Theme Builder Content Display
|
||||
*/
|
||||
public function canvas_page_content_display() {
|
||||
// Get Template
|
||||
$template = WPR_Conditions_Manager::canvas_page_content_display_conditions();
|
||||
|
||||
// Display Template
|
||||
Utilities::render_elementor_template( $template );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue styles and scripts.
|
||||
*/
|
||||
public function enqueue_scripts() {
|
||||
|
||||
if ( !class_exists( '\Elementor\Plugin' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Elementor Frontend // Maybe we dont need this (should be extra, because we have everything below)
|
||||
// self::$elementor_instance->frontend->enqueue_styles();
|
||||
|
||||
// if ( class_exists( '\ElementorPro\Plugin' ) ) {
|
||||
// $elementor_pro = \ElementorPro\Plugin::instance();
|
||||
// $elementor_pro->enqueue_frontend_scripts();
|
||||
// }
|
||||
|
||||
// Load Header Template CSS File
|
||||
$heder_conditions = json_decode( get_option('wpr_header_conditions', '[]'), true );
|
||||
$heder_template = WPR_Conditions_Manager::header_footer_display_conditions($heder_conditions);
|
||||
$header_template_id = !is_null($heder_template) ? Utilities::get_template_id($heder_template) : false;
|
||||
|
||||
if ( false !== $header_template_id ) {
|
||||
|
||||
// Load Header Template Assets (Elementor Widget)
|
||||
if ( ! self::$elementor_instance->preview->is_preview_mode() ) {
|
||||
$page_assets = get_post_meta( $header_template_id, Assets::ASSETS_META_KEY, true );
|
||||
if ( ! empty( $page_assets ) ) {
|
||||
self::$elementor_instance->assets_loader->enable_assets( $page_assets );
|
||||
}
|
||||
|
||||
$css_file = Post_CSS::create( get_the_ID() );
|
||||
$css_file->enqueue();
|
||||
}
|
||||
|
||||
// Header Template CSS File
|
||||
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
||||
$header_css_file = new \Elementor\Core\Files\CSS\Post( $header_template_id );
|
||||
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
||||
$header_css_file = new \Elementor\Post_CSS_File( $header_template_id );
|
||||
}
|
||||
|
||||
$header_css_file->enqueue();
|
||||
}
|
||||
|
||||
// Load Footer Template CSS File
|
||||
$footer_conditions = json_decode( get_option('wpr_footer_conditions', '[]'), true );
|
||||
$footer_template = WPR_Conditions_Manager::header_footer_display_conditions($footer_conditions);
|
||||
$footer_template_id = !is_null($footer_template) ? Utilities::get_template_id($footer_template) : false;
|
||||
|
||||
if ( false !== $footer_template_id ) {
|
||||
// Load Footer Template Assets (Elementor Widget)
|
||||
if ( ! self::$elementor_instance->preview->is_preview_mode() ) {
|
||||
$page_assets = get_post_meta( $footer_template_id, Assets::ASSETS_META_KEY, true );
|
||||
if ( ! empty( $page_assets ) ) {
|
||||
self::$elementor_instance->assets_loader->enable_assets( $page_assets );
|
||||
}
|
||||
|
||||
$css_file = Post_CSS::create( get_the_ID() );
|
||||
$css_file->enqueue();
|
||||
}
|
||||
|
||||
// Footer Template CSS File
|
||||
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
||||
$footer_css_file = new \Elementor\Core\Files\CSS\Post( $footer_template_id );
|
||||
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
||||
$footer_css_file = new \Elementor\Post_CSS_File( $footer_template_id );
|
||||
}
|
||||
|
||||
$footer_css_file->enqueue();
|
||||
}
|
||||
|
||||
// Load Canvas Content Template CSS File
|
||||
$canvas_conditions = WPR_Conditions_Manager::canvas_page_content_display_conditions();
|
||||
$canvas_template_id = !empty($canvas_conditions) ? Utilities::get_template_id($canvas_conditions) : false;
|
||||
|
||||
if ( false !== $canvas_template_id ) {
|
||||
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
||||
$footer_css_file = new \Elementor\Core\Files\CSS\Post( $canvas_template_id );
|
||||
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
||||
$footer_css_file = new \Elementor\Post_CSS_File( $canvas_template_id );
|
||||
}
|
||||
|
||||
$footer_css_file->enqueue();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,569 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Includes;
|
||||
|
||||
use WprAddons\Plugin;
|
||||
use Elementor\TemplateLibrary\Source_Base;
|
||||
use Elementor\Core\Common\Modules\Ajax\Module as Ajax;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* WPR_Templates_Actions setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Actions {
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Save Conditions
|
||||
add_action( 'wp_ajax_wpr_save_template_conditions', [ $this, 'wpr_save_template_conditions' ] );
|
||||
|
||||
// Create Template
|
||||
add_action( 'wp_ajax_wpr_create_template', [ $this, 'wpr_create_template' ] );
|
||||
|
||||
// Import Library Template
|
||||
add_action( 'wp_ajax_wpr_import_library_template', [ $this, 'wpr_import_library_template' ] );
|
||||
|
||||
// Reset Template
|
||||
add_action( 'wp_ajax_wpr_delete_template', [ $this, 'wpr_delete_template' ] );
|
||||
|
||||
// Register Elementor AJAX Actions
|
||||
add_action( 'elementor/ajax/register_actions', [ $this, 'register_elementor_ajax_actions' ] );
|
||||
|
||||
// Enqueue Scripts
|
||||
add_action( 'admin_enqueue_scripts', [ $this, 'templates_library_scripts' ] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
** Save Template Conditions
|
||||
*/
|
||||
public function wpr_save_template_conditions() {
|
||||
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-options-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
$template = isset($_POST['template']) ? sanitize_text_field(wp_unslash($_POST['template'])): false;
|
||||
|
||||
// Header
|
||||
if ( isset($_POST['wpr_header_conditions']) ) {
|
||||
update_option( 'wpr_header_conditions', $this->sanitize_conditions($_POST['wpr_header_conditions']) ); // phpcs:ignore
|
||||
|
||||
$wpr_header_show_on_canvas = isset($_POST['wpr_header_show_on_canvas']) ? sanitize_text_field(wp_unslash($_POST['wpr_header_show_on_canvas'])): false;
|
||||
if ( $wpr_header_show_on_canvas && $template ) {
|
||||
update_post_meta( Utilities::get_template_id($template), 'wpr_header_show_on_canvas', $wpr_header_show_on_canvas );
|
||||
}
|
||||
}
|
||||
|
||||
// Footer
|
||||
if ( isset($_POST['wpr_footer_conditions']) ) {
|
||||
update_option( 'wpr_footer_conditions', $this->sanitize_conditions($_POST['wpr_footer_conditions']) ); // phpcs:ignore
|
||||
|
||||
$wpr_footer_show_on_canvas = isset($_POST['wpr_footer_show_on_canvas']) ? sanitize_text_field(wp_unslash($_POST['wpr_footer_show_on_canvas'])): false;
|
||||
if ( $wpr_footer_show_on_canvas && $template ) {
|
||||
update_post_meta( Utilities::get_template_id($template), 'wpr_footer_show_on_canvas', $wpr_footer_show_on_canvas );
|
||||
}
|
||||
}
|
||||
|
||||
// Archive
|
||||
if ( isset($_POST['wpr_archive_conditions']) ) {
|
||||
update_option( 'wpr_archive_conditions', $this->sanitize_conditions($_POST['wpr_archive_conditions']) ); // phpcs:ignore
|
||||
}
|
||||
|
||||
// Single
|
||||
if ( isset($_POST['wpr_single_conditions']) ) {
|
||||
update_option( 'wpr_single_conditions', $this->sanitize_conditions($_POST['wpr_single_conditions']) ); // phpcs:ignore
|
||||
}
|
||||
|
||||
// Product Archive
|
||||
if ( isset($_POST['wpr_product_archive_conditions']) ) {
|
||||
update_option( 'wpr_product_archive_conditions', $this->sanitize_conditions($_POST['wpr_product_archive_conditions']) ); // phpcs:ignore
|
||||
}
|
||||
|
||||
// Product Single
|
||||
if ( isset($_POST['wpr_product_single_conditions']) ) {
|
||||
update_option( 'wpr_product_single_conditions', $this->sanitize_conditions($_POST['wpr_product_single_conditions']) ); // phpcs:ignore
|
||||
}
|
||||
|
||||
// Popup
|
||||
if ( isset($_POST['wpr_popup_conditions']) ) {
|
||||
update_option( 'wpr_popup_conditions', $this->sanitize_conditions($_POST['wpr_popup_conditions']) ); // phpcs:ignore
|
||||
}
|
||||
}
|
||||
|
||||
public function sanitize_conditions( $data ) {
|
||||
return wp_unslash( json_encode( array_filter( json_decode(stripcslashes($data), true) ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
** Create Template
|
||||
*/
|
||||
public function wpr_create_template() {
|
||||
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-options-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
$user_template_type = isset($_POST['user_template_type']) ? sanitize_text_field(wp_unslash($_POST['user_template_type'])): false;
|
||||
$user_template_library = isset($_POST['user_template_library']) ? sanitize_text_field(wp_unslash($_POST['user_template_library'])): false;
|
||||
$user_template_title = isset($_POST['user_template_title']) ? sanitize_text_field(wp_unslash($_POST['user_template_title'])): false;
|
||||
$user_template_slug = isset($_POST['user_template_slug']) ? sanitize_text_field(wp_unslash($_POST['user_template_slug'])): false;
|
||||
|
||||
$check_post_type =( $user_template_library == 'wpr_templates' || $user_template_library == 'elementor_library' );
|
||||
|
||||
if ( $user_template_title && $check_post_type ) {
|
||||
// Create
|
||||
$template_id = wp_insert_post(array (
|
||||
'post_type' => $user_template_library,
|
||||
'post_title' => $user_template_title,
|
||||
'post_name' => $user_template_slug,
|
||||
'post_content' => '',
|
||||
'post_status' => 'publish'
|
||||
));
|
||||
|
||||
// Set Types
|
||||
if ( 'wpr_templates' === $_POST['user_template_library'] ) {
|
||||
|
||||
wp_set_object_terms( $template_id, [$user_template_type, 'user'], 'wpr_template_type' );
|
||||
|
||||
if ( 'popup' === $_POST['user_template_type'] ) {
|
||||
update_post_meta( $template_id, '_elementor_template_type', 'wpr-popups' );
|
||||
} else {
|
||||
if ( 'header' === $_POST['user_template_type'] ) {
|
||||
update_post_meta( $template_id, '_elementor_template_type', 'wpr-theme-builder-header' );
|
||||
} elseif ( 'footer' === $_POST['user_template_type'] ) {
|
||||
update_post_meta( $template_id, '_elementor_template_type', 'wpr-theme-builder-footer' );
|
||||
} else {
|
||||
update_post_meta( $template_id, '_elementor_template_type', 'wpr-theme-builder' );
|
||||
}
|
||||
|
||||
update_post_meta( $template_id, '_wpr_template_type', $user_template_type );
|
||||
}
|
||||
} else {
|
||||
update_post_meta( $template_id, '_elementor_template_type', 'page' );
|
||||
}
|
||||
|
||||
// Set Canvas Template
|
||||
update_post_meta( $template_id, '_wp_page_template', 'elementor_canvas' ); //tmp - maybe set for wpr_templates only
|
||||
|
||||
// Send ID to JS
|
||||
echo esc_html($template_id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Import Library Template
|
||||
*/
|
||||
public function wpr_import_library_template() {
|
||||
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-addons-library-frontend-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
$source = new WPR_Library_Source();
|
||||
$slug = isset($_POST['slug']) ? sanitize_text_field(wp_unslash($_POST['slug'])) : '';
|
||||
$kit = isset($_POST['kit']) ? sanitize_text_field(wp_unslash($_POST['kit'])) : '';
|
||||
$section = isset($_POST['section']) ? sanitize_text_field(wp_unslash($_POST['section'])) : '';
|
||||
|
||||
$data = $source->get_data([
|
||||
'template_id' => $slug,
|
||||
'kit_id' => $kit,
|
||||
'section_id' => $section
|
||||
]);
|
||||
|
||||
$template = '' !== $kit ? $kit : $slug;
|
||||
if ( $this->vts($slug) ) {
|
||||
echo json_encode($data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Validate Template
|
||||
*/
|
||||
public function vts( $template ) {
|
||||
// Avoid Cache
|
||||
$randomNum = substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyzABCDEFGHIJKLMNOPQRSTVWXYZ"), 0, 7);
|
||||
|
||||
$remote_file_url = 'https://royal-elementor-addons.com/library/vts.json?='. $randomNum;
|
||||
|
||||
$tmp_file = download_url( $remote_file_url );
|
||||
|
||||
$file_args = [
|
||||
'name' => 'vts.json',
|
||||
'tmp_name' => $tmp_file,
|
||||
'error' => 0,
|
||||
'size' => filesize( $tmp_file ),
|
||||
];
|
||||
|
||||
$defaults = array(
|
||||
'test_form' => false,
|
||||
'test_size' => true,
|
||||
'test_upload' => true,
|
||||
'mimes' => [
|
||||
'xml' => 'text/xml',
|
||||
'json' => 'text/plain',
|
||||
],
|
||||
'wp_handle_sideload' => 'upload',
|
||||
);
|
||||
|
||||
$local_file = wp_handle_sideload( $file_args, $defaults );
|
||||
|
||||
if ( isset( $local_file['error'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$tmps = json_decode(file_get_contents($local_file['file']));
|
||||
|
||||
// Delete Import File
|
||||
unlink( $local_file['file'] );
|
||||
|
||||
return in_array($template, $tmps) && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ? false : true;
|
||||
}
|
||||
|
||||
/**
|
||||
** Reset Template
|
||||
*/
|
||||
public function wpr_delete_template() {
|
||||
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'delete_post-' . $_POST['template_slug'] ) || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
$template_slug = isset($_POST['template_slug']) ? sanitize_text_field(wp_unslash($_POST['template_slug'])): '';
|
||||
$template_library = isset($_POST['template_library']) ? sanitize_text_field(wp_unslash($_POST['template_library'])): '';
|
||||
|
||||
$post = get_page_by_path( $template_slug, OBJECT, $template_library );
|
||||
|
||||
if ( get_post_type($post->ID) == 'wpr_templates' || get_post_type($post->ID) == 'elementor_library' ) {
|
||||
wp_delete_post( $post->ID, true );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Enqueue Scripts and Styles
|
||||
*/
|
||||
public function templates_library_scripts( $hook ) {
|
||||
|
||||
// Get Plugin Version
|
||||
$version = Plugin::instance()->get_version();
|
||||
|
||||
$screen = get_current_screen();
|
||||
|
||||
|
||||
if ( $screen->id === 'edit-wpr_templates' ) {
|
||||
$custom_css = '
|
||||
.wpr-templates-cat-select,
|
||||
.wpr-templates-cat-select option,
|
||||
.wpr-templates-cat-select option:checked {
|
||||
text-transform: capitalize !important;
|
||||
}
|
||||
';
|
||||
|
||||
wp_add_inline_style( 'wp-admin', $custom_css );
|
||||
}
|
||||
|
||||
// Deny if NOT Plugin Page
|
||||
if ( 'toplevel_page_wpr-addons' == $hook || strpos($hook, 'wpr-theme-builder') || strpos($hook, 'wpr-popups') ) {
|
||||
|
||||
// Color Picker
|
||||
wp_enqueue_style( 'wp-color-picker' );
|
||||
wp_enqueue_script( 'wp-color-picker-alpha', WPR_ADDONS_URL .'assets/js/admin/lib/wp-color-picker-alpha.min.js', ['jquery', 'wp-color-picker'], $version, true );
|
||||
|
||||
// Media Upload
|
||||
if ( ! did_action( 'wp_enqueue_media' ) ) {
|
||||
wp_enqueue_media();
|
||||
}
|
||||
|
||||
// enqueue CSS
|
||||
wp_enqueue_style( 'wpr-plugin-options-css', WPR_ADDONS_URL .'assets/css/admin/plugin-options.css', [], $version );
|
||||
|
||||
// enqueue JS
|
||||
wp_enqueue_script( 'wpr-plugin-options-js', WPR_ADDONS_URL .'assets/js/admin/plugin-options.js', ['jquery'], $version );
|
||||
|
||||
wp_localize_script(
|
||||
'wpr-plugin-options-js',
|
||||
'WprPluginOptions', // This is used in the js file to group all of your scripts together
|
||||
[
|
||||
'nonce' => wp_create_nonce( 'wpr-plugin-options-js' ),
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if ( strpos($hook, 'wpr-templates-kit') ) {
|
||||
wp_enqueue_style( 'wpr-templates-kit-css', WPR_ADDONS_URL .'assets/css/admin/templates-kit.css', [], $version );
|
||||
wp_enqueue_script( 'wpr-templates-kit-js', WPR_ADDONS_URL .'assets/js/admin/templates-kit.js', ['jquery', 'updates'], $version );
|
||||
|
||||
wp_localize_script(
|
||||
'wpr-templates-kit-js',
|
||||
'WprTemplatesKitLoc', // This is used in the js file to group all of your scripts together
|
||||
[
|
||||
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
||||
'resturl' => get_rest_url() . 'wpraddons/v1',
|
||||
'nonce' => wp_create_nonce( 'wpr-templates-kit-js' ),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
if ( strpos($hook, 'wpr-premade-blocks') ) {
|
||||
wp_enqueue_style( 'wpr-premade-blocks-css', WPR_ADDONS_URL .'assets/css/admin/premade-blocks.css', [], $version );
|
||||
|
||||
wp_enqueue_script( 'wpr-macy-js', WPR_ADDONS_URL .'assets/js/lib/macy/macy.js', ['jquery'], $version );
|
||||
wp_enqueue_script( 'wpr-premade-blocks-js', WPR_ADDONS_URL .'assets/js/admin/premade-blocks.js', ['jquery'], $version );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Register Elementor AJAX Actions
|
||||
*/
|
||||
public function register_elementor_ajax_actions( Ajax $ajax ) {
|
||||
|
||||
// Elementor Search Data
|
||||
$ajax->register_ajax_action( 'wpr_elementor_search_data', function( $data ) {
|
||||
// Freemius OptIn
|
||||
if ( ! (wpr_fs()->is_registered() && wpr_fs()->is_tracking_allowed() || wpr_fs()->is_pending_activation() )) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( strlen($data['search_query']) > 25 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Send Search Query
|
||||
wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/elementor-search/data', [
|
||||
'body' => [
|
||||
'search_query' => $data['search_query']
|
||||
]
|
||||
] );
|
||||
} );
|
||||
|
||||
// Templates Library Pages Search Data
|
||||
$ajax->register_ajax_action( 'wpr_templates_library_search_data', function( $data ) {
|
||||
// Freemius OptIn
|
||||
if ( ! (wpr_fs()->is_registered() && wpr_fs()->is_tracking_allowed() || wpr_fs()->is_pending_activation() )) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( strlen($data['search_query']) > 25 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Send Search Query
|
||||
wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-search/data', [
|
||||
'body' => [
|
||||
'search_query' => $data['search_query']
|
||||
]
|
||||
] );
|
||||
} );
|
||||
|
||||
// Templates Library Blocks Search Data
|
||||
$ajax->register_ajax_action( 'wpr_templates_library_blocks_search_data', function( $data ) {
|
||||
// Freemius OptIn
|
||||
if ( ! (wpr_fs()->is_registered() && wpr_fs()->is_tracking_allowed() || wpr_fs()->is_pending_activation() )) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( strlen($data['search_query']) > 25 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Send Search Query
|
||||
wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-blocks-search/data', [
|
||||
'body' => [
|
||||
'search_query' => $data['search_query']
|
||||
]
|
||||
] );
|
||||
} );
|
||||
|
||||
// Templates Library Sections Search Data
|
||||
$ajax->register_ajax_action( 'wpr_templates_library_sections_search_data', function( $data ) {
|
||||
// Freemius OptIn
|
||||
if ( ! (wpr_fs()->is_registered() && wpr_fs()->is_tracking_allowed() || wpr_fs()->is_pending_activation() )) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( strlen($data['search_query']) > 25 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Send Search Query
|
||||
wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-sections-search/data', [
|
||||
'body' => [
|
||||
'search_query' => $data['search_query']
|
||||
]
|
||||
] );
|
||||
} );
|
||||
|
||||
// Library Template Import Finished
|
||||
$ajax->register_ajax_action( 'wpr_library_template_import_finished', function( $data ) {
|
||||
Utilities::regenerate_extra_image_sizes();
|
||||
|
||||
// Freemius OptIn
|
||||
if ( ! (wpr_fs()->is_registered() && wpr_fs()->is_tracking_allowed() || wpr_fs()->is_pending_activation() )) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Templates Library Import Block
|
||||
if ( isset($data['block'])) {
|
||||
wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-blocks-import/data', [
|
||||
'body' => [
|
||||
'imported_block' => $data['block']
|
||||
]
|
||||
] );
|
||||
}
|
||||
|
||||
// Templates Library Import Section
|
||||
if ( isset($data['section'])) {
|
||||
wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-sections-import/data', [
|
||||
'body' => [
|
||||
'imported_section' => $data['section']
|
||||
]
|
||||
] );
|
||||
}
|
||||
|
||||
if ( ! isset($data['kit']) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Templates Library Import Template
|
||||
wp_remote_post( 'https://reastats.kinsta.cloud/wp-json/templates-library-import/data', [
|
||||
'body' => [
|
||||
'imported_template' => $data['kit'] .'-'. $data['template'] . ' *'. WPR_ADDONS_VERSION .'*'
|
||||
]
|
||||
] );
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Templates_Actions setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Library_Source extends \Elementor\TemplateLibrary\Source_Base {
|
||||
|
||||
public function get_id() {
|
||||
return 'wpr-layout-manager';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return 'WPR Layout Manager';
|
||||
}
|
||||
|
||||
public function register_data() {}
|
||||
|
||||
public function save_item( $template_data ) {
|
||||
return new \WP_Error( 'invalid_request', 'Cannot save template to a WPR layout manager' );
|
||||
}
|
||||
|
||||
public function update_item( $new_data ) {
|
||||
return new \WP_Error( 'invalid_request', 'Cannot update template to a WPR layout manager' );
|
||||
}
|
||||
|
||||
public function delete_template( $template_id ) {
|
||||
return new \WP_Error( 'invalid_request', 'Cannot delete template from a WPR layout manager' );
|
||||
}
|
||||
|
||||
public function export_template( $template_id ) {
|
||||
return new \WP_Error( 'invalid_request', 'Cannot export template from a WPR layout manager' );
|
||||
}
|
||||
|
||||
public function get_items( $args = [] ) {
|
||||
return [];
|
||||
}
|
||||
|
||||
public function get_item( $template_id ) {
|
||||
$templates = $this->get_items();
|
||||
|
||||
return $templates[ $template_id ];
|
||||
}
|
||||
|
||||
public function request_template_data( $template_id, $kit_id, $section_id ) {
|
||||
if ( empty( $template_id ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( '' !== $kit_id ) {
|
||||
$url = 'https://royal-elementor-addons.com/library/templates-kit/'. $kit_id .'/';
|
||||
} elseif ( '' !== $section_id ) {
|
||||
$url = 'https://royal-elementor-addons.com/library/premade-sections/';
|
||||
// $url = 'https://royal-elementor-addons.com/library/premade-sections/'. $kit_id .'/';
|
||||
} else {
|
||||
$url = 'https://royal-elementor-addons.com/library/premade-styles/';
|
||||
}
|
||||
|
||||
// Avoid Cache
|
||||
$randomNum = substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyzABCDEFGHIJKLMNOPQRSTVWXYZ"), 0, 7);
|
||||
|
||||
$response = wp_remote_get($url . $template_id .'.json?='. $randomNum, [
|
||||
'timeout' => 60,
|
||||
'sslverify' => false
|
||||
] );
|
||||
|
||||
return wp_remote_retrieve_body( $response );
|
||||
}
|
||||
|
||||
public function get_data( array $args ) {
|
||||
$data = $this->request_template_data( $args['template_id'], $args['kit_id'], $args['section_id'] );
|
||||
|
||||
$data = json_decode( $data, true );
|
||||
|
||||
if ( empty( $data ) || empty( $data['content'] ) ) {
|
||||
throw new \Exception( 'Template does not have any content' );
|
||||
}
|
||||
|
||||
add_filter( 'intermediate_image_sizes_advanced', [new Utilities, 'disable_extra_image_sizes'], 10, 3 );
|
||||
|
||||
// Remove Parallax Images from Import File
|
||||
foreach( $data['content'] as $key => $content ) {
|
||||
if ( isset($data['content'][$key]['settings']['bg_image']) ) {
|
||||
unset($data['content'][$key]['settings']['bg_image']);
|
||||
}
|
||||
if ( isset($data['content'][$key]['settings']['hover_parallax']) ) {
|
||||
unset($data['content'][$key]['settings']['hover_parallax']);
|
||||
}
|
||||
}
|
||||
|
||||
$parallax_bg = get_option('wpr-parallax-background', 'on');
|
||||
$parallax_multi = get_option('wpr-parallax-multi-layer', 'on');
|
||||
|
||||
// Disable Extensions during Import
|
||||
if ( 'on' === $parallax_bg ) {
|
||||
update_option('wpr-parallax-background', '');
|
||||
}
|
||||
if ( 'on' === $parallax_multi ) {
|
||||
update_option('wpr-parallax-multi-layer', '');
|
||||
}
|
||||
|
||||
$data['content'] = $this->replace_elements_ids( $data['content'] );
|
||||
$data['content'] = $this->process_export_import_content( $data['content'], 'on_import' );
|
||||
|
||||
// Enable Back
|
||||
if ( 'on' === $parallax_bg ) {
|
||||
update_option('wpr-parallax-background', 'on');
|
||||
}
|
||||
if ( 'on' === $parallax_multi ) {
|
||||
update_option('wpr-parallax-multi-layer', 'on');
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Includes;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Templates_Category_Filter setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Category_Filter {
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
// $which (the position of the filters form) is either 'top' or 'bottom'
|
||||
add_action( 'restrict_manage_posts', function ( $post_type, $which ) {
|
||||
if ( 'top' === $which && 'wpr_templates' === $post_type ) {
|
||||
$taxonomy = 'wpr_template_type';
|
||||
$tax = get_taxonomy( $taxonomy ); // get the taxonomy object/data
|
||||
$cat = filter_input( INPUT_GET, $taxonomy ); // get the selected category slug
|
||||
|
||||
echo '<label class="screen-reader-text" for="wpr_template_type">Filter by ' .
|
||||
esc_html( $tax->labels->singular_name ) . '</label>';
|
||||
|
||||
wp_dropdown_categories( [
|
||||
'walker' => new WPR_Custom_Walker_CategoryDropdown(),
|
||||
'class' => 'wpr-templates-cat-select',
|
||||
'show_option_all' => $tax->labels->all_items,
|
||||
'hide_empty' => 0, // include categories that have no posts
|
||||
'hierarchical' => $tax->hierarchical,
|
||||
'show_count' => 0, // don't show the category's posts count
|
||||
'orderby' => 'name',
|
||||
'selected' => $cat,
|
||||
'taxonomy' => $taxonomy,
|
||||
'name' => $taxonomy,
|
||||
'value_field' => 'slug',
|
||||
] );
|
||||
}
|
||||
}, 10, 2 );
|
||||
}
|
||||
}
|
||||
|
||||
new WPR_Templates_Category_Filter();
|
||||
|
||||
class WPR_Custom_Walker_CategoryDropdown extends \Walker_CategoryDropdown {
|
||||
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
||||
$pad = str_repeat(' ', $depth * 3);
|
||||
|
||||
// Here you can modify the category name
|
||||
$cat_name = apply_filters('list_cats', $category->name, $category);
|
||||
|
||||
// Customization example: append count
|
||||
if( $args['show_count'] ) {
|
||||
$cat_name .= ' ('. $category->count .')';
|
||||
}
|
||||
|
||||
$output .= "\t<option class=\"level-$depth\" value=\"".$category->slug."\"";
|
||||
if ( $category->slug == $args['selected'] ) {
|
||||
$output .= ' selected="selected"';
|
||||
}
|
||||
$output .= '>';
|
||||
$output .= str_replace('_', ' ', $pad.$cat_name);
|
||||
if ( $args['show_count'] ) {
|
||||
$output .= ' ('. $category->count .')';
|
||||
}
|
||||
$output .= "</option>\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
||||
use WprAddons\Admin\Includes\WPR_Templates_Shortcode;
|
||||
use WprAddons\Admin\Includes\WPR_Templates_Modal_Popups;
|
||||
use WprAddons\Admin\Includes\WPR_Templates_Actions;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Library_Blocks;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Library_Sections;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Library_Pages;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Library_Popups;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
/**
|
||||
* WPR_Templates_Library setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Library {
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Register CPTs
|
||||
add_action( 'init', [ $this, 'register_templates_library_cpt' ] );
|
||||
add_action( 'template_redirect', [ $this, 'block_template_frontend' ] );
|
||||
add_action( 'current_screen', [ $this, 'redirect_to_options_page' ] );
|
||||
|
||||
// Templates Shortcode
|
||||
new WPR_Templates_Shortcode();
|
||||
|
||||
// Init Popups
|
||||
new WPR_Templates_Modal_Popups();
|
||||
|
||||
// Init Theme Builder
|
||||
new WPR_Render_Templates();
|
||||
|
||||
// Template Actions
|
||||
new WPR_Templates_Actions();
|
||||
|
||||
// Add Blocks to Library
|
||||
new WPR_Templates_Library_Blocks();
|
||||
|
||||
// Add Sections to Library
|
||||
new WPR_Templates_Library_Sections();
|
||||
|
||||
// Add Pages to Library
|
||||
new WPR_Templates_Library_Pages();
|
||||
|
||||
// Add Popups to Library
|
||||
new WPR_Templates_Library_Popups();
|
||||
|
||||
// Enable Elementor for 'wpr_templates'
|
||||
$this->add_elementor_cpt_support();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
** Register Templates Library
|
||||
*/
|
||||
public function redirect_to_options_page() {
|
||||
if ( get_current_screen()->post_type == 'wpr_templates' && isset($_GET['action']) && $_GET['action'] == 'edit' ) {
|
||||
$elementor_template_type = isset($_GET['post']) ? sanitize_text_field(wp_unslash($_GET['post'])) : '';
|
||||
|
||||
if ( 'wpr-popups' === Utilities::get_elementor_template_type( $elementor_template_type ) ) {
|
||||
wp_redirect('admin.php?page=wpr-popups');
|
||||
} else {
|
||||
wp_redirect('admin.php?page=wpr-theme-builder');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function register_templates_library_cpt() {
|
||||
|
||||
$args = array(
|
||||
'label' => esc_html__( 'Royal Templates', 'wpr-addons' ),
|
||||
'public' => true,
|
||||
'rewrite' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_menu' => false,
|
||||
'show_in_nav_menus' => false,
|
||||
'exclude_from_search' => true,
|
||||
'capability_type' => 'post',
|
||||
'hierarchical' => false,
|
||||
);
|
||||
|
||||
register_post_type( 'wpr_templates', $args );
|
||||
|
||||
$tax_args = [
|
||||
'hierarchical' => true,
|
||||
'show_ui' => true,
|
||||
'show_in_nav_menus' => false,
|
||||
'show_admin_column' => true,
|
||||
'query_var' => is_admin(),
|
||||
'rewrite' => false,
|
||||
'public' => false,
|
||||
];
|
||||
|
||||
register_taxonomy( 'wpr_template_type', 'wpr_templates', $tax_args );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
** Don't display on the frontend for non edit_posts capable users
|
||||
*/
|
||||
public function block_template_frontend() {
|
||||
if ( is_singular( 'wpr_templates' ) && ! current_user_can( 'edit_posts' ) ) {
|
||||
wp_redirect( site_url(), 301 );
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*** Add elementor support for wpr_templates.
|
||||
**/
|
||||
function add_elementor_cpt_support() {
|
||||
if ( ! is_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$cpt_support = get_option( 'elementor_cpt_support' );
|
||||
|
||||
if ( ! $cpt_support ) {
|
||||
update_option( 'elementor_cpt_support', ['post', 'page', 'wpr_templates'] );
|
||||
} elseif ( ! in_array( 'wpr_templates', $cpt_support ) ) {
|
||||
$cpt_support[] = 'wpr_templates';
|
||||
update_option( 'elementor_cpt_support', $cpt_support );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new WPR_Templates_Library();
|
||||
@@ -0,0 +1,524 @@
|
||||
<?php
|
||||
|
||||
namespace WprAddons\Admin\Includes;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
/**
|
||||
** WPR_Templates_Loop setup
|
||||
*/
|
||||
class WPR_Templates_Loop {
|
||||
|
||||
/**
|
||||
** Loop Through Custom Templates
|
||||
*/
|
||||
public static function render_theme_builder_templates( $template ) {
|
||||
// WP_Query arguments
|
||||
$args = array (
|
||||
'post_type' => array( 'wpr_templates' ),
|
||||
'post_status' => array( 'publish' ),
|
||||
'posts_per_page' => -1,
|
||||
'tax_query' => array(
|
||||
array(
|
||||
'taxonomy' => 'wpr_template_type',
|
||||
'field' => 'slug',
|
||||
'terms' => [ $template, 'user' ],
|
||||
'operator' => 'AND'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// The Query
|
||||
$user_templates = get_posts( $args );
|
||||
|
||||
// The Loop
|
||||
echo '<ul class="wpr-'. esc_attr($template) .'-templates-list wpr-my-templates-list" data-pro="'. esc_attr(defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code()) .'">';
|
||||
|
||||
if ( ! empty( $user_templates ) ) {
|
||||
foreach ( $user_templates as $user_template ) {
|
||||
$slug = $user_template->post_name;
|
||||
|
||||
if ( !str_contains( $slug, 'user-' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$edit_url = str_replace( 'edit', 'elementor', get_edit_post_link( $user_template->ID ) );
|
||||
$show_on_canvas = get_post_meta(Utilities::get_template_id($slug), 'wpr_'. $template .'_show_on_canvas', true);
|
||||
|
||||
echo '<li>';
|
||||
echo '<h3 class="wpr-title">'. esc_html($user_template->post_title) .'</h3>';
|
||||
|
||||
echo '<div class="wpr-action-buttons">';
|
||||
// Activate
|
||||
echo '<span class="wpr-template-conditions button button-primary" data-slug="'. esc_attr($slug) .'" data-show-on-canvas="'. esc_attr($show_on_canvas) .'">'. esc_html__( 'Manage Conditions', 'wpr-addons' ) .'</span>';
|
||||
// Edit
|
||||
echo '<a href="'. esc_url($edit_url) .'" class="wpr-edit-template button button-primary">'. esc_html__( 'Edit Template', 'wpr-addons' ) .'</a>';
|
||||
|
||||
// Delete
|
||||
$one_time_nonce = wp_create_nonce( 'delete_post-' . $slug );
|
||||
|
||||
echo '<span class="wpr-delete-template button button-primary" data-nonce="'. esc_attr($one_time_nonce) .'" data-slug="'. esc_attr($slug) .'" data-warning="'. esc_html__( 'Are you sure you want to delete this template?', 'wpr-addons' ) .'"><span class="dashicons dashicons-no-alt"></span></span>';
|
||||
|
||||
|
||||
echo '</div>';
|
||||
echo '</li>';
|
||||
}
|
||||
} else {
|
||||
echo '<li class="wpr-no-templates">You don\'t have any templates yet!</li>';
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
|
||||
// Restore original Post Data
|
||||
wp_reset_postdata();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
** Loop Through My Templates
|
||||
*/
|
||||
public static function render_elementor_saved_templates() {
|
||||
|
||||
// WP_Query arguments
|
||||
$args = array (
|
||||
'post_type' => array( 'elementor_library' ),
|
||||
'post_status' => array( 'publish' ),
|
||||
'meta_key' => '_elementor_template_type',
|
||||
'meta_value' => ['page', 'section'],
|
||||
'numberposts' => -1
|
||||
);
|
||||
|
||||
// The Query
|
||||
$user_templates = get_posts( $args );
|
||||
|
||||
// My Templates List
|
||||
echo '<ul class="wpr-my-templates-list striped">';
|
||||
|
||||
// The Loop
|
||||
if ( ! empty( $user_templates ) ) {
|
||||
foreach ( $user_templates as $user_template ) {
|
||||
// Edit URL
|
||||
$edit_url = str_replace( 'edit', 'elementor', get_edit_post_link( $user_template->ID ) );
|
||||
|
||||
// List
|
||||
echo '<li>';
|
||||
echo '<h3 class="wpr-title">'. esc_html($user_template->post_title) .'</h3>';
|
||||
|
||||
echo '<span class="wpr-action-buttons">';
|
||||
echo '<a href="'. esc_url($edit_url) .'" class="wpr-edit-template button button-primary">'. esc_html__( 'Edit', 'wpr-addons' ) .'</a>';
|
||||
echo '<span class="wpr-delete-template button button-primary" data-slug="'. esc_attr($user_template->post_name) .'" data-warning="'. esc_html__( 'Are you sure you want to delete this template?', 'wpr-addons' ) .'"><span class="dashicons dashicons-no-alt"></span></span>';
|
||||
echo '</span>';
|
||||
echo '</li>';
|
||||
}
|
||||
} else {
|
||||
echo '<li class="wpr-no-templates">You don\'t have any templates yet!</li>';
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
|
||||
// Restore original Post Data
|
||||
wp_reset_postdata();
|
||||
}
|
||||
|
||||
/**
|
||||
** Render Conditions Popup
|
||||
*/
|
||||
public static function render_conditions_popup( $canvas = false ) {
|
||||
|
||||
// Active Tab
|
||||
$active_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'wpr_tab_header';
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-condition-popup-wrap wpr-admin-popup-wrap">
|
||||
<div class="wpr-condition-popup wpr-admin-popup">
|
||||
<header>
|
||||
<h2><?php esc_html_e( 'Where Do You Want to Display Your Template?', 'wpr-addons' ); ?></h2>
|
||||
<p>
|
||||
<?php esc_html_e( 'Set the conditions that determine where your Template is used throughout your site.', 'wpr-addons' ); ?><br>
|
||||
<?php esc_html_e( 'For example, choose \'Entire Site\' to display the template across your site.', 'wpr-addons' ); ?>
|
||||
</p>
|
||||
</header>
|
||||
<span class="close-popup dashicons dashicons-no-alt"></span>
|
||||
|
||||
<!-- Conditions -->
|
||||
<div class="wpr-conditions-wrap">
|
||||
<div class="wpr-conditions-sample">
|
||||
<?php if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code() ) : ?>
|
||||
<!-- Global -->
|
||||
<select name="global_condition_select" class="global-condition-select">
|
||||
<option value="global"><?php esc_html_e( 'Entire Site', 'wpr-addons' ); ?></option>
|
||||
<option value="archive"><?php esc_html_e( 'Archives', 'wpr-addons' ); ?></option>
|
||||
<option value="single"><?php esc_html_e( 'Singular', 'wpr-addons' ); ?></option>
|
||||
</select>
|
||||
|
||||
<!-- Archive -->
|
||||
<select name="archives_condition_select" class="archives-condition-select">
|
||||
<?php if ( 'wpr_tab_header' === $active_tab || 'wpr_tab_footer' === $active_tab ) : ?>
|
||||
<optgroup label="<?php esc_html_e( 'Archives', 'wpr-addons' ); ?>">
|
||||
<option value="all_archives"><?php esc_html_e( 'All Archives', 'wpr-addons' ); ?></option>
|
||||
<option value="posts"><?php esc_html_e( 'Posts Archive', 'wpr-addons' ); ?></option>
|
||||
<?php // Custom Post Types
|
||||
$custom_post_types = Utilities::get_custom_types_of( 'post', true );
|
||||
foreach ($custom_post_types as $key => $value) {
|
||||
if ( 'e-landing-page' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->is_plan( 'expert' ) || 'product' === $key ) {
|
||||
echo '<option value="'. esc_attr($key) .'">'. $value .' '. esc_html__( 'Archive', 'wpr-addons' ) .'</option>';
|
||||
} else {
|
||||
echo '<option value="pro-'. esc_attr(substr($key, 0, 3)) .'">'. $value .' '. esc_html__( 'Archive (Expert)', 'wpr-addons' ) .'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="author"><?php esc_html_e( 'Author Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="date"><?php esc_html_e( 'Date Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="search"><?php esc_html_e( 'Search Results', 'wpr-addons' ); ?></option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup label="<?php esc_html_e( 'Taxonomy Archives', 'wpr-addons' ); ?>">
|
||||
<option value="categories" class="custom-ids"><?php esc_html_e( 'Post Categories', 'wpr-addons' ); ?></option>
|
||||
<option value="tags" class="custom-ids"><?php esc_html_e( 'Post Tags', 'wpr-addons' ); ?></option>
|
||||
<?php // Custom Taxonomies
|
||||
$custom_taxonomies = Utilities::get_custom_types_of( 'tax', true );
|
||||
foreach ($custom_taxonomies as $key => $value) {
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->is_plan( 'expert' ) || 'product_cat' === $key || 'product_tag' === $key ) {
|
||||
echo '<option value="'. esc_attr($key) .'" class="custom-type-ids">'. esc_html($value) .'</option>';
|
||||
} else {
|
||||
echo '<option value="pro-'. esc_attr(substr($key, 0, 3)) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</optgroup>
|
||||
<?php else: ?>
|
||||
<?php if ( 'wpr_tab_archive' === $active_tab ) : ?>
|
||||
<optgroup label="<?php esc_html_e( 'Archives', 'wpr-addons' ); ?>">
|
||||
<option value="all_archives"><?php esc_html_e( 'All Archives', 'wpr-addons' ); ?></option>
|
||||
<option value="posts"><?php esc_html_e( 'Posts Archive', 'wpr-addons' ); ?></option>
|
||||
|
||||
<?php // Custom Post Types
|
||||
$custom_post_types = Utilities::get_custom_types_of( 'post', true );
|
||||
foreach ($custom_post_types as $key => $value) {
|
||||
if ( 'product' === $key || 'e-landing-page' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->is_plan( 'expert' ) ) {
|
||||
echo '<option value="'. esc_attr($key) .'">'. $value .' '. esc_html__( 'Archive', 'wpr-addons' ) .'</option>';
|
||||
} else {
|
||||
echo '<option value="pro-'. esc_attr(substr($key, 0, 3)) .'">'. $value .' '. esc_html__( 'Archive (Expert)', 'wpr-addons' ) .'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<option value="author"><?php esc_html_e( 'Author Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="date"><?php esc_html_e( 'Date Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="search"><?php esc_html_e( 'Search Results', 'wpr-addons' ); ?></option>
|
||||
</optgroup>
|
||||
|
||||
<optgroup label="<?php esc_html_e( 'Taxonomy Archives', 'wpr-addons' ); ?>">
|
||||
<option value="categories" class="custom-ids"><?php esc_html_e( 'Post Categories', 'wpr-addons' ); ?></option>
|
||||
<option value="tags" class="custom-ids"><?php esc_html_e( 'Post Tags', 'wpr-addons' ); ?></option>
|
||||
<?php // Custom Taxonomies
|
||||
$custom_taxonomies = Utilities::get_custom_types_of( 'tax', true );
|
||||
foreach ($custom_taxonomies as $key => $value) {
|
||||
if ( 'product_cat' === $key || 'product_tag' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->is_plan( 'expert' ) ) {
|
||||
echo '<option value="'. esc_attr($key) .'" class="custom-type-ids">'. esc_html($value) .'</option>';
|
||||
} else {
|
||||
echo '<option value="pro-'. esc_attr(substr($key, 0, 3)) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</optgroup>
|
||||
<?php elseif ( 'wpr_tab_product_archive' === $active_tab ): ?>
|
||||
<option value="products"><?php esc_html_e( 'Products Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="product_cat" class="custom-type-ids"><?php esc_html_e( 'Products Categories', 'wpr-addons' ); ?></option>
|
||||
<option value="product_tag" class="custom-type-ids"><?php esc_html_e( 'Products Tags', 'wpr-addons' ); ?></option>
|
||||
<option value="product_search"><?php esc_html_e( 'Products Search', 'wpr-addons' ); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
|
||||
<!-- Single -->
|
||||
<select name="singles_condition_select" class="singles-condition-select">
|
||||
<?php if ( 'wpr_tab_header' === $active_tab || 'wpr_tab_footer' === $active_tab ) : ?>
|
||||
<option value="front_page"><?php esc_html_e( 'Front Page', 'wpr-addons' ); ?></option>
|
||||
<option value="page_404"><?php esc_html_e( '404 Page', 'wpr-addons' ); ?></option>
|
||||
<option value="pages" class="custom-ids"><?php esc_html_e( 'Pages', 'wpr-addons' ); ?></option>
|
||||
<option value="posts" class="custom-ids"><?php esc_html_e( 'Posts', 'wpr-addons' ); ?></option>
|
||||
<?php // Custom Post Types
|
||||
$custom_post_types = Utilities::get_custom_types_of( 'post', true );
|
||||
foreach ($custom_post_types as $key => $value) {
|
||||
if ( 'e-landing-page' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->is_plan( 'expert' ) || 'product' === $key ) {
|
||||
echo '<option value="'. esc_attr($key) .'" class="custom-type-ids">'. esc_html($value) .'</option>';
|
||||
} else {
|
||||
echo '<option value="pro-'. esc_attr(substr($key, 0, 3)) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php else: ?>
|
||||
<?php if ( 'wpr_tab_single' === $active_tab ) : ?>
|
||||
<option value="front_page"><?php esc_html_e( 'Front Page', 'wpr-addons' ); ?></option>
|
||||
<option value="page_404"><?php esc_html_e( '404 Page', 'wpr-addons' ); ?></option>
|
||||
<option value="pages" class="custom-ids"><?php esc_html_e( 'Pages', 'wpr-addons' ); ?></option>
|
||||
<option value="posts" class="custom-ids"><?php esc_html_e( 'Posts', 'wpr-addons' ); ?></option>
|
||||
|
||||
<?php // Custom Post Types
|
||||
$custom_post_types = Utilities::get_custom_types_of( 'post', true );
|
||||
foreach ($custom_post_types as $key => $value) {
|
||||
if ( 'product' === $key || 'e-landing-page' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->is_plan( 'expert' ) ) {
|
||||
echo '<option value="'. esc_attr($key) .'" class="custom-type-ids">'. esc_html($value) .'</option>';
|
||||
} else {
|
||||
echo '<option value="pro-'. esc_attr(substr($key, 0, 3)) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php elseif ( 'wpr_tab_product_single' === $active_tab ): ?>
|
||||
<option value="product" class="custom-product-ids custom-type-ids"><?php esc_html_e( 'Products', 'wpr-addons' ); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
|
||||
<input type="text" placeholder="<?php esc_html_e( 'Enter comma separated IDs', 'wpr-addons' ); ?>" name="condition_input_ids" class="wpr-condition-input-ids">
|
||||
<span class="wpr-delete-template-conditions dashicons dashicons-no-alt"></span>
|
||||
|
||||
<?php else: // Free user conditions ?>
|
||||
|
||||
<!-- Global -->
|
||||
<select name="global_condition_select" class="global-condition-select">
|
||||
<option value="global"><?php esc_html_e( 'Entire Site', 'wpr-addons' ); ?></option>
|
||||
<option value="archive"><?php esc_html_e( 'Archives (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="single"><?php esc_html_e( 'Singular (Pro)', 'wpr-addons' ); ?></option>
|
||||
</select>
|
||||
|
||||
<!-- Archive -->
|
||||
<select name="archives_condition_select" class="archives-condition-select">
|
||||
<?php if ( 'wpr_tab_header' === $active_tab || 'wpr_tab_footer' === $active_tab ) : ?>
|
||||
<optgroup label="<?php esc_html_e( 'Archives', 'wpr-addons' ); ?>">
|
||||
<option value="all_archives"><?php esc_html_e( 'All Archives (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="posts"><?php esc_html_e( 'Posts Archive (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="author"><?php esc_html_e( 'Author Archive (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="date"><?php esc_html_e( 'Date Archive (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="search"><?php esc_html_e( 'Search Results (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="categories" class="custom-ids"><?php esc_html_e( 'Post Categories (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="tags" class="custom-ids"><?php esc_html_e( 'Post Tags (Pro)', 'wpr-addons' ); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?php esc_html_e( 'WooCommerce Archives', 'wpr-addons' ); ?>">
|
||||
<option value="products" class="custom-ids"><?php esc_html_e( 'Products Archive (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="products_cats" class="custom-ids"><?php esc_html_e( 'Product Categories (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="product_tags" class="custom-ids"><?php esc_html_e( 'Product Tags (Pro)', 'wpr-addons' ); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?php esc_html_e( 'Custom Post Type Archives', 'wpr-addons' ); ?>">
|
||||
<?php // Custom Post Types
|
||||
$custom_post_types = Utilities::get_custom_types_of( 'post', true );
|
||||
foreach ($custom_post_types as $key => $value) {
|
||||
if ( 'product' === $key || 'e-landing-page' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
echo '<option value="'. esc_attr(substr($key, 0, 3)) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
?>
|
||||
<?php // Custom Taxonomies
|
||||
$custom_taxonomies = Utilities::get_custom_types_of( 'tax', true );
|
||||
foreach ($custom_taxonomies as $key => $value) {
|
||||
if ( 'product_cat' === $key || 'product_tag' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// List Taxonomies
|
||||
echo '<option value="'. esc_attr($key) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
?>
|
||||
</optgroup>
|
||||
<?php else: ?>
|
||||
<?php if ( 'wpr_tab_archive' === $active_tab ) : ?>
|
||||
<optgroup label="<?php esc_html_e( 'Archives', 'wpr-addons' ); ?>">
|
||||
<option value="all_archives"><?php esc_html_e( 'All Archives', 'wpr-addons' ); ?></option>
|
||||
<option value="posts"><?php esc_html_e( 'Posts Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="author"><?php esc_html_e( 'Author Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="date"><?php esc_html_e( 'Date Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="search"><?php esc_html_e( 'Search Results', 'wpr-addons' ); ?></option>
|
||||
<option value="categories" class="custom-ids"><?php esc_html_e( 'Post Categories', 'wpr-addons' ); ?></option>
|
||||
<option value="tags" class="custom-ids"><?php esc_html_e( 'Post Tags', 'wpr-addons' ); ?></option>
|
||||
</optgroup>
|
||||
<optgroup label="<?php esc_html_e( 'Custom Post Type Archives', 'wpr-addons' ); ?>">
|
||||
<?php // Custom Post Types
|
||||
$custom_post_types = Utilities::get_custom_types_of( 'post', true );
|
||||
foreach ($custom_post_types as $key => $value) {
|
||||
if ( 'product' === $key || 'e-landing-page' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
echo '<option value="'. esc_attr(substr($key, 0, 3)) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
?>
|
||||
<?php // Custom Taxonomies
|
||||
$custom_taxonomies = Utilities::get_custom_types_of( 'tax', true );
|
||||
foreach ($custom_taxonomies as $key => $value) {
|
||||
if ( 'product_cat' === $key || 'product_tag' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// List Taxonomies
|
||||
echo '<option value="'. esc_attr($key) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
?>
|
||||
</optgroup>
|
||||
<?php elseif ( 'wpr_tab_product_archive' === $active_tab ): ?>
|
||||
<option value="products"><?php esc_html_e( 'Products Archive', 'wpr-addons' ); ?></option>
|
||||
<option value="product_cat" class="custom-type-ids"><?php esc_html_e( 'Products Categories (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="product_tag" class="custom-type-ids"><?php esc_html_e( 'Products Tags (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="product_search"><?php esc_html_e( 'Products Search (Pro)', 'wpr-addons' ); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
|
||||
<!-- Single -->
|
||||
<select name="singles_condition_select" class="singles-condition-select">
|
||||
<?php if ( 'wpr_tab_header' === $active_tab || 'wpr_tab_footer' === $active_tab ) : ?>
|
||||
<option value="front_page"><?php esc_html_e( 'Front Page (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="page_404"><?php esc_html_e( '404 Page (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="pages" class="custom-ids"><?php esc_html_e( 'Pages (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="posts" class="custom-ids"><?php esc_html_e( 'Posts (Pro)', 'wpr-addons' ); ?></option>
|
||||
<option value="product" class="custom-ids"><?php esc_html_e( 'Product (Pro)', 'wpr-addons' ); ?></option>
|
||||
<?php // Custom Post Types
|
||||
$custom_post_types = Utilities::get_custom_types_of( 'post', true );
|
||||
foreach ($custom_post_types as $key => $value) {
|
||||
if ( 'product' === $key || 'e-landing-page' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
echo '<option value="'. esc_attr($key) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
?>
|
||||
<?php else: ?>
|
||||
<?php if ( 'wpr_tab_single' === $active_tab ) : ?>
|
||||
<option value="front_page"><?php esc_html_e( 'Front Page', 'wpr-addons' ); ?></option>
|
||||
<option value="page_404"><?php esc_html_e( '404 Page', 'wpr-addons' ); ?></option>
|
||||
<option value="pages" class="custom-ids"><?php esc_html_e( 'Pages', 'wpr-addons' ); ?></option>
|
||||
<option value="posts" class="custom-ids"><?php esc_html_e( 'Posts', 'wpr-addons' ); ?></option>
|
||||
|
||||
<?php // Custom Post Types
|
||||
$custom_post_types = Utilities::get_custom_types_of( 'post', true );
|
||||
foreach ($custom_post_types as $key => $value) {
|
||||
if ( 'product' === $key || 'e-landing-page' === $key ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
echo '<option value="'. esc_attr($key) .'" class="custom-type-ids">'. esc_html($value) .' (Expert)</option>';
|
||||
}
|
||||
?>
|
||||
<?php elseif ( 'wpr_tab_product_single' === $active_tab ): ?>
|
||||
<option value="product" class="custom-type-ids"><?php esc_html_e( 'Products', 'wpr-addons' ); ?></option>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
|
||||
<input type="text" placeholder="<?php esc_html_e( 'Enter comma separated IDs (Pro)', 'wpr-addons' ); ?>" name="condition_input_ids" class="wpr-condition-input-ids">
|
||||
<span class="wpr-delete-template-conditions dashicons dashicons-no-alt"></span>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php // Expert Notice
|
||||
|
||||
if ( !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->is_plan( 'expert' ) ) {
|
||||
echo '<span class="wpr-expert-notice" style="display:none;text-align:center;"><br>
|
||||
<span style="color:#f44;font-size:18px;" class="dashicons dashicons-warning"></span>
|
||||
<strong style="color:#f44;">Please Note:</strong>
|
||||
<strong>Custom Post Types</strong>, <strong>Custom Taxonomies</strong> and <strong>Custom Fields</strong><br>
|
||||
are only supported in the <strong style="color:#f44;"><a href="https://royal-elementor-addons.com/?ref=rea-plugin-backend-conditions-upgrade-expert#purchasepro" target="_blank" style="text-decoration:none">Expert Version.</a></strong>
|
||||
</span>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php if ( $canvas ) : ?>
|
||||
<div class="wpr-canvas-condition wpr-setting-custom-ckbox">
|
||||
<span><?php esc_html_e( 'Show this template on Elementor Canvas pages', 'wpr-addons' ); ?></span>
|
||||
<input type="checkbox" name="wpr-show-on-canvas" id="wpr-show-on-canvas">
|
||||
<label for="wpr-show-on-canvas"></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
// Pro Notice
|
||||
if ( !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ) {
|
||||
echo '<span style="color: #7f8b96;"><br>Conditions are fully supported in the <strong><a href="https://royal-elementor-addons.com/?ref=rea-plugin-backend-conditions-upgrade-pro#purchasepro" target="_blank">Pro and Expert versions.</a></strong></span>';
|
||||
// echo '<span style="color: #7f8b96;"><br>Conditions are fully supported in the <strong><a href="'. admin_url('admin.php?page=wpr-addons-pricing') .'" target="_blank">Pro version</a></strong></span>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<span class="wpr-add-conditions"><?php esc_html_e( 'Add Conditions', 'wpr-addons' ); ?></span>
|
||||
<span class="wpr-save-conditions"><?php esc_html_e( 'Save Conditions', 'wpr-addons' ); ?></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
** Render Create Template Popup
|
||||
*/
|
||||
public static function render_create_template_popup() {
|
||||
?>
|
||||
|
||||
<!-- Custom Template Popup -->
|
||||
<div class="wpr-user-template-popup-wrap wpr-admin-popup-wrap">
|
||||
<div class="wpr-user-template-popup wpr-admin-popup">
|
||||
<header>
|
||||
<h2><?php esc_html_e( 'Templates Help You Work Efficiently!', 'wpr-addons' ); ?></h2>
|
||||
<p><?php esc_html_e( 'Use templates to create the different pieces of your site, and reuse them with one click whenever needed.', 'wpr-addons' ); ?></p>
|
||||
</header>
|
||||
|
||||
<input type="text" name="user_template_title" class="wpr-user-template-title" placeholder="<?php esc_html_e( 'Enter Template Title', 'wpr-addons' ); ?>">
|
||||
<input type="hidden" name="user_template_type" class="user-template-type">
|
||||
<span class="wpr-create-template"><?php esc_html_e( 'Create Template', 'wpr-addons' ); ?></span>
|
||||
<span class="close-popup dashicons dashicons-no-alt"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
** Check if Library Template Exists
|
||||
*/
|
||||
public static function template_exists( $slug ) {
|
||||
$result = false;
|
||||
$wpr_templates = get_posts( ['post_type' => 'wpr_templates', 'posts_per_page' => '-1'] );
|
||||
|
||||
foreach ( $wpr_templates as $post ) {
|
||||
|
||||
if ( $slug === $post->post_name ) {
|
||||
$result = true;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Includes;
|
||||
|
||||
use WprAddons\Plugin;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Templates_Modal_Popups setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Modal_Popups {
|
||||
|
||||
/**
|
||||
** Instance of Elemenntor Frontend class.
|
||||
*
|
||||
** @var \Elementor\Frontend()
|
||||
*/
|
||||
private static $elementor_instance;
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
// Elementor Frontend
|
||||
self::$elementor_instance = \Elementor\Plugin::instance();
|
||||
|
||||
add_action( 'template_include', [ $this, 'set_post_type_template' ], 9999 );
|
||||
|
||||
add_action( 'wp_footer', [ $this, 'render_popups' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set blank template for editor
|
||||
*/
|
||||
public function set_post_type_template( $template ) {
|
||||
|
||||
if ( is_singular( 'wpr_templates' ) ) {
|
||||
if ( 'wpr-popups' === Utilities::get_elementor_template_type(get_the_ID()) && self::$elementor_instance->preview->is_preview_mode() ) {
|
||||
$template = WPR_ADDONS_PATH . 'modules/popup/editor.php';
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
/**
|
||||
** Popups
|
||||
*/
|
||||
public function render_popups() {
|
||||
$conditions = json_decode( get_option('wpr_popup_conditions'), true );
|
||||
|
||||
if ( ! empty( $conditions ) ) {
|
||||
$conditions = $this->reverse_template_conditions( $conditions );
|
||||
|
||||
// Global
|
||||
if ( isset( $conditions['global'] ) ) {
|
||||
WPR_Templates_Modal_Popups::display_popups_by_location( $conditions, 'global' );
|
||||
}
|
||||
|
||||
// Custom
|
||||
if ( defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code() ) {
|
||||
// Archive
|
||||
\WprAddonsPro\Classes\Pro_Modules::archive_pages_popup_conditions( $conditions );
|
||||
|
||||
// Single
|
||||
\WprAddonsPro\Classes\Pro_Modules::single_pages_popup_conditions( $conditions );
|
||||
}
|
||||
|
||||
|
||||
// Enqueue ScrolBar JS //TODO - check if displayed multiple times
|
||||
wp_enqueue_script( 'wpr-popup-scroll-js', WPR_ADDONS_URL .'assets/js/lib/perfect-scrollbar/perfect-scrollbar.min.js', [ 'jquery' ], '0.4.9' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Reverse Template Conditions
|
||||
*/
|
||||
public function reverse_template_conditions( $conditions ) {
|
||||
$reverse = [];
|
||||
|
||||
foreach ( $conditions as $key => $condition ) {
|
||||
foreach( $condition as $location ) {
|
||||
if ( ! isset( $reverse[$location] ) ) {
|
||||
$reverse[$location] = [ $key ];
|
||||
} else {
|
||||
array_push( $reverse[$location], $key );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $reverse;
|
||||
}
|
||||
|
||||
/**
|
||||
** Display Popups by Location
|
||||
*/
|
||||
public static function display_popups_by_location( $conditions, $page ) {
|
||||
foreach ( $conditions[$page] as $key => $popup ) {
|
||||
WPR_Templates_Modal_Popups::render_popup_content( $popup );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Display Elementor Content
|
||||
*/
|
||||
public static function render_popup_content( $slug ) {
|
||||
$template_name = '';
|
||||
|
||||
$template_id = Utilities::get_template_id( $slug );
|
||||
|
||||
if ( defined('ICL_LANGUAGE_CODE') ) {
|
||||
$default_language_code = apply_filters('wpml_default_language', null);
|
||||
$current_language_code = apply_filters( 'wpml_current_language', NULL );
|
||||
|
||||
|
||||
IF ( ICL_LANGUAGE_CODE !== $default_language_code ) {
|
||||
$template_id = apply_filters('wpml_object_id', $template_id, 'wpr_templates', true, $current_language_code);
|
||||
}
|
||||
}
|
||||
|
||||
$get_settings = WPR_Templates_Modal_Popups::get_template_settings( $slug );
|
||||
$get_elementor_content = self::$elementor_instance->frontend->get_builder_content( $template_id, false );
|
||||
|
||||
if ( '' === $get_elementor_content ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Encode Settings
|
||||
$get_encoded_settings = ! empty( $get_settings ) ? wp_json_encode( $get_settings ) : '[]';
|
||||
|
||||
// Template Settings Attribute
|
||||
$template_settings_attr = "data-settings='". esc_attr($get_encoded_settings) ."'";
|
||||
|
||||
// Return if NOT available for current user
|
||||
if ( ! WPR_Templates_Modal_Popups::check_available_user_roles( $get_settings['popup_show_for_roles'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! self::$elementor_instance->preview->is_preview_mode() ) {
|
||||
echo '<div id="wpr-popup-id-'. esc_attr($template_id) .'" class="wpr-template-popup" '. $template_settings_attr .'>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<div class="wpr-template-popup-inner">';
|
||||
|
||||
// Popup Overlay & Close Button
|
||||
echo '<div class="wpr-popup-overlay"></div>';
|
||||
|
||||
// Template Container
|
||||
echo '<div class="wpr-popup-container">';
|
||||
|
||||
// Close Button
|
||||
if ( \Elementor\Plugin::$instance->experiments->is_feature_active( 'e_font_icon_svg' ) ) { // GOGA: why not included
|
||||
echo '<div class="wpr-popup-close-btn"><i class="fa fa-times"></i></div>';
|
||||
} else {
|
||||
echo '<div class="wpr-popup-close-btn"><i class="eicon-close"></i></div>';
|
||||
}
|
||||
|
||||
// Elementor Template Content
|
||||
echo '<div class="wpr-popup-container-inner">';
|
||||
echo ''. $get_elementor_content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
** Get Template Settings
|
||||
*/
|
||||
public static function get_template_settings( $slug ) {
|
||||
$settings = [];
|
||||
$defaults = [];
|
||||
|
||||
$template_id = Utilities::get_template_id( $slug );
|
||||
$meta_settings = get_post_meta( $template_id, '_elementor_page_settings', true );
|
||||
|
||||
$popup_defaults = [
|
||||
'popup_trigger' => 'load',
|
||||
'popup_load_delay' => 1,
|
||||
'popup_scroll_progress' => 10,
|
||||
'popup_inactivity_time' => 15,
|
||||
'popup_element_scroll' => '',
|
||||
'popup_custom_trigger' => '',
|
||||
'popup_specific_date' => date( 'Y-m-d H:i', strtotime( '+1 month' ) + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ),
|
||||
'popup_stop_after_date' => false,
|
||||
'popup_stop_after_date_select' => date( 'Y-m-d H:i', strtotime( '+1 day' ) + ( get_option( 'gmt_offset' ) * HOUR_IN_SECONDS ) ),
|
||||
'popup_show_again_delay' => 1,
|
||||
'popup_disable_esc_key' => false,
|
||||
'popup_automatic_close_switch' => false,
|
||||
'popup_automatic_close_delay' => 10,
|
||||
'popup_animation' => 'fade',
|
||||
'popup_animation_duration' => 1,
|
||||
'popup_show_for_roles' => '',
|
||||
'popup_show_via_referral' => false,
|
||||
'popup_referral_keyword' => '',
|
||||
'popup_display_as' => 'modal',
|
||||
'popup_show_on_device' => true,
|
||||
'popup_show_on_device_mobile' => true,
|
||||
'popup_show_on_device_tablet' => true,
|
||||
'popup_disable_page_scroll' => true,
|
||||
'popup_overlay_disable_close' => false,
|
||||
'popup_close_button_display_delay' => 0,
|
||||
];
|
||||
|
||||
// Determine Template
|
||||
if ( strpos( $slug, 'popup') ) {
|
||||
$defaults = $popup_defaults;
|
||||
}
|
||||
|
||||
foreach( $defaults as $option => $value ) {
|
||||
if ( isset($meta_settings[$option]) ) {
|
||||
$settings[$option] = $meta_settings[$option];
|
||||
}
|
||||
}
|
||||
|
||||
return array_merge( $defaults, $settings );
|
||||
}
|
||||
|
||||
/**
|
||||
** Check Available User Rols
|
||||
*/
|
||||
public static function check_available_user_roles( $selected_roles ) {
|
||||
if ( empty( $selected_roles ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$current_user = wp_get_current_user();
|
||||
|
||||
if ( ! empty( $current_user->roles ) ) {
|
||||
$role = $current_user->roles[0];
|
||||
} else {
|
||||
$role = 'guest';
|
||||
}
|
||||
|
||||
if ( in_array( $role, $selected_roles ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace WprAddons\Admin\Includes;
|
||||
|
||||
use Elementor;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Templates_Shortcode setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Shortcode {
|
||||
|
||||
public function __construct() {
|
||||
add_shortcode( 'wpr-template', [ $this, 'shortcode' ] );
|
||||
|
||||
add_action('elementor/element/after_section_start', [ $this, 'extend_shortcode' ], 10, 3 );
|
||||
}
|
||||
|
||||
public function shortcode( $attributes = [] ) {
|
||||
if ( empty( $attributes['id'] ) ) {
|
||||
return '';
|
||||
} else {
|
||||
$id = intval($attributes['id']);
|
||||
}
|
||||
|
||||
// Ensure only publicly published posts can be accessed
|
||||
$post = get_post($id);
|
||||
|
||||
if (!$post || $post->post_status !== 'publish' || in_array($post->post_status, ['draft', 'private', 'future'])) {
|
||||
return 'You do not have permission to view this post.';
|
||||
}
|
||||
|
||||
// Optionally check if the post is password protected
|
||||
if (post_password_required($post)) {
|
||||
return 'This post is password protected.';
|
||||
}
|
||||
|
||||
// WPML language handling
|
||||
if (defined('ICL_LANGUAGE_CODE')) {
|
||||
$default_language_code = apply_filters('wpml_default_language', null);
|
||||
|
||||
if ( ICL_LANGUAGE_CODE !== $default_language_code ) {
|
||||
$id = icl_object_id($id, 'elementor_library', false, ICL_LANGUAGE_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
$edit_link = '<span class="wpr-template-edit-btn" data-permalink="'. esc_url(get_permalink($id)) .'">Edit Template</span>';
|
||||
|
||||
$type = get_post_meta(get_the_ID(), '_wpr_template_type', true) || get_post_meta($id, '_elementor_template_type', true);
|
||||
$has_css = 'internal' === get_option( 'elementor_css_print_method' ) || '' !== $type;
|
||||
|
||||
return Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $id, $has_css ) . $edit_link;
|
||||
}
|
||||
|
||||
public function extend_shortcode( $section, $section_id, $args ) {
|
||||
if ( $section->get_name() == 'shortcode' && $section_id == 'section_shortcode' ) {
|
||||
$section->add_control(
|
||||
'select_template' ,
|
||||
[
|
||||
'label' => esc_html__( 'Select Template', 'wpr-addons' ),
|
||||
'type' => 'wpr-ajax-select2',
|
||||
'options' => 'ajaxselect2/get_elementor_templates',
|
||||
'label_block' => true,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,393 @@
|
||||
<?php
|
||||
use WprAddons\Plugin;
|
||||
|
||||
// Register Post Type
|
||||
function register_mega_menu_cpt() {
|
||||
$args = array(
|
||||
'label' => esc_html__( 'Royal Mega Menu', 'wpr-addons' ),
|
||||
'public' => true,
|
||||
'publicly_queryable' => true,
|
||||
'rewrite' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_menu' => false,
|
||||
'show_in_nav_menus' => false,
|
||||
'exclude_from_search' => true,
|
||||
'capability_type' => 'post',
|
||||
'supports' => array( 'title', 'editor', 'elementor' ),
|
||||
'hierarchical' => false,
|
||||
);
|
||||
|
||||
register_post_type( 'wpr_mega_menu', $args );
|
||||
}
|
||||
|
||||
// Convert to Canvas Template
|
||||
function convert_to_canvas_template( $template ) {
|
||||
if ( is_singular('wpr_mega_menu') ) {
|
||||
$template = WPR_ADDONS_PATH . 'admin/templates/wpr-canvas.php';
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
// Init Mega Menu
|
||||
function init_mega_menu() {
|
||||
register_mega_menu_cpt();
|
||||
add_action( 'template_include', 'convert_to_canvas_template', 9999 );
|
||||
}
|
||||
|
||||
add_action('init', 'init_mega_menu', 999);
|
||||
|
||||
|
||||
// Confinue only for Dashboard Screen
|
||||
if ( !is_admin() ) return;
|
||||
|
||||
// Init Actions
|
||||
add_filter( 'option_elementor_cpt_support', 'add_mega_menu_cpt_support' );
|
||||
add_filter( 'default_option_elementor_cpt_support', 'add_mega_menu_cpt_support' );
|
||||
add_action( 'admin_footer', 'render_settings_popup', 10 );
|
||||
add_action( 'wp_ajax_wpr_create_mega_menu_template', 'wpr_create_mega_menu_template' );
|
||||
add_action( 'wp_ajax_wpr_save_mega_menu_settings', 'wpr_save_mega_menu_settings' );
|
||||
add_action( 'admin_enqueue_scripts', 'enqueue_scripts' );
|
||||
|
||||
// Add Elementor Editor Support
|
||||
function add_mega_menu_cpt_support( $value ) {
|
||||
if ( empty( $value ) ) {
|
||||
$value = [];
|
||||
}
|
||||
|
||||
return array_merge( $value, ['wpr_mega_menu'] );
|
||||
}
|
||||
|
||||
// Create Menu Template
|
||||
function wpr_create_mega_menu_template() {
|
||||
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-mega-menu-js' ) || !current_user_can( 'manage_options' ) ) {
|
||||
return; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
// $menu_id = intval( $_REQUEST['menu'] );
|
||||
// $menu_item_id = intval( $_REQUEST['item'] );
|
||||
$menu_item_id = intval( $_POST['item_id'] );
|
||||
$mega_menu_id = get_post_meta( $menu_item_id, 'wpr-mega-menu-item', true );
|
||||
|
||||
if ( ! $mega_menu_id ) {
|
||||
|
||||
$mega_menu_id = wp_insert_post( array(
|
||||
'post_title' => 'wpr-mega-menu-item-' . $menu_item_id,
|
||||
'post_status' => 'publish',
|
||||
'post_type' => 'wpr_mega_menu',
|
||||
) );
|
||||
|
||||
update_post_meta( $menu_item_id, 'wpr-mega-menu-item', $mega_menu_id );
|
||||
|
||||
}
|
||||
|
||||
$edit_link = add_query_arg(
|
||||
array(
|
||||
'post' => $mega_menu_id,
|
||||
'action' => 'elementor',
|
||||
),
|
||||
admin_url( 'post.php' )
|
||||
);
|
||||
|
||||
wp_send_json([
|
||||
'data' => [
|
||||
'edit_link' => $edit_link
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
// Render Settings Popup
|
||||
function render_settings_popup() {
|
||||
$screen = get_current_screen();
|
||||
|
||||
if ( 'nav-menus' !== $screen->base ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-mm-settings-popup-wrap">
|
||||
<div class="wpr-mm-settings-popup">
|
||||
<div class="wpr-mm-settings-popup-header">
|
||||
<span class="wpr-mm-popup-logo" style="background:url('<?php echo WPR_ADDONS_ASSETS_URL .'img/logo-40x40.png'; ?>') no-repeat center center / contain;">RE</span>
|
||||
<span><?php esc_html_e('Royal Mega Menu', 'wpr-addons'); ?></span>
|
||||
<span class="wpr-mm-popup-title"><?php esc_html_e('Menu Item: ', 'wpr-addons'); ?><span></span></span>
|
||||
<span class="dashicons dashicons-no-alt wpr-mm-settings-close-popup-btn"></span>
|
||||
</div>
|
||||
|
||||
<?php $pro_active = defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code() ? 'data-pro-active="true"' : 'data-pro-active="false"'; ?>
|
||||
|
||||
<div class="wpr-mm-settings-wrap" <?php echo $pro_active; ?>>
|
||||
<h4><?php esc_html_e('General', 'wpr-addons'); ?></h4>
|
||||
<div class="wpr-mm-setting wpr-mm-setting-switcher">
|
||||
<h4><?php esc_html_e('Enable Mega Menu', 'wpr-addons'); ?></h4>
|
||||
<input type="checkbox" id="wpr_mm_enable">
|
||||
<label for="wpr_mm_enable"></label>
|
||||
</div>
|
||||
<div class="wpr-mm-setting">
|
||||
<h4><?php esc_html_e('Mega Menu Content', 'wpr-addons'); ?></h4>
|
||||
<button class="button button-primary wpr-edit-mega-menu-btn">
|
||||
<i class="eicon-elementor-square" aria-hidden="true"></i>
|
||||
<?php esc_html_e('Edit with Elementor', 'wpr-addons'); ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="wpr-mm-setting">
|
||||
<h4><?php esc_html_e('Dropdown Position', 'wpr-addons'); ?></h4>
|
||||
<select id="wpr_mm_position">
|
||||
<option value="default"><?php esc_html_e('Default', 'wpr-addons'); ?></option>
|
||||
<option value="relative"><?php esc_html_e('Relative', 'wpr-addons'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="wpr-mm-setting">
|
||||
<h4><?php esc_html_e('Dropdown Width', 'wpr-addons'); ?></h4>
|
||||
<select id="wpr_mm_width">
|
||||
<option value="default"><?php esc_html_e('Default', 'wpr-addons'); ?></option>
|
||||
<?php if ( !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ) : ?>
|
||||
<option value="pro-st"><?php esc_html_e('Fit to Section (Pro)', 'wpr-addons'); ?></option>
|
||||
<?php else: ?>
|
||||
<option value="stretch"><?php esc_html_e('Fit to Section', 'wpr-addons'); ?></option>
|
||||
<?php endif; ?>
|
||||
<option value="full"><?php esc_html_e('Full Width', 'wpr-addons'); ?></option>
|
||||
<option value="custom"><?php esc_html_e('Custom', 'wpr-addons'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="wpr-mm-setting">
|
||||
<h4><?php esc_html_e('Custom Width (px)', 'wpr-addons'); ?></h4>
|
||||
<input type="number" id="wpr_mm_custom_width" value="600">
|
||||
</div>
|
||||
<div class="wpr-mm-setting <?php echo !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'wpr-mm-pro-setting' : ''; ?>">
|
||||
<h4><?php esc_html_e('Mobile Sub Content', 'wpr-addons'); ?></h4>
|
||||
<div>
|
||||
<select id="wpr_mm_mobile_content">
|
||||
<option value="mega"><?php esc_html_e('Mega Menu', 'wpr-addons'); ?></option>
|
||||
<option value="wp-sub"><?php esc_html_e('WordPress Sub Items', 'wpr-addons'); ?></option>
|
||||
</select>
|
||||
|
||||
<div class="wpr-mm-pro-radio">
|
||||
<input type="radio" name="mc" checked="checked">
|
||||
<label>Mega Menu</label><br>
|
||||
<input type="radio" name="mc">
|
||||
<label>WordPress Sub Items</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpr-mm-setting <?php echo !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'wpr-mm-pro-setting' : ''; ?>">
|
||||
<h4><?php esc_html_e('Mobile Sub Render', 'wpr-addons'); ?></h4>
|
||||
<div>
|
||||
<select id="wpr_mm_render">
|
||||
<option value="default"><?php esc_html_e('Default', 'wpr-addons'); ?></option>
|
||||
<option value="ajax"><?php esc_html_e('Load with AJAX', 'wpr-addons'); ?></option>
|
||||
</select>
|
||||
|
||||
<div class="wpr-mm-pro-radio">
|
||||
<input type="radio" name="mr" checked="checked">
|
||||
<label>Default</label><br>
|
||||
<input type="radio" name="mr">
|
||||
<label>Load with AJAX</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<h4 <?php echo !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'class="wpr-mm-pro-heading"' : ''; ?>>
|
||||
<?php esc_html_e('Icon', 'wpr-addons'); ?>
|
||||
</h4>
|
||||
<div <?php echo !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'class="wpr-mm-pro-section"' : ''; ?>>
|
||||
<div class="wpr-mm-setting wpr-mm-setting-icon">
|
||||
<h4><?php esc_html_e('Icon Select', 'wpr-addons'); ?></h4>
|
||||
<div><span class="wpr-mm-active-icon"><i class="fas fa-ban"></i></span><span><i class="fas fa-angle-down"></i></span></div>
|
||||
<input type="text" id="wpr_mm_icon_picker" data-alpha="true" value="">
|
||||
</div>
|
||||
<div class="wpr-mm-setting wpr-mm-setting-color">
|
||||
<h4><?php esc_html_e('Icon Color', 'wpr-addons'); ?></h4>
|
||||
<input type="text" id="wpr_mm_icon_color" data-alpha="true" value="rgba(0,0,0,0.6);">
|
||||
</div>
|
||||
<div class="wpr-mm-setting">
|
||||
<h4><?php esc_html_e('Icon Size (px)', 'wpr-addons'); ?></h4>
|
||||
<input type="number" id="wpr_mm_icon_size" value="14">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<h4 <?php echo !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'class="wpr-mm-pro-heading"' : ''; ?>>
|
||||
<?php esc_html_e('Badge', 'wpr-addons'); ?>
|
||||
</h4>
|
||||
<div <?php echo !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'class="wpr-mm-pro-section"' : ''; ?>>
|
||||
<div class="wpr-mm-setting">
|
||||
<h4><?php esc_html_e('Badge Text', 'wpr-addons'); ?></h4>
|
||||
<input type="text" id="wpr_mm_badge_text" value="">
|
||||
</div>
|
||||
<div class="wpr-mm-setting wpr-mm-setting-color">
|
||||
<h4><?php esc_html_e('Badge Text Color', 'wpr-addons'); ?></h4>
|
||||
<input type="text" id="wpr_mm_badge_color" data-alpha="true" value="rgba(0,0,0,0.6);">
|
||||
</div>
|
||||
<div class="wpr-mm-setting wpr-mm-setting-color">
|
||||
<h4><?php esc_html_e('Badge Background Color', 'wpr-addons'); ?></h4>
|
||||
<input type="text" id="wpr_mm_badge_bg_color" data-alpha="true" value="rgba(0,0,0,0.6);">
|
||||
</div>
|
||||
<div class="wpr-mm-setting wpr-mm-setting-switcher">
|
||||
<h4><?php esc_html_e('Enable Animation', 'wpr-addons'); ?></h4>
|
||||
<input type="checkbox" id="wpr_mm_badge_animation">
|
||||
<label for="wpr_mm_badge_animation"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpr-mm-settings-popup-footer">
|
||||
<button class="button wpr-save-mega-menu-btn"><?php esc_html_e('Save', 'wpr-addons'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Iframe Popup -->
|
||||
<div class="wpr-mm-editor-popup-wrap">
|
||||
<div class="wpr-mm-editor-close-popup-btn"><span class="dashicons dashicons-no-alt"></span></div>
|
||||
<div class="wpr-mm-editor-popup-iframe"></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
// Save Mega Menu Settings
|
||||
function wpr_save_mega_menu_settings() {
|
||||
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-mega-menu-js' ) || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
if ( isset($_POST['item_settings']) ) {
|
||||
update_post_meta( $_POST['item_id'], 'wpr-mega-menu-settings', $_POST['item_settings'] );
|
||||
}
|
||||
|
||||
wp_send_json_success($_POST['item_settings']);
|
||||
}
|
||||
|
||||
// Get Menu Items Data
|
||||
function get_menu_items_data( $menu_id = false ) {
|
||||
|
||||
if ( ! $menu_id ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$menu = wp_get_nav_menu_object( $menu_id );
|
||||
|
||||
$menu_items = wp_get_nav_menu_items( $menu );
|
||||
|
||||
if ( ! $menu_items ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $menu_items;
|
||||
}
|
||||
|
||||
// Get Mega Menu Item Settings
|
||||
function get_menu_items_settings() {
|
||||
$menu_items = get_menu_items_data( get_selected_menu_id() );
|
||||
|
||||
$settings = [];
|
||||
|
||||
if ( ! $menu_items ) {
|
||||
return [];
|
||||
} else {
|
||||
foreach ( $menu_items as $key => $item_object ) {
|
||||
$item_id = $item_object->ID;
|
||||
|
||||
$item_meta = get_post_meta( $item_id, 'wpr-mega-menu-settings', true );
|
||||
|
||||
if ( !empty($item_meta) ) {
|
||||
$settings[ $item_id ] = $item_meta;
|
||||
} else {
|
||||
$settings[ $item_id ] = [];
|
||||
}
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Selected menu ID
|
||||
* @author Tom Hemsley (https://wordpress.org/plugins/megamenu/)
|
||||
*/
|
||||
function get_selected_menu_id() {
|
||||
$nav_menus = wp_get_nav_menus( array('orderby' => 'name') );
|
||||
$menu_count = count( $nav_menus );
|
||||
$nav_menu_selected_id = isset( $_REQUEST['menu'] ) ? (int) $_REQUEST['menu'] : 0;
|
||||
$add_new_screen = ( isset( $_GET['menu'] ) && 0 == $_GET['menu'] ) ? true : false;
|
||||
|
||||
$current_menu_id = $nav_menu_selected_id;
|
||||
|
||||
// If we have one theme location, and zero menus, we take them right into editing their first menu
|
||||
$page_count = wp_count_posts( 'page' );
|
||||
$one_theme_location_no_menus = ( 1 == count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) ? true : false;
|
||||
|
||||
// Get recently edited nav menu
|
||||
$recently_edited = absint( get_user_option( 'nav_menu_recently_edited' ) );
|
||||
if ( empty( $recently_edited ) && is_nav_menu( $current_menu_id ) ) {
|
||||
$recently_edited = $current_menu_id;
|
||||
}
|
||||
|
||||
// Use $recently_edited if none are selected
|
||||
if ( empty( $current_menu_id ) && ! isset( $_GET['menu'] ) && is_nav_menu( $recently_edited ) ) {
|
||||
$current_menu_id = $recently_edited;
|
||||
}
|
||||
|
||||
// On deletion of menu, if another menu exists, show it
|
||||
if ( ! $add_new_screen && 0 < $menu_count && isset( $_GET['action'] ) && 'delete' == $_GET['action'] ) {
|
||||
$current_menu_id = $nav_menus[0]->term_id;
|
||||
}
|
||||
|
||||
// Set $current_menu_id to 0 if no menus
|
||||
if ( $one_theme_location_no_menus ) {
|
||||
$current_menu_id = 0;
|
||||
} elseif ( empty( $current_menu_id ) && ! empty( $nav_menus ) && ! $add_new_screen ) {
|
||||
// if we have no selection yet, and we have menus, set to the first one in the list
|
||||
$current_menu_id = $nav_menus[0]->term_id;
|
||||
}
|
||||
|
||||
return $current_menu_id;
|
||||
|
||||
}
|
||||
|
||||
// Enqueue Scripts and Styles
|
||||
function enqueue_scripts( $hook ) {
|
||||
|
||||
// Get Plugin Version
|
||||
$version = Plugin::instance()->get_version();
|
||||
|
||||
// Deny if NOT a Menu Page
|
||||
if ( 'nav-menus.php' == $hook ) {
|
||||
|
||||
// Color Picker
|
||||
wp_enqueue_style( 'wp-color-picker' );
|
||||
wp_enqueue_script( 'wp-color-picker-alpha', WPR_ADDONS_URL .'assets/js/admin/lib/wp-color-picker-alpha.min.js', ['jquery', 'wp-color-picker'], $version, true );
|
||||
|
||||
// Icon Picker
|
||||
wp_enqueue_script( 'wpr-iconpicker-js', WPR_ADDONS_URL .'assets/js/admin/lib/iconpicker/fontawesome-iconpicker.min.js', ['jquery'], $version, true );
|
||||
wp_enqueue_style( 'wpr-iconpicker-css', WPR_ADDONS_URL .'assets/js/admin/lib/iconpicker/fontawesome-iconpicker.min.css', $version, true );
|
||||
wp_enqueue_style( 'wpr-el-fontawesome-css', ELEMENTOR_URL .'assets/lib/font-awesome/css/all.min.css', [], $version );
|
||||
|
||||
// enqueue CSS
|
||||
wp_enqueue_style( 'wpr-mega-menu-css', WPR_ADDONS_URL .'assets/css/admin/mega-menu.css', [], $version );
|
||||
|
||||
// enqueue JS
|
||||
wp_enqueue_script( 'wpr-mega-menu-js', WPR_ADDONS_URL .'assets/js/admin/mega-menu.js', ['jquery'], $version );
|
||||
|
||||
wp_localize_script(
|
||||
'wpr-mega-menu-js',
|
||||
'WprMegaMenuSettingsData',
|
||||
[
|
||||
'settingsData' => get_menu_items_settings(),
|
||||
'nonce' => wp_create_nonce( 'wpr-mega-menu-js' ),
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
use WprAddons\Plugin;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
// Add second featured image
|
||||
add_action( 'add_meta_boxes', 'secondary_image_add_metabox' );
|
||||
function secondary_image_add_metabox () {
|
||||
$post_types = Utilities::get_custom_types_of( 'post', false );
|
||||
|
||||
foreach ( $post_types as $key => $value ) {
|
||||
$meta_option = get_option( 'wpr_meta_secondary_image_' . $key, 'on' );
|
||||
|
||||
if ( 'page' !== $key && 'e-landing-page' !== $key && $meta_option === 'on' ) {
|
||||
add_meta_box( 'wpr-secondary-image', __( 'Secondary Image', 'wpr-addons' ), 'secondary_image_metabox', $key, 'side', 'low');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function secondary_image_metabox ( $post ) {
|
||||
global $content_width, $_wp_additional_image_sizes;
|
||||
|
||||
$image_id = get_post_meta( $post->ID, 'wpr_secondary_image_id', true );
|
||||
|
||||
$old_content_width = $content_width;
|
||||
$content_width = 254;
|
||||
|
||||
if ( $image_id && get_post( $image_id ) ) {
|
||||
|
||||
if ( ! isset( $_wp_additional_image_sizes['post-thumbnail'] ) ) {
|
||||
$thumbnail_html = wp_get_attachment_image( $image_id, array( $content_width, $content_width ) );
|
||||
} else {
|
||||
$thumbnail_html = wp_get_attachment_image( $image_id, 'post-thumbnail' );
|
||||
}
|
||||
|
||||
if ( ! empty( $thumbnail_html ) ) {
|
||||
$content = $thumbnail_html;
|
||||
$content .= '<p class="hide-if-no-js"><a href="javascript:;" id="remove_secondary_image_button" >' . esc_html__( 'Remove secondary image', 'wpr-addons' ) . '</a></p>';
|
||||
$content .= '<input type="hidden" id="upload_secondary_image" name="wpr_secondary_cover_image" value="' . esc_attr( $image_id ) . '" />';
|
||||
}
|
||||
|
||||
$content_width = $old_content_width;
|
||||
} else {
|
||||
|
||||
$content = '<img src="" style="width:' . esc_attr( $content_width ) . 'px;height:auto;border:0;display:none;" />';
|
||||
$content .= '<p class="hide-if-no-js"><a title="' . esc_attr__( 'Set secondary image', 'wpr-addons' ) . '" href="javascript:;" id="upload_secondary_image_button" id="set-secondary-image" data-uploader_title="' . esc_attr__( 'Choose an image', 'wpr-addons' ) . '" data-uploader_button_text="' . esc_attr__( 'Set secondary image', 'wpr-addons' ) . '">' . esc_html__( 'Set secondary image', 'wpr-addons' ) . '</a></p>';
|
||||
$content .= '<input type="hidden" id="upload_secondary_image" name="wpr_secondary_cover_image" value="" />';
|
||||
|
||||
}
|
||||
|
||||
echo $content;
|
||||
}
|
||||
|
||||
add_action( 'save_post', 'secondary_image_save', 10, 1 );
|
||||
function secondary_image_save ( $post_id ) {
|
||||
if( isset( $_POST['wpr_secondary_cover_image'] ) ) {
|
||||
$image_id = (int) $_POST['wpr_secondary_cover_image'];
|
||||
update_post_meta( $post_id, 'wpr_secondary_image_id', $image_id );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function wpdocs_selectively_enqueue_admin_script( $hook ) {
|
||||
if ( 'post.php' != $hook ) {
|
||||
return;
|
||||
}
|
||||
// Get Plugin Version
|
||||
$version = Plugin::instance()->get_version();
|
||||
// enqueue JS
|
||||
wp_enqueue_script( 'wpr-secondary-image-js', WPR_ADDONS_URL .'assets/js/admin/metabox/secondary-image.js', ['jquery'], $version );
|
||||
}
|
||||
|
||||
add_action( 'admin_enqueue_scripts', 'wpdocs_selectively_enqueue_admin_script' );
|
||||
@@ -0,0 +1,256 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Notices;
|
||||
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class WprPluginSaleNotice {
|
||||
// Declare class properties
|
||||
public $past_date;
|
||||
public $past_date_rml;
|
||||
public $install_date;
|
||||
public $remind_me_later;
|
||||
|
||||
public function __construct() {
|
||||
// delete_option('wpr_plugin_sale_dismiss_notice'); // uncomment for testing
|
||||
|
||||
$this->past_date = strtotime( '-2 days' );
|
||||
$this->past_date_rml = strtotime( '-15 days' );
|
||||
$this->install_date = get_option('royal_elementor_addons_activation_time_for_sale');
|
||||
$this->remind_me_later = get_option('wpr_sale_remind_me_later');
|
||||
// add_action( 'admin_init', [$this, 'render_notice'] ); // uncomment for testing
|
||||
|
||||
if ( current_user_can('administrator') ) {
|
||||
if ( !get_option('wpr_plugin_sale_dismiss_notice') ) {
|
||||
if ( (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) && !wpr_fs()->is_plan( 'expert' ) ) {
|
||||
add_action( 'admin_init', [$this, 'render_notice'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_admin() ) {
|
||||
add_action( 'admin_head', [$this, 'enqueue_scripts' ] );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpr_plugin_sale_dismiss_notice', [$this, 'wpr_plugin_sale_dismiss_notice'] );
|
||||
add_action( 'wp_ajax_wpr_sale_remind_me_later', [$this, 'wpr_sale_remind_me_later'] );
|
||||
}
|
||||
|
||||
public function render_notice() {
|
||||
// add_action( 'admin_notices', [$this, 'render_plugin_sale_notice' ]); // uncomment for testing
|
||||
if ( $this->past_date >= $this->install_date ) {
|
||||
if ( get_option('wpr_sale_remind_me_later') && !($this->past_date_rml >= $this->remind_me_later) ) {
|
||||
return;
|
||||
}
|
||||
add_action( 'admin_notices', [$this, 'render_plugin_sale_notice' ]);
|
||||
}
|
||||
}
|
||||
|
||||
public function wpr_plugin_sale_dismiss_notice() {
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-notice-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
add_option( 'wpr_plugin_sale_dismiss_notice', true );
|
||||
}
|
||||
|
||||
public function wpr_sale_remind_me_later() {
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-notice-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
update_option( 'wpr_sale_remind_me_later', absint(intval(strtotime('now'))) );
|
||||
}
|
||||
|
||||
public function render_plugin_sale_notice() {
|
||||
if ( is_admin() ) {
|
||||
echo '<div class="notice wpr-plugin-sale-notice is-dismissible">
|
||||
<div>
|
||||
<h3><span>Flash Sale</span><br> Royal Elementor Addons Pro</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/check-mark.png">
|
||||
140+ Designer Made Templates Kit
|
||||
</li>
|
||||
<li>
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/check-mark.png">
|
||||
100+ Advanced Elementor Widgets
|
||||
</li>
|
||||
<li>
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/check-mark.png">
|
||||
Dynamic Website Builder <a class="wpr-dynamic-tutorial" href="https://www.youtube.com/watch?v=kE1zmi3fxh8" target="_blank">View Demo</a>
|
||||
</li>
|
||||
<li>
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/check-mark.png">
|
||||
Advanced Theme Builder
|
||||
</li>
|
||||
<li>
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/check-mark.png">
|
||||
Advanced WooCommerce Builder
|
||||
</li>
|
||||
<li>
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/check-mark.png">
|
||||
Advanced Form Builder
|
||||
</li>
|
||||
<li>
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/check-mark.png">
|
||||
Mega Menu Builder
|
||||
</li>
|
||||
<li>
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/check-mark.png">
|
||||
Ajax Live Search and much more...
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Hurry up! Upgrade within the <strong>next 24 hours</strong> and get a
|
||||
<strong>20% Discount</strong>.<br><br>
|
||||
Use Promo Code: <strong style="border: 1px dashed #C3C4C7;padding: 2px 10px;">REAFLASH20</strong>
|
||||
</p>
|
||||
<br>
|
||||
<div>
|
||||
<a href="https://royal-elementor-addons.com/?ref=rea-plugin-backend-salebanner-upgrade-pro#purchasepro" target="_blank" class="wpr-upgrade-to-pro-button button button-secondary">Upgrade to Pro <span class="dashicons dashicons-arrow-right-alt"></span></a>
|
||||
<a target="#" target="_blank" class="wpr-upgrade-to-pro-button button button-secondary wpr-remind-later">Remind Me Later</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-wrap"><img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/sale-banner-20.png"></div>
|
||||
<canvas id="wpr-notice-confetti"></canvas>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function enqueue_scripts() {
|
||||
// Load Confetti
|
||||
wp_enqueue_script( 'wpr-confetti-js', WPR_ADDONS_URL .'assets/js/admin/lib/confetti/confetti.min.js', ['jquery'] );
|
||||
|
||||
// Scripts & Styles
|
||||
echo "
|
||||
<style>
|
||||
.wpr-plugin-sale-notice {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding: 30px;
|
||||
border: 0 !important;
|
||||
box-shadow: 0 0 5px rgb(0 0 0 / 0.1);
|
||||
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice-logo {
|
||||
display: none;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice-logo img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice h3 {
|
||||
font-size: 36px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice h3 span {
|
||||
display: inline-block;
|
||||
margin-bottom: 15px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
background-color: #f51f3d;
|
||||
padding: 2px 12px 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice ul li {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice ul img {
|
||||
display: inline-block;
|
||||
width: 11px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice p {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice .wpr-upgrade-to-pro-button {
|
||||
border: 2px solid #e4e4e4;
|
||||
color: #9f9c9c;
|
||||
background-color: #fff;
|
||||
padding: 5px 25px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice .wpr-upgrade-to-pro-button:hover {
|
||||
border: 2px solid #6a4bff4f;
|
||||
color: #6A4BFF;
|
||||
background: #f6f7f7;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice .wpr-upgrade-to-pro-button:first-child {
|
||||
border: 2px solid #6A4BFF;
|
||||
color: #ffffff;
|
||||
background-color: #6A4BFF;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice .wpr-upgrade-to-pro-button .dashicons {
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice .wpr-dynamic-tutorial {
|
||||
text-decoration: none;
|
||||
color: #FFF;
|
||||
background: #e1ad01;
|
||||
padding: 4px 10px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.wpr-plugin-sale-notice .image-wrap {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
#wpr-notice-confetti {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1400px) {
|
||||
.wpr-plugin-sale-notice .image-wrap img {
|
||||
zoom: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1366px) {
|
||||
.wpr-plugin-sale-notice .image-wrap img {
|
||||
zoom: 0.7;
|
||||
}
|
||||
}
|
||||
</style>";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'Royal Addons' === Utilities::get_plugin_name() ) {
|
||||
new WprPluginSaleNotice();
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Notices;
|
||||
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class WprPluginNotice {
|
||||
public function __construct() {
|
||||
|
||||
if ( current_user_can('administrator') ) {
|
||||
|
||||
if ( !get_option('wpr_plugin_update_dismiss_notice' ) ) {
|
||||
add_action( 'admin_init', [$this, 'render_notice'] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_admin() ) {
|
||||
add_action( 'admin_head', [$this, 'enqueue_scripts' ] );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpr_plugin_update_dismiss_notice', [$this, 'wpr_plugin_update_dismiss_notice'] );
|
||||
}
|
||||
|
||||
public function render_notice() {
|
||||
add_action( 'admin_notices', [$this, 'render_plugin_update_notice' ]);
|
||||
}
|
||||
|
||||
public function wpr_plugin_update_dismiss_notice() {
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-notice-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
add_option( 'wpr_plugin_update_dismiss_notice', true );
|
||||
}
|
||||
|
||||
public function render_plugin_update_notice() {
|
||||
global $current_screen;
|
||||
|
||||
if ( is_admin() ) {
|
||||
if ( 'royal-addons_page_wpr-templates-kit' === $current_screen->id || 'update' === $current_screen->id ) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<div class="notice wpr-plugin-update-notice is-dismissible">
|
||||
<div class="wpr-plugin-update-notice-logo">
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'/img/logo-128x128.png">
|
||||
</div>
|
||||
<div>
|
||||
<h3><span>New Features</span><br> Introducing New Widgets</h3>
|
||||
<p>We are excited to announce that we have added new Widgets, Template Kits, and other Elementor<br> features to enhance your website building experience. Stay tuned for the weekly updates!</p>
|
||||
<ul class="wpr-new-widgets-list">
|
||||
<li><a target="_blank" href="https://royal-elementor-addons.com/advanced-sticky-header/?ref=rea-plugin-backend-update-notice">Advanced Sticky Header</a></li>
|
||||
<li><a target="_blank" href="https://royal-elementor-addons.com/elementor-form-builder-widget/?ref=rea-plugin-backend-update-notice">Form Builder</a></li>
|
||||
<li><a target="_blank" href="https://royal-elementor-addons.com/elementor-mega-menu-widget/?ref=rea-plugin-backend-update-notice">Mega Menu</a></li>
|
||||
<li><a target="_blank" href="https://royal-elementor-addons.com/elementor-offcanvas-menu-widget/?ref=rea-plugin-backend-update-notice">Off-Canvas Content</a></li>
|
||||
<li><a target="_blank" href="https://royal-elementor-addons.com/elementor-instagram-feed-widget/?ref=rea-plugin-backend-update-notice">Instagram Feed</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="image-wrap"><img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'img/new-theme-builder.png"></div>
|
||||
<canvas id="wpr-notice-confetti"></canvas>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function enqueue_scripts() {
|
||||
// Load Confetti
|
||||
wp_enqueue_script( 'wpr-confetti-js', WPR_ADDONS_URL .'assets/js/admin/lib/confetti/confetti.min.js', ['jquery'] );
|
||||
|
||||
// Scripts & Styles
|
||||
echo "
|
||||
<style>
|
||||
.wpr-plugin-update-notice {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding: 30px;
|
||||
border: 0 !important;
|
||||
box-shadow: 0 0 5px rgb(0 0 0 / 0.1);
|
||||
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice-logo {
|
||||
display: none;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice-logo img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice h3 {
|
||||
font-size: 36px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice h3 span {
|
||||
display: inline-block;
|
||||
margin-bottom: 15px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
background-color: #f51f3d;
|
||||
padding: 2px 12px 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice p {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice ul {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice ul a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice ul li a:after {
|
||||
content: ' ';
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -2px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
margin-left: 12px;
|
||||
margin-right: 12px;
|
||||
background-color: #e0e0e0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice ul li:last-child a:after {
|
||||
display: none;
|
||||
}
|
||||
.wpr-get-started-button.button-primary {
|
||||
background-color: #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-get-started-button.button-primary:hover {
|
||||
background-color: #583ed7;
|
||||
}
|
||||
|
||||
.wpr-get-started-button.button-secondary {
|
||||
border: 1px solid #6A4BFF;
|
||||
color: #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-get-started-button.button-secondary:hover {
|
||||
background-color: #6A4BFF;
|
||||
border: 2px solid #6A4BFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpr-get-started-button {
|
||||
padding: 5px 25px !important;
|
||||
}
|
||||
|
||||
.wpr-get-started-button .dashicons {
|
||||
font-size: 12px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice .image-wrap {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice .image-wrap img {
|
||||
zoom: 0.45;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1366px) {
|
||||
.wpr-plugin-update-notice h3 {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.wpr-plugin-update-notice .image-wrap img {
|
||||
zoom: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1280px) {
|
||||
.wpr-plugin-update-notice .image-wrap img {
|
||||
zoom: 0.35;
|
||||
}
|
||||
}
|
||||
|
||||
#wpr-notice-confetti {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'Royal Addons' === Utilities::get_plugin_name() ) {
|
||||
new WprPluginNotice();
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Notices;
|
||||
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class WprProFeaturesNotice {
|
||||
public function __construct() {
|
||||
|
||||
if ( function_exists('wpr_fs') && !wpr_fs()->is_plan( 'expert' ) ) {
|
||||
|
||||
if ( current_user_can('administrator') ) {
|
||||
|
||||
if ( !get_option('wpr_pro_features_dismiss_notice' ) ) {
|
||||
add_action( 'admin_init', [$this, 'render_notice'] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_admin() && !get_option('wpr_pro_features_dismiss_notice' ) ) {
|
||||
add_action( 'admin_head', [$this, 'enqueue_scripts' ] );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpr_pro_features_dismiss_notice', [$this, 'wpr_pro_features_dismiss_notice'] );
|
||||
}
|
||||
}
|
||||
|
||||
public function render_notice() {
|
||||
add_action( 'admin_notices', [$this, 'render_pro_features_notice' ]);
|
||||
}
|
||||
|
||||
public function wpr_pro_features_dismiss_notice() {
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-notice-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
add_option( 'wpr_pro_features_dismiss_notice', true );
|
||||
return 'responsetext';
|
||||
}
|
||||
|
||||
public function render_pro_features_notice() {
|
||||
global $current_screen;
|
||||
|
||||
if ( is_admin() && 'toplevel_page_wpr-addons' == $current_screen->id ) {
|
||||
echo '<div class="wpr-pro-features-notice-wrap">';
|
||||
echo '<div class="notice wpr-pro-features-notice is-dismissible">
|
||||
<div class="wpr-pro-features-notice-logo">
|
||||
<img src="'. esc_url(WPR_ADDONS_ASSETS_URL) .'/img/logo-128x128.png">
|
||||
</div>
|
||||
<div>
|
||||
<h3><span>Big Update</span><br>Dynamic Content</h3>
|
||||
<p>We are happy to announce that <strong>Royal Elementor Addons Expert</strong> version now supports <strong>Dynamic Content</strong> wich includes:</p>
|
||||
<ul class="wpr-new-widgets-list">
|
||||
<li><strong>Dynamic Tags (Elementor)</strong></li>
|
||||
<li><strong>Advanced Custom Fields (Extended)</strong></li>
|
||||
<li><strong>Custom Post Type Generator</strong></li>
|
||||
<li><strong>Custom Taxonomy Generator</strong></li>
|
||||
<li><a target="_blank" href="https://www.youtube.com/watch?v=wis1rQTn1tg">Product Wishlist (WooCommerce)</a></li>
|
||||
<li><a target="_blank" href="https://www.youtube.com/watch?v=wis1rQTn1tg">Product Compare (WooCommerce)</a></li>
|
||||
</ul>
|
||||
|
||||
<a class="wpr-pro-features-btn" href="https://royal-elementor-addons.com/#purchasepro?ref=rea-plugin-backend-expertnoticebanner-checkbtn-upgrade-expert#purchasepro" target="_blank">Upgrade to Expert</a>
|
||||
<a class="wpr-pro-features-btn wpr-dynamic-tutorial" href="https://www.youtube.com/watch?v=kE1zmi3fxh8" target="_blank">Dynamic Tutorial</a>
|
||||
</div>
|
||||
<canvas id="wpr-notice-confetti"></canvas>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function enqueue_scripts() {
|
||||
global $current_screen;
|
||||
|
||||
|
||||
if ( !(is_admin() && 'toplevel_page_wpr-addons' == $current_screen->id) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load Confetti
|
||||
wp_enqueue_script( 'wpr-confetti-js', WPR_ADDONS_URL .'assets/js/admin/lib/confetti/confetti.min.js', ['jquery'] );
|
||||
|
||||
// Scripts & Styles
|
||||
echo "
|
||||
<script>
|
||||
jQuery( document ).ready( function($) {
|
||||
|
||||
$('html, body').animate({
|
||||
scrollTop: 0
|
||||
}, 'slow');
|
||||
$('body').addClass('wpr-pro-features-body');
|
||||
$(document).find('.wpr-pro-features-notice-wrap').css('opacity', 1);
|
||||
|
||||
if ( jQuery('#wpr-notice-confetti').length ) {
|
||||
const wprConfetti = confetti.create( document.getElementById('wpr-notice-confetti'), {
|
||||
resize: true
|
||||
});
|
||||
|
||||
setTimeout( function () {
|
||||
wprConfetti( {
|
||||
particleCount: 150,
|
||||
origin: { x: 1, y: 2 },
|
||||
gravity: 0.3,
|
||||
spread: 50,
|
||||
ticks: 150,
|
||||
angle: 120,
|
||||
startVelocity: 60,
|
||||
colors: [
|
||||
'#0e6ef1',
|
||||
'#f5b800',
|
||||
'#ff344c',
|
||||
'#98e027',
|
||||
'#9900f1',
|
||||
],
|
||||
} );
|
||||
}, 500 );
|
||||
|
||||
setTimeout( function () {
|
||||
wprConfetti( {
|
||||
particleCount: 150,
|
||||
origin: { x: 0, y: 2 },
|
||||
gravity: 0.3,
|
||||
spread: 50,
|
||||
ticks: 200,
|
||||
angle: 60,
|
||||
startVelocity: 60,
|
||||
colors: [
|
||||
'#0e6ef1',
|
||||
'#f5b800',
|
||||
'#ff344c',
|
||||
'#98e027',
|
||||
'#9900f1',
|
||||
],
|
||||
} );
|
||||
}, 900 );
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.wpr-pro-features-body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice-wrap {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.wpr-settings-page-header .wpr-pro-features-notice.notice {
|
||||
display: flex !important;
|
||||
position: absolute !important;
|
||||
top: 30%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 410px;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding: 30px;
|
||||
border: 0 !important;
|
||||
box-shadow: 0 0 5px rgb(0 0 0 / 0.3);
|
||||
padding-left: 40px;
|
||||
z-index: 999;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice-logo {
|
||||
display: none;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice-logo img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice h3 {
|
||||
font-size: 32px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice h3 span {
|
||||
display: inline-block;
|
||||
margin-bottom: 15px;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
background-color: #f51f3d;
|
||||
padding: 2px 12px 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice p {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 25px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice ul a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice ul li:last-child a:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-pro-features-btn,
|
||||
.wpr-new-widgets-list + a {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
color: #fff;
|
||||
background: #6A4BFF;
|
||||
padding: 5px 18px 7px;
|
||||
border-radius: 3px;
|
||||
margin-top: 30px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-btn.wpr-dynamic-tutorial {
|
||||
background: #e1ad01;
|
||||
}
|
||||
|
||||
.wpr-pro-features-btn:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.wpr-pro-features-btn:focus {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.wpr-get-started-button.button-primary {
|
||||
background-color: #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-get-started-button.button-primary:hover {
|
||||
background-color: #583ed7;
|
||||
}
|
||||
|
||||
.wpr-get-started-button.button-secondary {
|
||||
border: 1px solid #6A4BFF;
|
||||
color: #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-get-started-button.button-secondary:hover {
|
||||
background-color: #6A4BFF;
|
||||
border: 2px solid #6A4BFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpr-get-started-button {
|
||||
padding: 5px 25px !important;
|
||||
}
|
||||
|
||||
.wpr-get-started-button .dashicons {
|
||||
font-size: 12px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice .image-wrap {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice .image-wrap img {
|
||||
zoom: 0.45;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1366px) {
|
||||
.wpr-pro-features-notice h3 {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-notice .image-wrap img {
|
||||
zoom: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1280px) {
|
||||
.wpr-pro-features-notice .image-wrap img {
|
||||
zoom: 0.35;
|
||||
}
|
||||
}
|
||||
|
||||
#wpr-notice-confetti {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'Royal Addons' === Utilities::get_plugin_name() ) {
|
||||
new WprProFeaturesNotice();
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Notices;
|
||||
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class WprRatingNotice {
|
||||
private $past_date;
|
||||
|
||||
public function __construct() {
|
||||
global $pagenow;
|
||||
$this->past_date = false == get_option('wpr_maybe_later_time') ? strtotime( '-14 days' ) : strtotime('-7 days');
|
||||
|
||||
if ( current_user_can('administrator') ) {
|
||||
if ( empty(get_option('wpr_rating_dismiss_notice', false)) && empty(get_option('wpr_rating_already_rated', false)) ) {
|
||||
add_action( 'admin_init', [$this, 'check_plugin_install_time'] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( is_admin() ) {
|
||||
add_action( 'admin_head', [$this, 'enqueue_scripts' ] );
|
||||
}
|
||||
|
||||
add_action( 'wp_ajax_wpr_rating_dismiss_notice', [$this, 'wpr_rating_dismiss_notice'] );
|
||||
add_action( 'wp_ajax_wpr_rating_maybe_later', [$this, 'wpr_rating_maybe_later'] );
|
||||
add_action( 'wp_ajax_wpr_rating_already_rated', [$this, 'wpr_rating_already_rated'] );
|
||||
add_action( 'wp_ajax_wpr_rating_need_help', [$this, 'wpr_rating_need_help'] );
|
||||
}
|
||||
|
||||
public function check_plugin_install_time() {
|
||||
$install_date = get_option('royal_elementor_addons_activation_time');
|
||||
|
||||
if ( false == get_option('wpr_maybe_later_time') && false !== $install_date && $this->past_date >= $install_date ) {
|
||||
add_action( 'admin_notices', [$this, 'render_rating_notice' ]);
|
||||
} else if ( false != get_option('wpr_maybe_later_time') && $this->past_date >= get_option('wpr_maybe_later_time') ) {
|
||||
add_action( 'admin_notices', [$this, 'render_rating_notice' ]);
|
||||
}
|
||||
}
|
||||
|
||||
public function wpr_rating_maybe_later() {
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-notice-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
update_option( 'wpr_maybe_later_time', strtotime('now') );
|
||||
}
|
||||
|
||||
function wpr_rating_already_rated() {
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-notice-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
update_option( 'wpr_rating_already_rated' , true );
|
||||
}
|
||||
|
||||
public function wpr_rating_dismiss_notice() {
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-notice-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
update_option( 'wpr_rating_dismiss_notice', true );
|
||||
}
|
||||
|
||||
public function wpr_rating_need_help() {
|
||||
$nonce = $_POST['nonce'];
|
||||
|
||||
if ( !wp_verify_nonce( $nonce, 'wpr-plugin-notice-js') || !current_user_can( 'manage_options' ) ) {
|
||||
exit; // Get out of here, the nonce is rotten!
|
||||
}
|
||||
|
||||
// Reset Activation Time if user Needs Help
|
||||
update_option( 'royal_elementor_addons_activation_time', strtotime('now') );
|
||||
}
|
||||
|
||||
public function render_rating_notice() {
|
||||
global $pagenow;
|
||||
|
||||
if ( is_admin() ) {
|
||||
$plugin_info = get_plugin_data( __FILE__ , true, true );
|
||||
$dont_disturb = esc_url( get_admin_url() . '?spare_me=1' );
|
||||
|
||||
echo '<div class="notice wpr-rating-notice is-dismissible" style="border-left-color: #7A75FF!important; display: flex; align-items: center; position: relative;">
|
||||
<div class="wpr-rating-notice-logo">
|
||||
<img src="' . WPR_ADDONS_ASSETS_URL . '/img/logo-128x128.png">
|
||||
</div>
|
||||
<div>
|
||||
<h3>Thank you for using Royal Elementor Addons to build this website!</h3>
|
||||
<p style="">Could you please do us a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation.</p>
|
||||
<p>
|
||||
<a href="https://wordpress.org/support/plugin/royal-elementor-addons/reviews/" target="_blank" class="wpr-you-deserve-it button button-primary">OK, you deserve it!</a>
|
||||
<a class="wpr-maybe-later"><span class="dashicons dashicons-clock"></span> Maybe Later</a>
|
||||
<a class="wpr-already-rated"><span class="dashicons dashicons-yes"></span> I Already did</a>
|
||||
</p>
|
||||
</div>
|
||||
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
|
||||
</div>';
|
||||
|
||||
// <a href="https://wordpress.org/support/plugin/royal-elementor-addons/" target="_blank" class="wpr-need-support"><span class="dashicons dashicons-sos"></span> I need support!</a>
|
||||
// <a class="wpr-notice-dismiss-2"><span class="dashicons dashicons-thumbs-down"></span> NO, not good enough</a>
|
||||
}
|
||||
}
|
||||
|
||||
public static function enqueue_scripts() {
|
||||
echo "
|
||||
<style>
|
||||
.wpr-rating-notice {
|
||||
padding: 10px 20px;
|
||||
border-top: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.wpr-rating-notice-logo {
|
||||
margin-right: 20px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.wpr-rating-notice-logo img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.wpr-rating-notice h3 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wpr-rating-notice p {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.wpr-maybe-later,
|
||||
.wpr-already-rated,
|
||||
.wpr-need-support,
|
||||
.wpr-notice-dismiss-2 {
|
||||
text-decoration: none;
|
||||
margin-left: 12px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-already-rated .dashicons,
|
||||
.wpr-maybe-later .dashicons,
|
||||
.wpr-need-support .dashicons {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.wpr-notice-dismiss-2 .dashicons {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.wpr-rating-notice .notice-dismiss {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 1px;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 9px;
|
||||
background: none;
|
||||
color: #787c82;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-rating-notice .notice-dismiss:before {
|
||||
background: none;
|
||||
color: #787c82;
|
||||
content: '\\f153';
|
||||
display: block;
|
||||
font: normal 16px/20px dashicons;
|
||||
speak: never;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.wpr-rating-notice .notice-dismiss:hover:before {
|
||||
color: #d63638;
|
||||
}
|
||||
</style>
|
||||
";
|
||||
|
||||
echo "
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
$('.wpr-rating-notice .notice-dismiss').on('click', function() {
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'wpr_rating_dismiss_notice',
|
||||
nonce: '" . wp_create_nonce('wpr-plugin-notice-js') . "'
|
||||
},
|
||||
success: function() {
|
||||
$('.wpr-rating-notice').fadeOut();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( 'Royal Addons' === Utilities::get_plugin_name() ) {
|
||||
new WprRatingNotice();
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use WprAddons\Admin\Includes\WPR_Templates_Loop;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
// Register Menus
|
||||
function wpr_addons_add_popups_menu() {
|
||||
add_submenu_page( 'wpr-addons', 'Popup Builder', 'Popup Builder', 'manage_options', 'wpr-popups', 'wpr_addons_popups_page' );
|
||||
}
|
||||
add_action( 'admin_menu', 'wpr_addons_add_popups_menu' );
|
||||
|
||||
function wpr_addons_popups_page() {
|
||||
|
||||
?>
|
||||
|
||||
<div class="wrap wpr-settings-page-wrap">
|
||||
|
||||
<div class="wpr-settings-page-header">
|
||||
<h1><?php echo esc_html(Utilities::get_plugin_name(true)); ?></h1>
|
||||
<p><?php esc_html_e( 'The most powerful Elementor Addons in the universe.', 'wpr-addons' ); ?></p>
|
||||
|
||||
<!-- Custom Template -->
|
||||
<div class="wpr-preview-buttons">
|
||||
<div class="wpr-user-template">
|
||||
<span><?php esc_html_e( 'Create Template', 'wpr-addons' ); ?></span>
|
||||
<span class="plus-icon">+</span>
|
||||
</div>
|
||||
|
||||
<a href="https://www.youtube.com/watch?v=TbKTNpuXM68" class="wpr-options-button button" target="_blank" style="padding: 10px 22px;">
|
||||
<?php echo esc_html__( 'How to use Popups', 'wpr-addons' ); ?>
|
||||
<span class="dashicons dashicons-video-alt3"></span>
|
||||
</a>
|
||||
|
||||
<a href="https://royaladdons.frill.co/b/6m4d5qm4/feature-ideas" class="wpr-options-button button" target="_blank" style="padding: 8px 22px;">
|
||||
<?php echo esc_html__( 'Request New Feature', 'wpr-addons' ); ?>
|
||||
<span class="dashicons dashicons-star-empty"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpr-settings-page">
|
||||
<form method="post" action="options.php">
|
||||
<?php
|
||||
|
||||
// Active Tab
|
||||
$active_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'wpr_tab_popups';
|
||||
|
||||
?>
|
||||
|
||||
<!-- Template ID Holder -->
|
||||
<input type="hidden" name="wpr_template" id="wpr_template" value="">
|
||||
|
||||
<!-- Conditions Popup -->
|
||||
<?php WPR_Templates_Loop::render_conditions_popup(); ?>
|
||||
|
||||
<!-- Create Templte Popup -->
|
||||
<?php WPR_Templates_Loop::render_create_template_popup(); ?>
|
||||
|
||||
<!-- Tabs -->
|
||||
<div class="nav-tab-wrapper wpr-nav-tab-wrapper">
|
||||
<a href="?page=wpr-theme-builder&tab=wpr_tab_popups" data-title="popup" class="nav-tab <?php echo ($active_tab == 'wpr_tab_popups') ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e( 'Popups', 'wpr-addons' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
|
||||
$url = '';
|
||||
$url = admin_url( 'edit.php?s&post_status=all&post_type=wpr_templates&wpr_template_type=popup&filter_action=Filter' );
|
||||
|
||||
echo '<a href="' . esc_url( $url ) . '" class="button button-primary wpr-translate-templates wpr-options-button"><span class="dashicons dashicons-admin-site"></span><span>Translate WPML Templates</span></a>';
|
||||
echo '<a href="https://www.youtube.com/watch?v=y7yjItsMBmw" class="button button-primary wpr-translate-templates wpr-options-button tutorial">'. esc_html__("Video Tutorial") .'</a>';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( $active_tab == 'wpr_tab_popups' ) : ?>
|
||||
|
||||
<!-- Save Conditions -->
|
||||
<input type="hidden" name="wpr_popup_conditions" id="wpr_popup_conditions" value="<?php echo esc_attr(get_option('wpr_popup_conditions', '[]')); ?>">
|
||||
|
||||
<?php WPR_Templates_Loop::render_theme_builder_templates( 'popup' ); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
} // End wpr_addons_popups_page()
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Data;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Library_Blocks;
|
||||
use WprAddons\Classes\Utilities;
|
||||
use Elementor\Plugin;
|
||||
|
||||
// Register Menus
|
||||
function wpr_addons_add_premade_blocks_menu() {
|
||||
add_submenu_page( 'wpr-addons', 'Premade Blocks', 'Premade Blocks', 'manage_options', 'wpr-premade-blocks', 'wpr_addons_premade_blocks_page' );
|
||||
}
|
||||
add_action( 'admin_menu', 'wpr_addons_add_premade_blocks_menu' );
|
||||
|
||||
/**
|
||||
** Render Premade Blocks Page
|
||||
*/
|
||||
function wpr_addons_premade_blocks_page() {
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-premade-blocks-page">
|
||||
|
||||
<div class="wpr-settings-page-header">
|
||||
<h1><?php echo esc_html(Utilities::get_plugin_name(true)); ?></h1>
|
||||
<p><?php esc_html_e( 'The most powerful Elementor Addon in the universe.', 'wpr-addons' ); ?></p>
|
||||
</div>
|
||||
|
||||
<?php WPR_Templates_Library_Blocks::render_library_templates_blocks(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
} // End wpr_addons_premade_blocks_page()
|
||||
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Templates\Library;
|
||||
use WprAddons\Classes\Utilities;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Data;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Templates_Library_Blocks setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Library_Blocks {
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Template Library Popup
|
||||
add_action( 'wp_ajax_render_library_templates_blocks', [ $this, 'render_library_templates_blocks' ] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
** Template Library Popup
|
||||
*/
|
||||
public static function render_library_templates_blocks() {
|
||||
$license = !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'free' : 'premium';
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-tplib-sidebar" data-license="<?php echo esc_attr($license); ?>">
|
||||
<div class="wpr-tplib-filters-wrap">
|
||||
<div class="wpr-tplib-filters">
|
||||
<h3>
|
||||
<span data-filter="all"><?php esc_html_e( 'Category', 'wpr-addons' ); ?></span>
|
||||
<i class="fas fa-angle-down"></i>
|
||||
</h3>
|
||||
|
||||
<div class="wpr-tplib-filters-list">
|
||||
<ul>
|
||||
|
||||
<li data-filter="all"><?php esc_html_e( 'All', 'wpr-addons' ) ?></li>
|
||||
|
||||
<?php
|
||||
|
||||
$modules = Utilities::get_available_modules( Utilities::get_registered_modules() );
|
||||
|
||||
$exclude_widgets = [
|
||||
'logo',
|
||||
'mega-menu',
|
||||
'forms',
|
||||
'phone-call',
|
||||
'back-to-top',
|
||||
'popup-trigger',
|
||||
'lottie-animations',
|
||||
'taxonomy-list',
|
||||
'page-list',
|
||||
'elementor-template',
|
||||
'flip-carousel',
|
||||
'feature-list',
|
||||
'dual-color-heading',
|
||||
'reading-progress-bar',
|
||||
'image-accordion',
|
||||
'advanced-accordion',
|
||||
'charts',
|
||||
];
|
||||
|
||||
foreach ($modules as $title => $slug) {
|
||||
if ( ! in_array($slug[0], $exclude_widgets) ) {
|
||||
echo '<li data-filter="'. esc_attr($slug[0]) .'">'. esc_html($title) .'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpr-tplib-sub-filters">
|
||||
<ul>
|
||||
<li data-sub-filter="all" class="wpr-tplib-activ-filter"><?php esc_html_e( 'All', 'wpr-addons' ); ?></li>
|
||||
<li data-sub-filter="grid"><?php esc_html_e( 'Grid', 'wpr-addons' ) ?></li>
|
||||
<li data-sub-filter="slider"><?php esc_html_e( 'Slider', 'wpr-addons' ) ?></li>
|
||||
<li data-sub-filter="carousel"><?php esc_html_e( 'Carousel', 'wpr-addons' ) ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpr-tplib-search">
|
||||
<input type="text" placeholder="Search Template">
|
||||
<i class="eicon-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpr-tplib-template-gird elementor-clearfix">
|
||||
<div class="wpr-tplib-template-gird-inner">
|
||||
|
||||
<?php
|
||||
|
||||
foreach ($modules as $title => $data) :
|
||||
$module_slug = $data[0];
|
||||
$blocks = WPR_Templates_Data::get_available_blocks();
|
||||
|
||||
if ( !isset($blocks[$module_slug]) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for ( $i=0; $i < count($blocks[$module_slug]); $i++ ) :
|
||||
|
||||
$template_slug = array_keys($blocks[$module_slug])[$i];
|
||||
$template_sub = isset($blocks[$module_slug][$template_slug]['sub']) ? $blocks[$module_slug][$template_slug]['sub'] : '';
|
||||
$template_title = $title .' '. $template_slug;
|
||||
$preview_type = $blocks[$module_slug][$template_slug]['type'];
|
||||
$preview_url = $blocks[$module_slug][$template_slug]['url'];
|
||||
$template_class = (strpos($template_slug, 'pro') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) || (strpos($template_slug, 'zzz') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) ? ' wpr-tplib-pro-wrap' : '';
|
||||
|
||||
if (defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code()) {
|
||||
$template_class .= ' wpr-tplib-pro-active';
|
||||
}
|
||||
|
||||
$template_slug_for_image = strpos($template_slug, 'zzz') ? substr($template_slug, 0, -4) : $template_slug;
|
||||
|
||||
// Add Extra Keywords for Search
|
||||
$data_template_title = $template_title;
|
||||
if ( false !== strpos($title, 'Form Builder') ) {
|
||||
$data_template_title .= ' contact';
|
||||
} else if ( false !== strpos($title, 'Nav Menu') ) {
|
||||
$data_template_title .= ' header';
|
||||
} else if ( false !== strpos($title, 'Post Grid') ) {
|
||||
$data_template_title .= ' blog';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>" data-title="<?php echo esc_attr(strtolower($data_template_title)); ?>">
|
||||
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($template_slug); ?>" data-filter="<?php echo esc_attr($module_slug); ?>" data-sub-filter="<?php echo esc_attr($template_sub); ?>" data-preview-type="<?php echo esc_attr($preview_type); ?>" data-preview-url="<?php echo esc_attr($preview_url); ?>">
|
||||
<div class="wpr-tplib-template-media">
|
||||
<img class="lazy" src="<?php echo esc_url(WPR_ADDONS_ASSETS_URL .'img/icon-256x256.png'); ?>" data-src="<?php echo esc_url('https://royal-elementor-addons.com/library/premade-styles/'. $module_slug .'/'. $template_slug_for_image .'.jpg'); ?>">
|
||||
<div class="wpr-tplib-template-media-overlay">
|
||||
<i class="eicon-eye"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpr-tplib-template-footer elementor-clearfix">
|
||||
<?php if ( !defined('WPR_ADDONS_PRO_VERSION') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) : ?>
|
||||
<h3><?php echo strpos($template_slug, 'pro') ? esc_html(str_replace('-pro', ' Pro', $template_title)) : esc_html(str_replace('-zzz', ' Pro', $template_title)); ?></h3>
|
||||
<?php else : ?>
|
||||
<h3><?php echo strpos($template_slug, 'pro') ? esc_html(str_replace('-pro', '', $template_title)) : esc_html(str_replace('-zzz', '', $template_title)); ?></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ( strpos($template_slug, 'pro') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) || ( strpos($template_slug, 'zzz') ) && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) : ?>
|
||||
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
||||
<?php else : ?>
|
||||
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endfor; ?>
|
||||
<?php endforeach;?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
$current_screen = get_current_screen();
|
||||
|
||||
if ( !(isset($current_screen) && 'royal-addons_page_wpr-premade-blocks' === $current_screen->id) ) {
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Templates\Library;
|
||||
use WprAddons\Classes\Utilities;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Data;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Templates_Library_Pages setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Library_Pages {
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Template Library Popup
|
||||
add_action( 'wp_ajax_render_library_templates_pages', [ $this, 'render_library_templates_pages' ] );
|
||||
add_action( 'wp_ajax_render_library_templates_pages_grid_items', [ $this, 'render_library_templates_pages_grid_items' ] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
** Template Library Popup
|
||||
*/
|
||||
public static function render_library_templates_pages() {
|
||||
$license = !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'free' : 'premium';
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-tplib-sidebar" data-license="<?php echo esc_attr($license); ?>">
|
||||
<div class="wpr-tplib-price" data-filter="mixed">
|
||||
<h3>
|
||||
<span><?php esc_html_e( 'Mixed', 'wpr-addons' ); ?></span>
|
||||
<i class="fas fa-angle-down"></i>
|
||||
</h3>
|
||||
|
||||
<div class="wpr-tplib-price-list">
|
||||
<ul>
|
||||
<li data-filter="mixed"><?php esc_html_e( 'Mixed', 'wpr-addons' ); ?></li>
|
||||
<li data-filter="free"><?php esc_html_e( 'Free', 'wpr-addons' ); ?></li>
|
||||
<li data-filter="pro"><?php esc_html_e( 'Premium', 'wpr-addons' ); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpr-tplib-search">
|
||||
<input type="text" placeholder="Search Template">
|
||||
<i class="eicon-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpr-tplib-template-gird elementor-clearfix">
|
||||
<div class="wpr-tplib-template-gird-inner">
|
||||
|
||||
<?php //WPR_Templates_Library_Pages::render_library_templates_pages_grid_items(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wpr-tplib-template-gird-loading">
|
||||
<div class="wpr-wave">
|
||||
<div class="wpr-rect wpr-rect1"></div>
|
||||
<div class="wpr-rect wpr-rect2"></div>
|
||||
<div class="wpr-rect wpr-rect3"></div>
|
||||
<div class="wpr-rect wpr-rect4"></div>
|
||||
<div class="wpr-rect wpr-rect5"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
wp_die();
|
||||
}
|
||||
|
||||
/**
|
||||
** Template Library Grid Items
|
||||
*/
|
||||
public static function render_library_templates_pages_grid_items() {
|
||||
$kits = WPR_Templates_Data::get_available_kits_for_pages();
|
||||
|
||||
$page = isset($_POST['page']) ? intval($_POST['page']) : 1;
|
||||
$kits_per_page = 10; // should be set to 10
|
||||
|
||||
$start = ($page - 1) * $kits_per_page;
|
||||
$end = $start + $kits_per_page;
|
||||
|
||||
$kits = array_slice($kits, $start, $kits_per_page, true);
|
||||
|
||||
foreach( $kits as $kit => $data ) :
|
||||
|
||||
foreach( $data['pages'] as $key => $page ) :
|
||||
|
||||
$template_title = $data['name'] .' - '. str_replace('-', ' ', ucwords($page));
|
||||
$template_price = ('pro' === $data['price'] && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) ? 'pro' : 'free';
|
||||
$template_class = 'pro' === $template_price ? ' wpr-tplib-pro-wrap' : '';
|
||||
$preview_url = $data['preview'][$key];
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>" style="position:absolute;top:9999999999px;" data-title="<?php echo esc_attr(strtolower($template_title)); ?>" data-price="<?php echo esc_attr($template_price); ?>">
|
||||
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($page); ?>" data-kit="<?php echo esc_attr($kit); ?>" data-preview-type="iframe" data-preview-url="<?php echo esc_attr($preview_url); ?>">
|
||||
<div class="wpr-tplib-template-media">
|
||||
<img class="lazy" src="<?php echo esc_url(WPR_ADDONS_ASSETS_URL .'img/icon-256x256.png'); ?>" data-src="<?php echo esc_url('https://royal-elementor-addons.com/library/templates-kit/'. $kit .'/'. $page .'.jpg'); ?>">
|
||||
<div class="wpr-tplib-template-media-overlay">
|
||||
<i class="eicon-eye"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpr-tplib-template-footer elementor-clearfix">
|
||||
<h3>
|
||||
<span><?php echo esc_html($data['name']) ?></span>
|
||||
<span><?php echo ' - '. esc_html(ucwords($page)); ?></span>
|
||||
</h3>
|
||||
|
||||
<?php if ( 'pro' === $data['price'] && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) : ?>
|
||||
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
||||
<?php else : ?>
|
||||
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach;
|
||||
|
||||
endforeach;
|
||||
|
||||
wp_die();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Templates\Library;
|
||||
use WprAddons\Classes\Utilities;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Data;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Templates_Library_Popups setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Library_Popups {
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Template Library Popup
|
||||
add_action( 'wp_ajax_render_library_templates_popups', [ $this, 'render_library_templates_popups' ] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
** Template Library Popup
|
||||
*/
|
||||
public function render_library_templates_popups() {
|
||||
$license = !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'free' : 'premium';
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-tplib-sidebar" data-license="<?php echo esc_attr($license); ?>">
|
||||
<div class="wpr-tplib-search">
|
||||
<input type="text" placeholder="Search Template">
|
||||
<i class="eicon-search"></i>
|
||||
</div>
|
||||
|
||||
<div class="wpr-tplib-filters-wrap">
|
||||
<div class="wpr-tplib-filters">
|
||||
<h3>
|
||||
<span><?php esc_html_e( 'Category', 'wpr-addons' ); ?></span>
|
||||
<i class="fas fa-angle-down"></i>
|
||||
</h3>
|
||||
|
||||
<div class="wpr-tplib-filters-list">
|
||||
<ul>
|
||||
<li data-filter="all"><?php esc_html_e( 'All', 'wpr-addons' ) ?></li>
|
||||
<li data-filter="cookie"><?php esc_html_e( 'Cookie', 'wpr-addons' ) ?></li>
|
||||
<li data-filter="discount"><?php esc_html_e( 'Discount', 'wpr-addons' ) ?></li>
|
||||
<li data-filter="subscribe"><?php esc_html_e( 'Subscribe', 'wpr-addons' ) ?></li>
|
||||
<li data-filter="yesno"><?php esc_html_e( 'Yes/No', 'wpr-addons' ) ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="wpr-tplib-template-gird elementor-clearfix">
|
||||
<div class="wpr-tplib-template-gird-inner">
|
||||
|
||||
<?php
|
||||
|
||||
$popups = WPR_Templates_Data::get_available_popups();
|
||||
|
||||
foreach ($popups as $type => $data) :
|
||||
|
||||
for ( $i=0; $i < count($popups[$type]); $i++ ) :
|
||||
|
||||
$template_slug = array_keys($popups[$type])[$i];
|
||||
$template_title = ucfirst($type) .' '. $template_slug;
|
||||
$preview_type = $popups[$type][$template_slug]['type'];
|
||||
$preview_url = $popups[$type][$template_slug]['url'];
|
||||
$template_class = ( strpos($template_slug, 'pro') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) ? ' wpr-tplib-pro-wrap' : '';
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>">
|
||||
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($template_slug); ?>" data-filter="<?php echo esc_attr($type); ?>" data-preview-type="<?php echo esc_attr($preview_type); ?>" data-preview-url="<?php echo esc_attr($preview_url); ?>">
|
||||
<div class="wpr-tplib-template-media">
|
||||
<img class="lazy" src="<?php echo esc_url(WPR_ADDONS_ASSETS_URL .'img/icon-256x256.png'); ?>" data-src="<?php echo esc_url('https://royal-elementor-addons.com/library/premade-styles/popups/'. $type .'/'. $template_slug .'.jpg'); ?>">
|
||||
<div class="wpr-tplib-template-media-overlay">
|
||||
<i class="eicon-eye"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpr-tplib-template-footer elementor-clearfix">
|
||||
<h3><?php echo esc_html(str_replace('-pro', ' Pro', $template_title)); ?></h3>
|
||||
|
||||
<?php if ( strpos($template_slug, 'pro') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) : ?>
|
||||
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
||||
<?php else : ?>
|
||||
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endfor; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php exit();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
namespace WprAddons\Admin\Templates\Library;
|
||||
use WprAddons\Classes\Utilities;
|
||||
use WprAddons\Admin\Templates\Library\WPR_Templates_Data;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* WPR_Templates_Library_Sections setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class WPR_Templates_Library_Sections {
|
||||
|
||||
/**
|
||||
** Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Template Library Popup
|
||||
add_action( 'wp_ajax_render_library_templates_sections', [ $this, 'render_library_templates_sections' ] );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
** Template Library Popup
|
||||
*/
|
||||
public static function render_library_templates_sections() {
|
||||
$license = !defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code() ? 'free' : 'premium';
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-tplib-sidebar" data-license="<?php echo esc_attr($license); ?>">
|
||||
<div class="wpr-tplib-filters-wrap">
|
||||
<div class="wpr-tplib-filters">
|
||||
<h3>
|
||||
<span data-filter="all"><?php esc_html_e( 'Category', 'wpr-addons' ); ?></span>
|
||||
<i class="fas fa-angle-down"></i>
|
||||
</h3>
|
||||
|
||||
<div class="wpr-tplib-filters-list">
|
||||
<ul>
|
||||
|
||||
<li data-filter="all"><?php esc_html_e( 'All', 'wpr-addons' ) ?></li>
|
||||
|
||||
<?php
|
||||
|
||||
$sections = WPR_Templates_Data::get_available_sections();
|
||||
|
||||
foreach ($sections as $title => $data) {
|
||||
$slug = self::create_slug($title);
|
||||
echo '<li data-filter="'. esc_attr($slug) .'">'. esc_html($title) .'</li>';
|
||||
}
|
||||
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpr-tplib-search">
|
||||
<input type="text" placeholder="Search Template">
|
||||
<i class="eicon-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpr-tplib-template-gird wpr-tplib-sections-grid elementor-clearfix">
|
||||
<div class="wpr-tplib-template-gird-inner">
|
||||
|
||||
<?php
|
||||
|
||||
foreach ($sections as $title => $data) :
|
||||
$slug = self::create_slug($title);
|
||||
|
||||
for ( $i=0; $i < count($data); $i++ ) :
|
||||
|
||||
$template_slug = $slug .'-'. $data[$i];
|
||||
$template_class = strpos($template_slug, 'pro') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ? ' wpr-tplib-pro-wrap' : '';
|
||||
$template_class .= strpos($template_slug, 'woo') && !class_exists( 'woocommerce' ) ? ' wpr-tplib-woo-wrap' : '';
|
||||
|
||||
if (defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code()) {
|
||||
$template_class .= ' wpr-tplib-pro-active';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>" data-title="<?php echo esc_attr(strtolower($title)); ?>">
|
||||
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($data[$i]); ?>" data-filter="<?php echo esc_attr($slug); ?>" data-preview-type="image">
|
||||
<div class="wpr-tplib-template-media">
|
||||
<img class="lazy" src="<?php echo esc_url(WPR_ADDONS_ASSETS_URL .'img/icon-256x256.png'); ?>" data-src="<?php echo esc_url('https://royal-elementor-addons.com/library/premade-sections/'. $slug .'/'. $data[$i] .'.jpg'); ?>">
|
||||
<div class="wpr-tplib-template-media-overlay">
|
||||
<i class="eicon-eye"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpr-tplib-template-footer elementor-clearfix">
|
||||
<?php $title_v = $title .' '. esc_html($data[$i]);?>
|
||||
<?php if ( !defined('WPR_ADDONS_PRO_VERSION') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) : ?>
|
||||
<h3><?php echo strpos($template_slug, 'pro') ? esc_html(str_replace('-pro', ' Pro', $title_v)) : esc_html(str_replace('-zzz', ' Pro', $title_v)); ?></h3>
|
||||
<?php else : ?>
|
||||
<h3><?php echo strpos($template_slug, 'pro') ? esc_html(str_replace('-pro', '', $title_v)) : esc_html(str_replace('-zzz', '', $title_v)); ?></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ( strpos($template_slug, 'pro') && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) || ( strpos($template_slug, 'zzz') ) && (!defined('WPR_ADDONS_PRO_VERSION') || !wpr_fs()->can_use_premium_code()) ) : ?>
|
||||
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
||||
<?php else : ?>
|
||||
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endfor; ?>
|
||||
<?php endforeach;?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
$current_screen = get_current_screen();
|
||||
|
||||
if ( !(isset($current_screen) && 'royal-addons_page_wpr-premade-sections' === $current_screen->id) ) {
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
public static function create_slug($str, $delimiter = '-'){
|
||||
// Try to convert the string with iconv
|
||||
$converted_str = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
|
||||
|
||||
// If iconv fails, fallback to the original string
|
||||
if ($converted_str === false) {
|
||||
$converted_str = $str; // Fallback to the original string
|
||||
}
|
||||
|
||||
// Continue with the rest of the slug generation
|
||||
$slug = strtolower(trim(preg_replace('/[\s-]+/', $delimiter, preg_replace('/[^A-Za-z0-9-]+/', $delimiter, preg_replace('/[&]/', 'and', preg_replace('/[\']/', '', $converted_str)))), $delimiter));
|
||||
|
||||
return $slug;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
||||
|
||||
/**
|
||||
* Wpr_Astra_Compat setup
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Astra theme compatibility.
|
||||
*/
|
||||
class Wpr_Astra_Compat {
|
||||
|
||||
/**
|
||||
* Instance of Wpr_Astra_Compat.
|
||||
*
|
||||
* @var Wpr_Astra_Compat
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* WPR_Render_Templates() Class
|
||||
*/
|
||||
private $render_templates;
|
||||
|
||||
/**
|
||||
* Initiator
|
||||
*/
|
||||
public static function instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
self::$instance = new Wpr_Astra_Compat();
|
||||
|
||||
add_action( 'wp', [ self::$instance, 'hooks' ] );
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run all the Actions / Filters.
|
||||
*/
|
||||
public function hooks() {
|
||||
$this->render_templates = new WPR_Render_Templates( true );
|
||||
|
||||
if ( $this->render_templates->is_template_available('header') ) {
|
||||
add_action( 'template_redirect', [ $this, 'astra_setup_header' ], 10 );
|
||||
// add_action( 'astra_header', [$this->render_templates, 'replace_header'] );
|
||||
add_action( 'get_header', [ $this->render_templates, 'replace_header' ] );
|
||||
add_action( 'elementor/page_templates/canvas/before_content', [ $this->render_templates, 'add_canvas_header' ] );
|
||||
}
|
||||
|
||||
if ( $this->render_templates->is_template_available('footer') ) {
|
||||
add_action( 'template_redirect', [ $this, 'astra_setup_footer' ], 10 );
|
||||
add_action( 'astra_footer', [$this->render_templates, 'replace_footer'] );
|
||||
// add_action( 'get_footer', [$this->render_templates, 'replace_footer'] );
|
||||
add_action( 'elementor/page_templates/canvas/after_content', [ $this->render_templates, 'add_canvas_footer' ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable header from the theme.
|
||||
*/
|
||||
public function astra_setup_header() {
|
||||
remove_action( 'astra_header', 'astra_header_markup' );
|
||||
|
||||
// Remove the new header builder action.
|
||||
if ( class_exists( '\Astra_Builder_Helper' ) && \Astra_Builder_Helper::$is_header_footer_builder_active ) {
|
||||
remove_action( 'astra_header', [ Astra_Builder_Header::get_instance(), 'prepare_header_builder_markup' ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable footer from the theme.
|
||||
*/
|
||||
public function astra_setup_footer() {
|
||||
remove_action( 'astra_footer', 'astra_footer_markup' );
|
||||
|
||||
// Remove the new footer builder action.
|
||||
if ( class_exists( '\Astra_Builder_Helper' ) && \Astra_Builder_Helper::$is_header_footer_builder_active ) {
|
||||
remove_action( 'astra_footer', [ Astra_Builder_Footer::get_instance(), 'footer_markup' ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Wpr_Astra_Compat::instance();
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
||||
|
||||
/**
|
||||
* Wpr_GeneratePress_Compat setup
|
||||
*
|
||||
* @since 1.0
|
||||
*/
|
||||
class Wpr_GeneratePress_Compat {
|
||||
|
||||
/**
|
||||
* Instance of Wpr_GeneratePress_Compat
|
||||
*
|
||||
* @var Wpr_GeneratePress_Compat
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* WPR_Render_Templates() Class
|
||||
*/
|
||||
private $render_templates;
|
||||
|
||||
/**
|
||||
* Initiator
|
||||
*/
|
||||
public static function instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
self::$instance = new Wpr_GeneratePress_Compat();
|
||||
|
||||
add_action( 'wp', [ self::$instance, 'hooks' ] );
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run all the Actions / Filters.
|
||||
*/
|
||||
public function hooks() {
|
||||
$this->render_templates = new WPR_Render_Templates( true );
|
||||
|
||||
if ( $this->render_templates->is_template_available('header') ) {
|
||||
add_action( 'template_redirect', [ $this, 'generatepress_setup_header' ] );
|
||||
add_action( 'generate_header', [$this->render_templates, 'replace_header'] );
|
||||
add_action( 'elementor/page_templates/canvas/before_content', [ $this->render_templates, 'add_canvas_header' ] );
|
||||
}
|
||||
|
||||
if ( $this->render_templates->is_template_available('footer') ) {
|
||||
add_action( 'template_redirect', [ $this, 'generatepress_setup_footer' ] );
|
||||
add_action( 'generate_footer', [$this->render_templates, 'replace_footer'] );
|
||||
add_action( 'elementor/page_templates/canvas/after_content', [ $this->render_templates, 'add_canvas_footer' ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable header from the theme.
|
||||
*/
|
||||
public function generatepress_setup_header() {
|
||||
remove_action( 'generate_header', 'generate_construct_header' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable footer from the theme.
|
||||
*/
|
||||
public function generatepress_setup_footer() {
|
||||
remove_action( 'generate_footer', 'generate_construct_footer_widgets', 5 );
|
||||
remove_action( 'generate_footer', 'generate_construct_footer' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Wpr_GeneratePress_Compat::instance();
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
||||
|
||||
/**
|
||||
* OceanWP theme compatibility.
|
||||
*/
|
||||
class Wpr_OceanWP_Compat {
|
||||
|
||||
/**
|
||||
* Instance of Wpr_OceanWP_Compat.
|
||||
*
|
||||
* @var Wpr_OceanWP_Compat
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* WPR_Render_Templates() Class
|
||||
*/
|
||||
private $render_templates;
|
||||
|
||||
/**
|
||||
* Initiator
|
||||
*/
|
||||
public static function instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
self::$instance = new Wpr_OceanWP_Compat();
|
||||
|
||||
add_action( 'wp', [ self::$instance, 'hooks' ] );
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run all the Actions / Filters.
|
||||
*/
|
||||
public function hooks() {
|
||||
$this->render_templates = new WPR_Render_Templates( true );
|
||||
|
||||
if ( $this->render_templates->is_template_available('header') ) {
|
||||
add_action( 'template_redirect', [ $this, 'setup_header' ], 10 );
|
||||
add_action( 'ocean_header', [$this->render_templates, 'replace_header'] );
|
||||
add_action( 'elementor/page_templates/canvas/before_content', [ $this->render_templates, 'add_canvas_header' ] );
|
||||
}
|
||||
|
||||
if ( $this->render_templates->is_template_available('footer') ) {
|
||||
add_action( 'template_redirect', [ $this, 'setup_footer' ], 10 );
|
||||
add_action( 'ocean_footer', [$this->render_templates, 'replace_footer'] );
|
||||
add_action( 'elementor/page_templates/canvas/after_content', [ $this->render_templates, 'add_canvas_footer' ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable header from the theme.
|
||||
*/
|
||||
public function setup_header() {
|
||||
remove_action( 'ocean_top_bar', 'oceanwp_top_bar_template' );
|
||||
remove_action( 'ocean_header', 'oceanwp_header_template' );
|
||||
remove_action( 'ocean_page_header', 'oceanwp_page_header_template' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable footer from the theme.
|
||||
*/
|
||||
public function setup_footer() {
|
||||
remove_action( 'ocean_footer', 'oceanwp_footer_template' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Wpr_OceanWP_Compat::instance();
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
use WprAddons\Admin\Includes\WPR_Conditions_Manager;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$conditions = json_decode( get_option('wpr_footer_conditions', '[]'), true );
|
||||
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
||||
|
||||
// Render WPR Header
|
||||
Utilities::render_elementor_template($template_slug);
|
||||
|
||||
wp_footer();
|
||||
|
||||
// Royal themes compatibility
|
||||
echo '</div>'; // .page-content
|
||||
echo '</div>'; // #page-wrap
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
use WprAddons\Admin\Includes\WPR_Conditions_Manager;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$conditions = json_decode( get_option('wpr_header_conditions', '[]'), true );
|
||||
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||
<?php if ( ! current_theme_supports( 'title-tag' ) ) : ?>
|
||||
<title>
|
||||
<?php echo esc_html(wp_get_document_title()); ?>
|
||||
</title>
|
||||
<?php endif; ?>
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<?php
|
||||
|
||||
do_action( 'wp_body_open' );
|
||||
|
||||
// Royal themes compatibility
|
||||
echo '<div id="page-wrap">';
|
||||
|
||||
// Render WPR Header
|
||||
Utilities::render_elementor_template($template_slug);
|
||||
|
||||
// Royal themes compatibility
|
||||
echo '<div class="page-content">';
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
||||
|
||||
/**
|
||||
* Storefront theme compatibility.
|
||||
*/
|
||||
class Wpr_Storefront_Compat {
|
||||
|
||||
/**
|
||||
* Instance of Wpr_Storefront_Compat.
|
||||
*
|
||||
* @var Wpr_Storefront_Compat
|
||||
*/
|
||||
private static $instance;
|
||||
|
||||
/**
|
||||
* WPR_Render_Templates() Class
|
||||
*/
|
||||
private $render_templates;
|
||||
|
||||
/**
|
||||
* Initiator
|
||||
*/
|
||||
public static function instance() {
|
||||
if ( ! isset( self::$instance ) ) {
|
||||
self::$instance = new Wpr_Storefront_Compat();
|
||||
|
||||
add_action( 'wp', [ self::$instance, 'hooks' ] );
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run all the Actions / Filters.
|
||||
*/
|
||||
public function hooks() {
|
||||
$this->render_templates = new WPR_Render_Templates( true );
|
||||
|
||||
if ( $this->render_templates->is_template_available('header') ) {
|
||||
add_action( 'template_redirect', [ $this, 'setup_header' ], 10 );
|
||||
add_action( 'storefront_before_header', [$this->render_templates, 'replace_header'], 500 );
|
||||
add_action( 'elementor/page_templates/canvas/before_content', [ $this->render_templates, 'add_canvas_header' ] );
|
||||
}
|
||||
|
||||
if ( $this->render_templates->is_template_available('footer') ) {
|
||||
add_action( 'template_redirect', [ $this, 'setup_footer' ], 10 );
|
||||
add_action( 'storefront_after_footer', [$this->render_templates, 'replace_footer'], 500 );
|
||||
add_action( 'elementor/page_templates/canvas/after_content', [ $this->render_templates, 'add_canvas_footer' ] );
|
||||
}
|
||||
|
||||
if ( $this->render_templates->is_template_available('header') || $this->render_templates->is_template_available('footer') ) {
|
||||
add_action( 'wp_head', [ $this, 'styles' ] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add inline CSS to hide empty divs for header and footer in storefront
|
||||
*
|
||||
* @since 1.2.0
|
||||
* @return void
|
||||
*/
|
||||
public function styles() {
|
||||
$css = '<style id="wpr-disable-storefront-hf">';
|
||||
|
||||
if ( $this->render_templates->is_template_available('header') ) {
|
||||
$css .= '.site-header {
|
||||
display: none;
|
||||
}';
|
||||
}
|
||||
|
||||
if ( $this->render_templates->is_template_available('footer') ) {
|
||||
$css .= '.site-footer {
|
||||
display: none;
|
||||
}';
|
||||
}
|
||||
|
||||
$css .= '</style>';
|
||||
|
||||
// Echo plain CSS (no user input or variables)
|
||||
echo ''. $css; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable header from the theme.
|
||||
*/
|
||||
public function setup_header() {
|
||||
for ( $priority = 0; $priority < 200; $priority ++ ) {
|
||||
remove_all_actions( 'storefront_header', $priority );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable footer from the theme.
|
||||
*/
|
||||
public function setup_footer() {
|
||||
for ( $priority = 0; $priority < 200; $priority ++ ) {
|
||||
remove_all_actions( 'storefront_footer', $priority );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Wpr_Storefront_Compat::instance();
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
use WprAddons\Admin\Includes\WPR_Conditions_Manager;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$conditions = json_decode( get_option('wpr_footer_conditions', '[]'), true );
|
||||
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
||||
|
||||
// Render WPR Header
|
||||
Utilities::render_elementor_template($template_slug);
|
||||
|
||||
wp_footer();
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
use WprAddons\Admin\Includes\WPR_Conditions_Manager;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$conditions = json_decode( get_option('wpr_header_conditions', '[]'), true );
|
||||
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
||||
|
||||
?><!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<?php if ( 'Astra' != wp_get_theme()->get('Name') ) { ?>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||
<?php if ( ! current_theme_supports( 'title-tag' ) ) : ?>
|
||||
<title>
|
||||
<?php echo esc_html(wp_get_document_title()); ?>
|
||||
</title>
|
||||
<?php endif; ?>
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<?php } ?>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<?php
|
||||
|
||||
do_action( 'wp_body_open' );
|
||||
|
||||
// Render WPR Header
|
||||
Utilities::render_elementor_template($template_slug);
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
use Elementor\Utils;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
\Elementor\Plugin::$instance->frontend->add_body_class( 'elementor-template-canvas' );
|
||||
|
||||
$is_preview_mode = \Elementor\Plugin::$instance->preview->is_preview_mode();
|
||||
// $woocommerce_class = $is_preview_mode && class_exists( 'WooCommerce' ) ? 'woocommerce woocommerce-page woocommerce-shop canvas-test' : '';
|
||||
$woocommerce_class = $is_preview_mode && class_exists( 'WooCommerce' ) ? 'woocommerce woocommerce-page' : '';
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<?php if ( ! current_theme_supports( 'title-tag' ) ) : ?>
|
||||
<title><?php echo wp_get_document_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></title>
|
||||
<?php endif; ?>
|
||||
<?php wp_head(); ?>
|
||||
<?php
|
||||
|
||||
// Keep the following line after `wp_head()` call, to ensure it's not overridden by another templates.
|
||||
Utils::print_unescaped_internal_string( Utils::get_meta_viewport( 'canvas' ) );
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class($woocommerce_class); ?>>
|
||||
<?php
|
||||
wp_body_open();
|
||||
|
||||
/**
|
||||
* Before canvas page template content.
|
||||
*
|
||||
* Fires before the content of Elementor canvas page template.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
do_action( 'elementor/page_templates/canvas/before_content' );
|
||||
|
||||
// Elementor Editor
|
||||
if (( \Elementor\Plugin::$instance->preview->is_preview_mode() && Utilities::is_theme_builder_template()) || is_singular('wpr_mega_menu') ) {
|
||||
\Elementor\Plugin::$instance->modules_manager->get_modules( 'page-templates' )->print_content();
|
||||
|
||||
// Frontend
|
||||
} else {
|
||||
// Display Custom Elementor Templates
|
||||
do_action( 'elementor/page_templates/canvas/wpr_print_content' );
|
||||
}
|
||||
|
||||
/**
|
||||
* After canvas page template content.
|
||||
*
|
||||
* Fires after the content of Elementor canvas page template.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
do_action( 'elementor/page_templates/canvas/after_content' );
|
||||
|
||||
wp_footer();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,191 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use WprAddons\Admin\Includes\WPR_Templates_Loop;
|
||||
use WprAddons\Classes\Utilities;
|
||||
|
||||
// Register Menus
|
||||
function wpr_addons_add_theme_builder_menu() {
|
||||
add_submenu_page( 'wpr-addons', 'Theme Builder', 'Theme Builder', 'manage_options', 'wpr-theme-builder', 'wpr_addons_theme_builder_page' );
|
||||
}
|
||||
add_action( 'admin_menu', 'wpr_addons_add_theme_builder_menu' );
|
||||
|
||||
function wpr_addons_theme_builder_page() {
|
||||
|
||||
?>
|
||||
|
||||
<div class="wrap wpr-settings-page-wrap">
|
||||
|
||||
<div class="wpr-settings-page-header">
|
||||
<h1><?php echo esc_html(Utilities::get_plugin_name(true)); ?></h1>
|
||||
|
||||
<p><?php esc_html_e( 'The most powerful Elementor Addon in the universe.', 'wpr-addons' ); ?></p>
|
||||
<!-- <a href="https://royaladdons.frill.co/b/6m4d5qm4/feature-ideas" class="" target="_blank" style="padding: 8px 22px;">
|
||||
<?php echo esc_html__( 'Request New Feature', 'wpr-addons' ); ?>
|
||||
</a> -->
|
||||
|
||||
<!-- Custom Template -->
|
||||
<div class="wpr-preview-buttons">
|
||||
<div class="wpr-user-template">
|
||||
<span><?php esc_html_e( 'Create Template', 'wpr-addons' ); ?></span>
|
||||
<span class="plus-icon">+</span>
|
||||
|
||||
<?php
|
||||
if ( ! class_exists( 'WooCommerce' ) && isset($_GET['tab']) && ('wpr_tab_product_archive' === $_GET['tab'] || 'wpr_tab_product_single' === $_GET['tab'] )) {
|
||||
echo '<div></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<a href="https://www.youtube.com/watch?v=kE1zmi3fxh8" class="wpr-dynamic-tutorial wpr-options-button button" target="_blank" style="padding: 8px 22px;">
|
||||
<?php echo esc_html__( 'Dynamic Websites Tutorial', 'wpr-addons' ); ?>
|
||||
<span class="dashicons dashicons-video-alt3"></span>
|
||||
</a>
|
||||
|
||||
<a href="https://www.youtube.com/watch?v=f_3tNiBC3dw" class="wpr-how-to-use-woo-builder wpr-options-button button" target="_blank" style="padding: 8px 22px; margin-left: 10px;">
|
||||
<?php echo esc_html__( 'WooCommerce Builder Tutorial', 'wpr-addons' ); ?>
|
||||
<span class="dashicons dashicons-video-alt3"></span>
|
||||
</a>
|
||||
|
||||
<a href="https://www.youtube.com/watch?v=cwkhwO_rPuo" class="wpr-how-to-use-theme-builder wpr-options-button button" target="_blank" style="padding: 8px 22px; margin-left: 10px;">
|
||||
<?php echo esc_html__( 'Theme Builder Tutorial', 'wpr-addons' ); ?>
|
||||
<span class="dashicons dashicons-video-alt3"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wpr-settings-page">
|
||||
<form method="post" action="options.php">
|
||||
<?php
|
||||
|
||||
// Active Tab
|
||||
$active_tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'wpr_tab_header';
|
||||
|
||||
?>
|
||||
|
||||
<!-- Template ID Holder -->
|
||||
<input type="hidden" name="wpr_template" id="wpr_template" value="">
|
||||
|
||||
<!-- Conditions Popup -->
|
||||
<?php WPR_Templates_Loop::render_conditions_popup(true); ?>
|
||||
|
||||
<!-- Create Templte Popup -->
|
||||
<?php WPR_Templates_Loop::render_create_template_popup(); ?>
|
||||
|
||||
<!-- Tabs -->
|
||||
<div class="nav-tab-wrapper wpr-nav-tab-wrapper">
|
||||
<a href="?page=wpr-theme-builder&tab=wpr_tab_header" data-title="Header" class="nav-tab <?php echo ($active_tab == 'wpr_tab_header') ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e( 'Header', 'wpr-addons' ); ?>
|
||||
</a>
|
||||
<a href="?page=wpr-theme-builder&tab=wpr_tab_footer" data-title="Footer" class="nav-tab <?php echo ($active_tab == 'wpr_tab_footer') ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e( 'Footer', 'wpr-addons' ); ?>
|
||||
</a>
|
||||
<a href="?page=wpr-theme-builder&tab=wpr_tab_archive" data-title="Archive" class="nav-tab <?php echo ($active_tab == 'wpr_tab_archive') ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e( 'Archive', 'wpr-addons' ); ?>
|
||||
</a>
|
||||
<a href="?page=wpr-theme-builder&tab=wpr_tab_single" data-title="Single" class="nav-tab <?php echo ($active_tab == 'wpr_tab_single') ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e( 'Single', 'wpr-addons' ); ?>
|
||||
</a>
|
||||
|
||||
<a href="?page=wpr-theme-builder&tab=wpr_tab_product_archive" data-title="Product Archive" class="nav-tab <?php echo $active_tab == 'wpr_tab_product_archive' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e( 'Product Archive', 'wpr-addons' ); ?>
|
||||
</a>
|
||||
<a href="?page=wpr-theme-builder&tab=wpr_tab_product_single" data-title="Product Single" class="nav-tab <?php echo $active_tab == 'wpr_tab_product_single' ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e( 'Product Single', 'wpr-addons' ); ?>
|
||||
</a>
|
||||
|
||||
<a href="?page=wpr-theme-builder&tab=wpr_tab_my_templates" data-title="My Templates" class="nav-tab <?php echo ($active_tab == 'wpr_tab_my_templates') ? 'nav-tab-active' : ''; ?>">
|
||||
<?php esc_html_e( 'Saved Templates', 'wpr-addons' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) {
|
||||
$url = '';
|
||||
if ( 'wpr_tab_my_templates' === $active_tab ) {
|
||||
$url = admin_url( 'edit.php?post_type=elementor_library&tabs_group=library' );
|
||||
} else {
|
||||
$url = admin_url( 'edit.php?s&post_status=all&post_type=wpr_templates&wpr_template_type='. str_replace("wpr_tab_", "", $active_tab) .'&filter_action=Filter' );
|
||||
}
|
||||
echo '<a href="' . esc_url( $url ) . '" class="button button-primary wpr-translate-templates wpr-options-button"><span class="dashicons dashicons-admin-site"></span><span>Translate WPML Templates</span></a>';
|
||||
echo '<a href="https://www.youtube.com/watch?v=y7yjItsMBmw" class="button button-primary wpr-translate-templates wpr-options-button tutorial">'. esc_html__("Video Tutorial") .'</a>';
|
||||
} else if ( is_plugin_active('polylang/polylang.php') ) {
|
||||
$url = '';
|
||||
if ( 'wpr_tab_my_templates' === $active_tab ) {
|
||||
$url = admin_url( 'edit.php?post_type=elementor_library&tabs_group=library' );
|
||||
} else {
|
||||
$url = admin_url( 'edit.php?s&post_status=all&post_type=wpr_templates&wpr_template_type='. str_replace("wpr_tab_", "", $active_tab) .'&filter_action=Filter' );
|
||||
}
|
||||
echo '<a href="' . esc_url( $url ) . '" class="button button-primary wpr-translate-templates wpr-options-button"><span class="dashicons dashicons-admin-site"></span><span>Translate POLYLANG Templates</span></a>';
|
||||
echo '<a href="https://www.youtube.com/watch?v=y7yjItsMBmw" class="button button-primary wpr-translate-templates wpr-options-button tutorial">'. esc_html__("Video Tutorial") .'</a>';
|
||||
}
|
||||
?>
|
||||
<?php if ( $active_tab == 'wpr_tab_header' ) : ?>
|
||||
|
||||
<!-- Save Conditions -->
|
||||
<input type="hidden" name="wpr_header_conditions" id="wpr_header_conditions" value="<?php echo esc_attr(get_option('wpr_header_conditions', '[]')); ?>">
|
||||
|
||||
<?php WPR_Templates_Loop::render_theme_builder_templates( 'header' ); ?>
|
||||
|
||||
<?php elseif ( $active_tab == 'wpr_tab_footer' ) : ?>
|
||||
|
||||
<!-- Save Conditions -->
|
||||
<input type="hidden" name="wpr_footer_conditions" id="wpr_footer_conditions" value="<?php echo esc_attr(get_option('wpr_footer_conditions', '[]')); ?>">
|
||||
|
||||
<?php WPR_Templates_Loop::render_theme_builder_templates( 'footer' ); ?>
|
||||
|
||||
<?php elseif ( $active_tab == 'wpr_tab_archive' ) : ?>
|
||||
|
||||
<!-- Save Conditions -->
|
||||
<input type="hidden" name="wpr_archive_conditions" id="wpr_archive_conditions" value="<?php echo esc_attr(get_option('wpr_archive_conditions', '[]')); ?>">
|
||||
|
||||
<?php WPR_Templates_Loop::render_theme_builder_templates( 'archive' ); ?>
|
||||
|
||||
<?php elseif ( $active_tab == 'wpr_tab_single' ) : ?>
|
||||
|
||||
<!-- Save Conditions -->
|
||||
<input type="hidden" name="wpr_single_conditions" id="wpr_single_conditions" value="<?php echo esc_attr(get_option('wpr_single_conditions', '[]')); ?>">
|
||||
|
||||
<?php WPR_Templates_Loop::render_theme_builder_templates( 'single' ); ?>
|
||||
|
||||
<?php elseif ( $active_tab == 'wpr_tab_product_archive' ) : ?>
|
||||
|
||||
<?php if ( class_exists( 'WooCommerce' ) ) : ?>
|
||||
<!-- Save Conditions -->
|
||||
<input type="hidden" name="wpr_product_archive_conditions" id="wpr_product_archive_conditions" value="<?php echo esc_attr(get_option('wpr_product_archive_conditions', '[]')); ?>">
|
||||
|
||||
<?php WPR_Templates_Loop::render_theme_builder_templates( 'product_archive' ); ?>
|
||||
<?php else : ?>
|
||||
<div class="wpr-activate-woo-notice"><span class="dashicons dashicons-info-outline"></span> Please install/activate WooCommerce in order to create product archive templates!</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php elseif ( $active_tab == 'wpr_tab_product_single' ) : ?>
|
||||
|
||||
<?php if ( class_exists( 'WooCommerce' ) ) : ?>
|
||||
<!-- Save Conditions -->
|
||||
<input type="hidden" name="wpr_product_single_conditions" id="wpr_product_single_conditions" value="<?php echo esc_attr(get_option('wpr_product_single_conditions', '[]')); ?>">
|
||||
|
||||
<?php WPR_Templates_Loop::render_theme_builder_templates( 'product_single' ); ?>
|
||||
<?php else : ?>
|
||||
<div class="wpr-activate-woo-notice"><span class="dashicons dashicons-info-outline"></span> Please install/activate WooCommerce in order to create product single templates!</div>
|
||||
<?php endif ; ?>
|
||||
|
||||
<?php elseif ( $active_tab == 'wpr_tab_my_templates' ) : ?>
|
||||
|
||||
<?php Wpr_Templates_Loop::render_elementor_saved_templates(); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
} // End wpr_addons_theme_builder_page()
|
||||
@@ -0,0 +1,944 @@
|
||||
/*--------------------------------------------------------------
|
||||
== General
|
||||
--------------------------------------------------------------*/
|
||||
.wpr-elementor-hidden-control {
|
||||
overflow: hidden;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
visibility: hidden !important;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== WPR Widgets
|
||||
--------------------------------------------------------------*/
|
||||
.elementor-panel .wpr-icon:after {
|
||||
content: 'R';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
font-family: Roboto,Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
background-image: -o-linear-gradient(#6A4BFF, #7E94FE);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#6A4BFF), to(#7E94FE));
|
||||
background-image: linear-gradient(#6A4BFF, #7E94FE);
|
||||
-webkit-box-shadow: 0 0 2px 2px #b8c7ff;
|
||||
box-shadow: 0 0 2px 2px #b8c7ff;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
line-height: 19px;
|
||||
border-radius: 15px;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
.elementor-panel .elementor-element .icon {
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
.elementor-element--promotion .wpr-icon:after {
|
||||
top: 22px;
|
||||
right: -1px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
#elementor-element--promotion__dialog .dialog-button {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.elementor-control-type-section[class*="elementor-control-wpr_section_"]:after {
|
||||
content: 'R';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
right: 7px;
|
||||
font-family: Roboto,Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
background-image: -o-linear-gradient(#6A4BFF, #7E94FE);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#6A4BFF), to(#7E94FE));
|
||||
background-image: linear-gradient(#6A4BFF, #7E94FE);
|
||||
-webkit-box-shadow: 0 0 2px 2px #b8c7ff;
|
||||
box-shadow: 0 0 2px 2px #b8c7ff;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
line-height: 19px;
|
||||
border-radius: 15px;
|
||||
margin: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Adjustments
|
||||
--------------------------------------------------------------*/
|
||||
.elementor-control-element_select,
|
||||
.elementor-control-element_align_hr,
|
||||
.elementor-control-element_read_more_text,
|
||||
.elementor-control-element_tax_sep,
|
||||
.elementor-control-element_sharing_icon_6,
|
||||
.elementor-control-element_sharing_trigger_direction,
|
||||
.elementor-control-element_sharing_icon_display,
|
||||
.elementor-control-element_sharing_tooltip,
|
||||
.elementor-control-element_custom_field_wrapper_html,
|
||||
.elementor-control-slider_item_bg_size,
|
||||
.elementor-control-element_addcart_variable_txt,
|
||||
.elementor-control-type,
|
||||
.elementor-control-show_last_update_date {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.elementor-control-slider_content_bg_color,
|
||||
.elementor-control-slider_nav_border_border,
|
||||
.elementor-control-slider_nav_border_radius,
|
||||
.elementor-control-scroll_btn_vr,
|
||||
.elementor-control-pagination_load_more_text,
|
||||
.elementor-control-pagination_finish_text,
|
||||
.elementor-control-pagination_prev_next,
|
||||
.elementor-control-author_transition_duration,
|
||||
.elementor-control-comments_transition_duration,
|
||||
.elementor-control-likes_transition_duration,
|
||||
.elementor-control-sharing_transition_duration,
|
||||
.elementor-control-lightbox_transition_duration,
|
||||
.elementor-control-custom_field1_transition_duration,
|
||||
.elementor-control-custom_field2_transition_duration,
|
||||
.elementor-control-custom_field3_transition_duration,
|
||||
.elementor-control-custom_field4_transition_duration,
|
||||
.elementor-control-filters_transition_duration,
|
||||
.elementor-control-pagination_transition_duration,
|
||||
.elementor-control-element_extra_text_pos,
|
||||
.elementor-control-element_custom_field_wrapper,
|
||||
.elementor-control-overlay_post_link,
|
||||
.elementor-control-read_more_animation_height,
|
||||
.elementor-control-archive_link_transition_duration,
|
||||
.elementor-control-post_info_tax_select,
|
||||
.elementor-control-post_info_link_wrap,
|
||||
.elementor-control-post_info_modified_time,
|
||||
.elementor-control-tabs_sharing_custom_colors,
|
||||
.elementor-control-post_info_show_avatar,
|
||||
.elementor-control-post_info_cf,
|
||||
.elementor-control-pricing_items .elementor-control-price,
|
||||
.elementor-control-pricing_items .elementor-control-feature_text,
|
||||
.elementor-control-pricing_items .elementor-control-btn_text,
|
||||
.elementor-control-divider_style,
|
||||
.elementor-control-filters_pointer,
|
||||
.elementor-control-title_transition_duration,
|
||||
.elementor-control-tax1_transition_duration,
|
||||
.elementor-control-tax2_transition_duration,
|
||||
.elementor-control-filters_transition_duration,
|
||||
.elementor-control-pagination_older_text,
|
||||
.elementor-control-tooltip_position,
|
||||
.elementor-control-post_info_comments_text_1 {
|
||||
padding-top: 15px !important;
|
||||
}
|
||||
|
||||
.elementor-control-post_info_custom_field_video_tutorial {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.elementor-control-title_pointer_animation + .elementor-control-title_transition_duration,
|
||||
.elementor-control-tax1_pointer_animation + .elementor-control-tax1_transition_duration,
|
||||
.elementor-control-tax2_pointer_animation + .elementor-control-tax2_transition_duration,
|
||||
.elementor-control-filters_pointer_animation + .elementor-control-filters_transition_duration {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.elementor-control-pagination_load_more_text {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.elementor-control-filters_transition_duration,
|
||||
.elementor-control-show_last_update_date {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.elementor-control-animation_divider,
|
||||
.elementor-control-overlay_divider,
|
||||
.elementor-control-slider_item_btn_1_divider,
|
||||
.elementor-control-slider_item_btn_2_divider,
|
||||
.elementor-control-slider_btn_typography_1_divider,
|
||||
.elementor-control-slider_btn_box_shadow_1_divider,
|
||||
.elementor-control-slider_btn_typography_2_divider,
|
||||
.elementor-control-slider_btn_box_shadow_2_divider,
|
||||
.elementor-control-testimonial_title_divider,
|
||||
.elementor-control-social_media_divider,
|
||||
.elementor-control-social_divider_1,
|
||||
.elementor-control-social_divider_2,
|
||||
.elementor-control-social_divider_3,
|
||||
.elementor-control-social_divider_4,
|
||||
.elementor-control-social_divider_5,
|
||||
.elementor-control-custom_field_wrapper_html_divider1,
|
||||
.elementor-control-custom_field_wrapper_html_divider2,
|
||||
.elementor-control-lightbox_shadow_divider {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.elementor-control-custom_field_wrapper_html_divider1 hr,
|
||||
.elementor-control-lightbox_shadow_divider hr {
|
||||
height: 1px !important;
|
||||
}
|
||||
|
||||
.elementor-control-element_show_on {
|
||||
padding-top: 15px !important;
|
||||
border-top: 1px solid #d5dadf;
|
||||
}
|
||||
|
||||
[class*="wpr__section_"] ~ .elementor-control-type-number .elementor-control-input-wrapper,
|
||||
[class*="wpr__section_"] ~ .elementor-control-type-repeater .elementor-control-type-number .elementor-control-input-wrapper {
|
||||
max-width: 30% !important;
|
||||
margin-left: auto !important;
|
||||
}
|
||||
|
||||
[class*="wpr__section_"] ~ .elementor-control-type-select .elementor-control-input-wrapper,
|
||||
[class*="wpr__section_"] ~ .elementor-control-type-repeater .elementor-control-type-select .elementor-control-input-wrapper {
|
||||
width: auto !important;
|
||||
min-width: 30% !important;
|
||||
margin-left: auto !important;
|
||||
}
|
||||
|
||||
.elementor-control-submit_preview_changes .elementor-control-input-wrapper {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.elementor-control-query_manual_related,
|
||||
.elementor-control-query_manual_current {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Fix Select Inputs */
|
||||
.elementor-control-button_hover_animation .elementor-control-input-wrapper,
|
||||
.elementor-control-front_btn_animation .elementor-control-input-wrapper,
|
||||
.elementor-control-back_btn_animation .elementor-control-input-wrapper,
|
||||
|
||||
.elementor-control-select_template .select2-selection,
|
||||
.elementor-control-switcher_first_select_template .select2-selection,
|
||||
.elementor-control-switcher_second_select_template .select2-selection,
|
||||
.elementor-control-switcher_select_template .select2-selection,
|
||||
.elementor-control-slider_select_template .select2-selection {
|
||||
width: 135px !important;
|
||||
}
|
||||
|
||||
.elementor-control-type-repeater .elementor-control-content > label {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Notification
|
||||
--------------------------------------------------------------*/
|
||||
#wpr-template-settings-notification {
|
||||
position: fixed;
|
||||
left: 40px;
|
||||
bottom: 5px;
|
||||
z-index: 9999;
|
||||
padding: 13px 25px;
|
||||
background: #fff;
|
||||
color: #222;
|
||||
-webkit-box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.3);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#wpr-template-settings-notification:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -6px;
|
||||
bottom: 10px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 6px solid transparent;
|
||||
border-bottom: 6px solid transparent;
|
||||
border-right-style: solid;
|
||||
border-right-width: 6px;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
|
||||
#wpr-template-settings-notification h4 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#wpr-template-settings-notification h4 span {
|
||||
font-size: 14px;
|
||||
vertical-align: super;
|
||||
color: #5f5f5f;
|
||||
}
|
||||
|
||||
#wpr-template-settings-notification h4 i {
|
||||
margin-right: 10px;
|
||||
color: #3db050;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
#wpr-template-settings-notification p {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
#wpr-template-settings-notification > i {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
right: 7px;
|
||||
cursor: pointer;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.elementor-control-cf7_notice,
|
||||
.elementor-control-wpforms_notice,
|
||||
.elementor-control-ninja_forms_notice,
|
||||
.elementor-control-caldera_notice {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* Help Button - select with referrals - [href^="https://royal-elementor-addons.com/contact/"] */
|
||||
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"] {
|
||||
display: inline-block;
|
||||
padding: 12px 35px;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
background: #6A65FF;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 2px 7px 0 rgba(0,0,0,0.3);
|
||||
box-shadow: 0 2px 7px 0 rgba(0,0,0,0.3);
|
||||
letter-spacing: 0.3px;
|
||||
-webkit-transition: all 0.2s ease-in;
|
||||
-o-transition: all 0.2s ease-in;
|
||||
transition: all 0.2s ease-in;
|
||||
}
|
||||
|
||||
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"]:hover {
|
||||
color: #fff;
|
||||
background: #6A4BFF;
|
||||
}
|
||||
|
||||
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"] i {
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"]:hover i {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"]:hover i:before {
|
||||
content: '\e942' !important;
|
||||
}
|
||||
|
||||
.elementor-control-posts_slider_notice .elementor-control-raw-html {
|
||||
font-style: normal !important;
|
||||
}
|
||||
|
||||
.elementor-control-product_notice_widget_info .elementor-control-raw-html {
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Modal Popup Editor
|
||||
--------------------------------------------------------------*/
|
||||
.elementor-editor-wpr-popups .elementor-control-document_settings,
|
||||
.elementor-editor-wpr-popups .elementor-control-post_title,
|
||||
.elementor-editor-wpr-popups .elementor-control-post_status {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Elementor Editor Popup
|
||||
--------------------------------------------------------------*/
|
||||
#wpr-template-editor-popup .dialog-widget-content {
|
||||
width: 90vw;
|
||||
height: 90vh;
|
||||
}
|
||||
|
||||
#wpr-template-editor-popup .dialog-message {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#wpr-template-editor-popup .dialog-close-button {
|
||||
font-size: 24px;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
#wpr-template-editor-popup .dialog-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#wpr-template-editor-loading {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f1f3f5;
|
||||
z-index: 9999;
|
||||
-webkit-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#wpr-template-editor-loading .elementor-loader-wrapper {
|
||||
top: auto;
|
||||
left: auto;
|
||||
-webkit-transform: none;
|
||||
-ms-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
/* Disable Transitions on Responsive Preview */
|
||||
#elementor-preview-responsive-wrapper {
|
||||
-webkit-transition: none !important;
|
||||
-o-transition: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Magazine Grid Layout
|
||||
--------------------------------------------------------------*/
|
||||
.elementor-control-layout_select.elementor-control .elementor-control-field {
|
||||
-webkit-box-orient: vertical !important;
|
||||
-webkit-box-direction: normal !important;
|
||||
-ms-flex-direction: column !important;
|
||||
flex-direction: column !important;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.elementor-control-layout_select.elementor-control .elementor-control-input-wrapper {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
width: 100% !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.elementor-control-layout_select.elementor-control .elementor-choices {
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
-webkit-box-align: stretch;
|
||||
-ms-flex-align: stretch;
|
||||
align-items: stretch;
|
||||
width: 100% !important;
|
||||
height: auto;
|
||||
border: 1px solid #dfd5d5;
|
||||
}
|
||||
|
||||
.elementor-control-layout_select.elementor-control .elementor-choices label {
|
||||
width: 33.3%;
|
||||
height: 50px;
|
||||
background-size: 75%;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.elementor-control-layout_select input[type="radio"]:checked + label {
|
||||
border: 2px solid #D30C5C;
|
||||
border-radius: 0 !important;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(2) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='15.2' class='st1' width='22.2' height='11.9'/%3E%3Crect x='25.6' y='4.9' class='st1' width='22.2' height='9.2'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(4) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='25.6' y='4.9' class='st1' width='22.2' height='10.5'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(6) {
|
||||
background: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Cg%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='25.6' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(8) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3Crect x='37.2' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(10) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='13.9' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='37.2' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3Crect x='2.3' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='2.3' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(12) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='28.5' height='22.2'/%3E%3Crect x='31.8' y='12.9' class='st1' width='15.9' height='6.3'/%3E%3Crect x='31.8' y='4.9' class='st1' width='15.9' height='6.8'/%3E%3Crect x='31.8' y='20.3' class='st1' width='15.9' height='6.8'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(14) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='13.9' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='2.2' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(16) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='33.9' height='13.2'/%3E%3Crect x='2.2' y='19.3' class='st1' width='16.4' height='7.8'/%3E%3Crect x='19.7' y='19.3' class='st1' width='16.4' height='7.8'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='13.2'/%3E%3Crect x='37.2' y='19.3' class='st1' width='10.5' height='7.8'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(18) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='12.1'/%3E%3Crect x='25.6' y='4.9' class='st1' width='22.2' height='12.1'/%3E%3Crect x='2.2' y='18.2' class='st1' width='14.4' height='8.9'/%3E%3Crect x='17.8' y='18.2' class='st1' width='14.4' height='8.9'/%3E%3Crect x='33.3' y='18.2' class='st1' width='14.4' height='8.9'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(20) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(22) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='14.5' height='22.2'/%3E%3Crect x='33.4' y='4.9' class='st1' width='14.4' height='22.2'/%3E%3Crect x='17.9' y='4.9' class='st1' width='14.4' height='22.2'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.elementor-control-layout_select label:nth-child(24) {
|
||||
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='10.6' height='22.2'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3Crect x='25.6' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3Crect x='14' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3C/g%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Widget Preview and Library buttons
|
||||
--------------------------------------------------------------*/
|
||||
.elementor-control-wpr_library_buttons {
|
||||
height: 60px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.elementor-control-wpr_library_buttons .elementor-control-raw-html {
|
||||
padding: 0 10px 10px 10px;
|
||||
border-bottom: 1px solid #efefef;
|
||||
}
|
||||
|
||||
.elementor-control-wpr_library_buttons .elementor-control-raw-html div {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.elementor-control-wpr_library_buttons .elementor-control-raw-html div a {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
padding: 10px 15px;
|
||||
border-radius: 3px;
|
||||
/*box-shadow: 1px 2px 5px 0 rgba(0,0,0,0.2);*/
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
}
|
||||
.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child {
|
||||
background-color: #1CB4E4;
|
||||
color: #fff;
|
||||
margin-right: 3px;
|
||||
}
|
||||
.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child {
|
||||
margin-left: 3px;
|
||||
background-color: #6A65FF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.elementor-control-wpr_library_buttons .elementor-control-raw-html > a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
line-height: 20px;
|
||||
color: #777;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.elementor-section-title > a {
|
||||
top: 10px;
|
||||
right: 20px;
|
||||
position: absolute;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.elementor-section-title > a:hover {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Apply Changes Button
|
||||
--------------------------------------------------------------*/
|
||||
.editor-wpr-preview-update {
|
||||
margin: 0;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.editor-wpr-preview-update button {
|
||||
font-size: 13px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Free/Pro Options
|
||||
--------------------------------------------------------------*/
|
||||
.elementor-control select option[value*=pro-] {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
|
||||
.elementor-control[class*="pro_notice"] {
|
||||
padding: 5px 0 15px 0 !important;
|
||||
}
|
||||
|
||||
.wpr-pro-notice {
|
||||
padding: 20px;
|
||||
border-top: 1px solid #e6e9ec;
|
||||
border-bottom: 1px solid #e6e9ec;
|
||||
background-color: #f2fbff;
|
||||
line-height: 1.4;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-pro-notice-video {
|
||||
display: block;
|
||||
margin-top: 7px;
|
||||
line-height: 20px;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
#elementor-controls .elementor-control-slider_section_pro_notice {
|
||||
margin-top: -16px;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.elementor-control-layout_select_pro_notice + div,
|
||||
.elementor-control-element_align_pro_notice + div {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.elementor-control-layout_select .elementor-choices label {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.elementor-control-layout_select .elementor-choices label:nth-child(2):after,
|
||||
.elementor-control-layout_select .elementor-choices label:nth-child(4):after,
|
||||
.elementor-control-layout_select .elementor-choices label:nth-child(6):after,
|
||||
.elementor-control-layout_select .elementor-choices label:nth-child(8):after,
|
||||
.elementor-control-layout_select .elementor-choices label:nth-child(10):after,
|
||||
.elementor-control-layout_select .elementor-choices label:nth-child(12):after {
|
||||
content: ' ';
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
/* Adjustments */
|
||||
.elementor-control.elementor-control-element_align_pro_notice,
|
||||
.elementor-control.elementor-control-search_pro_notice,
|
||||
.elementor-control.elementor-control-layout_select_pro_notice,
|
||||
.elementor-control.elementor-control-grid_columns_pro_notice,
|
||||
.elementor-control.elementor-control-slider_content_type_pro_notice,
|
||||
.elementor-control.elementor-control-slider_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-slider_dots_layout_pro_notice,
|
||||
.elementor-control.elementor-control-testimonial_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-testimonial_icon_pro_notice,
|
||||
.elementor-control.elementor-control-menu_layout_pro_notice,
|
||||
.elementor-control.elementor-control-menu_items_submenu_entrance_pro_notice,
|
||||
.elementor-control.elementor-control-switcher_label_style_pro_notice,
|
||||
.elementor-control.elementor-control-countdown_type_pro_notice,
|
||||
.elementor-control.elementor-control-layout_pro_notice,
|
||||
.elementor-control.elementor-control-anim_timing_pro_notice,
|
||||
.elementor-control.elementor-control-tab_content_type_pro_notice,
|
||||
.elementor-control.elementor-control-tabs_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-tabs_align_pro_notice,
|
||||
.elementor-control.elementor-control-front_trigger_pro_notice,
|
||||
.elementor-control.elementor-control-back_link_type_pro_notice,
|
||||
.elementor-control.elementor-control-box_anim_timing_pro_notice,
|
||||
.elementor-control.elementor-control-image_style_pro_notice,
|
||||
.elementor-control.elementor-control-image_animation_timing_pro_notice,
|
||||
.elementor-control.elementor-control-label_display_pro_notice,
|
||||
.elementor-control.elementor-control-post_type_pro_notice,
|
||||
.elementor-control.elementor-control-type_select_pro_notice,
|
||||
.elementor-control.elementor-control-icon_style_pro_notice,
|
||||
.elementor-control.elementor-control-dual_button_pro_notice,
|
||||
.elementor-control.elementor-control-team_member_pro_notice,
|
||||
.elementor-control.elementor-control-price_list_pro_notice,
|
||||
.elementor-control.elementor-control-business_hours_pro_notice,
|
||||
.elementor-control.elementor-control-sharing_columns_pro_notice,
|
||||
.elementor-control.elementor-control-popup_trigger_pro_notice,
|
||||
.elementor-control.elementor-control-popup_show_again_delay_pro_notice,
|
||||
.elementor-control.elementor-control-group_popup_settings_pro_notice,
|
||||
.elementor-control.elementor-control-which_particle_pro_notice,
|
||||
.elementor-control.elementor-control-paralax_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-opnepage_pro_notice,
|
||||
.elementor-control.elementor-control-timeline_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-limit_grid_items_pro_notice,
|
||||
.elementor-control.elementor-control-post_nav_layout_pro_notice,
|
||||
.elementor-control.elementor-control-author_name_links_to_pro_notice,
|
||||
.elementor-control.elementor-control-author_title_links_to_pro_notice,
|
||||
.elementor-control.elementor-control-comments_form_layout_pro_notice,
|
||||
.elementor-control.elementor-control-sharing_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-mini_cart_style_pro_notice,
|
||||
.elementor-control.elementor-control-tabs_position_pro_notice,
|
||||
.elementor-control.elementor-control-choose_table_type_pro_notice,
|
||||
.elementor-control.elementor-control-accordion_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-acc_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-data_source_pro_notice,
|
||||
.elementor-control.elementor-control-charts_repeater_pro_notice,
|
||||
.elementor-control.elementor-control-mob_menu_display_as_pro_notice {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.elementor-control-search_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-grid_columns_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-slider_content_type_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-slider_repeater_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-slider_dots_layout_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-testimonial_repeater_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-testimonial_icon_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-menu_layout_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-menu_items_submenu_entrance_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-switcher_label_style_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-countdown_type_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-layout_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-anim_timing_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-tab_content_type_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-tabs_repeater_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-tabs_align_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-front_trigger_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-back_link_type_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-box_anim_timing_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-image_style_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-image_animation_timing_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-label_display_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-post_type_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-type_select_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-icon_style_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-dual_button_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-team_member_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-price_list_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-business_hours_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-sharing_columns_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-popup_trigger_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-popup_show_again_delay_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-group_popup_settings_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-post_nav_layout_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-author_name_links_to_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-author_title_links_to_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-comments_form_layout_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-sharing_repeater_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-mini_cart_style_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-tabs_position_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-choose_table_type_pro_notice .wpr-pro-notice,
|
||||
.elementor-control-accordion_repeater_pro_notice .wpr-pro-notice,
|
||||
.elementor-control.elementor-control-data_source_pro_notice .wpr-pro-notice,
|
||||
.elementor-control.elementor-control-mob_menu_display_as_pro_notice .wpr-pro-notice {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
/* Both */
|
||||
.elementor-control.elementor-control-pagination_type_pro_notice,
|
||||
.elementor-control.elementor-control-tooltip_trigger_pro_notice,
|
||||
.elementor-control.elementor-control-post_info_select_pro_notice {
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.elementor-control-pagination_type_pro_notice .wpr-pro-notice {
|
||||
border-top: none !important;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.elementor-control-pro_features_section .elementor-section-toggle,
|
||||
.elementor-control-pro_features_section .elementor-section-title {
|
||||
color: #f54;
|
||||
}
|
||||
|
||||
.elementor-control-pro_features_section .elementor-section-title {
|
||||
line-height: 20px;
|
||||
}
|
||||
.elementor-control-pro_features_section .elementor-section-title .dashicons {
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-list {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-pro-features-list ul {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.wpr-pro-features-list ul li {
|
||||
position: relative;
|
||||
line-height: 22px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-list ul li::before {
|
||||
content: '.';
|
||||
font-size: 38px;
|
||||
position: absolute;
|
||||
top: -11px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.wpr-pro-features-list ul + a {
|
||||
display: inline-block;
|
||||
background-color: #f54;
|
||||
color: #fff;
|
||||
margin: 15px 15px 10px 0;
|
||||
padding: 7px 12px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-pro-features-list ul + a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Video Tutorial Link */
|
||||
.elementor-control[class*="video_tutorial"] {
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 5px !important;
|
||||
}
|
||||
|
||||
.elementor-control.elementor-control-woo_grid_notice_video_tutorial,
|
||||
.elementor-control-show_last_update_date {
|
||||
padding-bottom: 15px !important;
|
||||
}
|
||||
|
||||
.elementor-control.elementor-control-woo_grid_notice_video_tutorial a {
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.elementor-control[class*="video_tutorial"] a {
|
||||
line-height: 16px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.elementor-control[class*="video_tutorial"] a .dashicons {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Pro Control Class */
|
||||
.elementor-control.wpr-pro-control label i {
|
||||
color: #aeaeae;
|
||||
font-size: 14px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.elementor-control.wpr-pro-control .elementor-control-content:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.elementor-control.wpr-pro-control .elementor-control-content:after {
|
||||
content: "This option is available in the Pro Version.";
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
padding: 15px;
|
||||
z-index: 99;
|
||||
margin-top: 10px;
|
||||
font-size: 12px;
|
||||
color: #93003c;
|
||||
background-color: #ffffff;
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
|
||||
box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
|
||||
border: 1px solid #e6e9ec;
|
||||
-webkit-transition: all 0.2s ease-in;
|
||||
-o-transition: all 0.2s ease-in;
|
||||
transition: all 0.2s ease-in;
|
||||
}
|
||||
|
||||
.elementor-repeater-fields .elementor-control.wpr-pro-control .elementor-control-content:after {
|
||||
content: "This is available in the Pro Version.";
|
||||
}
|
||||
|
||||
.elementor-control.wpr-pro-control.no-distance .elementor-control-content:after {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.elementor-control.wpr-pro-control .elementor-control-content:hover:after {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Theme Builder Widgets
|
||||
--------------------------------------------------------------*/
|
||||
#elementor-panel-categories {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#elementor-panel-categories > div {
|
||||
-webkit-box-ordinal-group: 3;
|
||||
-ms-flex-order: 2;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#elementor-panel-category-wpr-theme-builder-widgets,
|
||||
#elementor-panel-category-wpr-woocommerce-builder-widgets {
|
||||
-webkit-box-ordinal-group: 2 !important;
|
||||
-ms-flex-order: 1 !important;
|
||||
order: 1 !important;
|
||||
}
|
||||
|
||||
.elementor-editor-wpr-theme-builder #elementor-panel-footer-saver-preview {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Elementor Search Notice
|
||||
--------------------------------------------------------------*/
|
||||
.wpr-elementor-search-notice {
|
||||
background: #fff;
|
||||
font-size: 13px;
|
||||
padding: 20px;
|
||||
line-height: 18px;
|
||||
margin: 10px;
|
||||
border-left: 3px solid #71d7f7;
|
||||
-webkit-box-shadow: 0 1px 4px 0 rgb(0 0 0 / 7%);
|
||||
box-shadow: 0 1px 4px 0 rgb(0 0 0 / 7%);
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Debug
|
||||
--------------------------------------------------------------*/
|
||||
pre.xdebug-var-dump {
|
||||
position: absolute;
|
||||
z-index: 999999;
|
||||
background: #fff;
|
||||
border: 2px solid #000;
|
||||
padding: 20px;
|
||||
left: 300px;
|
||||
}
|
||||
@@ -0,0 +1,714 @@
|
||||
/*--------------------------------------------------------------
|
||||
== Library - Predefined Styles
|
||||
--------------------------------------------------------------*/
|
||||
#wpr-library-btn {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: top;
|
||||
margin-left: 10px;
|
||||
color: #fff;
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-library-icon {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.wpr-tplib-popup {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%,-30%);
|
||||
-ms-transform: translate(-50%,-30%);
|
||||
transform: translate(-50%,-30%);
|
||||
background: #f1f3f5;
|
||||
min-width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wpr-tplib-header {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.wpr-tplib-logo {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
width: 200px;
|
||||
padding-left: 30px;
|
||||
color: #495157;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
}
|
||||
|
||||
.wpr-tplib-header ul {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-left: -130px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-header ul li {
|
||||
width: 115px;
|
||||
padding: 20px 0;
|
||||
color: #6d7882;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.wpr-tplib-active-tab {
|
||||
background-image: -o-linear-gradient(top,#f1f3f5,#fff);
|
||||
background-image: -webkit-gradient(linear,left top, left bottom,from(#f1f3f5),to(#fff));
|
||||
background-image: linear-gradient(180deg,#f1f3f5,#fff);
|
||||
border-bottom: 3px solid #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-tplib-close {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
padding-right: 30px;
|
||||
color: #a4afb7;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all .3s;
|
||||
-o-transition: all .3s;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.wpr-tplib-close:hover {
|
||||
color: #3a3a3a;
|
||||
}
|
||||
|
||||
.wpr-tplib-close i {
|
||||
line-height: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-header .wpr-tplib-insert-template {
|
||||
display: none;
|
||||
width: 120px;
|
||||
height: 27px;
|
||||
line-height: 27px;
|
||||
padding: 0 15px;
|
||||
margin-right: 15px;
|
||||
color: #fff;
|
||||
background-color: #6A4BFF;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
border-radius: 2px;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-tplib-back {
|
||||
display: none;
|
||||
width: 230px;
|
||||
padding: 17px 15px;
|
||||
border-right: 1px solid #e6e9ec;
|
||||
color: #6d7882;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all .3s;
|
||||
-o-transition: all .3s;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.wpr-tplib-back:hover {
|
||||
color: #495157;
|
||||
}
|
||||
|
||||
.wpr-tplib-back i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.wpr-tplib-back span {
|
||||
|
||||
}
|
||||
|
||||
.wpr-tplib-content-wrap {
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 30px 30px 20px 30px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search {
|
||||
display: none;
|
||||
position: relative;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
-webkit-transform: translateY(-50%);
|
||||
-ms-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input {
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #efefef;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-wrap {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters {
|
||||
display: none;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul li {
|
||||
padding: 10px 25px;
|
||||
margin-right: 7px;
|
||||
line-height: 15px;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul li:hover,
|
||||
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
||||
background: #6A4BFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
width: 200px;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
color: #6d7882;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters h3 {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 10px 15px;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters h3 span {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 38px;
|
||||
z-index: 999;
|
||||
width: 700px;
|
||||
padding: 20px 30px;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
-webkit-transition: all 0.2s ease-in;
|
||||
-o-transition: all 0.2s ease-in;
|
||||
transition: all 0.2s ease-in;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul li {
|
||||
width: 25%;
|
||||
padding: 12px;
|
||||
color: #6d7882;
|
||||
background: #fff;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul li:hover {
|
||||
background: #f9f9f9;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-gird {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: calc(100% - 132px);
|
||||
overflow: auto;
|
||||
padding: 0 30px 30px 30px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap {
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
width: 18.5%;
|
||||
margin: 10px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
||||
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
||||
content: 'Free';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 1;
|
||||
width: 45px;
|
||||
padding: 4px;
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
background: #555;
|
||||
color: #fff;
|
||||
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
||||
content: 'Pro';
|
||||
background: #6A4BFF;
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 1364px ) {
|
||||
.wpr-tplib-template-wrap {
|
||||
width: 23%;
|
||||
}
|
||||
}
|
||||
|
||||
.wpr-tplib-template {
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-template {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media {
|
||||
position: relative;
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media img {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media-overlay {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
-webkit-transition: opacity 0.1s ease-in;
|
||||
-o-transition: opacity 0.1s ease-in;
|
||||
transition: opacity 0.1s ease-in;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media-overlay i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.wpr-tplib-preview-wrap {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-image {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.wpr-tplib-iframe {
|
||||
position: relative;
|
||||
padding-top: 56.25%;
|
||||
}
|
||||
|
||||
.wpr-tplib-iframe iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: column wrap;
|
||||
flex-flow: column wrap;
|
||||
-ms-flex-line-pack: justify;
|
||||
align-content: space-between;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
height: 45px;
|
||||
padding: 5px 15px;
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #efefef;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer h3 {
|
||||
overflow: hidden;
|
||||
color: #6d7882;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
padding: 6px 10px;
|
||||
color: #fff;
|
||||
background-color: #6A4BFF;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
letter-spacing: 0.3px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
-o-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
}
|
||||
|
||||
|
||||
#masonry-effect {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.item {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
width: calc(33.3%);
|
||||
}
|
||||
|
||||
|
||||
/* Elementor Loader */
|
||||
.wpr-tplib-loader {
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9999999999;
|
||||
background-color: #f1f3f5;
|
||||
}
|
||||
|
||||
.elementor-loader-wrapper {
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
-webkit-transform: translateX(-50%) translateY(-50%);
|
||||
-ms-transform: translateX(-50%) translateY(-50%);
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.elementor-loader {
|
||||
border-radius: 7px;
|
||||
padding: 40px;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
||||
box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.elementor-loader-boxes {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.elementor-loader-box {
|
||||
position: absolute;
|
||||
background-color: #d5dadf;
|
||||
-webkit-animation: load 1.8s linear infinite;
|
||||
animation: load 1.8s linear infinite;
|
||||
}
|
||||
|
||||
.elementor-loader-box:nth-of-type(1) {
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.elementor-loader-box:not(:nth-of-type(1)) {
|
||||
right: 0;
|
||||
height: 20%;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.elementor-loader-box:nth-of-type(2) {
|
||||
top: 0;
|
||||
-webkit-animation-delay: -0.45s;
|
||||
animation-delay: -0.45s;
|
||||
}
|
||||
|
||||
.elementor-loader-box:nth-of-type(3) {
|
||||
top: 40%;
|
||||
-webkit-animation-delay: -0.9s;
|
||||
animation-delay: -0.9s;
|
||||
}
|
||||
|
||||
.elementor-loader-box:nth-of-type(4) {
|
||||
bottom: 0;
|
||||
-webkit-animation-delay: -1.35s;
|
||||
animation-delay: -1.35s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes load {
|
||||
0% {
|
||||
opacity: .3;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: .3;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes load {
|
||||
0% {
|
||||
opacity: .3;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: .3;
|
||||
}
|
||||
}
|
||||
|
||||
.elementor-loading-title {
|
||||
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
||||
color: #a4afb7;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
margin-top: 30px;
|
||||
letter-spacing: 7px;
|
||||
text-indent: 7px;
|
||||
font-size: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
/* Scroll Bar */
|
||||
.wpr-tplib-popup ::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup ::-webkit-scrollbar-button {
|
||||
width: 0px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup ::-webkit-scrollbar-thumb {
|
||||
background-color: #d5dadf;
|
||||
border: 0px none #d5dadf;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup ::-webkit-scrollbar-track {
|
||||
border: 0px none #fff;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup ::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
@@ -0,0 +1,929 @@
|
||||
/*--------------------------------------------------------------
|
||||
== Library - Predefined Styles
|
||||
--------------------------------------------------------------*/
|
||||
.wpr-tplib-popup-overlay * {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#wpr-library-btn {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: top;
|
||||
margin-left: 10px;
|
||||
color: #fff;
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-library-icon {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
padding: 10px;
|
||||
margin-right: 10px;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999999;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.wpr-tplib-popup {
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%,-30%);
|
||||
-ms-transform: translate(-50%,-30%);
|
||||
transform: translate(-50%,-30%);
|
||||
background: #f1f3f5;
|
||||
min-width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wpr-tplib-header {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.wpr-tplib-logo {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
width: 200px;
|
||||
padding-left: 30px;
|
||||
color: #495157;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
}
|
||||
|
||||
.wpr-tplib-header ul {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-left: -130px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-header ul li {
|
||||
width: 115px;
|
||||
padding: 20px 0;
|
||||
color: #6d7882;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.wpr-tplib-active-tab {
|
||||
background-image: -o-linear-gradient(top,#f1f3f5,#fff);
|
||||
background-image: -webkit-gradient(linear,left top, left bottom,from(#f1f3f5),to(#fff));
|
||||
background-image: linear-gradient(180deg,#f1f3f5,#fff);
|
||||
border-bottom: 3px solid #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-tplib-close {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
padding-right: 30px;
|
||||
color: #a4afb7;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all .3s;
|
||||
-o-transition: all .3s;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.wpr-tplib-close:hover {
|
||||
color: #3a3a3a;
|
||||
}
|
||||
|
||||
.wpr-tplib-close i {
|
||||
line-height: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-header .wpr-tplib-insert-template {
|
||||
display: none;
|
||||
width: 120px;
|
||||
height: 27px;
|
||||
line-height: 27px;
|
||||
padding: 0 15px;
|
||||
margin-right: 15px;
|
||||
color: #fff;
|
||||
background-color: #6A4BFF;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
border-radius: 2px;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-tplib-back {
|
||||
display: none;
|
||||
width: 230px;
|
||||
padding: 17px 15px;
|
||||
border-right: 1px solid #e6e9ec;
|
||||
color: #6d7882;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all .3s;
|
||||
-o-transition: all .3s;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.wpr-tplib-back:hover {
|
||||
color: #495157;
|
||||
}
|
||||
|
||||
.wpr-tplib-back i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.wpr-tplib-back span {
|
||||
|
||||
}
|
||||
|
||||
.wpr-tplib-content-wrap {
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
padding: 30px 37px 30px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search {
|
||||
position: relative;
|
||||
width: 250px;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgb(0 0 0 / 5%);
|
||||
box-shadow: 0 2px 5px 0 rgb(0 0 0 / 5%);
|
||||
}
|
||||
|
||||
#wpr-info-box {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
max-width: 300px;
|
||||
padding: 10px 15px;
|
||||
border-radius: 3px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
color: #6d7882;
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
#wpr-info-box a {
|
||||
color: #6A4BFF;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#wpr-info-box a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 15px;
|
||||
font-size: 12px;
|
||||
-webkit-transform: translateY(-50%);
|
||||
-ms-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input {
|
||||
width: 100%;
|
||||
padding: 7px 15px;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #efefef;
|
||||
font-size: 14px;
|
||||
line-height: 23px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-wrap {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters {
|
||||
display: none;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul li {
|
||||
padding: 10px 25px;
|
||||
margin-right: 7px;
|
||||
line-height: 15px;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul li:hover,
|
||||
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
||||
background: #6A4BFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters,
|
||||
.wpr-tplib-price {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
width: 200px;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
color: #6d7882;
|
||||
}
|
||||
|
||||
.wpr-tplib-price i {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters h3,
|
||||
.wpr-tplib-price h3 {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 10px 15px;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters h3 span,
|
||||
.wpr-tplib-price h3 span {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list,
|
||||
.wpr-tplib-price-list {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 38px;
|
||||
z-index: 999;
|
||||
width: 700px;
|
||||
padding: 20px 30px;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
-webkit-transition: all 0.2s ease-in;
|
||||
-o-transition: all 0.2s ease-in;
|
||||
transition: all 0.2s ease-in;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul,
|
||||
.wpr-tplib-price-list ul {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul li,
|
||||
.wpr-tplib-price-list ul li {
|
||||
width: 25%;
|
||||
padding: 12px;
|
||||
color: #6d7882;
|
||||
background: #fff;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul li:hover,
|
||||
.wpr-tplib-price-list ul li:hover {
|
||||
background: #f9f9f9;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.wpr-tplib-price {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.wpr-tplib-search + .wpr-tplib-filters-wrap .wpr-tplib-filters-list {
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-tplib-search + .wpr-tplib-filters-wrap .wpr-tplib-filters-list ul {
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
.wpr-tplib-search + .wpr-tplib-filters-wrap .wpr-tplib-filters-list ul li {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-tplib-price-list {
|
||||
width: 120px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.wpr-tplib-price-list ul {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.wpr-tplib-price-list ul li {
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-gird {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: calc(100% - 132px);
|
||||
overflow: auto;
|
||||
padding: 0 30px 30px 30px;
|
||||
margin-left: -10px;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap {
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
width: 18.5%;
|
||||
margin: 10px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
||||
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
||||
content: 'Free';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 1;
|
||||
width: 45px;
|
||||
padding: 4px;
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
background: #555;
|
||||
color: #fff;
|
||||
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
||||
content: 'Pro';
|
||||
background: #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar[data-license="premium"] + .wpr-tplib-template-gird .wpr-tplib-template-wrap:before {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 1364px ) {
|
||||
.wpr-tplib-template-wrap {
|
||||
width: 23%;
|
||||
}
|
||||
}
|
||||
|
||||
.wpr-tplib-template {
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-template {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media {
|
||||
position: relative;
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media img {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media-overlay {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
-webkit-transition: opacity 0.1s ease-in;
|
||||
-o-transition: opacity 0.1s ease-in;
|
||||
transition: opacity 0.1s ease-in;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media-overlay i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.wpr-tplib-preview-wrap {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-image {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.wpr-tplib-iframe {
|
||||
position: relative;
|
||||
padding-top: 56.25%;
|
||||
}
|
||||
|
||||
.wpr-tplib-iframe iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: column wrap;
|
||||
flex-flow: column wrap;
|
||||
-ms-flex-line-pack: justify;
|
||||
align-content: space-between;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
height: 45px;
|
||||
padding: 5px 15px;
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #efefef;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer h3 {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
color: #6d7882;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* Sections Grid - Modified */
|
||||
.wpr-tplib-sections-grid .wpr-tplib-template-media {
|
||||
min-height: 90px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sections-grid .wpr-tplib-template-footer,
|
||||
.wpr-tplib-sections-grid .wpr-tplib-template-footer h3 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-sections-grid .wpr-tplib-template-footer {
|
||||
align-content: flex-end;
|
||||
}
|
||||
|
||||
.wpr-tplib-sections-grid .wpr-tplib-template-wrap:hover .wpr-tplib-template-footer {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sections-grid .wpr-tplib-template-media-overlay i {
|
||||
margin-top: -17px;
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 1919px ) {
|
||||
.wpr-tplib-template-footer h3 span:first-child {
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
max-width: 130px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 1366px ) {
|
||||
.wpr-tplib-template-footer h3 span:first-child {
|
||||
max-width: 109px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 1280px ) {
|
||||
.wpr-tplib-template-footer h3 span:first-child {
|
||||
max-width: 90px;
|
||||
}
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
padding: 6px 10px;
|
||||
color: #fff;
|
||||
background-color: #6A4BFF;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
letter-spacing: 0.3px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
-o-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
}
|
||||
|
||||
#masonry-effect {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.item {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
width: calc(33.3%);
|
||||
}
|
||||
|
||||
.wpr-tplib-template-gird-loading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-gird-loading .wpr-wave {
|
||||
width: 50px;
|
||||
height: 25px;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.wpr-wave .wpr-rect {
|
||||
height: 100%;
|
||||
width: 4px;
|
||||
margin-right: 2px;
|
||||
display: inline-block;
|
||||
-webkit-animation: wpr-waveStretchDelay 1.2s infinite ease-in-out;
|
||||
animation: wpr-waveStretchDelay 1.2s infinite ease-in-out;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
.wpr-wave .wpr-rect1 {
|
||||
-webkit-animation-delay: -1.2s;
|
||||
animation-delay: -1.2s;
|
||||
}
|
||||
|
||||
.wpr-wave .wpr-rect2 {
|
||||
-webkit-animation-delay: -1.1s;
|
||||
animation-delay: -1.1s;
|
||||
}
|
||||
|
||||
.wpr-wave .wpr-rect3 {
|
||||
-webkit-animation-delay: -1s;
|
||||
animation-delay: -1s;
|
||||
}
|
||||
|
||||
.wpr-wave .wpr-rect4 {
|
||||
-webkit-animation-delay: -0.9s;
|
||||
animation-delay: -0.9s;
|
||||
}
|
||||
|
||||
.wpr-wave .wpr-rect5 {
|
||||
-webkit-animation-delay: -0.8s;
|
||||
animation-delay: -0.8s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-waveStretchDelay {
|
||||
0%,
|
||||
40%,
|
||||
100% {
|
||||
-webkit-transform: scaleY(0.4);
|
||||
transform: scaleY(0.4);
|
||||
}
|
||||
20% {
|
||||
-webkit-transform: scaleY(1);
|
||||
transform: scaleY(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-waveStretchDelay {
|
||||
0%,
|
||||
40%,
|
||||
100% {
|
||||
-webkit-transform: scaleY(0.4);
|
||||
transform: scaleY(0.4);
|
||||
}
|
||||
20% {
|
||||
-webkit-transform: scaleY(1);
|
||||
transform: scaleY(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Elementor Loader */
|
||||
.wpr-tplib-loader {
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 9999999999;
|
||||
background-color: #f1f3f5;
|
||||
}
|
||||
|
||||
.elementor-loader-wrapper {
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
-webkit-transform: translateX(-50%) translateY(-50%);
|
||||
-ms-transform: translateX(-50%) translateY(-50%);
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.elementor-loader {
|
||||
border-radius: 7px;
|
||||
padding: 40px;
|
||||
height: 150px;
|
||||
width: 150px;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
||||
box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.elementor-loader-boxes {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.elementor-loader-box {
|
||||
position: absolute;
|
||||
background-color: #d5dadf;
|
||||
-webkit-animation: load 1.8s linear infinite;
|
||||
animation: load 1.8s linear infinite;
|
||||
}
|
||||
|
||||
.elementor-loader-box:nth-of-type(1) {
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.elementor-loader-box:not(:nth-of-type(1)) {
|
||||
right: 0;
|
||||
height: 20%;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.elementor-loader-box:nth-of-type(2) {
|
||||
top: 0;
|
||||
-webkit-animation-delay: -0.45s;
|
||||
animation-delay: -0.45s;
|
||||
}
|
||||
|
||||
.elementor-loader-box:nth-of-type(3) {
|
||||
top: 40%;
|
||||
-webkit-animation-delay: -0.9s;
|
||||
animation-delay: -0.9s;
|
||||
}
|
||||
|
||||
.elementor-loader-box:nth-of-type(4) {
|
||||
bottom: 0;
|
||||
-webkit-animation-delay: -1.35s;
|
||||
animation-delay: -1.35s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes load {
|
||||
0% {
|
||||
opacity: .3;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: .3;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes load {
|
||||
0% {
|
||||
opacity: .3;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: .3;
|
||||
}
|
||||
}
|
||||
|
||||
.elementor-loading-title {
|
||||
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
||||
color: #a4afb7;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
margin-top: 30px;
|
||||
letter-spacing: 7px;
|
||||
text-indent: 7px;
|
||||
font-size: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
/* Scroll Bar */
|
||||
.wpr-tplib-popup ::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup ::-webkit-scrollbar-button {
|
||||
width: 0px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup ::-webkit-scrollbar-thumb {
|
||||
background-color: #d5dadf;
|
||||
border: 0px none #d5dadf;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup ::-webkit-scrollbar-track {
|
||||
border: 0px none #fff;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-popup ::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
@@ -0,0 +1,444 @@
|
||||
.wpr-mm-settings-btn {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.menu-item-depth-0:hover .wpr-mm-settings-btn {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-mm-settings-btn {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 260px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 5px 14px 7px;
|
||||
color: #fff;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#6A4BFF), to(#7E94FE));
|
||||
background: -o-linear-gradient(#6A4BFF, #7E94FE);
|
||||
background: linear-gradient(#6A4BFF, #7E94FE);
|
||||
font-weight: 500;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-mm-settings-btn span {
|
||||
content: 'R';
|
||||
display: inline-block;
|
||||
font-family: Roboto,Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 8px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
background-image: -o-linear-gradient(#6A4BFF, #7E94FE);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#6A4BFF), to(#7E94FE));
|
||||
background-image: linear-gradient(#6A4BFF, #7E94FE);
|
||||
-webkit-box-shadow: 0 0 2px 2px #b8c7ff;
|
||||
box-shadow: 0 0 2px 2px #b8c7ff;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
border-radius: 15px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.wpr-mm-settings-popup-wrap {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 9999999;
|
||||
background-color: rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.wpr-mm-settings-popup {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%,-50%);
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
transform: translate(-50%,-50%);
|
||||
width: 100%;
|
||||
max-width: 700px;
|
||||
margin-left: 80px;
|
||||
background-color: #fff;
|
||||
-webkit-box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
|
||||
box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.wpr-mm-popup-title {
|
||||
margin-left: auto;
|
||||
margin-right: 10px;
|
||||
border: 1px solid #dcdcde;
|
||||
background-color: #f6f7f7;
|
||||
padding: 2px 10px 4px;
|
||||
}
|
||||
|
||||
.wpr-mm-settings-close-popup-btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-mm-settings-popup-header {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.wpr-mm-popup-logo {
|
||||
padding: 3px;
|
||||
margin-right: 10px;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
|
||||
.wpr-mm-settings-popup-footer {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
padding: 10px;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.button.wpr-save-mega-menu-btn {
|
||||
min-height: 0;
|
||||
padding: 6px 18px 7px;
|
||||
color: #fff;
|
||||
background: #6A4BFF;
|
||||
border-radius: 3px;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.button.wpr-save-mega-menu-btn:hover {
|
||||
color: #fff;
|
||||
background: #5537e1;
|
||||
}
|
||||
|
||||
.wpr-save-mega-menu-btn .dashicons {
|
||||
display: inline;
|
||||
line-height: 8px;
|
||||
font-size: 14px;
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
.wpr-mm-settings-wrap {
|
||||
height: 60vh;
|
||||
overflow-y: scroll;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.wpr-mm-settings-wrap > h4 {
|
||||
padding: 5px 10px 7px;
|
||||
background-color: #f5f3f3;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.wpr-mm-setting {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.wpr-mm-setting h4 {
|
||||
width: 200px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpr-mm-setting > div,
|
||||
.wpr-mm-setting select,
|
||||
.wpr-mm-setting input[type="text"] {
|
||||
width: 168px;
|
||||
}
|
||||
|
||||
.wpr-mm-setting input[type="number"] {
|
||||
width: 103px;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-switcher input {
|
||||
position: absolute;
|
||||
z-index: -1000;
|
||||
left: -1000px;
|
||||
overflow: hidden;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-switcher label {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 45px;
|
||||
height: 23px;
|
||||
border-radius: 20px;
|
||||
background: #e8e8e8;
|
||||
cursor: pointer;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-transition: all 0.2s ease-in;
|
||||
-o-transition: all 0.2s ease-in;
|
||||
transition: all 0.2s ease-in;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-switcher input + label:after {
|
||||
content: ' ';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
-webkit-transition: all 0.2s ease-in;
|
||||
-o-transition: all 0.2s ease-in;
|
||||
transition: all 0.2s ease-in;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-switcher input:checked + label {
|
||||
background: #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-switcher input:checked + label:after {
|
||||
left: 24px;
|
||||
}
|
||||
|
||||
button.wpr-edit-mega-menu-btn {
|
||||
padding: 3px 22px !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.wpr-edit-mega-menu-btn i {
|
||||
font-size: 125%;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
.wpr-mm-editor-popup-wrap {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
z-index: 99999999;
|
||||
}
|
||||
|
||||
.wpr-mm-editor-popup-iframe {
|
||||
width: calc(100vw - 70px);
|
||||
height: calc(100vh - 70px);
|
||||
margin: 35px 25px;
|
||||
background-color: #f9f9f9;
|
||||
-webkit-box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
|
||||
box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.wpr-mm-editor-close-popup-btn {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
right: 55px;
|
||||
font-size: 50px !important;
|
||||
}
|
||||
|
||||
.wpr-mm-editor-close-popup-btn span {
|
||||
color: #444;
|
||||
font-size: 25px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-mm-editor-close-popup-btn span:hover {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-radius div {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-icon div span {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 1px solid #a4afb7;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-icon div span.wpr-mm-active-icon {
|
||||
background-color: #a4afb7;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-icon div span:first-child {
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-icon div span:last-child {
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
.wpr-mm-setting-icon input[type="text"] {
|
||||
width: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
.wpr-mm-setting.iconpicker-container .iconpicker-popover {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.wpr-mm-setting.iconpicker-container .popover-title {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpr-mm-setting.iconpicker-container input[type="search"] {
|
||||
padding: 5px 10px;
|
||||
margin: 0 !important;
|
||||
border: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-mm-setting.iconpicker-container .arrow {
|
||||
border-bottom-color: #f7f7f7 !important;
|
||||
top: -8px !important;
|
||||
}
|
||||
|
||||
.wp-picker-input-wrap .wp-picker-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-mm-setting select,
|
||||
.wpr-mm-setting input:not(.iconpicker-input),
|
||||
.wpr-mm-setting button {
|
||||
border: 1px solid #e5e5e5 !important;
|
||||
}
|
||||
|
||||
/* Pro Options */
|
||||
.wpr-mm-pro-setting h4:after,
|
||||
h4.wpr-mm-pro-heading:after {
|
||||
content: 'PRO';
|
||||
margin-left: 5px;
|
||||
padding: 1px 7px 2px;
|
||||
color: #fff;
|
||||
background-color: #f44;
|
||||
border-radius: 3px;
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.wpr-mm-pro-section,
|
||||
.wpr-mm-pro-setting > div {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wpr-mm-pro-section:before,
|
||||
.wpr-mm-pro-setting > div:before {
|
||||
content: 'Please upgrade to the Pro Version to access this options.';
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: -20px;
|
||||
top: -65px;
|
||||
z-index: 2;
|
||||
width: 210px;
|
||||
padding: 10px;
|
||||
font-size: 12px;
|
||||
background-color: #fff;
|
||||
-webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
|
||||
box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-mm-pro-section:before {
|
||||
content: 'Please upgrade to the Pro Version to access these options.';
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translateX(-50%) translateY(-50%);
|
||||
-ms-transform: translateX(-50%) translateY(-50%);
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
padding: 20px 30px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.wpr-mm-pro-section:hover:before,
|
||||
.wpr-mm-pro-setting > div:hover:before {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpr-mm-pro-setting > div:after,
|
||||
.wpr-mm-pro-section:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.wpr-mm-pro-setting select {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-mm-pro-setting .wpr-mm-pro-radio {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpr-mm-pro-radio {
|
||||
display: none;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.wpr-mm-setting select option[value*="pro-"] {
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
}
|
||||
@@ -0,0 +1,444 @@
|
||||
#wpcontent {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.wpr-settings-page-header {
|
||||
padding: 10px 30px 30px;
|
||||
}
|
||||
|
||||
.wpr-settings-page-header h1 {
|
||||
font-size: 42px;
|
||||
}
|
||||
|
||||
.wpr-settings-page-header p {
|
||||
margin-top: 5px;
|
||||
color: #5a5a5a;
|
||||
font-size: 16px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.wpr-premade-blocks-tutorial {
|
||||
display: inline-block;
|
||||
margin-left: 45px;
|
||||
padding: 9px 25px;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
background: #6A4BFF;
|
||||
-webkit-box-shadow: 2px 2px 5px rgb(0 0 0 / 30%);
|
||||
box-shadow: 2px 2px 5px rgb(0 0 0 / 30%);
|
||||
font-size: 14px;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-premade-blocks-tutorial:hover,
|
||||
.wpr-premade-blocks-tutorial:focus {
|
||||
color: #fff;
|
||||
background: #5a39fb;
|
||||
}
|
||||
|
||||
.wpr-tplib-content-wrap {
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar {
|
||||
padding: 30px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search {
|
||||
display: none;
|
||||
position: relative;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
-webkit-transform: translateY(-50%);
|
||||
-ms-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input {
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #efefef;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
||||
color: #9a9a9a;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-wrap {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters {
|
||||
display: none;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul li {
|
||||
padding: 10px 25px;
|
||||
margin-right: 7px;
|
||||
line-height: 15px;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-sub-filters ul li:hover,
|
||||
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
||||
background: #6A4BFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
width: 200px;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
color: #6d7882;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters h3 {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 10px 15px;
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters h3 span {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters h3 i.fa-angle-down:before {
|
||||
content: "\f347";
|
||||
font-family: dashicons;
|
||||
line-height: 18px;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
speak: never;
|
||||
text-decoration: inherit;
|
||||
text-transform: none;
|
||||
text-rendering: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-size: 15px;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 38px;
|
||||
z-index: 999;
|
||||
width: 700px;
|
||||
padding: 20px 30px;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
||||
-webkit-transition: all 0.2s ease-in;
|
||||
-o-transition: all 0.2s ease-in;
|
||||
transition: all 0.2s ease-in;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul li {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 25%;
|
||||
padding: 12px;
|
||||
color: #6d7882;
|
||||
background: #fff;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-tplib-filters-list ul li:hover {
|
||||
background: #f9f9f9;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-gird {
|
||||
overflow: auto;
|
||||
margin-left: -10px;
|
||||
padding: 0 30px;
|
||||
}
|
||||
|
||||
.elementor-clearfix:after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap {
|
||||
position: relative;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
width: 18.5%;
|
||||
margin: 10px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
||||
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
||||
content: 'Free';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: 1;
|
||||
width: 45px;
|
||||
padding: 4px;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.3px;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
background: #555;
|
||||
color: #fff;
|
||||
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
||||
content: 'Pro';
|
||||
background: #6A4BFF;
|
||||
}
|
||||
|
||||
@media screen and ( max-width: 1364px ) {
|
||||
.wpr-tplib-template-wrap {
|
||||
width: 23%;
|
||||
}
|
||||
}
|
||||
|
||||
.wpr-tplib-template {
|
||||
}
|
||||
|
||||
.wpr-tplib-insert-template:not(.wpr-tplib-insert-pro) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-pro {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media {
|
||||
position: relative;
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media-overlay {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
-webkit-transition: opacity 0.1s ease-in;
|
||||
-o-transition: opacity 0.1s ease-in;
|
||||
transition: opacity 0.1s ease-in;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-media-overlay i {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
-ms-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.wpr-tplib-preview-wrap {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-image {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.wpr-tplib-iframe {
|
||||
position: relative;
|
||||
padding-top: 56.25%;
|
||||
}
|
||||
|
||||
.wpr-tplib-iframe iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-flow: column wrap;
|
||||
flex-flow: column wrap;
|
||||
-ms-flex-line-pack: justify;
|
||||
align-content: space-between;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
height: 45px;
|
||||
padding: 5px 15px;
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #efefef;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer h3 {
|
||||
overflow: hidden;
|
||||
color: #6d7882;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
padding: 6px 10px;
|
||||
color: #fff;
|
||||
background-color: #6A4BFF;
|
||||
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
letter-spacing: 0.3px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
-webkit-transition: all 0.1s ease-in;
|
||||
-o-transition: all 0.1s ease-in;
|
||||
transition: all 0.1s ease-in;
|
||||
}
|
||||
|
||||
|
||||
#masonry-effect {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.item {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
width: calc(33.3%);
|
||||
}
|
||||
|
||||
/* Disable Notices */
|
||||
.notice:not(.wpr-plugin-update-notice),
|
||||
div.fs-notice.updated, div.fs-notice.success {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -0,0 +1,778 @@
|
||||
.royal-addons_page_wpr-templates-kit #wpwrap {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.royal-addons_page_wpr-templates-kit #wpcontent {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wpbody img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-page > header {
|
||||
position: sticky;
|
||||
top: 32px;
|
||||
z-index: 99;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 0 7px 0 rgba(0,0,0,0.2);
|
||||
box-shadow: 0 0 7px 0 rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.wpr-templates-kit-logo {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-logo div {
|
||||
padding: 20px;
|
||||
border-right: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-logo .back-btn {
|
||||
display: none;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
color: #6d7882;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-logo .back-btn:hover {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-search {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 50%;
|
||||
-webkit-transform: translateX(-50%);
|
||||
-ms-transform: translateX(-50%);
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.wpr-templates-kit-search input {
|
||||
width: 500px;
|
||||
height: 45px;
|
||||
padding-left: 15px;
|
||||
background-color: #FBFBFB;
|
||||
border: none;
|
||||
border: 1px solid #e8e8e8 !important;
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-search .dashicons {
|
||||
margin-left: -32px;
|
||||
color: #6A4BFF;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-price-filter {
|
||||
position: relative;
|
||||
width: 110px;
|
||||
height: 40px;
|
||||
margin: 20px;
|
||||
border: 1px solid #e8e8e8;
|
||||
line-height: 40px;
|
||||
padding: 0 20px;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-price-filter .dashicons {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
line-height: 40px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-price-filter:hover ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-price-filter ul {
|
||||
display: none;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 26px;
|
||||
left: -1px;
|
||||
padding: 0;
|
||||
border: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-price-filter ul li {
|
||||
padding: 0 20px;
|
||||
line-height: 32px;
|
||||
margin-bottom: 0 !important;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-price-filter ul li:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-price-filter ul li:hover {
|
||||
background: #e8e8e8;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-filters {
|
||||
display: none;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-filters div {
|
||||
padding: 10px 20px;
|
||||
border: 2px solid #e8e8e8;
|
||||
border-radius: 3px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-filters ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-page-title {
|
||||
text-align: center;
|
||||
margin-top: 65px;
|
||||
margin-bottom: 35px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-page-title h1 {
|
||||
font-size: 35px;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.button.wpr-options-button {
|
||||
padding: 3px 18px;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
background: #6A4BFF;
|
||||
-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
||||
box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.button.wpr-options-button:hover,
|
||||
.button.wpr-options-button:focus {
|
||||
color: #fff;
|
||||
background: #6A4BFF;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.button.wpr-options-button .dashicons {
|
||||
font-size: 16px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid {
|
||||
display: -ms-grid;
|
||||
display: grid;
|
||||
-ms-grid-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-column-gap: 30px;
|
||||
grid-row-gap: 30px;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid.single-grid {
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1400px) {
|
||||
.wpr-templates-kit-grid {
|
||||
-ms-grid-columns: (1fr)[3];
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e8e8e8;
|
||||
-webkit-box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);
|
||||
box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item[data-price="pro"]:before,
|
||||
.wpr-templates-kit-grid .grid-item[data-expert="true"]:after{
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
padding: 4px 15px 5px;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
font-weight: 500;
|
||||
letter-spacing: .4px;
|
||||
color: #fff;
|
||||
-webkit-box-shadow: -1px 1px 5px 2px rgb(0 0 0 / 30%);
|
||||
box-shadow: -1px 1px 5px 2px rgb(0 0 0 / 30%);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item[data-price="pro"]:before {
|
||||
content: 'Premium';
|
||||
background: #6a4bff;
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item[data-expert="true"]:after {
|
||||
content: 'Expert';
|
||||
background: red;
|
||||
top: 62px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item[data-price="free"][data-expert="true"]:after {
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .image-wrap {
|
||||
position: relative;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .image-wrap:hover .image-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .image-overlay {
|
||||
opacity: 0;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.2);
|
||||
cursor: pointer;
|
||||
-webkit-transition: opacity 0.2s ease-in;
|
||||
-o-transition: opacity 0.2s ease-in;
|
||||
transition: opacity 0.2s ease-in;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .image-overlay .dashicons {
|
||||
font-size: 30px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item footer {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
padding: 15px;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item footer h3 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item footer span {
|
||||
position: relative;
|
||||
min-width: 77px;
|
||||
height: 20px;
|
||||
background-color: #5130ef;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
span.wpr-woo-builder-label {
|
||||
background-color: #7B51AD !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item footer span:after {
|
||||
display: none;
|
||||
width: 125px;
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
left: 30%;
|
||||
-webkit-transform: translateX(-50%);
|
||||
-ms-transform: translateX(-50%);
|
||||
transform: translateX(-50%);
|
||||
padding: 7px 10px;
|
||||
border-radius: 3px;
|
||||
background-color: #333;
|
||||
font-size: 12px;
|
||||
line-height: 15px;
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.4);
|
||||
box-shadow: 0 0 5px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item footer span.wpr-theme-builder-label:after {
|
||||
content: "This Kit includes Theme Builder templates.";
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item footer span.wpr-woo-builder-label:after {
|
||||
content: "This Kit includes WooCommerce Builder templates.";
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item footer span:hover:after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* TODO: News Magazine X Theme Banner (remove later) */
|
||||
.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"] .wpr-templates-kit-newsx-info {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: -10px;
|
||||
width: calc(100% - 20px);
|
||||
margin: 10px 20px;
|
||||
background: #fff;
|
||||
padding: 5px 10px;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"] .wpr-templates-kit-install-newsx {
|
||||
position: relative;
|
||||
min-width: 77px;
|
||||
height: 20px;
|
||||
background-color: #f54c48;
|
||||
box-shadow: 0 0 5px rgba(250, 51, 51, 0.3);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-newsx-info p:last-child {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* New, Hot, Trending Labels */
|
||||
.grid-item .label {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 15px;
|
||||
z-index: 1;
|
||||
padding: 6px 15px 7px;
|
||||
line-height: 1;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: -1px 1px 5px 2px rgba(0,0,0,0.2);
|
||||
box-shadow: -1px 1px 5px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.grid-item .label-new {
|
||||
background-color: #f44 ;
|
||||
}
|
||||
|
||||
.grid-item .label-hot {
|
||||
background-color: #FFA500 ;
|
||||
}
|
||||
|
||||
.grid-item .label-trending {
|
||||
background-color: #0077be ;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-expert-notice {
|
||||
padding: 0 30px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-expert-notice p {
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.05);
|
||||
box-shadow: 0 0 5px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.wpr-templates-kit-expert-notice p .dashicons:first-child,
|
||||
.wpr-templates-kit-expert-notice p strong:first-of-type {
|
||||
color: #f44;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-expert-notice p .dashicons:first-child {
|
||||
font-size: 16px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-expert-notice p .dashicons:last-child {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .grid-item a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .action-buttons-wrap {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
padding: 25px 30px;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 0 7px 0 rgba(0,0,0,0.2);
|
||||
box-shadow: 0 0 7px 0 rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.action-buttons-wrap a,
|
||||
.action-buttons-wrap button {
|
||||
padding: 5px 25px !important;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .preview-demo {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .preview-demo .dashicons {
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .import-tutorial-link {
|
||||
text-decoration: none;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .import-kit,
|
||||
.wpr-templates-kit-single .get-access {
|
||||
background: #6A4BFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .import-kit:hover,
|
||||
.wpr-templates-kit-single .import-kit:focus,
|
||||
.wpr-templates-kit-single .get-access:hover,
|
||||
.wpr-templates-kit-single .get-access:focus {
|
||||
background: #5130ef;
|
||||
color: #fff;
|
||||
-webkit-box-shadow: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .import-kit .dashicons,
|
||||
.wpr-templates-kit-single .get-access .dashicons {
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .selected-template {
|
||||
border: 1px solid #2271B1;
|
||||
-webkit-box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
|
||||
box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.import-template-buttons .import-template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-single .import-template strong {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup-wrap {
|
||||
display: none;
|
||||
position: relative;
|
||||
z-index: 9999999;
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup-wrap .overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9999999;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.wpr-import-help {
|
||||
margin-top: 20px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.wpr-import-help a {
|
||||
width: 50%;
|
||||
font-size: 12px;
|
||||
text-align: right;
|
||||
text-decoration: none;
|
||||
color: #8F5D64;
|
||||
}
|
||||
|
||||
.wpr-import-help a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.wpr-import-help a span {
|
||||
vertical-align: middle;
|
||||
margin-bottom: 2px;
|
||||
font-size: 12px !important;
|
||||
width: 12px !important;
|
||||
height: 12px !important;
|
||||
text-decoration: none !important
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup {
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%,-50%);
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
transform: translate(-50%,-50%);
|
||||
z-index: 9999999;
|
||||
width: 555px;
|
||||
background: #f5f5f5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup header {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
padding-left: 25px;
|
||||
-webkit-box-shadow: 2px 0 5px 0 rgba(0,0,0,0.2);
|
||||
box-shadow: 2px 0 5px 0 rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup .close-btn {
|
||||
display: none;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
width: 50px;
|
||||
cursor: pointer;
|
||||
border-left: 1px solid #eee;
|
||||
color: #aaa;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup .content {
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup .content p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup .progress-wrap {
|
||||
background: #fff;
|
||||
border-radius: 3px;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup .progress-wrap strong {
|
||||
padding: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpr-import-kit-popup .progress-bar {
|
||||
width: 30px;
|
||||
height: 4px;
|
||||
background: #2271B1;
|
||||
}
|
||||
|
||||
.dot-flashing {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
margin-bottom: -1px;
|
||||
position: relative;
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
border-radius: 10px;
|
||||
background-color: #3c434a;
|
||||
color: #3c434a;
|
||||
-webkit-animation: dotFlashing 1s infinite linear alternate;
|
||||
animation: dotFlashing 1s infinite linear alternate;
|
||||
-webkit-animation-delay: .5s;
|
||||
animation-delay: .5s;
|
||||
}
|
||||
|
||||
.dot-flashing::before, .dot-flashing::after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.dot-flashing::before {
|
||||
left: -6px;
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
border-radius: 10px;
|
||||
background-color: #3c434a;
|
||||
color: #3c434a;
|
||||
-webkit-animation: dotFlashing 1s infinite alternate;
|
||||
animation: dotFlashing 1s infinite alternate;
|
||||
-webkit-animation-delay: 0s;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.dot-flashing::after {
|
||||
left: 6px;
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
border-radius: 10px;
|
||||
background-color: #3c434a;
|
||||
color: #3c434a;
|
||||
-webkit-animation: dotFlashing 1s infinite alternate;
|
||||
animation: dotFlashing 1s infinite alternate;
|
||||
-webkit-animation-delay: 1s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes dotFlashing {
|
||||
0% {
|
||||
background-color: #3c434a;
|
||||
}
|
||||
50%,
|
||||
100% {
|
||||
background-color: #ebe6ff;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dotFlashing {
|
||||
0% {
|
||||
background-color: #3c434a;
|
||||
}
|
||||
50%,
|
||||
100% {
|
||||
background-color: #ebe6ff;
|
||||
}
|
||||
}
|
||||
|
||||
.wpr-templates-kit-not-found {
|
||||
display: none;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.wpr-templates-kit-not-found img {
|
||||
width: 180px !important;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-not-found h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-not-found a {
|
||||
display: inline-block;
|
||||
padding: 10px 25px;
|
||||
margin-top: 15px;
|
||||
background: #6A4BFF;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-not-found a:hover {
|
||||
background: #5836fd;
|
||||
}
|
||||
|
||||
/* Disable Notices */
|
||||
.notice:not(.wpr-plugin-update-notice),
|
||||
div.fs-notice.updated, div.fs-notice.success {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Impot Error */
|
||||
.progress-wrap.import-error .progress-bar {
|
||||
width: 100% !important;
|
||||
background-color: #ff6060;
|
||||
}
|
||||
|
||||
.progress-wrap.import-error strong span {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.wpr-import-help.import-error {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wpr-import-help.import-error a {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
background-color: #2271B1;
|
||||
font-size: 14px;
|
||||
padding: 5px 15px 6px;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wpr-import-help.import-error a span {
|
||||
font-size: 14px !important;
|
||||
width: 14px !important;
|
||||
height: 14px !important;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media screen and (max-width: 1400px) {
|
||||
.wpr-templates-kit-search input {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
.wpr-templates-kit-expert-notice {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.rek-notice {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -0,0 +1,843 @@
|
||||
/*--------------------------------------------------------------
|
||||
== General
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text-inner {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.wpr-anim-text-inner b {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text-inner b.wpr-anim-text-visible {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Rotate 1
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-1 .wpr-anim-text-inner {
|
||||
-webkit-perspective: 300px;
|
||||
perspective: 300px;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-1 b {
|
||||
opacity: 0;
|
||||
-webkit-transform-origin: 50% 100%;
|
||||
-ms-transform-origin: 50% 100%;
|
||||
transform-origin: 50% 100%;
|
||||
-webkit-transform: rotateX(180deg);
|
||||
-ms-transform: rotateX(180deg);
|
||||
transform: rotateX(180deg);
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-1 b.wpr-anim-text-visible {
|
||||
opacity: 1;
|
||||
-webkit-transform: rotateX(0deg);
|
||||
-ms-transform: rotateX(0deg);
|
||||
transform: rotateX(0deg);
|
||||
-webkit-animation: wpr-anim-text-rotate-1-in 1.2s;
|
||||
animation: wpr-anim-text-rotate-1-in 1.2s;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-1 b.wpr-anim-text-hidden {
|
||||
-webkit-transform: rotateX(180deg);
|
||||
-ms-transform: rotateX(180deg);
|
||||
transform: rotateX(180deg);
|
||||
-webkit-animation: wpr-anim-text-rotate-1-out 1.2s;
|
||||
animation: wpr-anim-text-rotate-1-out 1.2s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-rotate-1-in {
|
||||
0% {
|
||||
-webkit-transform: rotateX(180deg);
|
||||
opacity: 0;
|
||||
}
|
||||
35% {
|
||||
-webkit-transform: rotateX(120deg);
|
||||
opacity: 0;
|
||||
}
|
||||
65% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateX(360deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-rotate-1-in {
|
||||
0% {
|
||||
-webkit-transform: rotateX(180deg);
|
||||
-ms-transform: rotateX(180deg);
|
||||
transform: rotateX(180deg);
|
||||
opacity: 0;
|
||||
}
|
||||
35% {
|
||||
-webkit-transform: rotateX(120deg);
|
||||
-ms-transform: rotateX(120deg);
|
||||
transform: rotateX(120deg);
|
||||
opacity: 0;
|
||||
}
|
||||
65% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateX(360deg);
|
||||
-ms-transform: rotateX(360deg);
|
||||
transform: rotateX(360deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-rotate-1-out {
|
||||
0% {
|
||||
-webkit-transform: rotateX(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
35% {
|
||||
-webkit-transform: rotateX(-40deg);
|
||||
opacity: 1;
|
||||
}
|
||||
65% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateX(180deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-rotate-1-out {
|
||||
0% {
|
||||
-webkit-transform: rotateX(0deg);
|
||||
-ms-transform: rotateX(0deg);
|
||||
transform: rotateX(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
35% {
|
||||
-webkit-transform: rotateX(-40deg);
|
||||
-ms-transform: rotateX(-40deg);
|
||||
transform: rotateX(-40deg);
|
||||
opacity: 1;
|
||||
}
|
||||
65% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateX(180deg);
|
||||
-ms-transform: rotateX(180deg);
|
||||
transform: rotateX(180deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Typing
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-typing .wpr-anim-text-inner {
|
||||
vertical-align: top;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-typing b {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-typing b.wpr-anim-text-visible {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-typing i {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-typing i.wpr-anim-text-in {
|
||||
position: relative;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-pulse {
|
||||
0% {
|
||||
-webkit-transform: translateY(-50%) scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
40% {
|
||||
-webkit-transform: translateY(-50%) scale(0.9);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: translateY(-50%) scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-pulse {
|
||||
0% {
|
||||
-webkit-transform: translateY(-50%) scale(1);
|
||||
-ms-transform: translateY(-50%) scale(1);
|
||||
transform: translateY(-50%) scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
40% {
|
||||
-webkit-transform: translateY(-50%) scale(0.9);
|
||||
-ms-transform: translateY(-50%) scale(0.9);
|
||||
transform: translateY(-50%) scale(0.9);
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: translateY(-50%) scale(0);
|
||||
-ms-transform: translateY(-50%) scale(0);
|
||||
transform: translateY(-50%) scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Rotate 2
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-2 .wpr-anim-text-inner {
|
||||
-webkit-perspective: 300px;
|
||||
perspective: 300px;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-2 i,
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-2 em {
|
||||
display: inline-block;
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-2 b {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
||||
-webkit-transform-style: preserve-3d;
|
||||
transform-style: preserve-3d;
|
||||
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
||||
-ms-transform: translateZ(-20px) rotateX(90deg);
|
||||
transform: translateZ(-20px) rotateX(90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-2 i.wpr-anim-text-in {
|
||||
-webkit-animation: wpr-anim-text-rotate-2-in 0.4s forwards;
|
||||
animation: wpr-anim-text-rotate-2-in 0.4s forwards;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-2 i.wpr-anim-text-out {
|
||||
-webkit-animation: wpr-anim-text-rotate-2-out 0.4s forwards;
|
||||
animation: wpr-anim-text-rotate-2-out 0.4s forwards;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-2 em {
|
||||
-webkit-transform: translateZ(20px);
|
||||
-ms-transform: translateZ(20px);
|
||||
transform: translateZ(20px);
|
||||
}
|
||||
|
||||
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
||||
-webkit-transform: rotateX(0deg);
|
||||
-ms-transform: rotateX(0deg);
|
||||
transform: rotateX(0deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 i em {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 .wpr-anim-text-visible i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-rotate-2-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(-20px) rotateX(-10deg);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(-20px) rotateX(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-rotate-2-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
||||
-ms-transform: translateZ(-20px) rotateX(90deg);
|
||||
transform: translateZ(-20px) rotateX(90deg);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(-20px) rotateX(-10deg);
|
||||
-ms-transform: translateZ(-20px) rotateX(-10deg);
|
||||
transform: translateZ(-20px) rotateX(-10deg);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(-20px) rotateX(0deg);
|
||||
-ms-transform: translateZ(-20px) rotateX(0deg);
|
||||
transform: translateZ(-20px) rotateX(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-rotate-2-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(-20px) rotateX(0);
|
||||
}
|
||||
60% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(-20px) rotateX(-100deg);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(-20px) rotateX(-90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-rotate-2-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(-20px) rotateX(0);
|
||||
-ms-transform: translateZ(-20px) rotateX(0);
|
||||
transform: translateZ(-20px) rotateX(0);
|
||||
}
|
||||
60% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(-20px) rotateX(-100deg);
|
||||
-ms-transform: translateZ(-20px) rotateX(-100deg);
|
||||
transform: translateZ(-20px) rotateX(-100deg);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(-20px) rotateX(-90deg);
|
||||
-ms-transform: translateZ(-20px) rotateX(-90deg);
|
||||
transform: translateZ(-20px) rotateX(-90deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Slide
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-slide span {
|
||||
display: inline-block;
|
||||
padding: .2em 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-slide .wpr-anim-text-inner {
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-slide b {
|
||||
opacity: 0;
|
||||
top: .2em;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-slide b.wpr-anim-text-visible {
|
||||
top: 0;
|
||||
opacity: 1;
|
||||
-webkit-animation: wpr-anim-text-slide-in 0.6s;
|
||||
animation: wpr-anim-text-slide-in 0.6s;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-slide b.wpr-anim-text-hidden {
|
||||
-webkit-animation: wpr-anim-text-slide-out 0.6s;
|
||||
animation: wpr-anim-text-slide-out 0.6s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-slide-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(-100%);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(20%);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-slide-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(-100%);
|
||||
-ms-transform: translateY(-100%);
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(20%);
|
||||
-ms-transform: translateY(20%);
|
||||
transform: translateY(20%);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0);
|
||||
-ms-transform: translateY(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-slide-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0);
|
||||
}
|
||||
60% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(120%);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-slide-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateY(0);
|
||||
-ms-transform: translateY(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
60% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(120%);
|
||||
-ms-transform: translateY(120%);
|
||||
transform: translateY(120%);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateY(100%);
|
||||
-ms-transform: translateY(100%);
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Clip
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-clip span {
|
||||
display: inline-block;
|
||||
padding: .2em 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-clip .wpr-anim-text-inner {
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-clip b {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-clip b.wpr-anim-text-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Zoom
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-zoom .wpr-anim-text-inner {
|
||||
-webkit-perspective: 300px;
|
||||
perspective: 300px;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-zoom b {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-zoom b.wpr-anim-text-visible {
|
||||
opacity: 1;
|
||||
-webkit-animation: wpr-anim-text-zoom-in 0.8s;
|
||||
animation: wpr-anim-text-zoom-in 0.8s;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-zoom b.wpr-anim-text-hidden {
|
||||
-webkit-animation: wpr-anim-text-zoom-out 0.8s;
|
||||
animation: wpr-anim-text-zoom-out 0.8s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-zoom-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(100px);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-zoom-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(100px);
|
||||
-ms-transform: translateZ(100px);
|
||||
transform: translateZ(100px);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(0);
|
||||
-ms-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-zoom-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(0);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(-100px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-zoom-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateZ(0);
|
||||
-ms-transform: translateZ(0);
|
||||
transform: translateZ(0);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateZ(-100px);
|
||||
-ms-transform: translateZ(-100px);
|
||||
transform: translateZ(-100px);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Rotate-3
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-3 .wpr-anim-text-inner {
|
||||
-webkit-perspective: 300px;
|
||||
perspective: 300px;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-3 b {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
||||
display: inline-block;
|
||||
-webkit-transform: rotateY(180deg);
|
||||
-ms-transform: rotateY(180deg);
|
||||
transform: rotateY(180deg);
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
||||
-webkit-transform: rotateY(0deg);
|
||||
-ms-transform: rotateY(0deg);
|
||||
transform: rotateY(0deg);
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-3 i.wpr-anim-text-in {
|
||||
-webkit-animation: wpr-anim-text-rotate-3-in 0.6s forwards;
|
||||
animation: wpr-anim-text-rotate-3-in 0.6s forwards;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-rotate-3 i.wpr-anim-text-out {
|
||||
-webkit-animation: wpr-anim-text-rotate-3-out 0.6s forwards;
|
||||
animation: wpr-anim-text-rotate-3-out 0.6s forwards;
|
||||
}
|
||||
|
||||
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
||||
-webkit-transform: rotateY(0deg);
|
||||
-ms-transform: rotateY(0deg);
|
||||
transform: rotateY(0deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-3 .wpr-anim-text-visible i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-rotate-3-in {
|
||||
0% {
|
||||
-webkit-transform: rotateY(180deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateY(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-rotate-3-in {
|
||||
0% {
|
||||
-webkit-transform: rotateY(180deg);
|
||||
-ms-transform: rotateY(180deg);
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateY(0deg);
|
||||
-ms-transform: rotateY(0deg);
|
||||
transform: rotateY(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-rotate-3-out {
|
||||
0% {
|
||||
-webkit-transform: rotateY(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateY(-180deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-rotate-3-out {
|
||||
0% {
|
||||
-webkit-transform: rotateY(0);
|
||||
-ms-transform: rotateY(0);
|
||||
transform: rotateY(0);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateY(-180deg);
|
||||
-ms-transform: rotateY(-180deg);
|
||||
transform: rotateY(-180deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Scale
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-scale b {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-scale i {
|
||||
display: inline-block;
|
||||
opacity: 0;
|
||||
-webkit-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
}
|
||||
|
||||
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-scale i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-scale i.wpr-anim-text-in {
|
||||
-webkit-animation: wpr-anim-text-scale-up 0.6s forwards;
|
||||
animation: wpr-anim-text-scale-up 0.6s forwards;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-scale i.wpr-anim-text-out {
|
||||
-webkit-animation: wpr-anim-text-scale-down 0.6s forwards;
|
||||
animation: wpr-anim-text-scale-down 0.6s forwards;
|
||||
}
|
||||
|
||||
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-scale i {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-scale .wpr-anim-text-visible i {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-scale-up {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
60% {
|
||||
-webkit-transform: scale(1.2);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-scale-up {
|
||||
0% {
|
||||
-webkit-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
60% {
|
||||
-webkit-transform: scale(1.2);
|
||||
-ms-transform: scale(1.2);
|
||||
transform: scale(1.2);
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-scale-down {
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
60% {
|
||||
-webkit-transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-scale-down {
|
||||
0% {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
60% {
|
||||
-webkit-transform: scale(0);
|
||||
-ms-transform: scale(0);
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Push
|
||||
--------------------------------------------------------------*/
|
||||
.wpr-anim-text-type-push {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-push b {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-push b.wpr-anim-text-visible {
|
||||
opacity: 1;
|
||||
-webkit-animation: wpr-anim-text-push-in 0.6s;
|
||||
animation: wpr-anim-text-push-in 0.6s;
|
||||
}
|
||||
|
||||
.wpr-anim-text.wpr-anim-text-type-push b.wpr-anim-text-hidden {
|
||||
-webkit-animation: wpr-anim-text-push-out 0.6s;
|
||||
animation: wpr-anim-text-push-out 0.6s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-push-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(-100%);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(10%);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-push-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(-100%);
|
||||
-ms-transform: translateX(-100%);
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
60% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(10%);
|
||||
-ms-transform: translateX(10%);
|
||||
transform: translateX(10%);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(0);
|
||||
-ms-transform: translateX(0);
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes wpr-anim-text-push-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(0);
|
||||
}
|
||||
60% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(110%);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wpr-anim-text-push-out {
|
||||
0% {
|
||||
opacity: 1;
|
||||
-webkit-transform: translateX(0);
|
||||
-ms-transform: translateX(0);
|
||||
transform: translateX(0);
|
||||
}
|
||||
60% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(110%);
|
||||
-ms-transform: translateX(110%);
|
||||
transform: translateX(110%);
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
-webkit-transform: translateX(100%);
|
||||
-ms-transform: translateX(100%);
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
/*!
|
||||
* WPR Link Animations
|
||||
* Version: 1.0
|
||||
* Author: WP Royal
|
||||
* Author URL: https://royal-elementor-addons.com/
|
||||
|
||||
* WPR Animations Copyright WP Royal 2020.
|
||||
*/
|
||||
|
||||
.wpr-pointer-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wpr-pointer-double-line .wpr-pointer-item:before,
|
||||
.wpr-pointer-double-line .wpr-pointer-item:after,
|
||||
.wpr-pointer-underline .wpr-pointer-item:after,
|
||||
.wpr-pointer-overline .wpr-pointer-item:before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 4px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color: #55595c;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
||||
.wpr-pointer-fx-none .wpr-pointer-item:before,
|
||||
.wpr-pointer-fx-none .wpr-pointer-item:after {
|
||||
opacity: 0;
|
||||
-webkit-transition: none !important;
|
||||
-o-transition: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.wpr-pointer-fx-none .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-fx-none .wpr-pointer-item:hover:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-fx-fade .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:after,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
|
||||
opacity: 0;
|
||||
-webkit-transition: all 0.3s;
|
||||
-o-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:after {
|
||||
width: 0;
|
||||
-webkit-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
||||
-o-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
||||
transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:after {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
margin: 0 auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
-webkit-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
|
||||
-o-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
|
||||
-webkit-transition: all .3s ease(0, 0, 0.16, 0.95);
|
||||
-o-transition: all .3s ease(0, 0, 0.16, 0.95);
|
||||
transition: all .3s ease(0, 0, 0.16, 0.95);
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:after {
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:before {
|
||||
top: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:after {
|
||||
bottom: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx .wpr-pointer-item:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
opacity: 0;
|
||||
border: 2px solid #000;
|
||||
-webkit-transition: all 0.3s;
|
||||
-o-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx .wpr-pointer-item:hover:before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:before {
|
||||
-webkit-transform: scale(0.9);
|
||||
-ms-transform: scale(0.9);
|
||||
transform: scale(0.9);
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before {
|
||||
-webkit-transform: scale(1.1);
|
||||
-ms-transform: scale(1.1);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:hover:before {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx .wpr-pointer-item:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
background: #000;
|
||||
-webkit-transition: all 0.3s;
|
||||
-o-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx .wpr-pointer-item:hover:before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:before {
|
||||
-webkit-transform: translateY(-12%);
|
||||
-ms-transform: translateY(-12%);
|
||||
transform: translateY(-12%);
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:before {
|
||||
-webkit-transform: perspective(600px) rotateX(90deg);
|
||||
transform: perspective(600px) rotateX(90deg);
|
||||
-webkit-transform-origin: center bottom 0;
|
||||
-ms-transform-origin: center bottom 0;
|
||||
transform-origin: center bottom 0;
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:hover:before {
|
||||
-webkit-transform: perspective(600px) rotateX(0deg);
|
||||
transform: perspective(600px) rotateX(0deg);
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
/*!
|
||||
* WPR Link Animations
|
||||
* Version: 1.0
|
||||
* Author: WP Royal
|
||||
* Author URL: https://royal-elementor-addons.com/
|
||||
|
||||
* WPR Animations Copyright WP Royal 2020.
|
||||
*/
|
||||
|
||||
.wpr-pointer-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wpr-pointer-double-line .wpr-pointer-item:before,
|
||||
.wpr-pointer-double-line .wpr-pointer-item:after,
|
||||
.wpr-pointer-underline .wpr-pointer-item:after,
|
||||
.wpr-pointer-overline .wpr-pointer-item:before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 0px;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
background-color: #55595c;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
||||
.wpr-pointer-fx-none .wpr-pointer-item:before,
|
||||
.wpr-pointer-fx-none .wpr-pointer-item:after {
|
||||
opacity: 0;
|
||||
-webkit-transition: none !important;
|
||||
-o-transition: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.wpr-pointer-fx-none .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-fx-none .wpr-pointer-item:hover:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-fx-fade .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:after,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
|
||||
opacity: 0;
|
||||
-webkit-transition: all 0.3s;
|
||||
-o-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:after {
|
||||
width: 0;
|
||||
-webkit-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
||||
-o-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
||||
transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:after {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
margin: 0 auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
-webkit-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
|
||||
-o-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
|
||||
-webkit-transition: all .3s ease(0, 0, 0.16, 0.95);
|
||||
-o-transition: all .3s ease(0, 0, 0.16, 0.95);
|
||||
transition: all .3s ease(0, 0, 0.16, 0.95);
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:after {
|
||||
opacity: 1;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:before {
|
||||
top: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
}
|
||||
|
||||
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:after {
|
||||
bottom: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx .wpr-pointer-item:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
opacity: 0;
|
||||
border: 2px solid #000;
|
||||
-webkit-transition: all 0.3s;
|
||||
-o-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx .wpr-pointer-item:hover:before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:before {
|
||||
-webkit-transform: scale(0.9);
|
||||
-ms-transform: scale(0.9);
|
||||
transform: scale(0.9);
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before {
|
||||
-webkit-transform: scale(1.1);
|
||||
-ms-transform: scale(1.1);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:hover:before {
|
||||
-webkit-transform: scale(1);
|
||||
-ms-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx .wpr-pointer-item:before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
background: #000;
|
||||
-webkit-transition: all 0.3s;
|
||||
-o-transition: all 0.3s;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx .wpr-pointer-item:hover:before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:before {
|
||||
-webkit-transform: translateY(-12%);
|
||||
-ms-transform: translateY(-12%);
|
||||
transform: translateY(-12%);
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:before {
|
||||
-webkit-transform: perspective(600px) rotateX(90deg);
|
||||
transform: perspective(600px) rotateX(90deg);
|
||||
-webkit-transform-origin: center bottom 0;
|
||||
-ms-transform-origin: center bottom 0;
|
||||
transform-origin: center bottom 0;
|
||||
}
|
||||
|
||||
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:hover:before {
|
||||
-webkit-transform: perspective(600px) rotateX(0deg);
|
||||
transform: perspective(600px) rotateX(0deg);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
.bricklayer {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.bricklayer-column-sizer {
|
||||
width: 100%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 640px) {
|
||||
.bricklayer-column-sizer {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 980px) {
|
||||
.bricklayer-column-sizer {
|
||||
width: 33.333%;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1200px) {
|
||||
.bricklayer-column-sizer {
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
.bricklayer-column {
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.bricklayer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.bricklayer-column-sizer{width:100%;display:none}@media screen and (min-width:640px){.bricklayer-column-sizer{width:50%}}@media screen and (min-width:980px){.bricklayer-column-sizer{width:33.333%}}@media screen and (min-width:1200px){.bricklayer-column-sizer{width:25%}}.bricklayer-column{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;padding-left:5px;padding-right:5px}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
<json>
|
||||
<![CDATA[
|
||||
{
|
||||
"fontFamily": "lg",
|
||||
"majorVersion": 1,
|
||||
"minorVersion": 0,
|
||||
"fontURL": "https://github.com/sachinchoolur/lightGallery",
|
||||
"copyright": "sachin",
|
||||
"license": "MLT",
|
||||
"licenseURL": "http://opensource.org/licenses/MIT",
|
||||
"version": "Version 1.0",
|
||||
"fontId": "lg",
|
||||
"psName": "lg",
|
||||
"subFamily": "Regular",
|
||||
"fullName": "lg",
|
||||
"description": "Font generated by IcoMoon."
|
||||
}
|
||||
]]>
|
||||
</json>
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="lg" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="pause_circle_outline" data-tags="pause_circle_outline" d="M554 256.667v340h86v-340h-86zM512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM384 256.667v340h86v-340h-86z" />
|
||||
<glyph unicode="" glyph-name="play_circle_outline" data-tags="play_circle_outline" d="M512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM426 234.667v384l256-192z" />
|
||||
<glyph unicode="" glyph-name="stack-2" data-tags="stack-2" d="M384 853.334h426.667q53 0 90.5-37.5t37.5-90.5v-426.667q0-53-37.5-90.5t-90.5-37.5h-426.667q-53 0-90.5 37.5t-37.5 90.5v426.667q0 53 37.5 90.5t90.5 37.5zM170.667 675.334v-547.333q0-17.667 12.5-30.167t30.167-12.5h547.333q-13.333-37.667-46.333-61.5t-74.333-23.833h-426.667q-53 0-90.5 37.5t-37.5 90.5v426.667q0 41.333 23.833 74.333t61.5 46.333zM810.667 768h-426.667q-17.667 0-30.167-12.5t-12.5-30.167v-426.667q0-17.667 12.5-30.167t30.167-12.5h426.667q17.667 0 30.167 12.5t12.5 30.167v426.667q0 17.667-12.5 30.167t-30.167 12.5z" />
|
||||
<glyph unicode="" glyph-name="clear" data-tags="clear" d="M810 664.667l-238-238 238-238-60-60-238 238-238-238-60 60 238 238-238 238 60 60 238-238 238 238z" />
|
||||
<glyph unicode="" glyph-name="arrow-left" data-tags="arrow-left" d="M426.667 768q17.667 0 30.167-12.5t12.5-30.167q0-18-12.667-30.333l-225.667-225.667h665q17.667 0 30.167-12.5t12.5-30.167-12.5-30.167-30.167-12.5h-665l225.667-225.667q12.667-12.333 12.667-30.333 0-17.667-12.5-30.167t-30.167-12.5q-18 0-30.333 12.333l-298.667 298.667q-12.333 13-12.333 30.333t12.333 30.333l298.667 298.667q12.667 12.333 30.333 12.333z" />
|
||||
<glyph unicode="" glyph-name="arrow-right" data-tags="arrow-right" d="M597.333 768q18 0 30.333-12.333l298.667-298.667q12.333-12.333 12.333-30.333t-12.333-30.333l-298.667-298.667q-12.333-12.333-30.333-12.333-18.333 0-30.5 12.167t-12.167 30.5q0 18 12.333 30.333l226 225.667h-665q-17.667 0-30.167 12.5t-12.5 30.167 12.5 30.167 30.167 12.5h665l-226 225.667q-12.333 12.333-12.333 30.333 0 18.333 12.167 30.5t30.5 12.167z" />
|
||||
<glyph unicode="" glyph-name="vertical_align_bottom" data-tags="vertical_align_bottom" d="M170 128.667h684v-86h-684v86zM682 384.667l-170-172-170 172h128v426h84v-426h128z" />
|
||||
<glyph unicode="" glyph-name="apps" data-tags="apps" d="M682 84.667v172h172v-172h-172zM682 340.667v172h172v-172h-172zM426 596.667v172h172v-172h-172zM682 768.667h172v-172h-172v172zM426 340.667v172h172v-172h-172zM170 340.667v172h172v-172h-172zM170 84.667v172h172v-172h-172zM426 84.667v172h172v-172h-172zM170 596.667v172h172v-172h-172z" />
|
||||
<glyph unicode="" glyph-name="fullscreen" data-tags="fullscreen" d="M598 724.667h212v-212h-84v128h-128v84zM726 212.667v128h84v-212h-212v84h128zM214 512.667v212h212v-84h-128v-128h-84zM298 340.667v-128h128v-84h-212v212h84z" />
|
||||
<glyph unicode="" glyph-name="fullscreen_exit" data-tags="fullscreen_exit" d="M682 596.667h128v-84h-212v212h84v-128zM598 128.667v212h212v-84h-128v-128h-84zM342 596.667v128h84v-212h-212v84h128zM214 256.667v84h212v-212h-84v128h-128z" />
|
||||
<glyph unicode="" glyph-name="zoom_in" data-tags="zoom_in" d="M512 512.667h-86v-86h-42v86h-86v42h86v86h42v-86h86v-42zM406 340.667q80 0 136 56t56 136-56 136-136 56-136-56-56-136 56-136 136-56zM662 340.667l212-212-64-64-212 212v34l-12 12q-76-66-180-66-116 0-197 80t-81 196 81 197 197 81 196-81 80-197q0-104-66-180l12-12h34z" />
|
||||
<glyph unicode="" glyph-name="zoom_out" data-tags="zoom_out" d="M298 554.667h214v-42h-214v42zM406 340.667q80 0 136 56t56 136-56 136-136 56-136-56-56-136 56-136 136-56zM662 340.667l212-212-64-64-212 212v34l-12 12q-76-66-180-66-116 0-197 80t-81 196 81 197 197 81 196-81 80-197q0-104-66-180l12-12h34z" />
|
||||
<glyph unicode="" glyph-name="share" data-tags="share" d="M768 252.667c68 0 124-56 124-124s-56-126-124-126-124 58-124 126c0 10 0 20 2 28l-302 176c-24-22-54-34-88-34-70 0-128 58-128 128s58 128 128 128c34 0 64-12 88-34l300 174c-2 10-4 20-4 30 0 70 58 128 128 128s128-58 128-128-58-128-128-128c-34 0-64 14-88 36l-300-176c2-10 4-20 4-30s-2-20-4-30l304-176c22 20 52 32 84 32z" />
|
||||
<glyph unicode="" glyph-name="facebook-with-circle" data-tags="facebook-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM628.429 612.659h-73.882c-8.755 0-18.483-11.52-18.483-26.829v-53.35h92.416l-13.978-76.083h-78.438v-228.403h-87.194v228.403h-79.104v76.083h79.104v44.749c0 64.205 44.544 116.378 105.677 116.378h73.882v-80.947z" />
|
||||
<glyph unicode="" glyph-name="google-with-circle" data-tags="google+-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM483.686 249.805c-30.874-15.002-64.102-16.589-76.954-16.589-2.458 0-3.84 0-3.84 0s-1.178 0-2.765 0c-20.070 0-119.962 4.608-119.962 95.59 0 89.395 108.8 96.41 142.131 96.41h0.87c-19.251 25.702-15.258 51.61-15.258 51.61-1.69-0.102-4.147-0.205-7.168-0.205-12.544 0-36.762 1.997-57.549 15.411-25.498 16.384-38.4 44.288-38.4 82.893 0 109.107 119.142 113.51 120.32 113.613h118.989v-2.611c0-13.312-23.91-15.923-40.192-18.125-5.53-0.819-16.64-1.894-19.763-3.482 30.157-16.128 35.021-41.421 35.021-79.104 0-42.906-16.794-65.587-34.611-81.51-11.059-9.882-19.712-17.613-19.712-28.006 0-10.189 11.878-20.582 25.702-32.717 22.579-19.917 53.555-47.002 53.555-92.723 0-47.258-20.326-81.050-60.416-100.454zM742.4 460.8h-76.8v-76.8h-51.2v76.8h-76.8v51.2h76.8v76.8h51.2v-76.8h76.8v-51.2zM421.018 401.92c-2.662 0-5.325-0.102-8.038-0.307-22.733-1.69-43.725-10.189-58.88-24.013-15.053-13.619-22.733-30.822-21.658-48.179 2.304-36.403 41.37-57.702 88.832-54.323 46.694 3.379 77.824 30.31 75.571 66.714-2.15 34.202-31.898 60.109-75.827 60.109zM465.766 599.808c-12.39 43.52-32.358 56.422-63.386 56.422-3.328 0-6.707-0.512-9.933-1.382-13.466-3.84-24.166-15.053-30.106-31.744-6.093-16.896-6.451-34.509-1.229-54.579 9.472-35.891 34.97-61.901 60.672-61.901 3.379 0 6.758 0.41 9.933 1.382 28.109 7.885 45.722 50.79 34.048 91.802z" />
|
||||
<glyph unicode="" glyph-name="pinterest-with-circle" data-tags="pinterest-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM545.638 344.32c-31.539 2.406-44.749 18.022-69.427 32.973-13.568-71.219-30.157-139.52-79.309-175.206-15.206 107.725 22.221 188.518 39.629 274.381-29.645 49.92 3.533 150.323 66.099 125.645 76.954-30.515-66.662-185.6 29.747-205.005 100.659-20.173 141.773 174.694 79.36 237.978-90.214 91.494-262.502 2.099-241.306-128.87 5.12-32 38.246-41.728 13.21-85.914-57.702 12.8-74.957 58.317-72.704 118.989 3.533 99.328 89.242 168.909 175.155 178.483 108.698 12.083 210.688-39.885 224.819-142.182 15.821-115.405-49.101-240.282-165.274-231.27z" />
|
||||
<glyph unicode="" glyph-name="twitter-with-circle" data-tags="twitter-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM711.936 549.683c0.205-4.198 0.256-8.397 0.256-12.493 0-128-97.331-275.507-275.405-275.507-54.682 0-105.574 15.974-148.378 43.52 7.526-0.922 15.258-1.28 23.091-1.28 45.363 0 87.091 15.411 120.218 41.421-42.342 0.819-78.080 28.774-90.419 67.174 5.888-1.075 11.93-1.69 18.176-1.69 8.806 0 17.408 1.178 25.498 3.379-44.288 8.909-77.67 48.026-77.67 94.925v1.178c13.056-7.219 28.006-11.622 43.878-12.134-26.010 17.408-43.059 47.002-43.059 80.64 0 17.715 4.762 34.406 13.107 48.691 47.77-58.573 119.040-97.075 199.526-101.222-1.69 7.117-2.509 14.49-2.509 22.118 0 53.402 43.315 96.819 96.819 96.819 27.802 0 52.992-11.776 70.656-30.618 22.067 4.403 42.752 12.39 61.44 23.501-7.219-22.579-22.528-41.574-42.547-53.606 19.61 2.406 38.246 7.578 55.603 15.309-12.954-19.405-29.389-36.506-48.282-50.125z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,982 @@
|
||||
/*! lightgallery - v1.6.12 - 2019-02-19
|
||||
* http://sachinchoolur.github.io/lightGallery/
|
||||
* Copyright (c) 2019 Sachin N; Licensed GPLv3 */
|
||||
@font-face {
|
||||
font-family: 'lg';
|
||||
src: url("fonts/lg.eot?n1z373");
|
||||
src: url("fonts/lg.eot?#iefixn1z373") format("embedded-opentype"), url("fonts/lg.woff?n1z373") format("woff"), url("fonts/lg.ttf?n1z373") format("truetype"), url("fonts/lg.svg?n1z373#lg") format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
.lg-icon {
|
||||
font-family: 'lg';
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.lg-actions .lg-next, .lg-actions .lg-prev {
|
||||
background-color: rgba(0, 0, 0, 0.45);
|
||||
border-radius: 2px;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
font-size: 22px;
|
||||
margin-top: -10px;
|
||||
padding: 8px 10px 9px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 1080;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
.lg-actions .lg-next.disabled, .lg-actions .lg-prev.disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.lg-actions .lg-next:hover, .lg-actions .lg-prev:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
.lg-actions .lg-next {
|
||||
right: 20px;
|
||||
}
|
||||
.lg-actions .lg-next:before {
|
||||
content: "\e095";
|
||||
}
|
||||
.lg-actions .lg-prev {
|
||||
left: 20px;
|
||||
}
|
||||
.lg-actions .lg-prev:after {
|
||||
content: "\e094";
|
||||
}
|
||||
|
||||
@-webkit-keyframes lg-right-end {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
50% {
|
||||
left: -30px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@-moz-keyframes lg-right-end {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
50% {
|
||||
left: -30px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@-ms-keyframes lg-right-end {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
50% {
|
||||
left: -30px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@keyframes lg-right-end {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
50% {
|
||||
left: -30px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes lg-left-end {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
50% {
|
||||
left: 30px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@-moz-keyframes lg-left-end {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
50% {
|
||||
left: 30px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@-ms-keyframes lg-left-end {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
50% {
|
||||
left: 30px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@keyframes lg-left-end {
|
||||
0% {
|
||||
left: 0;
|
||||
}
|
||||
50% {
|
||||
left: 30px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.lg-outer.lg-right-end .lg-object {
|
||||
-webkit-animation: lg-right-end 0.3s;
|
||||
-o-animation: lg-right-end 0.3s;
|
||||
animation: lg-right-end 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
.lg-outer.lg-left-end .lg-object {
|
||||
-webkit-animation: lg-left-end 0.3s;
|
||||
-o-animation: lg-left-end 0.3s;
|
||||
animation: lg-left-end 0.3s;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.lg-toolbar {
|
||||
z-index: 1082;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.45);
|
||||
}
|
||||
.lg-toolbar .lg-icon {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-size: 24px;
|
||||
height: 47px;
|
||||
line-height: 27px;
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
width: 50px;
|
||||
text-decoration: none !important;
|
||||
outline: medium none;
|
||||
-webkit-transition: color 0.2s linear;
|
||||
-o-transition: color 0.2s linear;
|
||||
transition: color 0.2s linear;
|
||||
}
|
||||
.lg-toolbar .lg-icon:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
.lg-toolbar .lg-close:after {
|
||||
content: "\e070";
|
||||
}
|
||||
.lg-toolbar .lg-download:after {
|
||||
content: "\e0f2";
|
||||
}
|
||||
|
||||
.lg-sub-html {
|
||||
background-color: rgba(0, 0, 0, 0.45);
|
||||
bottom: 0;
|
||||
color: #EEE;
|
||||
font-size: 16px;
|
||||
left: 0;
|
||||
padding: 10px 40px;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
z-index: 1080;
|
||||
}
|
||||
.lg-sub-html h4 {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.lg-sub-html p {
|
||||
font-size: 12px;
|
||||
margin: 5px 0 0;
|
||||
}
|
||||
|
||||
#lg-counter {
|
||||
color: #999;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
padding-left: 20px;
|
||||
padding-top: 12px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.lg-toolbar, .lg-prev, .lg-next {
|
||||
opacity: 1;
|
||||
-webkit-transition: -webkit-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
|
||||
-moz-transition: -moz-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
|
||||
-o-transition: -o-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
|
||||
transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
|
||||
}
|
||||
|
||||
.lg-hide-items .lg-prev {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(-10px, 0, 0);
|
||||
transform: translate3d(-10px, 0, 0);
|
||||
}
|
||||
.lg-hide-items .lg-next {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(10px, 0, 0);
|
||||
transform: translate3d(10px, 0, 0);
|
||||
}
|
||||
.lg-hide-items .lg-toolbar {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, -10px, 0);
|
||||
transform: translate3d(0, -10px, 0);
|
||||
}
|
||||
|
||||
body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object {
|
||||
-webkit-transform: scale3d(0.5, 0.5, 0.5);
|
||||
transform: scale3d(0.5, 0.5, 0.5);
|
||||
opacity: 0;
|
||||
-webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
|
||||
-moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
|
||||
-o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
|
||||
transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
|
||||
-webkit-transform-origin: 50% 50%;
|
||||
-moz-transform-origin: 50% 50%;
|
||||
-ms-transform-origin: 50% 50%;
|
||||
transform-origin: 50% 50%;
|
||||
}
|
||||
body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object {
|
||||
-webkit-transform: scale3d(1, 1, 1);
|
||||
transform: scale3d(1, 1, 1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.lg-outer .lg-thumb-outer {
|
||||
background-color: #0D0A0A;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: 1080;
|
||||
max-height: 350px;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
}
|
||||
.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item {
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: -o-grab;
|
||||
cursor: -ms-grab;
|
||||
cursor: grab;
|
||||
}
|
||||
.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item {
|
||||
cursor: move;
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
cursor: -o-grabbing;
|
||||
cursor: -ms-grabbing;
|
||||
cursor: grabbing;
|
||||
}
|
||||
.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb {
|
||||
-webkit-transition-duration: 0s !important;
|
||||
transition-duration: 0s !important;
|
||||
}
|
||||
.lg-outer.lg-thumb-open .lg-thumb-outer {
|
||||
-webkit-transform: translate3d(0, 0%, 0);
|
||||
transform: translate3d(0, 0%, 0);
|
||||
}
|
||||
.lg-outer .lg-thumb {
|
||||
padding: 10px 0;
|
||||
height: 100%;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
.lg-outer .lg-thumb-item {
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
border: 2px solid #FFF;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
@media (min-width: 1025px) {
|
||||
.lg-outer .lg-thumb-item {
|
||||
-webkit-transition: border-color 0.25s ease;
|
||||
-o-transition: border-color 0.25s ease;
|
||||
transition: border-color 0.25s ease;
|
||||
}
|
||||
}
|
||||
.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover {
|
||||
border-color: #a90707;
|
||||
}
|
||||
.lg-outer .lg-thumb-item img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.lg-outer.lg-has-thumb .lg-item {
|
||||
padding-bottom: 120px;
|
||||
}
|
||||
.lg-outer.lg-can-toggle .lg-item {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.lg-outer.lg-pull-caption-up .lg-sub-html {
|
||||
-webkit-transition: bottom 0.25s ease;
|
||||
-o-transition: bottom 0.25s ease;
|
||||
transition: bottom 0.25s ease;
|
||||
}
|
||||
.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html {
|
||||
bottom: 100px;
|
||||
}
|
||||
.lg-outer .lg-toogle-thumb {
|
||||
background-color: #0D0A0A;
|
||||
border-radius: 2px 2px 0 0;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
font-size: 24px;
|
||||
height: 39px;
|
||||
line-height: 27px;
|
||||
padding: 5px 0;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
text-align: center;
|
||||
top: -39px;
|
||||
width: 50px;
|
||||
}
|
||||
.lg-outer .lg-toogle-thumb:after {
|
||||
content: "\e1ff";
|
||||
}
|
||||
.lg-outer .lg-toogle-thumb:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.lg-outer .lg-video-cont {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
max-width: 1140px;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
padding: 0 5px;
|
||||
}
|
||||
.lg-outer .lg-video {
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding-bottom: 56.25%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.lg-outer .lg-video .lg-object {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
.lg-outer .lg-video .lg-video-play {
|
||||
width: 84px;
|
||||
height: 59px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -42px;
|
||||
margin-top: -30px;
|
||||
z-index: 1080;
|
||||
cursor: pointer;
|
||||
}
|
||||
.lg-outer .lg-has-iframe .lg-video {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
}
|
||||
.lg-outer .lg-has-vimeo .lg-video-play {
|
||||
/* background: url("img/vimeo-play.png") no-repeat scroll 0 0 transparent; */
|
||||
}
|
||||
.lg-outer .lg-has-vimeo:hover .lg-video-play {
|
||||
/* background: url("img/vimeo-play.png") no-repeat scroll 0 -58px transparent; */
|
||||
}
|
||||
.lg-outer .lg-has-html5 .lg-video-play {
|
||||
/* background: transparent url("img/video-play.png") no-repeat scroll 0 0; */
|
||||
height: 64px;
|
||||
margin-left: -32px;
|
||||
margin-top: -32px;
|
||||
width: 64px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
.lg-outer .lg-has-html5:hover .lg-video-play {
|
||||
opacity: 1;
|
||||
}
|
||||
.lg-outer .lg-has-youtube .lg-video-play {
|
||||
/* background: url("img/youtube-play.png") no-repeat scroll 0 0 transparent; */
|
||||
}
|
||||
.lg-outer .lg-has-youtube:hover .lg-video-play {
|
||||
/* background: url("img/youtube-play.png") no-repeat scroll 0 -60px transparent; */
|
||||
}
|
||||
.lg-outer .lg-video-object {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.lg-outer .lg-has-video .lg-video-object {
|
||||
visibility: hidden;
|
||||
}
|
||||
.lg-outer .lg-has-video.lg-video-playing .lg-object, .lg-outer .lg-has-video.lg-video-playing .lg-video-play {
|
||||
display: none;
|
||||
}
|
||||
.lg-outer .lg-has-video.lg-video-playing .lg-video-object {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.lg-progress-bar {
|
||||
background-color: #333;
|
||||
height: 5px;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1083;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.08s ease 0s;
|
||||
-moz-transition: opacity 0.08s ease 0s;
|
||||
-o-transition: opacity 0.08s ease 0s;
|
||||
transition: opacity 0.08s ease 0s;
|
||||
}
|
||||
.lg-progress-bar .lg-progress {
|
||||
background-color: #a90707;
|
||||
height: 5px;
|
||||
width: 0;
|
||||
}
|
||||
.lg-progress-bar.lg-start .lg-progress {
|
||||
width: 100%;
|
||||
}
|
||||
.lg-show-autoplay .lg-progress-bar {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.lg-autoplay-button:after {
|
||||
content: "\e01d";
|
||||
}
|
||||
.lg-show-autoplay .lg-autoplay-button:after {
|
||||
content: "\e01a";
|
||||
}
|
||||
|
||||
.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, .lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image {
|
||||
-webkit-transition-duration: 0s;
|
||||
transition-duration: 0s;
|
||||
}
|
||||
.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
|
||||
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
}
|
||||
.lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
|
||||
-webkit-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-moz-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
-o-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
|
||||
}
|
||||
.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image {
|
||||
-webkit-transform: scale3d(1, 1, 1);
|
||||
transform: scale3d(1, 1, 1);
|
||||
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
|
||||
-moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
|
||||
-o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
|
||||
transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
|
||||
-webkit-transform-origin: 0 0;
|
||||
-moz-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
#lg-zoom-in:after {
|
||||
content: "\e311";
|
||||
}
|
||||
|
||||
#lg-actual-size {
|
||||
font-size: 20px;
|
||||
}
|
||||
#lg-actual-size:after {
|
||||
content: "\e033";
|
||||
}
|
||||
|
||||
#lg-zoom-out {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
#lg-zoom-out:after {
|
||||
content: "\e312";
|
||||
}
|
||||
.lg-zoomed #lg-zoom-out {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.lg-outer .lg-pager-outer {
|
||||
bottom: 60px;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
z-index: 1080;
|
||||
height: 10px;
|
||||
}
|
||||
.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont {
|
||||
overflow: visible;
|
||||
}
|
||||
.lg-outer .lg-pager-cont {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
margin: 0 5px;
|
||||
}
|
||||
.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont {
|
||||
opacity: 1;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.lg-outer .lg-pager-cont.lg-pager-active .lg-pager {
|
||||
box-shadow: 0 0 0 2px white inset;
|
||||
}
|
||||
.lg-outer .lg-pager-thumb-cont {
|
||||
background-color: #fff;
|
||||
color: #FFF;
|
||||
bottom: 100%;
|
||||
height: 83px;
|
||||
left: 0;
|
||||
margin-bottom: 20px;
|
||||
margin-left: -60px;
|
||||
opacity: 0;
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
width: 120px;
|
||||
border-radius: 3px;
|
||||
-webkit-transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s;
|
||||
-moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s;
|
||||
-o-transition: opacity 0.15s ease 0s, -o-transform 0.15s ease 0s;
|
||||
transition: opacity 0.15s ease 0s, transform 0.15s ease 0s;
|
||||
-webkit-transform: translate3d(0, 5px, 0);
|
||||
transform: translate3d(0, 5px, 0);
|
||||
}
|
||||
.lg-outer .lg-pager-thumb-cont img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.lg-outer .lg-pager {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset;
|
||||
display: block;
|
||||
height: 12px;
|
||||
-webkit-transition: box-shadow 0.3s ease 0s;
|
||||
-o-transition: box-shadow 0.3s ease 0s;
|
||||
transition: box-shadow 0.3s ease 0s;
|
||||
width: 12px;
|
||||
}
|
||||
.lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus {
|
||||
box-shadow: 0 0 0 8px white inset;
|
||||
}
|
||||
.lg-outer .lg-caret {
|
||||
border-left: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-top: 10px dashed;
|
||||
bottom: -10px;
|
||||
display: inline-block;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
position: absolute;
|
||||
vertical-align: middle;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.lg-fullscreen:after {
|
||||
content: "\e20c";
|
||||
}
|
||||
.lg-fullscreen-on .lg-fullscreen:after {
|
||||
content: "\e20d";
|
||||
}
|
||||
|
||||
.lg-outer #lg-dropdown-overlay {
|
||||
background-color: rgba(0, 0, 0, 0.25);
|
||||
bottom: 0;
|
||||
cursor: default;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 1081;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
-webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
|
||||
-o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
|
||||
transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
|
||||
}
|
||||
.lg-outer.lg-dropdown-active .lg-dropdown, .lg-outer.lg-dropdown-active #lg-dropdown-overlay {
|
||||
-webkit-transition-delay: 0s;
|
||||
transition-delay: 0s;
|
||||
-moz-transform: translate3d(0, 0px, 0);
|
||||
-o-transform: translate3d(0, 0px, 0);
|
||||
-ms-transform: translate3d(0, 0px, 0);
|
||||
-webkit-transform: translate3d(0, 0px, 0);
|
||||
transform: translate3d(0, 0px, 0);
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
.lg-outer.lg-dropdown-active #lg-share {
|
||||
color: #FFF;
|
||||
}
|
||||
.lg-outer .lg-dropdown {
|
||||
background-color: #fff;
|
||||
border-radius: 2px;
|
||||
font-size: 14px;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
text-align: left;
|
||||
top: 50px;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
-moz-transform: translate3d(0, 5px, 0);
|
||||
-o-transform: translate3d(0, 5px, 0);
|
||||
-ms-transform: translate3d(0, 5px, 0);
|
||||
-webkit-transform: translate3d(0, 5px, 0);
|
||||
transform: translate3d(0, 5px, 0);
|
||||
-webkit-transition: -webkit-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
|
||||
-moz-transition: -moz-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
|
||||
-o-transition: -o-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
|
||||
transition: transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
|
||||
}
|
||||
.lg-outer .lg-dropdown:after {
|
||||
content: "";
|
||||
display: block;
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
border: 8px solid transparent;
|
||||
border-bottom-color: #FFF;
|
||||
right: 16px;
|
||||
top: -16px;
|
||||
}
|
||||
.lg-outer .lg-dropdown > li:last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.lg-outer .lg-dropdown > li:hover a, .lg-outer .lg-dropdown > li:hover .lg-icon {
|
||||
color: #333;
|
||||
}
|
||||
.lg-outer .lg-dropdown a {
|
||||
color: #333;
|
||||
display: block;
|
||||
white-space: pre;
|
||||
padding: 4px 12px;
|
||||
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
.lg-outer .lg-dropdown a:hover {
|
||||
background-color: rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
.lg-outer .lg-dropdown .lg-dropdown-text {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
margin-top: -3px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.lg-outer .lg-dropdown .lg-icon {
|
||||
color: #333;
|
||||
display: inline-block;
|
||||
float: none;
|
||||
font-size: 20px;
|
||||
height: auto;
|
||||
line-height: 1;
|
||||
margin-right: 8px;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
width: auto;
|
||||
}
|
||||
.lg-outer #lg-share {
|
||||
position: relative;
|
||||
}
|
||||
.lg-outer #lg-share:after {
|
||||
content: "\e80d";
|
||||
}
|
||||
.lg-outer #lg-share-facebook .lg-icon {
|
||||
color: #3b5998;
|
||||
}
|
||||
.lg-outer #lg-share-facebook .lg-icon:after {
|
||||
content: "\e901";
|
||||
}
|
||||
.lg-outer #lg-share-twitter .lg-icon {
|
||||
color: #00aced;
|
||||
}
|
||||
.lg-outer #lg-share-twitter .lg-icon:after {
|
||||
content: "\e904";
|
||||
}
|
||||
.lg-outer #lg-share-googleplus .lg-icon {
|
||||
color: #dd4b39;
|
||||
}
|
||||
.lg-outer #lg-share-googleplus .lg-icon:after {
|
||||
content: "\e902";
|
||||
}
|
||||
.lg-outer #lg-share-pinterest .lg-icon {
|
||||
color: #cb2027;
|
||||
}
|
||||
.lg-outer #lg-share-pinterest .lg-icon:after {
|
||||
content: "\e903";
|
||||
}
|
||||
|
||||
.lg-group:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.lg-outer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
text-align: left;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.15s ease 0s;
|
||||
-o-transition: opacity 0.15s ease 0s;
|
||||
transition: opacity 0.15s ease 0s;
|
||||
}
|
||||
.lg-outer * {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.lg-outer.lg-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
.lg-outer.lg-css3 .lg-item.lg-prev-slide, .lg-outer.lg-css3 .lg-item.lg-next-slide, .lg-outer.lg-css3 .lg-item.lg-current {
|
||||
-webkit-transition-duration: inherit !important;
|
||||
transition-duration: inherit !important;
|
||||
-webkit-transition-timing-function: inherit !important;
|
||||
transition-timing-function: inherit !important;
|
||||
}
|
||||
.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current {
|
||||
-webkit-transition-duration: 0s !important;
|
||||
transition-duration: 0s !important;
|
||||
opacity: 1;
|
||||
}
|
||||
.lg-outer.lg-grab img.lg-object {
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: -o-grab;
|
||||
cursor: -ms-grab;
|
||||
cursor: grab;
|
||||
}
|
||||
.lg-outer.lg-grabbing img.lg-object {
|
||||
cursor: move;
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
cursor: -o-grabbing;
|
||||
cursor: -ms-grabbing;
|
||||
cursor: grabbing;
|
||||
}
|
||||
.lg-outer .lg {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
.lg-outer .lg-inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.lg-outer .lg-item {
|
||||
/* background: url("img/loading.gif") no-repeat scroll center center transparent; */
|
||||
display: none !important;
|
||||
}
|
||||
.lg-outer.lg-css3 .lg-prev-slide, .lg-outer.lg-css3 .lg-current, .lg-outer.lg-css3 .lg-next-slide {
|
||||
display: inline-block !important;
|
||||
}
|
||||
.lg-outer.lg-css .lg-current {
|
||||
display: inline-block !important;
|
||||
}
|
||||
.lg-outer .lg-item, .lg-outer .lg-img-wrap {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.lg-outer .lg-item:before, .lg-outer .lg-img-wrap:before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 50%;
|
||||
width: 1px;
|
||||
margin-right: -1px;
|
||||
}
|
||||
.lg-outer .lg-img-wrap {
|
||||
position: absolute;
|
||||
padding: 0 5px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.lg-outer .lg-item.lg-complete {
|
||||
background-image: none;
|
||||
}
|
||||
.lg-outer .lg-item.lg-current {
|
||||
z-index: 1060;
|
||||
}
|
||||
.lg-outer .lg-image {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
.lg-outer.lg-show-after-load .lg-item .lg-object, .lg-outer.lg-show-after-load .lg-item .lg-video-play {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.15s ease 0s;
|
||||
-o-transition: opacity 0.15s ease 0s;
|
||||
transition: opacity 0.15s ease 0s;
|
||||
}
|
||||
.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object, .lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play {
|
||||
opacity: 1;
|
||||
}
|
||||
.lg-outer .lg-empty-html {
|
||||
display: none;
|
||||
}
|
||||
.lg-outer.lg-hide-download #lg-download {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.lg-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1040;
|
||||
background-color: #000;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.15s ease 0s;
|
||||
-o-transition: opacity 0.15s ease 0s;
|
||||
transition: opacity 0.15s ease 0s;
|
||||
}
|
||||
.lg-backdrop.in {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.lg-css3.lg-no-trans .lg-prev-slide, .lg-css3.lg-no-trans .lg-next-slide, .lg-css3.lg-no-trans .lg-current {
|
||||
-webkit-transition: none 0s ease 0s !important;
|
||||
-moz-transition: none 0s ease 0s !important;
|
||||
-o-transition: none 0s ease 0s !important;
|
||||
transition: none 0s ease 0s !important;
|
||||
}
|
||||
.lg-css3.lg-use-css3 .lg-item {
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
.lg-css3.lg-use-left .lg-item {
|
||||
-webkit-backface-visibility: hidden;
|
||||
-moz-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
.lg-css3.lg-fade .lg-item {
|
||||
opacity: 0;
|
||||
}
|
||||
.lg-css3.lg-fade .lg-item.lg-current {
|
||||
opacity: 1;
|
||||
}
|
||||
.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current {
|
||||
-webkit-transition: opacity 0.1s ease 0s;
|
||||
-moz-transition: opacity 0.1s ease 0s;
|
||||
-o-transition: opacity 0.1s ease 0s;
|
||||
transition: opacity 0.1s ease 0s;
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-css3 .lg-item {
|
||||
opacity: 0;
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide {
|
||||
-webkit-transform: translate3d(-100%, 0, 0);
|
||||
transform: translate3d(-100%, 0, 0);
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide {
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
opacity: 1;
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current {
|
||||
-webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
|
||||
-moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
|
||||
-o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
|
||||
transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-left .lg-item {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide {
|
||||
left: -100%;
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide {
|
||||
left: 100%;
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-left .lg-item.lg-current {
|
||||
left: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-current {
|
||||
-webkit-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
|
||||
-moz-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
|
||||
-o-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
|
||||
transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=lightgallery.css.map */
|
||||
|
After Width: | Height: | Size: 790 B |
|
After Width: | Height: | Size: 424 B |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 263 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 427 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 125 KiB |
@@ -0,0 +1,411 @@
|
||||
( function( $ ) {//TODO: manage comments
|
||||
|
||||
"use strict";
|
||||
|
||||
var mutationObserver = new MutationObserver(function(mutations) {
|
||||
// Elementor Search Input
|
||||
if ( $('#elementor-panel-elements-search-input').length ) {
|
||||
|
||||
var searchTimeout = null;
|
||||
$('#elementor-panel-elements-search-input').on( 'keyup', function(e) {
|
||||
if ( e.which === 13 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var val = $(this).val();
|
||||
|
||||
if (searchTimeout != null) {
|
||||
clearTimeout(searchTimeout);
|
||||
}
|
||||
|
||||
searchTimeout = setTimeout(function() {
|
||||
searchTimeout = null;
|
||||
|
||||
elementorCommon.ajax.addRequest( 'wpr_elementor_search_data', {
|
||||
data: {
|
||||
search_query: val,
|
||||
},
|
||||
success: function() {
|
||||
console.log('Success!');
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// Listen to Elementor Panel Changes
|
||||
mutationObserver.observe($('#elementor-panel')[0], {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
|
||||
|
||||
// Make our custom css visible in the panel's front-end
|
||||
elementor.hooks.addFilter( 'editor/style/styleText', function( css, context ) {
|
||||
if ( ! context ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var model = context.model,
|
||||
customCSS = model.get('settings').get('wpr_custom_css');
|
||||
var selector = '.elementor-element.elementor-element-' + model.get('id');
|
||||
|
||||
if ( 'document' === model.get('elType') ) {
|
||||
selector = elementor.config.document.settings.cssWrapperSelector;
|
||||
}
|
||||
|
||||
if ( customCSS ) {
|
||||
css += customCSS.replace(/selector/g, selector);
|
||||
}
|
||||
|
||||
return css;
|
||||
});
|
||||
|
||||
// Shortcode Widget: Select Template
|
||||
function selectShortcodeTemplate( model, e, textarea ) {
|
||||
var data = e.params.data;
|
||||
|
||||
// Update Settings
|
||||
model.attributes.settings.attributes.shortcode = '[wpr-template id="'+ data.id +'"]';
|
||||
|
||||
// Update Textarea
|
||||
textarea.val('[wpr-template id="'+ data.id +'"]');
|
||||
|
||||
// Refresh Preview
|
||||
model.renderRemoteServer();
|
||||
}
|
||||
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/shortcode', function( panel, model, view ) {
|
||||
|
||||
var $select = panel.$el.find('.elementor-control-type-select2').find('select'),
|
||||
$textarea = panel.$el.find('.elementor-control-type-textarea').find('textarea');
|
||||
|
||||
// Change
|
||||
$select.on( 'select2:select', function( e ) {
|
||||
selectShortcodeTemplate( model, e, $textarea );
|
||||
});
|
||||
|
||||
// Render
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-select2', function(){
|
||||
$(this).find( 'select' ).on( 'select2:select', function( e ) {
|
||||
selectShortcodeTemplate( model, e, $textarea );
|
||||
} );
|
||||
});
|
||||
} );
|
||||
|
||||
|
||||
// WPR Grid Widget: Select Element (Filter Taxonomies)
|
||||
function filterGridTaxonomies( data, value ) {
|
||||
var options = [];
|
||||
|
||||
for ( var key in data ) {
|
||||
if ( key !== value ) {
|
||||
for ( var i = 0; i < data[key].length; i++ ) {
|
||||
options.push( '.elementor-control-element_select select option[value="'+ data[key][i] +'"]' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset
|
||||
$( 'head' ).find( '#element_select_filter_style' ).remove();
|
||||
|
||||
if ( 'related' === value || 'current' === value ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Append Styles
|
||||
$( 'head' ).append('<style id="element_select_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
||||
}
|
||||
|
||||
// WPR Grid Widget: Post Meta Keys (Filter by Query)
|
||||
function filterGridMetaKeys( data, value ) {
|
||||
var options = [];
|
||||
|
||||
for ( var key in data ) {
|
||||
if ( key !== value ) {
|
||||
for ( var i = 0; i < data[key].length; i++ ) {
|
||||
options.push( '.select2-results__options li[data-select2-id*="-'+ data[key][i] +'"]' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset
|
||||
$( 'head' ).find( '#post_meta_keys_filter_style' ).remove();
|
||||
|
||||
// Append Styles
|
||||
$( 'head' ).append('<style id="post_meta_keys_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
||||
}
|
||||
|
||||
// WPR Grid Widget / List style: Element Location
|
||||
function disableListLocation( value ) {
|
||||
// Reset
|
||||
$( 'head' ).find( '#list_element_location_style' ).remove();
|
||||
|
||||
if ( 'list' !== value ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Append Styles
|
||||
$( 'head' ).append('<style id="list_element_location_style">.elementor-control-element_location option[value="above"] { display: none !important; }</style>');
|
||||
}
|
||||
|
||||
// Grid
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-grid', function( panel, model, view ) {
|
||||
var $querySource = panel.$el.find('.elementor-control-query_source').find( 'select' ),
|
||||
taxonomies = JSON.parse( panel.$el.find('.elementor-control-element_select_filter').find('input').val() ),
|
||||
metaKeys = JSON.parse( panel.$el.find('.elementor-control-post_meta_keys_filter').find('input').val() );
|
||||
|
||||
// Open
|
||||
filterGridTaxonomies( taxonomies, $querySource.val() );
|
||||
filterGridMetaKeys( metaKeys, $querySource.val() );
|
||||
|
||||
// Change
|
||||
$querySource.on( 'change', function() {
|
||||
filterGridTaxonomies( taxonomies, $(this).val() );
|
||||
filterGridMetaKeys( metaKeys, $(this).val() );
|
||||
});
|
||||
|
||||
// Render Query Source
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-query_source', function(){
|
||||
$(this).find( 'select' ).on( 'change', function() {
|
||||
filterGridTaxonomies( taxonomies, $(this).val() );
|
||||
filterGridMetaKeys( metaKeys, $(this).val() );
|
||||
} );
|
||||
});
|
||||
|
||||
// Render Layout Select
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
|
||||
disableListLocation( $(this).find( 'select' ).val() );
|
||||
|
||||
$(this).find( 'select' ).on( 'change', function() {
|
||||
disableListLocation( $(this).val() );
|
||||
} );
|
||||
});
|
||||
|
||||
// Render Grid Elements
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
||||
|
||||
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
||||
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
||||
|
||||
if ( 'lightbox' === $(this).val() ) {
|
||||
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
||||
setTimeout(function() {
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
||||
}, 100 );
|
||||
} else {
|
||||
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
||||
}
|
||||
} );
|
||||
});
|
||||
|
||||
var sOffsets = {};
|
||||
|
||||
// Prevent Bubble on Click
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
||||
var current = $(this),
|
||||
attrClass = current.attr( 'class' ),
|
||||
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
||||
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
||||
|
||||
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
||||
oProperty = current.offset().top;
|
||||
|
||||
sOffsets[oKey] = oProperty;
|
||||
|
||||
setTimeout(function() {
|
||||
current.on( 'click', function( event ) {
|
||||
var current = $(this),
|
||||
attrClass = current.attr( 'class' ),
|
||||
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
||||
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
||||
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
||||
|
||||
setTimeout( function() {
|
||||
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
||||
}, 10 );
|
||||
});
|
||||
}, 100 );
|
||||
});
|
||||
} );
|
||||
|
||||
// Image Grid
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-media-grid', function( panel, model, view ) {
|
||||
// Render Grid Elements
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
||||
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
||||
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
||||
|
||||
if ( 'lightbox' === $(this).val() ) {
|
||||
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
||||
setTimeout(function() {
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
||||
}, 100 );
|
||||
} else {
|
||||
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
||||
}
|
||||
} );
|
||||
});
|
||||
} );
|
||||
|
||||
// Woo Grid
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-woo-grid', function( panel, model, view ) {
|
||||
// Render Grid Elements
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
||||
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
||||
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
||||
|
||||
if ( 'lightbox' === $(this).val() ) {
|
||||
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
||||
setTimeout(function() {
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
||||
}, 100 );
|
||||
} else {
|
||||
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
||||
}
|
||||
} );
|
||||
});
|
||||
|
||||
var sOffsets = {};
|
||||
|
||||
// Prevent Bubble on Click - not working - //tmp
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
||||
var current = $(this),
|
||||
attrClass = current.attr( 'class' ),
|
||||
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
||||
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
||||
|
||||
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
||||
oPropery = current.offset().top;
|
||||
|
||||
sOffsets[oKey] = oPropery;
|
||||
|
||||
setTimeout(function() {
|
||||
current.on( 'click', function( event ) {
|
||||
var current = $(this),
|
||||
attrClass = current.attr( 'class' ),
|
||||
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
||||
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
||||
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
||||
|
||||
setTimeout( function() {
|
||||
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
||||
}, 10 );
|
||||
});
|
||||
}, 100 );
|
||||
});
|
||||
} );
|
||||
|
||||
// Instagram Feed
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-instagram-feed', function( panel, model, view ) {
|
||||
// Render Grid Elements
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-insta_feed_elements', function() {
|
||||
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
||||
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
||||
|
||||
if ( 'lightbox' === $(this).val() ) {
|
||||
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
||||
setTimeout(function() {
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
||||
}, 100 );
|
||||
} else {
|
||||
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
||||
}
|
||||
} );
|
||||
});
|
||||
} );
|
||||
|
||||
// Get Referrer Link
|
||||
var referrer = document.referrer;
|
||||
|
||||
// Return to Plugin Page
|
||||
if ( '' !== referrer && referrer.indexOf( 'page=wpr-addons' ) > -1 ) {
|
||||
$(window).on( 'load', function() {
|
||||
|
||||
$('#elementor-panel-header-menu-button').on( 'click', function() {
|
||||
|
||||
setTimeout(function() {
|
||||
$('.elementor-panel-menu-item-exit-to-dashboard').on( 'click', function() {
|
||||
window.location.href = referrer;
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Advanced Slider - TODO: Check if necessary or remove
|
||||
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-advanced-slider', function( panel, model, view ) {
|
||||
// var elControls = panel.$el,
|
||||
// $select = elControls.find('.elementor-control-slider_content_type').find('select');
|
||||
|
||||
// if ( 'custom' !== $select.val() ) {
|
||||
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
||||
// } else {
|
||||
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
||||
// }
|
||||
|
||||
// $select.on( 'change', function() {
|
||||
|
||||
// if ( 'custom' !== $(this).val() ) {
|
||||
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
||||
// } else {
|
||||
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
||||
// }
|
||||
// });
|
||||
// } );
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Widget Preview and Library buttons
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
for (const [key, value] of Object.entries(registered_modules)) {
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-'+ value[0], function( panel, model, view ) {
|
||||
openPedefinedStyles( panel.$el, view.$el, value[0], value[1], value[2] );
|
||||
} );
|
||||
}
|
||||
|
||||
function openPedefinedStyles( panel, preview, widget, url, filter ) {
|
||||
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child', function() {
|
||||
var theme = $(this).data('theme');
|
||||
$(this).attr('href', url +'?ref=rea-plugin-panel-'+ widget +'-utmtr'+ theme.slice(0,3) +'nkbs'+ theme.slice(3,theme.length) +'-preview'+ filter);
|
||||
});
|
||||
|
||||
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child', function() {
|
||||
preview.closest('body').find('#wpr-library-btn').attr('data-filter', widget);
|
||||
preview.closest('body').find('#wpr-library-btn').trigger('click');
|
||||
});
|
||||
}
|
||||
|
||||
}( jQuery ) );
|
||||
@@ -0,0 +1,859 @@
|
||||
( function( $ ) {//TODO: manage comments
|
||||
|
||||
"use strict";
|
||||
|
||||
var panelMutationObserver = new MutationObserver(function(mutations) {
|
||||
// Prevent Bubble up on Section Click
|
||||
$('.elementor-control-type-section').on( 'click', function( event ) {
|
||||
var current = $(this),
|
||||
attrClass = current.attr( 'class' ),
|
||||
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
||||
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
||||
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
||||
|
||||
setTimeout( function() {
|
||||
if ( $('.'+ sectionClass).length > 0 ) {
|
||||
$( '#elementor-panel-content-wrapper' ).scrollTop( $('.'+ sectionClass).offset().top - 100 );
|
||||
}
|
||||
}, 10 );
|
||||
});
|
||||
|
||||
// Elementor Search Input
|
||||
if ( $('#elementor-panel-elements-search-input').length ) {
|
||||
var searchTimeout = null;
|
||||
var popupURL = registered_modules.adminURL + 'admin.php?page=wpr-popups';
|
||||
|
||||
$('#elementor-panel-elements-search-input').on( 'keyup', function(e) {
|
||||
if ( e.which === 13 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (searchTimeout != null) {
|
||||
clearTimeout(searchTimeout);
|
||||
}
|
||||
|
||||
searchTimeout = setTimeout(function() {
|
||||
searchTimeout = null;
|
||||
|
||||
var searchVal = $('#elementor-panel-elements-search-input').val();
|
||||
|
||||
let keywords = ["appointment", "book"]; // Keywords to look for
|
||||
|
||||
// Check if any keyword matches the input
|
||||
let keywordFound = keywords.some(function(keyword) {
|
||||
return keyword.includes(searchVal) || searchVal.includes(keyword);
|
||||
});
|
||||
|
||||
// If a keyword is found and the div doesn't already exist
|
||||
if ((keywordFound && searchVal !== '') && $('.wpr-elementor-search-notice').length < 1 ) {
|
||||
// Append the new div
|
||||
let infoBox = `
|
||||
<div class="wpr-elementor-search-notice">
|
||||
Looking for Booking Solution? Check out the <a href="https://www.youtube.com/watch?v=asdMBXpd2Nw" target="_blank">Video Tutorial</a>.
|
||||
</div>
|
||||
`;
|
||||
$('#elementor-panel-elements-wrapper').prepend(infoBox);
|
||||
}
|
||||
|
||||
if ( searchVal.includes('par') && $('.wpr-elementor-search-notice').length < 1 ) {
|
||||
$('#elementor-panel-elements-wrapper').prepend('\
|
||||
<div class="wpr-elementor-search-notice">\
|
||||
<strong>Parallax Background</strong> is only available for the Container (Section) elements. <strong>Edit any container (section)</strong> > <strong>"Styles"</strong> tab > <strong>"Parallax - Royal Addons"</strong>.\
|
||||
</div>\
|
||||
');
|
||||
}
|
||||
|
||||
if ( searchVal.includes('stic') && $('.wpr-elementor-search-notice').length < 1 ) {
|
||||
$('#elementor-panel-elements-wrapper').prepend('\
|
||||
<div class="wpr-elementor-search-notice">\
|
||||
<strong>Sticky Section</strong> is only available for the Container (Section) elements. <strong>Edit any container (section)</strong> > <strong>"Advanced"</strong> tab > <strong>"Sticky Section - Royal Addons"</strong>.\
|
||||
</div>\
|
||||
');
|
||||
}
|
||||
|
||||
if ( searchVal.includes('cart') && $('.wpr-elementor-search-notice').length < 1 && !registered_modules.isWooCommerceActive ) {
|
||||
$('#elementor-panel-elements-wrapper').prepend('\
|
||||
<div class="wpr-elementor-search-notice">\
|
||||
Please Install/Activate <strong>WooCommerce</strong> in order to use <strong>REA WOO</strong> Widgets.\
|
||||
</div>\
|
||||
');
|
||||
}
|
||||
|
||||
if ( searchVal.includes('pop') && $('.wpr-elementor-search-notice').length < 1 ) {
|
||||
$('#elementor-panel-elements-wrapper').prepend('\
|
||||
<div class="wpr-elementor-search-notice">\
|
||||
In Order to Create <strong>Popups</strong> go to <a href='+ popupURL +' target="_blank"><strong>Dashboard</strong> > <strong>Royal Addons</strong> > <strong>Popup Builder</strong></a>\
|
||||
or Watch <a href="https://www.youtube.com/watch?v=TbKTNpuXM68" target="_blank">Video Tutorial</a></div>\
|
||||
');
|
||||
}
|
||||
|
||||
elementorCommon.ajax.addRequest( 'wpr_elementor_search_data', {
|
||||
data: {
|
||||
search_query: searchVal,
|
||||
},
|
||||
success: function() {
|
||||
// console.log(searchVal);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
|
||||
// Promote Premium Widgets
|
||||
// if ( $('#elementor-panel-category-wpr-widgets').length ) {
|
||||
$('.elementor-element--promotion').on('click', function() {
|
||||
var dialogButton = $('.dialog-button');
|
||||
|
||||
if ( $(this).find('.wpr-icon').length ) {
|
||||
|
||||
dialogButton.hide();
|
||||
$('.wpr-see-it-in-action').remove();
|
||||
$('.wpr-see-it-in-action-upgrade').remove();
|
||||
$('.wpr-upgrade-dynamic-content').remove();
|
||||
|
||||
var url = '',
|
||||
upgradeURL = '',
|
||||
upgradeText = 'Ugrade to Pro',
|
||||
dialogueMessage = 'Advanced Filters lets you filter by <b>Colors, Brands, Ratings, Price Range</b>, or any custom meta field. It also supports <b>Custom Post Types (CPT)</b>, and you can create dynamic dependent dropdowns for a faster, more intuitive browsing experience.',
|
||||
title = $(this).find('.title').text();
|
||||
|
||||
if ( title === 'My Account') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/my-account-fashion-v1/?ref=rea-plugin-panel-pro-widgets-myacc-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-myacc-upgrade-pro#purchasepro';
|
||||
} else if ( title === 'Woo Category Grid') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/?ref=rea-plugin-panel-pro-widgets-catgrid-seeitinaction#catgridprev';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-catgrid-upgrade-pro#purchasepro';
|
||||
} else if ( title === 'Product Filters') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/shop-fashion-v1/?ref=rea-plugin-panel-pro-widgets-prodfilters-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-prodfilters-upgrade-pro#purchasepro';
|
||||
} else if ( title === 'Product Breadcrumbs') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/product/mans-bluish-hoodie/?ref=rea-plugin-panel-pro-widgets-breadcru-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-breadcru-upgrade-pro#purchasepro';
|
||||
} else if ( title === 'Wishlist Button') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-wishbutt-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-wishbutt-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Ugrade to Expert';
|
||||
} else if ( title === 'Mini Wishlist') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-miniwish-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-miniwish-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Ugrade to Expert';
|
||||
} else if ( title === 'Wishlist Table') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-wishtable-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-wishtable-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Ugrade to Expert';
|
||||
} else if ( title === 'Compare Button') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-compbutt-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-compbutt-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Ugrade to Expert';
|
||||
} else if ( title === 'Mini Compare') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-minicomp-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-minicomp-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Ugrade to Expert';
|
||||
} else if ( title === 'Compare Table') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-comptable-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-comptable-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Ugrade to Expert';
|
||||
} else if ( title == 'Post Breadcrumbs') {
|
||||
url += 'https://demosites.royal-elementor-addons.com/construction-v3/2023/04/01/experience-quality-craftsmanship-with-our-construction-team/?ref=rea-plugin-panel-pro-widgets-postbreadcru-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-postbreadcru-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Ugrade to Expert';
|
||||
} else if ( title == 'Category Grid' ) {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/?ref=rea-plugin-panel-pro-widgets-catgrid-seeitinaction#catgridprev';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-catgrid-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Upgrade to Expert';
|
||||
} else if ( title == 'Custom Field' ) {
|
||||
url += 'https://demosites.royal-elementor-addons.com/job-listing-v1/wpr_job_listing/mail-convertor/?ref=rea-plugin-panel-pro-widgets-catgrid-seeitinaction';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-customfield-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Upgrade to Expert';
|
||||
} else if ( title == 'Advanced Filters' ) {
|
||||
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/';
|
||||
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-advancedfilters-upgrade-expert#purchasepro';
|
||||
upgradeText = 'Upgrade to Expert';
|
||||
}
|
||||
|
||||
if ( !dialogButton.next('a').length ) {
|
||||
dialogButton.after('<a href="'+ url +'" target="_blank" class="wpr-see-it-in-action dialog-button elementor-button elementor-button-success">See it in action</a>');
|
||||
$('.wpr-see-it-in-action').after('<a href="'+ upgradeURL +'" target="_blank" class="wpr-see-it-in-action-upgrade e-accent dialog-button elementor-button">'+ upgradeText +'</a>');
|
||||
} else {
|
||||
$('.wpr-see-it-in-action').attr('href', url);
|
||||
}
|
||||
|
||||
if ( title == 'Advanced Filters' ) {
|
||||
$('.dialog-message').html( dialogueMessage );
|
||||
}
|
||||
|
||||
$('.wpr-see-it-in-action').css({
|
||||
'display' : 'block',
|
||||
'margin-bottom' : '12px'
|
||||
});
|
||||
|
||||
$('.wpr-see-it-in-action-upgrade').css({
|
||||
'display' : 'block'
|
||||
});
|
||||
} else {
|
||||
dialogButton.show();
|
||||
dialogButton.next('a').hide();
|
||||
}
|
||||
});
|
||||
// }
|
||||
|
||||
// Promote Dynamic Tags
|
||||
$('.elementor-control-dynamic-switcher').on('click', function() {
|
||||
$('.wpr-see-it-in-action').remove();
|
||||
$('.wpr-see-it-in-action-upgrade').remove();
|
||||
$('.wpr-upgrade-dynamic-content').remove();
|
||||
|
||||
let defaultText = 'Create more personalized and dynamic sites by populating data from various sources with dozens of dynamic tags to choose from.';
|
||||
let customText = '<br><br> Dynamic Content functionality is available for <strong>Royal Elementor Addons Expert</strong> plugin as well as for <strong>Elementor Pro</strong> plugin. With <strong>Royal Elementor Addons Expert Plan</strong> you can create Custom Post Types, Custom Taxonomies, add any type of Custom Fields and many other cool features to create Dynamic Websites.';
|
||||
|
||||
$('.dialog-buttons-widget .dialog-message').html('');
|
||||
$('.dialog-buttons-widget .dialog-message').html(defaultText + customText);
|
||||
|
||||
let dialogButton = $('.dialog-buttons-widget .dialog-button'),
|
||||
url = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-dynamic-content-banner-upgrade-expert#purchasepro';
|
||||
|
||||
dialogButton.text('Upgrade Elementor');
|
||||
dialogButton.after('<div class="wpr-upgrade-dynamic-content"><div style="margin:8px 0 20px;">OR</div><a href="'+ url +'" target="_blank" style="display:block; margin-bottom: 10px; padding:9px 22px;" class="dialog-button elementor-button elementor-button-success">Upgrade Royal Elementor Addons</a><a href="https://www.youtube.com/watch?v=kE1zmi3fxh8" target="_blank" style="display:block; padding:9px 22px;" class="dialog-button elementor-button elementor-button-success">Video Tutorial</a></div>');
|
||||
dialogButton.next('a').css('display','block');
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
// Listen to Elementor Panel Changes
|
||||
panelMutationObserver.observe($('#elementor-panel')[0], {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
|
||||
// Make our custom css visible in the panel's front-end
|
||||
elementor.hooks.addFilter( 'editor/style/styleText', function( css, context ) {
|
||||
if ( ! context ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var model = context.model,
|
||||
customCSS = model.get('settings').get('wpr_custom_css');
|
||||
var selector = '.elementor-element.elementor-element-' + model.get('id');
|
||||
|
||||
if ( 'document' === model.get('elType') ) {
|
||||
selector = elementor.config.document.settings.cssWrapperSelector;
|
||||
}
|
||||
|
||||
if ( customCSS ) {
|
||||
css += customCSS.replace(/selector/g, selector);
|
||||
}
|
||||
|
||||
return css;
|
||||
});
|
||||
|
||||
// Shortcode Widget: Select Template
|
||||
function selectShortcodeTemplate( model, e, select, textarea ) {
|
||||
var shortcode = model.attributes.settings.attributes.shortcode,
|
||||
shortcode = shortcode.replace ( /[^\d.]/g, '' );
|
||||
|
||||
if ( shortcode === select.val() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update Settings
|
||||
model.attributes.settings.attributes.shortcode = '[wpr-template id="'+ select.val() +'"]';
|
||||
|
||||
// Update Textarea
|
||||
textarea.val('[wpr-template id="'+ select.val() +'"]');
|
||||
|
||||
// Refresh Preview
|
||||
model.renderRemoteServer();
|
||||
}
|
||||
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-form-builder', function( panel, model, view ) {
|
||||
var $parent = panel.$el.find('#elementor-panel');
|
||||
var $element = panel.$el.find( '.elementor-repeater-fields' );
|
||||
|
||||
var stepObserver = new MutationObserver(function(mutations) {
|
||||
mutations.forEach((mutation) => {
|
||||
// console.log('steps mutation', mutation);
|
||||
if (mutation.type === 'childList') {
|
||||
mutation.addedNodes.forEach((node) => {
|
||||
if (node.nodeType === Node.ELEMENT_NODE) {
|
||||
// Find the child element with the specific class within the node
|
||||
const repeaterFields = node.querySelectorAll('.elementor-repeater-fields');
|
||||
const childElement = node.querySelectorAll('.elementor-repeater-row-tools');
|
||||
const childElement2 = node.querySelectorAll('.elementor-repeater-row-controls');
|
||||
|
||||
if ( childElement2 ) {
|
||||
let selectElement = [];
|
||||
|
||||
if ( selectElement.length == 0 ) {
|
||||
childElement2.forEach(function(item) {
|
||||
selectElement.push(item.querySelector('select'));
|
||||
});
|
||||
}
|
||||
|
||||
// If the child element exists and the select value is 'step', add the certain class to it
|
||||
if (childElement && selectElement.length > 0) {
|
||||
childElement.forEach(function(item, i) {
|
||||
if ( selectElement[i] && selectElement[i].value == 'step' ) {
|
||||
item.classList.add('wpr-step-editor-bg');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// model.get('settings').attributes.form_fields.models.forEach(function(thisModel, i) {
|
||||
// if ( thisModel.attributes.field_type == 'step' ) {
|
||||
// $('.elementor-repeater-fields').eq(i).find('.elementor-repeater-row-tools').addClass('wpr-step-editor-bg');
|
||||
// }
|
||||
// });
|
||||
|
||||
// if (selectElement) {
|
||||
// selectElement.forEach(function(item, i) {
|
||||
// item.addEventListener('change', () => {
|
||||
// if (childElement && selectElement) {
|
||||
// if (item.value === 'step') {
|
||||
// childElement[i].classList.add('wpr-step-editor-bg');
|
||||
// } else {
|
||||
// childElement[i].classList.remove('wpr-step-editor-bg');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
stepObserver.observe($('#elementor-panel')[0], {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
|
||||
changeStepBackground();
|
||||
|
||||
elementor.channels.editor.on('section:activated', function (sectionName, editor) {
|
||||
// model.get('settings').attributes.form_fields.models.forEach(function(thisModel, i) {
|
||||
// if ( thisModel.attributes.field_type == 'step' ) {
|
||||
// $('.elementor-repeater-fields').eq(i).find('.elementor-repeater-row-tools').addClass('wpr-step-editor-bg');
|
||||
// }
|
||||
// });
|
||||
updateDynamicOptions(view);
|
||||
});
|
||||
|
||||
function changeStepBackground() {
|
||||
|
||||
$element.each(function() {
|
||||
if ($(this).find('select').val() == 'step') {
|
||||
$(this).find('.elementor-repeater-row-tools').addClass('wpr-step-editor-bg');
|
||||
}
|
||||
});
|
||||
|
||||
$('#elementor-panel').off('change', 'select').on('change', 'select', function() {
|
||||
if ( $(this).val() == 'step' ) {
|
||||
$(this).closest('.elementor-repeater-row-controls').prev('.elementor-repeater-row-tools').addClass('wpr-step-editor-bg');
|
||||
} else if ($(this).closest('.elementor-repeater-row-controls').prev('.elementor-repeater-row-tools').hasClass('wpr-step-editor-bg')) {
|
||||
$(this).closest('.elementor-repeater-row-controls').prev('.elementor-repeater-row-tools').removeClass('wpr-step-editor-bg');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
view.listenTo(view.model.get('settings').get('form_fields'), 'add change remove', function (e) {
|
||||
updateDynamicOptions(view);
|
||||
});
|
||||
|
||||
function updateDynamicOptions () {
|
||||
var formFieldsModel = view.model.get('settings').get('form_fields');
|
||||
|
||||
var emailField = view.model.get('settings').get('email_field');
|
||||
var firstNameField = view.model.get('settings').get('first_name_field');
|
||||
var lastNameField = view.model.get('settings').get('last_name_field');
|
||||
var phoneField = view.model.get('settings').get('phone_field');
|
||||
var birthdayField = view.model.get('settings').get('birthday_field');
|
||||
var addressField = view.model.get('settings').get('address_field');
|
||||
var countryField = view.model.get('settings').get('country_field');
|
||||
var cityField = view.model.get('settings').get('city_field');
|
||||
var stateField = view.model.get('settings').get('state_field');
|
||||
var zipField = view.model.get('settings').get('zip_field');
|
||||
|
||||
var emailSelectControl = panel.$el.find('.elementor-control-email_field').find('select[data-setting="email_field"]');
|
||||
var firstNameSelectControl = panel.$el.find('.elementor-control-first_name_field').find('select[data-setting="first_name_field"]');
|
||||
var lastNameSelectControl = panel.$el.find('.elementor-control-last_name_field').find('select[data-setting="last_name_field"]');
|
||||
var phoneSelectControl = panel.$el.find('.elementor-control-phone_field').find('select[data-setting="phone_field"]');
|
||||
var birthdaySelectControl = panel.$el.find('.elementor-control-birthday_field').find('select[data-setting="birthday_field"]');
|
||||
var addressSelectControl = panel.$el.find('.elementor-control-address_field').find('select[data-setting="address_field"]');
|
||||
var countrySelectControl = panel.$el.find('.elementor-control-country_field').find('select[data-setting="country_field"]');
|
||||
var citySelectControl = panel.$el.find('.elementor-control-city_field').find('select[data-setting="city_field"]');
|
||||
var stateSelectControl = panel.$el.find('.elementor-control-state_field').find('select[data-setting="state_field"]');
|
||||
var zipSelectControl = panel.$el.find('.elementor-control-zip_field').find('select[data-setting="zip_field"]');
|
||||
|
||||
var selectControls = [emailSelectControl, firstNameSelectControl, lastNameSelectControl, phoneSelectControl, birthdaySelectControl, addressSelectControl, countrySelectControl, citySelectControl, stateSelectControl, zipSelectControl];
|
||||
var fieldValues = [emailField, firstNameField, lastNameField, phoneField, birthdayField, addressField, countryField, cityField, stateField, zipField];
|
||||
|
||||
var options = {
|
||||
'none': 'None'
|
||||
};
|
||||
|
||||
var prevFieldId;
|
||||
|
||||
formFieldsModel.each(function (field, index) {
|
||||
var fieldLabel = field.get('field_label');
|
||||
var fieldId = field.get('field_id');
|
||||
|
||||
if ( prevFieldId == fieldId ) {
|
||||
$('#elementor-panel').find(':input[value='+ field.attributes._id +']').closest('.elementor-repeater-fields').find(':input[data-setting="field_id"]').val(field.attributes._id);
|
||||
$('#elementor-panel').find(':input[value='+ field.attributes._id +']').closest('.elementor-repeater-fields').find('.wpr-form-field-shortcode').val('id=["'+ field.attributes._id +'"]');
|
||||
field.attributes.field_id = field.attributes._id;
|
||||
}
|
||||
|
||||
prevFieldId = fieldId;
|
||||
|
||||
if ( !fieldId ) {
|
||||
$('#elementor-panel').find(':input[value='+ field.attributes._id +']').closest('.elementor-repeater-fields').find(':input[data-setting="field_id"]').val(field.attributes._id);
|
||||
$('#elementor-panel').find(':input[value='+ field.attributes._id +']').closest('.elementor-repeater-fields').find('.wpr-form-field-shortcode').val('id=["'+ field.attributes._id +'"]');
|
||||
field.attributes.field_id = field.attributes._id;
|
||||
}
|
||||
|
||||
options[fieldId] = fieldLabel;
|
||||
});
|
||||
|
||||
view.model.setSetting('email_field', _.extend(emailField, { options }));
|
||||
view.model.setSetting('first_name_field', _.extend(firstNameField, { options }));
|
||||
view.model.setSetting('last_name_field', _.extend(lastNameField, { options }));
|
||||
view.model.setSetting('phone_field', _.extend(phoneField, { options }));
|
||||
view.model.setSetting('birthday_field', _.extend(birthdayField, { options }));
|
||||
view.model.setSetting('address_field', _.extend(addressField, { options }));
|
||||
view.model.setSetting('country_field', _.extend(countryField, { options }));
|
||||
view.model.setSetting('city_field', _.extend(cityField, { options }));
|
||||
view.model.setSetting('state_field', _.extend(stateField, { options }));
|
||||
view.model.setSetting('zip_field', _.extend(zipField, { options }));
|
||||
|
||||
_.each(selectControls, function (control) {
|
||||
control.empty();
|
||||
});
|
||||
|
||||
_.each(options, function (label, value) {
|
||||
_.each(selectControls, function (control, i) {
|
||||
const isSelected = fieldValues[i] === value ? ' selected' : '';
|
||||
control.append('<option value="' + value + '"' + isSelected + '>' + label + '</option>');
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// Change the selector below to match the field_id field in your repeater
|
||||
const customIdFieldSelector = 'input[data-setting="field_id"]';
|
||||
|
||||
// Change the selector below to match the shortcode field in your repeater
|
||||
const shortcodeFieldSelector = '.wpr-form-field-shortcode';
|
||||
|
||||
// Listen for changes in the field_id field
|
||||
$('#elementor-panel').on('input', customIdFieldSelector, function() {
|
||||
|
||||
// Get the new field_id value
|
||||
const newCustomId = $(this).val();
|
||||
|
||||
// Find the corresponding shortcode field in the same repeater item
|
||||
const $shortcodeField = $(this).closest('.elementor-repeater-fields').find(shortcodeFieldSelector);
|
||||
|
||||
// Update the shortcode with the new field_id value
|
||||
let updatedShortcode;
|
||||
const currentShortcode = $shortcodeField.val();
|
||||
const match = currentShortcode.match(/\[id="[^"]*"\]/);
|
||||
|
||||
if (match) {
|
||||
updatedShortcode = currentShortcode.replace(match[0], `[id="${newCustomId}"]`);
|
||||
} else {
|
||||
updatedShortcode = `[id="${newCustomId}"]`;
|
||||
}
|
||||
|
||||
// Set the updated shortcode in the shortcode field
|
||||
$shortcodeField.val(updatedShortcode);
|
||||
});
|
||||
});
|
||||
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/shortcode', function( panel, model, view ) {
|
||||
|
||||
var $select = panel.$el.find('.elementor-control-type-wpr-ajaxselect2'),
|
||||
$textarea = panel.$el.find('.elementor-control-type-textarea').find('textarea');
|
||||
|
||||
// Change
|
||||
$select.on( 'select2:select', function( e ) {
|
||||
selectShortcodeTemplate( model, e, $select, $textarea );
|
||||
});
|
||||
|
||||
// Render
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-wpr-ajaxselect2', function(){
|
||||
$(this).find( 'select' ).on( 'select2:select', function( e ) {
|
||||
selectShortcodeTemplate( model, e, $select, $textarea );
|
||||
} );
|
||||
});
|
||||
} );
|
||||
|
||||
// WPR Grid Widget: Select Element (Filter Taxonomies)
|
||||
function filterGridTaxonomies( data, value ) {
|
||||
var options = [];
|
||||
|
||||
for ( var key in data ) {
|
||||
if ( key !== value ) {
|
||||
for ( var i = 0; i < data[key].length; i++ ) {
|
||||
if ( !data[value].includes(data[key][i]) ) {
|
||||
options.push( '.elementor-control-element_select select option[value="'+ data[key][i] +'"]' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset
|
||||
$( 'head' ).find( '#element_select_filter_style' ).remove();
|
||||
|
||||
if ( 'related' === value || 'current' === value ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Append Styles
|
||||
$( 'head' ).append('<style id="element_select_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
||||
}
|
||||
|
||||
// WPR Grid Widget: Post Meta Keys (Filter by Query)
|
||||
function filterGridMetaKeys( data, value ) {
|
||||
var options = [];
|
||||
|
||||
for ( var key in data ) {
|
||||
if ( key !== value ) {
|
||||
for ( var i = 0; i < data[key].length; i++ ) {
|
||||
options.push( '.select2-results__options li[data-select2-id*="-'+ data[key][i] +'"]' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset
|
||||
$( 'head' ).find( '#post_meta_keys_filter_style' ).remove();
|
||||
|
||||
// Append Styles
|
||||
$( 'head' ).append('<style id="post_meta_keys_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
||||
}
|
||||
|
||||
// WPR Grid Widget / List style: Element Location
|
||||
function disableListLocation( value ) {
|
||||
// Reset
|
||||
$( 'head' ).find( '#list_element_location_style' ).remove();
|
||||
|
||||
if ( 'list' !== value ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Append Styles
|
||||
$( 'head' ).append('<style id="list_element_location_style">.elementor-control-element_location option[value="above"] { display: none !important; }</style>');
|
||||
}
|
||||
|
||||
// Grid
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-grid', function( panel, model, view ) {
|
||||
var $querySource = panel.$el.find('.elementor-control-query_source').find( 'select' ),
|
||||
taxonomies = JSON.parse( panel.$el.find('.elementor-control-element_select_filter').find('input').val() ),
|
||||
metaKeys = '';
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'wpr_get_custom_meta_keys',
|
||||
nonce: registered_modules.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if (response.success) {
|
||||
metaKeys = JSON.parse(response.data);
|
||||
|
||||
// Open
|
||||
filterGridMetaKeys( metaKeys, $querySource.val() );
|
||||
}
|
||||
},
|
||||
error: function( error ) {
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
|
||||
// Open
|
||||
filterGridTaxonomies( taxonomies, $querySource.val() );
|
||||
|
||||
// Change
|
||||
$querySource.on( 'change', function() {
|
||||
filterGridTaxonomies( taxonomies, $(this).val() );
|
||||
filterGridMetaKeys( metaKeys, $(this).val() );
|
||||
});
|
||||
|
||||
// Render Query Source
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-query_source', function(){
|
||||
$(this).find( 'select' ).on( 'change', function() {
|
||||
filterGridTaxonomies( taxonomies, $(this).val() );
|
||||
filterGridMetaKeys( metaKeys, $(this).val() );
|
||||
} );
|
||||
});
|
||||
|
||||
// GOGA - Render Layout Select (Remove If extra)
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
|
||||
disableListLocation( $(this).find( 'select' ).val() );
|
||||
|
||||
$(this).find( 'select' ).on( 'change', function() {
|
||||
disableListLocation( $(this).val() );
|
||||
} );
|
||||
});
|
||||
|
||||
// Render Grid Elements
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
||||
|
||||
// Render Layout Select
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
|
||||
disableListLocation( $(this).find( 'select' ).val() );
|
||||
|
||||
$(this).find( 'select' ).on( 'change', function() {
|
||||
disableListLocation( $(this).val() );
|
||||
} );
|
||||
});
|
||||
|
||||
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
||||
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
||||
|
||||
if ( 'lightbox' === $(this).val() ) {
|
||||
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
||||
setTimeout(function() {
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
||||
}, 100 );
|
||||
} else {
|
||||
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
||||
}
|
||||
} );
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
// Image Grid
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-media-grid', function( panel, model, view ) {
|
||||
|
||||
// Render Grid Elements
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
||||
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
||||
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
||||
|
||||
if ( 'lightbox' === $(this).val() ) {
|
||||
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
||||
setTimeout(function() {
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
||||
}, 100 );
|
||||
} else {
|
||||
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
||||
}
|
||||
} );
|
||||
});
|
||||
} );
|
||||
|
||||
// Instagram Feed
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-instagram-feed', function( panel, model, view ) {
|
||||
|
||||
// Render Layout Select
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-inst_layout_select', function(){
|
||||
disableListLocation( $(this).find( 'select' ).val() );
|
||||
|
||||
$(this).find( 'select' ).on( 'change', function() {
|
||||
disableListLocation( $(this).val() );
|
||||
} );
|
||||
});
|
||||
|
||||
// Render Grid Elements
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-insta_feed_elements', function() {
|
||||
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
||||
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
||||
|
||||
if ( 'lightbox' === $(this).val() ) {
|
||||
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
||||
setTimeout(function() {
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
||||
}, 100 );
|
||||
} else {
|
||||
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
||||
}
|
||||
} );
|
||||
});
|
||||
} );
|
||||
|
||||
// Woo Grid
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-woo-grid', function( panel, model, view ) {
|
||||
// Render Grid Elements
|
||||
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
||||
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
||||
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
||||
|
||||
if ( 'lightbox' === $(this).val() ) {
|
||||
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
||||
setTimeout(function() {
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
||||
}, 100 );
|
||||
} else {
|
||||
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
||||
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
||||
}
|
||||
} );
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
// Refresh Mega Menu
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-mega-menu', function( panel, model, view ) {
|
||||
model.renderRemoteServer();
|
||||
});
|
||||
|
||||
|
||||
// GOGA - Refresh Countdown check with duke
|
||||
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-countdown', function( panel, model, view ) {
|
||||
|
||||
// panel.$el.find('#elementor-controls').on( 'change', '.elementor-control-countdown_type', function() {
|
||||
// elementor.reloadPreview();
|
||||
// });
|
||||
|
||||
// panel.$el.find('#elementor-controls').on( 'change', '.elementor-control-due_date', function() {
|
||||
// elementor.reloadPreview();
|
||||
// });
|
||||
|
||||
// panel.$el.find('#elementor-controls').on( 'change', '.elementor-control-evergreen_hours', function() {
|
||||
// elementor.reloadPreview();
|
||||
// });
|
||||
|
||||
// panel.$el.find('#elementor-controls').on( 'change', '.elementor-control-evergreen_minutes', function() {
|
||||
// elementor.reloadPreview();
|
||||
// });
|
||||
|
||||
// });
|
||||
|
||||
// Get Referrer Link
|
||||
var referrer = document.referrer;
|
||||
|
||||
// Return to Plugin Page
|
||||
if ( '' !== referrer && referrer.indexOf( 'page=wpr-addons' ) > -1 ) {
|
||||
$(window).on( 'load', function() {
|
||||
|
||||
$('#elementor-panel-header-menu-button').on( 'click', function() {
|
||||
|
||||
setTimeout(function() {
|
||||
$('.elementor-panel-menu-item-exit-to-dashboard').on( 'click', function() {
|
||||
window.location.href = referrer;
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Advanced Slider - TODO: Check if necessary or remove
|
||||
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-advanced-slider', function( panel, model, view ) {
|
||||
// var elControls = panel.$el,
|
||||
// $select = elControls.find('.elementor-control-slider_content_type').find('select');
|
||||
|
||||
// if ( 'custom' !== $select.val() ) {
|
||||
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
||||
// } else {
|
||||
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
||||
// }
|
||||
|
||||
// $select.on( 'change', function() {
|
||||
|
||||
// if ( 'custom' !== $(this).val() ) {
|
||||
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
||||
// } else {
|
||||
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
||||
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
||||
// }
|
||||
// });
|
||||
// } );
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
== Widget Preview and Library buttons
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
for (const [key, value] of Object.entries(registered_modules)) {
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-'+ value[0], function( panel, model, view ) {
|
||||
openPedefinedStyles( panel.$el, view.$el, value[0], value[1], value[2] );
|
||||
} );
|
||||
}
|
||||
|
||||
function openPedefinedStyles( panel, preview, widget, url, filter ) {
|
||||
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child', function() {
|
||||
var theme = $(this).data('theme');
|
||||
$(this).attr('href', url +'?ref=rea-plugin-panel-'+ widget +'-utmtr'+ theme.slice(0,3) +'nkbs'+ theme.slice(3,theme.length) +'-preview'+ filter);
|
||||
});
|
||||
|
||||
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child', function() {
|
||||
preview.closest('body').find('#wpr-library-btn').attr('data-filter', widget);
|
||||
preview.closest('body').find('#wpr-library-btn').trigger('click');
|
||||
});
|
||||
}
|
||||
|
||||
}( jQuery ) );
|
||||
|
||||
( function( $ ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var WprMegaMenuEditor = {
|
||||
|
||||
activeSection: false,
|
||||
|
||||
currentElement: false,
|
||||
|
||||
currentSection: false,
|
||||
|
||||
prevSection: false,
|
||||
|
||||
|
||||
init: function() {
|
||||
elementor.channels.editor.on( 'section:activated', WprMegaMenuEditor.sectionActivated );
|
||||
},
|
||||
|
||||
sectionActivated: function( sectionName, editor ) {
|
||||
|
||||
let currentElement = WprMegaMenuEditor.currentElement = editor.getOption( 'editedElementView' ) || false;
|
||||
|
||||
if ( ! currentElement ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'wpr-mega-menu' == currentElement.model.get( 'widgetType' ) ) {
|
||||
|
||||
// if ( 'section_general' === sectionName ) {}
|
||||
// currentElement.model.renderRemoteServer();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprMegaMenuEditor.init );
|
||||
|
||||
window.WprMegaMenuEditor = WprMegaMenuEditor;
|
||||
|
||||
}( jQuery ) );
|
||||
@@ -0,0 +1,302 @@
|
||||
( function( $ ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Elementor Editor Popup
|
||||
var WprElementorEditorPopup = {
|
||||
|
||||
loaded: false,
|
||||
|
||||
init: function() {
|
||||
window.elementor.on( 'preview:loaded', WprElementorEditorPopup.loadPreview );
|
||||
},
|
||||
|
||||
loadPreview: function() {
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/shortcode.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-advanced-slider.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-tabs.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-content-toggle.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
},
|
||||
|
||||
renderPopup: function( link ) {
|
||||
// Open Editor
|
||||
WprElementorEditorPopup.getPopup().show();
|
||||
|
||||
// Render Iframe
|
||||
$( '#wpr-template-editor-popup .dialog-message').html( '<iframe src="' + $( this ).data( 'permalink' ) + '&elementor' + '" id="wpr-template-edit-frame" width="100%" height="100%"></iframe>' );
|
||||
|
||||
// Preloading
|
||||
$( '#wpr-template-editor-popup .dialog-message').append( '<div id="wpr-template-editor-loading"><div class="elementor-loader-wrapper"><div class="elementor-loader"><div class="elementor-loader-boxes"><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div></div></div><div class="elementor-loading-title">Loading</div></div></div>' );
|
||||
|
||||
// Loaded
|
||||
$( '#wpr-template-edit-frame').on( 'load', function() {
|
||||
$( '#wpr-template-editor-loading').fadeOut( 300 );
|
||||
} );
|
||||
|
||||
// Close
|
||||
$( '#wpr-template-editor-popup .dialog-close-button' ).css({
|
||||
'right' : '30px',
|
||||
'width' : '35px',
|
||||
'height' : '35px',
|
||||
'line-height' : '30px',
|
||||
'border-radius' : '50%',
|
||||
'text-align' : 'center',
|
||||
'opacity' : '1',
|
||||
'background-color' : '#333',
|
||||
'box-shadow' : '1px 1px 3px 0 #000',
|
||||
}).html( '<i class="eicon-close"></i>');
|
||||
|
||||
$( '#wpr-template-editor-popup .dialog-close-button i' ).css({
|
||||
'font-size' : '15px',
|
||||
'color' : '#fff',
|
||||
})
|
||||
|
||||
$( '#wpr-template-editor-popup .dialog-close-button' ).on( 'click', function() {
|
||||
elementor.reloadPreview();
|
||||
});
|
||||
},
|
||||
|
||||
getPopup: function() {
|
||||
|
||||
if ( ! WprElementorEditorPopup.loaded ) {
|
||||
this.loaded = elementor.dialogsManager.createWidget( 'lightbox', {
|
||||
id: 'wpr-template-editor-popup',
|
||||
closeButton: true,
|
||||
hide: { onBackgroundClick: false }
|
||||
} );
|
||||
}
|
||||
|
||||
return WprElementorEditorPopup.loaded;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprElementorEditorPopup.init );
|
||||
|
||||
|
||||
// Modal Popups
|
||||
var WprModalPopups = {
|
||||
|
||||
init: function() {
|
||||
if ( ! $( 'body' ).hasClass( 'elementor-editor-wpr-popups' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load Preview
|
||||
window.elementor.on( 'preview:loaded', WprModalPopups.onPreviewLoad );
|
||||
|
||||
// Change Preview
|
||||
window.elementor.on( 'preview:loaded', WprModalPopups.onPreviewChange );
|
||||
|
||||
// Change Controls
|
||||
elementor.settings.page.model.on( 'change', WprModalPopups.onControlChange );
|
||||
},
|
||||
|
||||
onPreviewLoad: function() {
|
||||
// Open Popup Settings
|
||||
setTimeout(function() {
|
||||
$( '#elementor-panel-footer-settings' ).trigger( 'click' );
|
||||
}, 2000);
|
||||
|
||||
// Popup Settings Notification
|
||||
WprModalPopups.settingsNotification();
|
||||
|
||||
// Fix Popup Layout
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/global', function( $scope ) {
|
||||
var popup = $scope.closest( '.wpr-template-popup' );
|
||||
|
||||
WprModalPopups.fixPopupLayout( popup );
|
||||
} );
|
||||
},
|
||||
|
||||
onPreviewChange: function() {
|
||||
// preview change code goes here
|
||||
},
|
||||
|
||||
onControlChange: function( model ) {
|
||||
var iframe = document.getElementById( 'elementor-preview-iframe' ),
|
||||
iframeContent = iframe.contentDocument || iframe.contentWindow.document;
|
||||
|
||||
// Popup
|
||||
var popup = $( '.wpr-template-popup', iframeContent );
|
||||
|
||||
// Scrollbar
|
||||
if ( model.changed.hasOwnProperty( 'popup_height' ) ) {
|
||||
// elementor.reloadPreview();
|
||||
}
|
||||
|
||||
// Display As
|
||||
if ( model.changed.hasOwnProperty( 'popup_display_as' ) ) {
|
||||
if ( 'notification' === model.changed['popup_display_as'] ) {
|
||||
popup.addClass( 'wpr-popup-notification' );
|
||||
} else {
|
||||
popup.removeClass( 'wpr-popup-notification' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( model.changed.hasOwnProperty( 'popup_display_as' ) ) {
|
||||
|
||||
}
|
||||
|
||||
// Entrance Animation
|
||||
if ( model.changed.hasOwnProperty( 'popup_animation' ) ) {
|
||||
var popupContainer = popup.find('.wpr-popup-container');
|
||||
|
||||
popupContainer.removeAttr( 'class');
|
||||
popupContainer.addClass( 'wpr-popup-container animated '+ model.changed['popup_animation'] );
|
||||
}
|
||||
},
|
||||
|
||||
fixPopupLayout: function( popup ) {
|
||||
var settings = WprModalPopups.getDocumentSettings();
|
||||
|
||||
// Add Scrollbar
|
||||
if ( ! popup.find('.wpr-popup-container-inner').hasClass('ps') ) {
|
||||
const ps = new PerfectScrollbar(popup.find('.wpr-popup-container-inner')[0], {
|
||||
suppressScrollX: true
|
||||
});
|
||||
}
|
||||
|
||||
if ( 'notification' === settings.popup_display_as ) {
|
||||
popup.addClass( 'wpr-popup-notification' );
|
||||
}
|
||||
},
|
||||
|
||||
getDocumentSettings: function() {
|
||||
var documentSettings = {},
|
||||
settings = elementor.settings.page.model;
|
||||
|
||||
jQuery.each(settings.getActiveControls(), function (controlKey) {
|
||||
documentSettings[controlKey] = settings.attributes[controlKey];
|
||||
});
|
||||
|
||||
return documentSettings;
|
||||
},
|
||||
|
||||
settingsNotification: function() {
|
||||
// Get Close Time
|
||||
var closeTime = JSON.parse( localStorage.getItem( 'WprPopupEditorNotification') ) || {};
|
||||
|
||||
if ( closeTime + 604800000 >= Date.now() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Notification HTML
|
||||
var nHTML = '\
|
||||
<div id="wpr-template-settings-notification">\
|
||||
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
|
||||
<p>Click here to access <strong>Popup Settings</strong>.</p>\
|
||||
<i class="eicon-close"></i>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
// Render Notification
|
||||
$( 'body' ).append( nHTML ).hide().fadeIn();
|
||||
|
||||
// Hide on Click
|
||||
$( '#wpr-template-settings-notification .eicon-close' ).on( 'click', function() {
|
||||
$( '#wpr-template-settings-notification' ).fadeOut();
|
||||
|
||||
// Save Close Time in Browser
|
||||
localStorage.setItem( 'WprPopupEditorNotification', Date.now() );
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprModalPopups.init );
|
||||
|
||||
|
||||
// Theme Builder
|
||||
var WprTemplateEditor = {
|
||||
|
||||
init: function() {
|
||||
if ( ! $( 'body' ).hasClass( 'elementor-editor-wpr-theme-builder' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load Preview
|
||||
window.elementor.on( 'preview:loaded', WprTemplateEditor.onPreviewLoad );
|
||||
},
|
||||
|
||||
onPreviewLoad: function() {
|
||||
|
||||
// Open Popup Settings
|
||||
setTimeout(function() {
|
||||
$( '#elementor-panel-footer-settings' ).trigger( 'click' );
|
||||
}, 500 );
|
||||
|
||||
// Popup Settings Notification
|
||||
WprTemplateEditor.settingsNotification();
|
||||
|
||||
// Submit Preview Changes
|
||||
$( '#elementor-panel-footer-settings' ).on( 'click', function() {
|
||||
setTimeout(function() {
|
||||
|
||||
$( '.elementor-control-submit_preview_changes' ).on( 'click', function() {
|
||||
$( '#elementor-panel-saver-button-publish' ).trigger( 'click' );
|
||||
$( '#elementor-preview-loading' ).show();
|
||||
|
||||
|
||||
var saveChanges = setInterval(function() {
|
||||
if ( ! $( 'html' ).hasClass( 'nprogress-busy' ) ) {
|
||||
location.reload();
|
||||
clearInterval(saveChanges);
|
||||
}
|
||||
}, 500 );
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
settingsNotification: function() {
|
||||
// Get Close Time
|
||||
var closeTime = JSON.parse( localStorage.getItem( 'WprTemplateEditorNotification') ) || {};
|
||||
|
||||
if ( closeTime + 604800000 >= Date.now() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Notification HTML
|
||||
var nHTML = '\
|
||||
<div id="wpr-template-settings-notification">\
|
||||
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
|
||||
<p>You can change <strong>Preview Settings</strong> here.</p>\
|
||||
<i class="eicon-close"></i>\
|
||||
</div>\
|
||||
';
|
||||
|
||||
setTimeout(function() {
|
||||
// Render Notification
|
||||
$( 'body' ).append( nHTML ).hide().fadeIn();
|
||||
|
||||
// Set Close Time
|
||||
$( document ).on( 'click', function() {
|
||||
$( '#wpr-template-settings-notification' ).fadeOut();
|
||||
});
|
||||
|
||||
// Hide on Click
|
||||
$( '#wpr-template-settings-notification .eicon-close' ).on( 'click', function() {
|
||||
$( '#wpr-template-settings-notification' ).fadeOut();
|
||||
|
||||
// Save Close Time in Browser
|
||||
localStorage.setItem( 'WprTemplateEditorNotification', Date.now() );
|
||||
});
|
||||
}, 1000 );
|
||||
},
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprTemplateEditor.init );
|
||||
|
||||
}( jQuery ) );
|
||||
@@ -0,0 +1,440 @@
|
||||
( function( $ ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Elementor Editor Popup
|
||||
var WprElementorEditorPopup = {
|
||||
|
||||
loaded: false,
|
||||
|
||||
init: function() {
|
||||
window.elementor.on( 'preview:loaded', WprElementorEditorPopup.loadPreview );
|
||||
},
|
||||
|
||||
loadPreview: function() {
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-offcanvas.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-elementor-template.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/shortcode.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-advanced-slider.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-tabs.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-content-toggle.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-advanced-accordion.default', function( $scope ) {
|
||||
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
|
||||
} );
|
||||
},
|
||||
|
||||
renderPopup: function( link ) {
|
||||
// Open Editor
|
||||
WprElementorEditorPopup.getPopup().show();
|
||||
|
||||
// Render Iframe
|
||||
$( '#wpr-template-editor-popup .dialog-message').html( '<iframe src="' + $( this ).data( 'permalink' ) + '&elementor' + '" id="wpr-template-edit-frame" width="100%" height="100%"></iframe>' );
|
||||
|
||||
// Preloading
|
||||
$( '#wpr-template-editor-popup .dialog-message').append( '<div id="wpr-template-editor-loading"><div class="elementor-loader-wrapper"><div class="elementor-loader"><div class="elementor-loader-boxes"><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div></div></div><div class="elementor-loading-title">Loading</div></div></div>' );
|
||||
|
||||
// Loaded
|
||||
$( '#wpr-template-edit-frame').on( 'load', function() {
|
||||
$( '#wpr-template-editor-loading').fadeOut( 300 );
|
||||
} );
|
||||
|
||||
// Close
|
||||
$( '#wpr-template-editor-popup .dialog-close-button' ).css({
|
||||
'right' : '30px',
|
||||
'width' : '35px',
|
||||
'height' : '35px',
|
||||
'line-height' : '30px',
|
||||
'border-radius' : '50%',
|
||||
'text-align' : 'center',
|
||||
'opacity' : '1',
|
||||
'background-color' : '#333',
|
||||
'box-shadow' : '1px 1px 3px 0 #000',
|
||||
}).html('<i class="eicon-close"></i>');
|
||||
|
||||
$( '#wpr-template-editor-popup .dialog-close-button i' ).css({
|
||||
'font-size' : '15px',
|
||||
'color' : '#fff',
|
||||
})
|
||||
|
||||
$( '#wpr-template-editor-popup .dialog-close-button' ).on( 'click', function() {
|
||||
elementor.reloadPreview();
|
||||
});
|
||||
},
|
||||
|
||||
getPopup: function() {
|
||||
|
||||
if ( ! WprElementorEditorPopup.loaded ) {
|
||||
this.loaded = elementor.dialogsManager.createWidget( 'lightbox', {
|
||||
id: 'wpr-template-editor-popup',
|
||||
closeButton: true,
|
||||
hide: { onBackgroundClick: false }
|
||||
} );
|
||||
}
|
||||
|
||||
return WprElementorEditorPopup.loaded;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprElementorEditorPopup.init );
|
||||
|
||||
|
||||
// Modal Popups
|
||||
var WprModalPopups = {
|
||||
|
||||
init: function() {
|
||||
if ( ! $( 'body' ).hasClass( 'elementor-editor-wpr-popups' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load Preview
|
||||
window.elementor.on( 'preview:loaded', WprModalPopups.onPreviewLoad );
|
||||
|
||||
// Change Preview
|
||||
window.elementor.on( 'preview:loaded', WprModalPopups.onPreviewChange );
|
||||
|
||||
// Change Controls
|
||||
elementor.settings.page.model.on( 'change', WprModalPopups.onControlChange );
|
||||
},
|
||||
|
||||
onPreviewLoad: function() {
|
||||
// Open Popup Settings
|
||||
setTimeout(function() {
|
||||
if ( $( '#elementor-panel-footer-settings' ).length ) {
|
||||
$( '#elementor-panel-footer-settings' ).trigger( 'click' );
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
$( '#elementor-panel-footer-settings' ).trigger( 'click' );
|
||||
}, 5000);
|
||||
}
|
||||
}, 2000);
|
||||
|
||||
// Popup Settings Notification
|
||||
WprModalPopups.settingsNotification();
|
||||
|
||||
// Fix Popup Layout
|
||||
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/global', function( $scope ) {
|
||||
var popup = $scope.closest( '.wpr-template-popup' );
|
||||
|
||||
WprModalPopups.fixPopupLayout( popup );
|
||||
} );
|
||||
},
|
||||
|
||||
onPreviewChange: function() {
|
||||
// preview change code goes here
|
||||
},
|
||||
|
||||
onControlChange: function( model ) {
|
||||
var iframe = document.getElementById( 'elementor-preview-iframe' ),
|
||||
iframeContent = iframe.contentDocument || iframe.contentWindow.document;
|
||||
|
||||
// Popup
|
||||
var popup = $( '.wpr-template-popup', iframeContent );
|
||||
|
||||
// Scrollbar
|
||||
if ( model.changed.hasOwnProperty( 'popup_height' ) ) {
|
||||
// elementor.reloadPreview();
|
||||
}
|
||||
|
||||
// Display As
|
||||
if ( model.changed.hasOwnProperty( 'popup_display_as' ) ) {
|
||||
if ( 'notification' === model.changed['popup_display_as'] ) {
|
||||
popup.addClass( 'wpr-popup-notification' );
|
||||
} else {
|
||||
popup.removeClass( 'wpr-popup-notification' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( model.changed.hasOwnProperty( 'popup_display_as' ) ) {
|
||||
|
||||
}
|
||||
|
||||
// Entrance Animation
|
||||
if ( model.changed.hasOwnProperty( 'popup_animation' ) ) {
|
||||
var popupContainer = popup.find('.wpr-popup-container');
|
||||
|
||||
popupContainer.removeAttr( 'class');
|
||||
popupContainer.addClass( 'wpr-popup-container animated '+ model.changed['popup_animation'] );
|
||||
}
|
||||
},
|
||||
|
||||
fixPopupLayout: function( popup ) {
|
||||
var settings = WprModalPopups.getDocumentSettings();
|
||||
|
||||
// Add Scrollbar
|
||||
if ( ! popup.find('.wpr-popup-container-inner').hasClass('ps') ) {
|
||||
const ps = new PerfectScrollbar(popup.find('.wpr-popup-container-inner')[0], {
|
||||
suppressScrollX: true
|
||||
});
|
||||
}
|
||||
|
||||
if ( 'notification' === settings.popup_display_as ) {
|
||||
popup.addClass( 'wpr-popup-notification' );
|
||||
}
|
||||
},
|
||||
|
||||
getDocumentSettings: function() {
|
||||
var documentSettings = {},
|
||||
settings = elementor.settings.page.model;
|
||||
|
||||
jQuery.each(settings.getActiveControls(), function (controlKey) {
|
||||
documentSettings[controlKey] = settings.attributes[controlKey];
|
||||
});
|
||||
|
||||
return documentSettings;
|
||||
},
|
||||
|
||||
settingsNotification: function() {
|
||||
var version = $('#wpr-addons-editor-js-js').attr('src');
|
||||
version = 'v-'+ version.substring(version .length - 6, version .length);
|
||||
|
||||
// Get Close Time
|
||||
var closeTime = JSON.parse( localStorage.getItem( 'WprPopupEditorNotification'+ version) ) || {};
|
||||
|
||||
if ( closeTime + 604800000 >= Date.now() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Notification HTML
|
||||
if ( $('body').find('#elementor-editor-wrapper-v2').length > 0 ) {
|
||||
// Notification HTML
|
||||
var nHTML = '\
|
||||
<div id="wpr-template-settings-notification" class="wpr-new-editor-bar">\
|
||||
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
|
||||
<p>Click here to access <strong>Popup Settings</strong>.<br>Click our Logo to the bottom to open a <strong>Popup Library</strong>.</p>\
|
||||
<i class="eicon-close"></i>\
|
||||
</div>\
|
||||
';
|
||||
} else {
|
||||
var nHTML = '\
|
||||
<div id="wpr-template-settings-notification">\
|
||||
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
|
||||
<p>Click here to access <strong>Popup Settings</strong>.<br>Click our Logo to the right to open a <strong>Popup Library</strong>.</p>\
|
||||
<i class="eicon-close"></i>\
|
||||
</div>\
|
||||
';
|
||||
}
|
||||
|
||||
// Render Notification
|
||||
if ( $('body').find('#elementor-editor-wrapper-v2').length > 0 ) {
|
||||
$('body .MuiBox-root button[value="document-settings"]').append(nHTML).hide().fadeIn();
|
||||
} else {
|
||||
$( 'body' ).append( nHTML ).hide().fadeIn();
|
||||
}
|
||||
|
||||
// Hide on Click
|
||||
$( '#wpr-template-settings-notification .eicon-close' ).on( 'click', function() {
|
||||
$( '#wpr-template-settings-notification' ).fadeOut();
|
||||
|
||||
// Save Close Time in Browser
|
||||
localStorage.setItem( 'WprPopupEditorNotification'+ version, Date.now() );
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprModalPopups.init );
|
||||
|
||||
|
||||
// Theme Builder
|
||||
var WprThemeBuilder = {
|
||||
|
||||
init: function() {
|
||||
if ( ! $( 'body' ).hasClass( 'elementor-editor-wpr-theme-builder' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load Preview
|
||||
window.elementor.on( 'preview:loaded', WprThemeBuilder.onPreviewLoad );
|
||||
},
|
||||
|
||||
onPreviewLoad: function() {
|
||||
|
||||
// Popup Settings Notification
|
||||
WprThemeBuilder.settingsNotification();
|
||||
|
||||
// Submit Preview Changes
|
||||
$( '#elementor-panel-footer-settings' ).on( 'click', function() {
|
||||
setTimeout(function() {
|
||||
$( '.elementor-control-submit_preview_changes button' ).on( 'click', function() {
|
||||
$e.run('document/save/auto', {
|
||||
force: true,
|
||||
onSuccess: function onSuccess() {
|
||||
elementor.reloadPreview();
|
||||
elementor.once('preview:loaded', function () {
|
||||
$e.route('panel/page-settings/settings');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
settingsNotification: function() {
|
||||
var version = $('#wpr-addons-editor-js-js').attr('src');
|
||||
version = 'v-'+ version.substring(version .length - 6, version .length);
|
||||
|
||||
// Get Close Time
|
||||
var closeTime = JSON.parse( localStorage.getItem('WprThemeBuilderNotification'+ version) ) || {};
|
||||
|
||||
if ( closeTime + 604800000 >= Date.now() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $('body').find('#elementor-editor-wrapper-v2').length > 0 ) {
|
||||
// Notification HTML
|
||||
var nHTML = '\
|
||||
<div id="wpr-template-settings-notification" class="wpr-new-editor-bar">\
|
||||
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
|
||||
<p>You can change <strong>Preview Settings</strong> here.</p>\
|
||||
<i class="eicon-close"></i>\
|
||||
</div>\
|
||||
';
|
||||
} else {
|
||||
// Notification HTML
|
||||
var nHTML = '\
|
||||
<div id="wpr-template-settings-notification">\
|
||||
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
|
||||
<p>You can change <strong>Preview Settings</strong> here.</p>\
|
||||
<i class="eicon-close"></i>\
|
||||
</div>\
|
||||
';
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
// Render Notification
|
||||
if ( !$('#wpr-template-settings-notification').length ) {
|
||||
if ( $('body').find('#elementor-editor-wrapper-v2').length > 0 ) {
|
||||
$('body .MuiBox-root button[value="document-settings"]').append(nHTML).hide().fadeIn();
|
||||
} else {
|
||||
$('body').append(nHTML).hide().fadeIn();
|
||||
}
|
||||
|
||||
// Set Close Time
|
||||
$(document).on( 'click', function() {
|
||||
$('#wpr-template-settings-notification').fadeOut();
|
||||
});
|
||||
|
||||
// Hide on Click
|
||||
$('#wpr-template-settings-notification .eicon-close').on( 'click', function() {
|
||||
$( '#wpr-template-settings-notification' ).fadeOut();
|
||||
|
||||
// Save Close Time in Browser
|
||||
localStorage.setItem( 'WprThemeBuilderNotification'+ version, Date.now() );
|
||||
});
|
||||
}
|
||||
}, 1000 );
|
||||
},
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprThemeBuilder.init );
|
||||
|
||||
// Sticky Section Editor JS
|
||||
$(window).on('elementor:init', function () {
|
||||
elementor.settings.page.addChangeCallback( 'wpr_rpb_enable', function ( newValue ) {
|
||||
if('yes' == newValue ) {
|
||||
let wrpbHtml = '<div class="wpr-reading-progress-bar-container"><div class="wpr-reading-progress-bar wpr-mybar" id="wpr-mybar"></div></div>';
|
||||
$( elementorFrontend.elements.$body ).append( wrpbHtml );
|
||||
} else {
|
||||
if ( $( elementorFrontend.elements.$body ).find( '.wpr-reading-progress-bar-container' ).length ) {
|
||||
$( elementorFrontend.elements.$body ).find( '.wpr-reading-progress-bar-container' ).remove();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(window).on('elementor:init', function () {
|
||||
// Data Table
|
||||
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-data-table', function( panel, model, view ) {
|
||||
elementor.channels.editor.on( 'my-table-export',() => {
|
||||
|
||||
console.log('table exporting');
|
||||
// var html = view.$el.find('.wpr-data-table');
|
||||
var html = view.$el.find('.wpr-data-table').prop('outerHTML');
|
||||
htmlToCSV(html, "placeholder.csv", view);
|
||||
} );
|
||||
});
|
||||
});
|
||||
|
||||
function htmlToCSV(html, filename, view) {
|
||||
var data = [];
|
||||
var rows = view.$el.find('.wpr-data-table').find(".wpr-table-row");
|
||||
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
var row = [], cols = rows[i].querySelectorAll(".wpr-table-text");
|
||||
|
||||
for (var j = 0; j < cols.length; j++) {
|
||||
row.push(cols[j].innerText);
|
||||
}
|
||||
|
||||
data.push(row.join(","));
|
||||
}
|
||||
|
||||
downloadCSVFile(data.join("\n"), filename);
|
||||
}
|
||||
|
||||
function downloadCSVFile(csv, filename) {
|
||||
var csv_file, download_link;
|
||||
|
||||
csv_file = new Blob([csv], {type: "text/csv"});
|
||||
|
||||
download_link = document.createElement("a");
|
||||
|
||||
download_link.download = filename;
|
||||
|
||||
download_link.href = window.URL.createObjectURL(csv_file);
|
||||
|
||||
download_link.style.display = "none";
|
||||
|
||||
document.body.appendChild(download_link);
|
||||
|
||||
download_link.click();
|
||||
} // Data Table CSV export
|
||||
|
||||
}( jQuery ) );
|
||||
|
||||
function connectInstagramInit(obj) {
|
||||
|
||||
if (!obj) return;
|
||||
|
||||
var type = jQuery(obj).data("type");
|
||||
|
||||
console.log(type);
|
||||
|
||||
connectInstagram(obj, type);
|
||||
}
|
||||
|
||||
// $( window ).on( 'elementor:init', function() {
|
||||
|
||||
// $('.wpr-facebook-login').on('click', connectInstagramInit);
|
||||
|
||||
// function connectInstagramInit(obj) {
|
||||
|
||||
// if (!obj) return;
|
||||
|
||||
// var type = jQuery(obj).data("type");
|
||||
|
||||
// console.log(obj);
|
||||
|
||||
// connectInstagram(obj, type);
|
||||
// }
|
||||
// } );
|
||||
@@ -0,0 +1,449 @@
|
||||
( function( $ ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Modal Popups
|
||||
var WprLibraryTmpls = {
|
||||
|
||||
sectionIndex: null,
|
||||
contentID: 0,
|
||||
logoURL: white_label.logo_url,
|
||||
|
||||
init: function() {
|
||||
window.elementor.on( 'preview:loaded', WprLibraryTmpls.previewLoaded );
|
||||
},
|
||||
|
||||
previewLoaded: function() {
|
||||
var previewIframe = window.elementor.$previewContents,
|
||||
addNewSection = previewIframe.find( '.elementor-add-new-section' ),
|
||||
libraryButton = '<div id="wpr-library-btn" class="elementor-add-section-area-button" style="background:url('+ WprLibraryTmpls.logoURL +') no-repeat center center / contain;"></div>';
|
||||
|
||||
// Add Library Button
|
||||
var elementorAddSection = $("#tmpl-elementor-add-section"),
|
||||
elementorAddSectionText = elementorAddSection.text();
|
||||
elementorAddSectionText = elementorAddSectionText.replace('<div class="elementor-add-section-drag-title', libraryButton +'<div class="elementor-add-section-drag-title');
|
||||
elementorAddSection.text(elementorAddSectionText);
|
||||
|
||||
$( previewIframe ).on( 'click', '.elementor-editor-section-settings .elementor-editor-element-add', function() {
|
||||
var addNewSectionWrap = $(this).closest( '.elementor-top-section' ).prev( '.elementor-add-section' ),
|
||||
modelID = $(this).closest( '.elementor-top-section' ).data( 'model-cid' );
|
||||
|
||||
// Add Library Button
|
||||
if ( 0 == addNewSectionWrap.find( '#wpr-library-btn' ).length ) {
|
||||
setTimeout( function() {
|
||||
addNewSectionWrap.find( '.elementor-add-new-section' ).prepend( libraryButton );
|
||||
}, 110 );
|
||||
}
|
||||
|
||||
// Set Section Index
|
||||
if ( window.elementor.elements.models.length ) {
|
||||
$.each( window.elementor.elements.models, function( index, model ) {
|
||||
if ( modelID === model.cid ) {
|
||||
WprLibraryTmpls.sectionIndex = index;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
WprLibraryTmpls.contentID++;
|
||||
});
|
||||
|
||||
// Open Popup Predefined Styles
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type ) {
|
||||
setTimeout(function() {
|
||||
if ( 0 === previewIframe.find('.elementor-section-wrap.ui-sortable').children().length ) {
|
||||
previewIframe.find('#wpr-library-btn').trigger('click');
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
// Popup
|
||||
previewIframe.on( 'click', '#wpr-library-btn', function() {
|
||||
|
||||
// Render Popup
|
||||
WprLibraryTmpls.renderPopup( previewIframe );
|
||||
|
||||
// Render Content
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type && undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
|
||||
WprLibraryTmpls.renderPopupContent( previewIframe, 'popups' );
|
||||
} else {
|
||||
WprLibraryTmpls.renderPopupContent( previewIframe, 'blocks' );
|
||||
}
|
||||
|
||||
// Filter Content
|
||||
$(document).on( 'wpr-filter-popup-content', function() {
|
||||
var filter = previewIframe.find('#wpr-library-btn').attr('data-filter');
|
||||
previewIframe.find( '.wpr-tplib-sidebar ul li[data-filter="'+ filter +'"]' ).trigger('click');
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
renderPopup: function( previewIframe ) {
|
||||
// Render
|
||||
if ( previewIframe.find( '.wpr-tplib-popup' ).length == 0 ) {
|
||||
var headerNavigation = '<li data-tab="blocks" class="wpr-tplib-active-tab">Blocks</li>';
|
||||
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type ) {
|
||||
if ( undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
|
||||
var headerNavigation = '\
|
||||
<li data-tab="blocks">Blocks</li>\
|
||||
<li data-tab="popups" class="wpr-tplib-active-tab">Popups</li>';
|
||||
} else {
|
||||
var headerNavigation = '\
|
||||
<li data-tab="blocks" class="wpr-tplib-active-tab">Blocks</li>\
|
||||
<li data-tab="popups">Popups</li>';
|
||||
}
|
||||
}
|
||||
|
||||
previewIframe.find( 'body' ).append( '\
|
||||
<div class="wpr-tplib-popup-overlay">\
|
||||
<div class="wpr-tplib-popup">\
|
||||
<div class="wpr-tplib-header elementor-clearfix">\
|
||||
<div class="wpr-tplib-logo"><span class="wpr-library-icon" style="background:url('+ WprLibraryTmpls.logoURL +') no-repeat center center / contain;">RE</span>Library</div>\
|
||||
<div class="wpr-tplib-back" data-tab="">\
|
||||
<i class="eicon-chevron-left"></i> <span>Back to Library</span>\
|
||||
</div>\
|
||||
<ul>'+ headerNavigation +'</ul>\
|
||||
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span>Insert</span></span>\
|
||||
<div class="wpr-tplib-close"><i class="eicon-close"></i></div>\
|
||||
</div>\
|
||||
<div class="wpr-tplib-content-wrap elementor-clearfix">\
|
||||
</div>\
|
||||
<div class="wpr-tplib-preview-wrap"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
' );
|
||||
}
|
||||
|
||||
// Show Overlay
|
||||
$e.run( 'panel/close' );
|
||||
$('#wpr-template-settings-notification').hide();
|
||||
previewIframe.find('html').css('overflow','hidden');
|
||||
previewIframe.find('.wpr-tplib-preview-wrap iframe').remove();
|
||||
previewIframe.find( '.wpr-tplib-popup-overlay' ).show();
|
||||
|
||||
// Close
|
||||
previewIframe.find( '.wpr-tplib-close' ).on( 'click', function() {
|
||||
$e.run( 'panel/open' );
|
||||
$('#wpr-template-settings-notification').show();
|
||||
previewIframe.find('html').css('overflow','auto');
|
||||
|
||||
previewIframe.find( '.wpr-tplib-popup-overlay' ).fadeOut( 'fast', function() {
|
||||
previewIframe.find('.wpr-tplib-popup-overlay').remove();
|
||||
previewIframe.find('#wpr-library-btn').removeAttr('data-filter');
|
||||
});
|
||||
});
|
||||
|
||||
// Render Content
|
||||
previewIframe.find('.wpr-tplib-header').find('li').on( 'click', function() {
|
||||
previewIframe.find( '.wpr-tplib-header' ).find('li').removeClass( 'wpr-tplib-active-tab' );
|
||||
$(this).addClass( 'wpr-tplib-active-tab' );
|
||||
|
||||
// Render Tab Content
|
||||
WprLibraryTmpls.renderPopupContent( previewIframe, $(this).data('tab') );
|
||||
});
|
||||
|
||||
// Close Preview
|
||||
previewIframe.find( '.wpr-tplib-back' ).on( 'click', function() {
|
||||
$(this).hide();
|
||||
previewIframe.find('.wpr-tplib-close i').css('border-left', '0');
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').hide();
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').removeClass('wpr-tplib-insert-pro');
|
||||
previewIframe.find( '.wpr-tplib-preview-wrap' ).hide();
|
||||
previewIframe.find( '.wpr-tplib-preview-wrap' ).html('');
|
||||
previewIframe.find('.wpr-tplib-popup').css('overflow','hidden');
|
||||
|
||||
previewIframe.find( '.wpr-tplib-logo' ).show();
|
||||
previewIframe.find( '.wpr-tplib-header ul li' ).show();
|
||||
previewIframe.find( '.wpr-tplib-content-wrap' ).show();
|
||||
});
|
||||
},
|
||||
|
||||
renderPopupContent: function( previewIframe, tab ) {
|
||||
WprLibraryTmpls.renderPopupLoader( previewIframe );
|
||||
|
||||
// AJAX Data
|
||||
var data = {
|
||||
action: 'render_library_templates_'+ tab,
|
||||
};
|
||||
|
||||
// Update via AJAX
|
||||
$.post(ajaxurl, data, function( response ) {
|
||||
previewIframe.find( '.wpr-tplib-content-wrap' ).html( response );
|
||||
|
||||
// Render Preview
|
||||
}).always(function() {
|
||||
// Template Preview
|
||||
previewIframe.find( '.wpr-tplib-template-media' ).on( 'click', function() {
|
||||
var module = $(this).parent().data('filter'),
|
||||
template = $(this).parent().data('slug'),
|
||||
previewUrl = 'https://royal-elementor-addons.com/premade-styles/'+ $(this).parent().data('preview-url'),
|
||||
previewType = $(this).parent().data('preview-type'),
|
||||
proRefferal = '';
|
||||
|
||||
if ( $(this).closest('.wpr-tplib-pro-wrap').length ) {
|
||||
proRefferal = '-pro';
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').addClass('wpr-tplib-insert-pro');
|
||||
}
|
||||
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').attr('data-filter', module).attr('data-slug', template);
|
||||
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').html($(this).parent().find('.wpr-tplib-insert-template').html());
|
||||
|
||||
previewIframe.find('.wpr-tplib-close i').css('border-left', '1px solid #e8e8e8');
|
||||
|
||||
// Hide Extra
|
||||
previewIframe.find('.wpr-tplib-logo').hide();
|
||||
previewIframe.find('.wpr-tplib-header ul li').hide();
|
||||
previewIframe.find('.wpr-tplib-back').show();
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').show();
|
||||
|
||||
// Load Iframe
|
||||
previewIframe.find('.wpr-tplib-content-wrap').hide();
|
||||
previewIframe.find('.wpr-tplib-preview-wrap').show();
|
||||
|
||||
if ( 'iframe' == previewType ) {
|
||||
previewIframe.find('.wpr-tplib-preview-wrap').html( '<div class="wpr-tplib-iframe"><iframe src="'+ previewUrl +'?ref=rea-plugin-library-preview'+ proRefferal +'"></iframe></div>' );
|
||||
previewIframe.find('.wpr-tplib-popup').css('overflow','hidden');
|
||||
} else {
|
||||
previewUrl = previewUrl.replace('premade-styles', 'library/premade-styles');
|
||||
previewIframe.find('.wpr-tplib-preview-wrap').html( '<div class="wpr-tplib-image"><img src="'+ previewUrl +'"></div>' );
|
||||
|
||||
// Enable Scroll for Image Previews
|
||||
previewIframe.find('.wpr-tplib-popup').css('overflow','scroll');
|
||||
}
|
||||
});
|
||||
|
||||
// Filters
|
||||
previewIframe.find( '.wpr-tplib-filters-list ul li' ).on( 'click', function() {
|
||||
var current = $(this).attr( 'data-filter' );
|
||||
|
||||
// Show/Hide
|
||||
if ( 'all' === current ) {
|
||||
previewIframe.find( '.wpr-tplib-template' ).parent().show();
|
||||
} else {
|
||||
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
|
||||
previewIframe.find( '.wpr-tplib-template[data-filter="'+ current +'"]' ).parent().show();
|
||||
}
|
||||
|
||||
previewIframe.find('.wpr-tplib-filters h3 span').attr('data-filter', current).text($(this).text());
|
||||
|
||||
// Sub Filters - TODO: Enable When Pro is Integrated
|
||||
// if ( -1 !== current.indexOf('grid') ) {
|
||||
// previewIframe.find( '.wpr-tplib-sub-filters' ).show();
|
||||
// } else {
|
||||
// previewIframe.find( '.wpr-tplib-sub-filters' ).hide();
|
||||
// }
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
});
|
||||
|
||||
// Sub Filters
|
||||
previewIframe.find( '.wpr-tplib-sub-filters ul li' ).on( 'click', function() {
|
||||
var current = $(this).attr( 'data-sub-filter' ),
|
||||
parentFilter = previewIframe.find('.wpr-tplib-filters h3 span').attr('data-filter');
|
||||
|
||||
// Active Class
|
||||
previewIframe.find( '.wpr-tplib-sub-filters ul li' ).removeClass( 'wpr-tplib-activ-filter' );
|
||||
$(this).addClass( 'wpr-tplib-activ-filter' );
|
||||
|
||||
// Show/Hide
|
||||
if ( 'all' === current ) {
|
||||
previewIframe.find( '.wpr-tplib-template[data-filter="'+ parentFilter +'"]' ).parent().show();
|
||||
} else {
|
||||
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
|
||||
previewIframe.find( '.wpr-tplib-template[data-filter="'+ parentFilter +'"][data-sub-filter="'+ current +'"]' ).parent().show();
|
||||
}
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
});
|
||||
|
||||
// Search
|
||||
var keywords = [];
|
||||
|
||||
// previewIframe.find( '.wpr-tplib-template' ).each( function() {
|
||||
// var kw = $(this).attr( 'data-keywords' );
|
||||
// keywords[$(this).attr( 'data-slug' )] = kw.split( ', ' );
|
||||
// });
|
||||
|
||||
previewIframe.find( '.wpr-tplib-sidebar input' ).on( 'keyup', function() {
|
||||
if ( '' !== $(this).val() ) {
|
||||
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
|
||||
previewIframe.find( '.wpr-tplib-template[data-keywords*="'+ $(this).val() +'"]' ).parent().show();
|
||||
} else {
|
||||
previewIframe.find( '.wpr-tplib-template' ).parent().show();
|
||||
}
|
||||
});
|
||||
|
||||
// Import Template
|
||||
previewIframe.find( '.wpr-tplib-insert-template' ).on( 'click', function() {
|
||||
var module = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-filter' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-filter' ),
|
||||
template = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-slug' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-slug' ),
|
||||
activeTab = previewIframe.find('.wpr-tplib-active-tab').attr('data-tab');
|
||||
|
||||
// Popup Templates
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type && 'popups' === activeTab ) {
|
||||
module = 'popups/'+ module;
|
||||
}
|
||||
|
||||
// Purchase Page
|
||||
if ( $(this).hasClass('wpr-tplib-insert-pro') ) {
|
||||
var href = window.location.href,
|
||||
adminUrl = href.substring(0, href.indexOf('/wp-admin')+9);
|
||||
|
||||
// window.open(adminUrl +'/admin.php?page=wpr-addons-pricing', '_blank');
|
||||
window.open('https://royal-elementor-addons.com/?ref=rea-plugin-library-'+ module +'-upgrade-pro#purchasepro', '_blank');
|
||||
return;
|
||||
}
|
||||
|
||||
previewIframe.find('.wpr-tplib-content-wrap').show();
|
||||
previewIframe.find('.wpr-tplib-preview-wrap').hide();
|
||||
WprLibraryTmpls.renderPopupLoader( previewIframe );
|
||||
|
||||
// AJAX Data
|
||||
var data = {
|
||||
action: 'wpr_import_library_template',
|
||||
slug: module +'/'+ template
|
||||
};
|
||||
|
||||
// Update via AJAX
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
var importFile = response.substring( 0, response.length-1 ),
|
||||
importFile = JSON.parse( importFile );
|
||||
|
||||
importFile.content[0].id += WprLibraryTmpls.contentID;
|
||||
|
||||
// Insert Template
|
||||
window.elementor.getPreviewView().addChildModel( importFile.content, { at: WprLibraryTmpls.sectionIndex } );
|
||||
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type && 'popups' === activeTab ) {
|
||||
var defaults = {
|
||||
popup_trigger: 'load',
|
||||
popup_show_again_delay: '0',
|
||||
popup_load_delay: '1',
|
||||
popup_display_as: 'modal',
|
||||
popup_width: {
|
||||
unit: 'px',
|
||||
size: '650'
|
||||
},
|
||||
popup_height: 'auto',
|
||||
popup_align_hr: 'center',
|
||||
popup_align_vr: 'center',
|
||||
popup_content_align: 'flex-start',
|
||||
popup_animation: 'fadeIn',
|
||||
popup_animation_duration: '1',
|
||||
popup_overlay_display: 'yes',
|
||||
popup_close_button_display: 'yes',
|
||||
popup_container_bg_background: 'classic',
|
||||
popup_container_bg_position: 'center center',
|
||||
popup_container_bg_repeat: 'no-repeat',
|
||||
popup_container_bg_size: 'cover',
|
||||
popup_overlay_bg_background: 'classic',
|
||||
popup_container_padding: {
|
||||
isLinked: true,
|
||||
unit: 'px',
|
||||
top: 20,
|
||||
right: 20,
|
||||
bottom: 20,
|
||||
left: 20,
|
||||
},
|
||||
popup_container_radius: {
|
||||
isLinked: true,
|
||||
unit: 'px',
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
}
|
||||
};
|
||||
// Reset Defaults
|
||||
elementor.settings.page.model.set(defaults);
|
||||
|
||||
// Import Page Settings
|
||||
elementor.settings.page.model.set( importFile.page_settings );
|
||||
}
|
||||
|
||||
// Fix Update Button
|
||||
window.elementor.panel.$el.find('#elementor-panel-footer-saver-publish button').removeClass('elementor-disabled');
|
||||
window.elementor.panel.$el.find('#elementor-panel-footer-saver-options button').removeClass('elementor-disabled');
|
||||
|
||||
// Reset Section Index
|
||||
WprLibraryTmpls.sectionIndex = null;
|
||||
|
||||
// Close Library
|
||||
$e.run( 'panel/open' );
|
||||
$('#wpr-template-settings-notification').show();
|
||||
previewIframe.find('html').css('overflow','auto');
|
||||
previewIframe.find( '.wpr-tplib-popup-overlay' ).fadeOut( 'fast', function() {
|
||||
previewIframe.find('.wpr-tplib-popup-overlay').remove();
|
||||
previewIframe.find('#wpr-library-btn').removeAttr('data-filter');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).trigger('wpr-filter-popup-content');
|
||||
|
||||
previewIframe.find('.wpr-tplib-filters').on('click', function(){
|
||||
if ( '0' == previewIframe.find('.wpr-tplib-filters-list').css('opacity') ) {
|
||||
previewIframe.find('.wpr-tplib-filters-list').css({
|
||||
'opacity' : '1',
|
||||
'visibility' : 'visible'
|
||||
});
|
||||
} else {
|
||||
previewIframe.find('.wpr-tplib-filters-list').css({
|
||||
'opacity' : '0',
|
||||
'visibility' : 'hidden'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
previewIframe.on('click', function(){
|
||||
if ( '1' == previewIframe.find('.wpr-tplib-filters-list').css('opacity') ) {
|
||||
previewIframe.find('.wpr-tplib-filters-list').css({
|
||||
'opacity' : '0',
|
||||
'visibility' : 'hidden'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
|
||||
}); // end always
|
||||
|
||||
},
|
||||
|
||||
renderPopupLoader: function( previewIframe ) {
|
||||
previewIframe.find( '.wpr-tplib-content-wrap' ).prepend('<div class="wpr-tplib-loader"><div class="elementor-loader-wrapper"><div class="elementor-loader"><div class="elementor-loader-boxes"><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div></div></div><div class="elementor-loading-title">Loading</div></div></div>');
|
||||
},
|
||||
|
||||
renderPopupGrid: function( previewIframe ) {
|
||||
|
||||
// Run Macy
|
||||
var macy = Macy({
|
||||
container: previewIframe.find('.wpr-tplib-template-gird-inner')[0],
|
||||
waitForImages: true,
|
||||
margin: 30,
|
||||
columns: 5,
|
||||
breakAt: {
|
||||
1370: 4,
|
||||
940: 3,
|
||||
520: 2,
|
||||
400: 1
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function(){
|
||||
macy.recalculate(true);
|
||||
}, 300 );
|
||||
|
||||
setTimeout(function(){
|
||||
macy.recalculate(true);
|
||||
}, 600 );
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprLibraryTmpls.init );
|
||||
|
||||
}( jQuery ) );
|
||||
@@ -0,0 +1,799 @@
|
||||
( function( $ ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Modal Popups
|
||||
var WprLibraryTmpls = {
|
||||
|
||||
sectionIndex: null,
|
||||
contentID: 0,
|
||||
logoURL: white_label.logo_url,
|
||||
|
||||
init: function() {
|
||||
window.elementor.on( 'preview:loaded', WprLibraryTmpls.previewLoaded );
|
||||
},
|
||||
|
||||
previewLoaded: function() {
|
||||
var previewIframe = window.elementor.$previewContents,
|
||||
addNewSection = previewIframe.find( '.elementor-add-new-section' ),
|
||||
libraryButton = '<div id="wpr-library-btn" class="elementor-add-section-area-button" style="background:url('+ WprLibraryTmpls.logoURL +') no-repeat center center / contain;"></div>';
|
||||
|
||||
// Add Library Button
|
||||
var elementorAddSection = $("#tmpl-elementor-add-section"),
|
||||
elementorAddSectionText = elementorAddSection.text();
|
||||
elementorAddSectionText = elementorAddSectionText.replace('<div class="elementor-add-section-drag-title', libraryButton +'<div class="elementor-add-section-drag-title');
|
||||
elementorAddSection.text(elementorAddSectionText);
|
||||
|
||||
$( previewIframe ).on( 'click', '.elementor-editor-section-settings .elementor-editor-element-add', function() {
|
||||
var addNewSectionWrap = $(this).closest( '.elementor-top-section' ).prev( '.elementor-add-section' ),
|
||||
modelID = $(this).closest( '.elementor-top-section' ).data( 'model-cid' );
|
||||
|
||||
// Add Library Button
|
||||
if ( 0 == addNewSectionWrap.find( '#wpr-library-btn' ).length ) {
|
||||
setTimeout( function() {
|
||||
addNewSectionWrap.find( '.elementor-add-new-section' ).prepend( libraryButton );
|
||||
}, 110 );
|
||||
}
|
||||
|
||||
// Set Section Index
|
||||
if ( window.elementor.elements.models.length ) {
|
||||
$.each( window.elementor.elements.models, function( index, model ) {
|
||||
if ( modelID === model.cid ) {
|
||||
WprLibraryTmpls.sectionIndex = index;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
WprLibraryTmpls.contentID++;
|
||||
});
|
||||
|
||||
|
||||
// Open Popup Predefined Styles
|
||||
// TODO: Experiment Disable Library opening for Pupups
|
||||
// if ( 'wpr-popups' === window.elementor.config.document.type ) {
|
||||
// setTimeout(function() {
|
||||
// if ( 0 === previewIframe.find('.elementor-section-wrap.ui-sortable').children().length ) {
|
||||
// previewIframe.find('#wpr-library-btn').trigger('click');
|
||||
// }
|
||||
// }, 2000);
|
||||
// }
|
||||
|
||||
// Popup
|
||||
previewIframe.on( 'click', '#wpr-library-btn', function() {
|
||||
|
||||
// Render Popup
|
||||
WprLibraryTmpls.renderPopup( previewIframe );
|
||||
|
||||
// Render Content
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type && undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
|
||||
WprLibraryTmpls.renderPopupContent( previewIframe, 'popups' );
|
||||
} else if ( 'wp-post' === window.elementor.config.document.type && undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
|
||||
WprLibraryTmpls.renderPopupContent( previewIframe, 'sections' );
|
||||
} else if ( undefined !== previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
|
||||
previewIframe.find('.wpr-tplib-header').find('li').removeClass( 'wpr-tplib-active-tab' );
|
||||
previewIframe.find('.wpr-tplib-header').find('li[data-tab="blocks"]').addClass( 'wpr-tplib-active-tab' );
|
||||
WprLibraryTmpls.renderPopupContent( previewIframe, 'blocks' );
|
||||
} else {
|
||||
WprLibraryTmpls.renderPopupContent( previewIframe, 'pages' );
|
||||
}
|
||||
|
||||
// Filter Content
|
||||
$(document).on( 'wpr-filter-popup-content', function() {
|
||||
var filter = previewIframe.find('#wpr-library-btn').attr('data-filter');
|
||||
previewIframe.find( '.wpr-tplib-sidebar ul li[data-filter="'+ filter +'"]' ).trigger('click');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Booking tutorial link
|
||||
previewIframe.on( 'click', '#wpr-info-box a', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var url = $(this).attr('href');
|
||||
|
||||
if (url) {
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
renderPopup: function( previewIframe ) {
|
||||
// Render
|
||||
if ( previewIframe.find( '.wpr-tplib-popup' ).length == 0 ) {
|
||||
var headerNavigation = '';
|
||||
|
||||
if ( 'wp-post' === window.elementor.config.document.type ) {
|
||||
headerNavigation += '<li data-tab="pages">Pages</li>';
|
||||
headerNavigation += '<li data-tab="sections" class="wpr-tplib-active-tab">Sections</li>';
|
||||
} else {
|
||||
headerNavigation += '<li data-tab="pages" class="wpr-tplib-active-tab">Pages</li>';
|
||||
headerNavigation += '<li data-tab="sections">Sections</li>';
|
||||
}
|
||||
|
||||
headerNavigation += '<li data-tab="blocks">Blocks</li>';
|
||||
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type ) {
|
||||
if ( undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
|
||||
var headerNavigation = '\
|
||||
<li data-tab="popups" class="wpr-tplib-active-tab">Popups</li>\
|
||||
<li data-tab="sections">Sections</li>\
|
||||
<li data-tab="blocks">Blocks</li>';
|
||||
} else {
|
||||
var headerNavigation = '\
|
||||
<li data-tab="popups">Popups</li>\
|
||||
<li data-tab="sections">Sections</li>\
|
||||
<li data-tab="blocks" class="wpr-tplib-active-tab">Blocks</li>';
|
||||
}
|
||||
}
|
||||
|
||||
previewIframe.find( 'body' ).append( '\
|
||||
<div class="wpr-tplib-popup-overlay">\
|
||||
<div class="wpr-tplib-popup">\
|
||||
<div class="wpr-tplib-header elementor-clearfix">\
|
||||
<div class="wpr-tplib-logo"><span class="wpr-library-icon" style="background:url('+ WprLibraryTmpls.logoURL +') no-repeat center center / contain;">RE</span>Library</div>\
|
||||
<div class="wpr-tplib-back" data-tab="">\
|
||||
<i class="eicon-chevron-left"></i> <span>Back to Library</span>\
|
||||
</div>\
|
||||
<ul>'+ headerNavigation +'</ul>\
|
||||
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span>Insert</span></span>\
|
||||
<div class="wpr-tplib-close"><i class="eicon-close"></i></div>\
|
||||
</div>\
|
||||
<div class="wpr-tplib-content-wrap elementor-clearfix">\
|
||||
</div>\
|
||||
<div class="wpr-tplib-preview-wrap"></div>\
|
||||
</div>\
|
||||
</div>\
|
||||
' );
|
||||
}
|
||||
|
||||
// Show Overlay
|
||||
$e.run( 'panel/close' );
|
||||
$('#wpr-template-settings-notification').hide();
|
||||
previewIframe.find('html').css('overflow','hidden');
|
||||
previewIframe.find('.wpr-tplib-preview-wrap iframe').remove();
|
||||
previewIframe.find( '.wpr-tplib-popup-overlay' ).show();
|
||||
|
||||
// Close
|
||||
previewIframe.find( '.wpr-tplib-close' ).on( 'click', function() {
|
||||
$e.run( 'panel/open' );
|
||||
$('#wpr-template-settings-notification').show();
|
||||
previewIframe.find('html').css('overflow','auto');
|
||||
|
||||
previewIframe.find( '.wpr-tplib-popup-overlay' ).fadeOut( 'fast', function() {
|
||||
previewIframe.find('.wpr-tplib-popup-overlay').remove();
|
||||
previewIframe.find('#wpr-library-btn').removeAttr('data-filter');
|
||||
});
|
||||
});
|
||||
|
||||
// Render Content
|
||||
previewIframe.find('.wpr-tplib-header').find('li').on( 'click', function() {
|
||||
previewIframe.find( '.wpr-tplib-header' ).find('li').removeClass( 'wpr-tplib-active-tab' );
|
||||
$(this).addClass( 'wpr-tplib-active-tab' );
|
||||
|
||||
// Render Tab Content
|
||||
previewIframe.find('.wpr-tplib-content-wrap').html('');
|
||||
WprLibraryTmpls.renderPopupContent( previewIframe, $(this).data('tab') );
|
||||
});
|
||||
|
||||
// Close Preview
|
||||
previewIframe.find( '.wpr-tplib-back' ).on( 'click', function() {
|
||||
$(this).hide();
|
||||
previewIframe.find('.wpr-tplib-close i').css('border-left', '0');
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').hide();
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').removeClass('wpr-tplib-insert-pro').removeClass('wpr-tplib-insert-woo');
|
||||
previewIframe.find( '.wpr-tplib-preview-wrap' ).hide();
|
||||
previewIframe.find( '.wpr-tplib-preview-wrap' ).html('');
|
||||
previewIframe.find('.wpr-tplib-popup').css('overflow','hidden');
|
||||
|
||||
previewIframe.find( '.wpr-tplib-logo' ).show();
|
||||
previewIframe.find( '.wpr-tplib-header ul li' ).show();
|
||||
previewIframe.find( '.wpr-tplib-content-wrap' ).show();
|
||||
});
|
||||
},
|
||||
|
||||
renderPopupContent: function( previewIframe, tab, scrolling = false ) {
|
||||
WprLibraryTmpls.renderPopupLoader( previewIframe );
|
||||
|
||||
// AJAX Data
|
||||
var data = {
|
||||
action: 'render_library_templates_'+ tab
|
||||
};
|
||||
|
||||
// Update via AJAX
|
||||
$.post(ajaxurl, data, function( response ) {
|
||||
previewIframe.find('.wpr-tplib-content-wrap').html('');
|
||||
previewIframe.find('.wpr-tplib-content-wrap').html( response );
|
||||
|
||||
// Render Preview
|
||||
}).always(function() {
|
||||
// Template Preview
|
||||
WprLibraryTmpls.templateGridPreview(previewIframe);
|
||||
|
||||
// Filters
|
||||
previewIframe.find( '.wpr-tplib-filters-list ul li' ).on( 'click', function() {
|
||||
var current = $(this).attr( 'data-filter' );
|
||||
|
||||
// Show/Hide
|
||||
if ( 'all' === current ) {
|
||||
previewIframe.find( '.wpr-tplib-template' ).parent().show();
|
||||
} else {
|
||||
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
|
||||
previewIframe.find( '.wpr-tplib-template[data-filter="'+ current +'"]' ).parent().show();
|
||||
}
|
||||
|
||||
previewIframe.find('.wpr-tplib-filters h3 span').attr('data-filter', current).text($(this).text());
|
||||
|
||||
// Sub Filters - TODO: Enable When Pro is Integrated
|
||||
// if ( -1 !== current.indexOf('grid') ) {
|
||||
// previewIframe.find( '.wpr-tplib-sub-filters' ).show();
|
||||
// } else {
|
||||
// previewIframe.find( '.wpr-tplib-sub-filters' ).hide();
|
||||
// }
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
});
|
||||
|
||||
// Sub Filters
|
||||
previewIframe.find( '.wpr-tplib-sub-filters ul li' ).on( 'click', function() {
|
||||
var current = $(this).attr( 'data-sub-filter' ),
|
||||
parentFilter = previewIframe.find('.wpr-tplib-filters h3 span').attr('data-filter');
|
||||
|
||||
// Active Class
|
||||
previewIframe.find( '.wpr-tplib-sub-filters ul li' ).removeClass( 'wpr-tplib-activ-filter' );
|
||||
$(this).addClass( 'wpr-tplib-activ-filter' );
|
||||
|
||||
// Show/Hide
|
||||
if ( 'all' === current ) {
|
||||
previewIframe.find( '.wpr-tplib-template[data-filter="'+ parentFilter +'"]' ).parent().show();
|
||||
} else {
|
||||
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
|
||||
previewIframe.find( '.wpr-tplib-template[data-filter="'+ parentFilter +'"][data-sub-filter="'+ current +'"]' ).parent().show();
|
||||
}
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
});
|
||||
|
||||
// Price Filter
|
||||
previewIframe.find( '.wpr-tplib-price-list ul li' ).on( 'click', function() {
|
||||
// Get Search Query
|
||||
var search = previewIframe.find('.wpr-tplib-search input').val(),
|
||||
searchAttr = '' === search ? '' : '[data-title*="'+ search +'"]';
|
||||
|
||||
// Reset
|
||||
|
||||
|
||||
// Set Active
|
||||
previewIframe.find('.wpr-tplib-price').attr('data-filter', $(this).data('filter'));
|
||||
previewIframe.find('.wpr-tplib-price').find('h3 span').text( $(this).text() );
|
||||
|
||||
if ( 'free' === $(this).data('filter') ) {
|
||||
previewIframe.find('.wpr-tplib-template-wrap'+ searchAttr).show();
|
||||
previewIframe.find('.wpr-tplib-pro-wrap').hide();
|
||||
} else if ( 'pro' === $(this).data('filter') ) {
|
||||
previewIframe.find('.wpr-tplib-template-wrap').hide();
|
||||
previewIframe.find('.wpr-tplib-pro-wrap'+ searchAttr).show();
|
||||
} else {
|
||||
previewIframe.find('.wpr-tplib-template-wrap'+ searchAttr).show();
|
||||
}
|
||||
|
||||
// previewIframe.find('.wpr-tplib-template-wrap'+ searchAttr).show();
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
});
|
||||
|
||||
// Search
|
||||
var searchTimeout = null;
|
||||
|
||||
previewIframe.find( '.wpr-tplib-sidebar input' ).on( 'keyup', function() { // .wpr-tplib-search
|
||||
var val = $(this).val().toLowerCase();
|
||||
var price = previewIframe.find('.wpr-tplib-price').attr('data-filter');
|
||||
|
||||
if (searchTimeout != null) {
|
||||
clearTimeout(searchTimeout);
|
||||
}
|
||||
|
||||
searchTimeout = setTimeout(function() {
|
||||
searchTimeout = null;
|
||||
|
||||
let keywords = ["appointment", "book"]; // Keywords to look for
|
||||
|
||||
// Check if any keyword matches the input
|
||||
let keywordFound = keywords.some(function(keyword) {
|
||||
return keyword.includes(val) || val.includes(keyword);
|
||||
});
|
||||
|
||||
// If a keyword is found and the div doesn't already exist
|
||||
if (keywordFound && !(previewIframe.find('#wpr-info-box').length > 0)) {
|
||||
// Append the new div
|
||||
let infoBox = `
|
||||
<div id="wpr-info-box">
|
||||
Looking for Booking Solution? Check out the <a href="https://www.youtube.com/watch?v=asdMBXpd2Nw">Video Tutorial</a>.
|
||||
</div>
|
||||
`;
|
||||
previewIframe.find('.wpr-tplib-search').before(infoBox);
|
||||
}
|
||||
|
||||
// If no keyword is found and the div exists, remove it
|
||||
else if ( (!keywordFound || val === '') && previewIframe.find('#wpr-info-box').length > 0 ) {
|
||||
previewIframe.find('#wpr-info-box').remove();
|
||||
}
|
||||
|
||||
if ( 'pages' === tab ) {
|
||||
// Modify search to respect price filter
|
||||
if ('free' === price) {
|
||||
previewIframe.find('.wpr-tplib-pro-wrap').hide();
|
||||
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)[data-title*="'+ val +'"]').show();
|
||||
} else if ('pro' === price) {
|
||||
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)').hide();
|
||||
previewIframe.find('.wpr-tplib-pro-wrap[data-title*="'+ val +'"]').show();
|
||||
} else {
|
||||
WprLibraryTmpls.templateGridSearch(previewIframe, val);
|
||||
}
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
|
||||
elementorCommon.ajax.addRequest( 'wpr_templates_library_search_data', {
|
||||
data: {
|
||||
search_query: val,
|
||||
},
|
||||
success: function() {
|
||||
// console.log(val);
|
||||
}
|
||||
});
|
||||
} else if ( 'blocks' === tab ) {
|
||||
if ( '' !== val ) {
|
||||
previewIframe.find('.wpr-tplib-template-wrap').hide();
|
||||
previewIframe.find('.wpr-tplib-template-wrap[data-title*="'+ val +'"]').show();
|
||||
} else {
|
||||
previewIframe.find('.wpr-tplib-template-wrap').show();
|
||||
}
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
|
||||
elementorCommon.ajax.addRequest( 'wpr_templates_library_blocks_search_data', {
|
||||
data: {
|
||||
search_query: val,
|
||||
},
|
||||
success: function() {
|
||||
// console.log(val);
|
||||
}
|
||||
});
|
||||
} else if ( 'sections' === tab ) {
|
||||
if ( '' !== val ) {
|
||||
previewIframe.find('.wpr-tplib-template-wrap').hide();
|
||||
previewIframe.find('.wpr-tplib-template-wrap[data-title*="'+ val +'"]').show();
|
||||
} else {
|
||||
previewIframe.find('.wpr-tplib-template-wrap').show();
|
||||
}
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
|
||||
elementorCommon.ajax.addRequest( 'wpr_templates_library_sections_search_data', {
|
||||
data: {
|
||||
search_query: val,
|
||||
},
|
||||
success: function() {
|
||||
// console.log(val);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
// Import Template
|
||||
WprLibraryTmpls.templateGridImport(previewIframe);
|
||||
|
||||
$(document).trigger('wpr-filter-popup-content');
|
||||
|
||||
function showHideLibraryFilters( selector ) {
|
||||
previewIframe.find('.wpr-tplib-'+ selector).on('click', function(){
|
||||
if ( '0' == previewIframe.find('.wpr-tplib-'+ selector +'-list').css('opacity') ) {
|
||||
previewIframe.find('.wpr-tplib-'+ selector +'-list').css({
|
||||
'opacity' : '1',
|
||||
'visibility' : 'visible'
|
||||
});
|
||||
} else {
|
||||
previewIframe.find('.wpr-tplib-'+ selector +'-list').css({
|
||||
'opacity' : '0',
|
||||
'visibility' : 'hidden'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
previewIframe.on('click', function(){
|
||||
if ( '1' == previewIframe.find('.wpr-tplib-'+ selector +'-list').css('opacity') ) {
|
||||
previewIframe.find('.wpr-tplib-'+ selector +'-list').css({
|
||||
'opacity' : '0',
|
||||
'visibility' : 'hidden'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
showHideLibraryFilters('filters');
|
||||
showHideLibraryFilters('price');
|
||||
|
||||
WprLibraryTmpls.renderPopupGrid( previewIframe );
|
||||
|
||||
}); // end always
|
||||
|
||||
setTimeout(function(){
|
||||
WprLibraryTmpls.renderTemplatesGridContent(previewIframe, tab);
|
||||
}, 2000);
|
||||
|
||||
},
|
||||
|
||||
renderTemplatesGridContent: function(previewIframe, tab, page = 1,) {
|
||||
var data = {
|
||||
action: 'render_library_templates_pages_grid_items',
|
||||
page: page
|
||||
};
|
||||
|
||||
let isPagesActive = previewIframe.find('.wpr-tplib-header ul li[data-tab="pages"]').hasClass('wpr-tplib-active-tab');
|
||||
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
if ( !isPagesActive ) return;
|
||||
|
||||
previewIframe.find('.wpr-tplib-template-gird-inner').append(response);
|
||||
|
||||
var loading = ('' === response) ? false : true;
|
||||
|
||||
if (loading) {
|
||||
var searchVal = previewIframe.find('.wpr-tplib-sidebar input').val().toLowerCase();
|
||||
WprLibraryTmpls.templateGridSearch(previewIframe, searchVal);
|
||||
WprLibraryTmpls.renderPopupGrid(previewIframe);
|
||||
WprLibraryTmpls.templateGridPreview(previewIframe);
|
||||
WprLibraryTmpls.templateGridImport(previewIframe);
|
||||
|
||||
// Proceed to the next iteration
|
||||
setTimeout(function() {
|
||||
WprLibraryTmpls.renderTemplatesGridContent(previewIframe, tab, page + 1);
|
||||
}, 1000);
|
||||
} else {
|
||||
previewIframe.find('.wpr-tplib-template-gird-loading').fadeOut();
|
||||
}
|
||||
});
|
||||
|
||||
// Optimize lazy loading with IntersectionObserver
|
||||
var lazyImages = previewIframe.find('.wpr-tplib-template-gird img.lazy');
|
||||
if ("IntersectionObserver" in window) {
|
||||
var lazyImageObserver = new IntersectionObserver(function(entries, observer) {
|
||||
entries.forEach(function(entry) {
|
||||
if (entry.isIntersecting) {
|
||||
var lazyImage = $(entry.target);
|
||||
lazyImage.attr('src', lazyImage.data('src'));
|
||||
lazyImage.removeClass('lazy');
|
||||
lazyImageObserver.unobserve(entry.target);
|
||||
|
||||
$(window).trigger('resize');
|
||||
}
|
||||
});
|
||||
}, {
|
||||
rootMargin: '0px 0px 100px 0px', // Adjust the root margin to load images slightly later as they enter the viewport
|
||||
threshold: 0.1 // This sets the threshold for the IntersectionObserver. A value of 0.1 means the observer will trigger when 10% of the target element is visible in the viewport.
|
||||
});
|
||||
|
||||
lazyImages.each(function() {
|
||||
lazyImageObserver.observe(this);
|
||||
});
|
||||
} else {
|
||||
// Fallback for browsers that do not support IntersectionObserver
|
||||
var lazyLoadThrottleTimeout;
|
||||
function lazyLoad() {
|
||||
if (lazyLoadThrottleTimeout) {
|
||||
clearTimeout(lazyLoadThrottleTimeout);
|
||||
}
|
||||
|
||||
lazyLoadThrottleTimeout = setTimeout(function() {
|
||||
var scrollTop = $(window).scrollTop();
|
||||
lazyImages.each(function() {
|
||||
var img = $(this);
|
||||
if (img.offset().top < (window.innerHeight + scrollTop)) {
|
||||
img.attr('src', img.data('src'));
|
||||
img.removeClass('lazy');
|
||||
|
||||
$(window).trigger('resize');
|
||||
}
|
||||
});
|
||||
if (lazyImages.length == 0) {
|
||||
$(document).off("scroll", lazyLoad);
|
||||
$(window).off("resize", lazyLoad);
|
||||
$(window).off("orientationChange", lazyLoad);
|
||||
}
|
||||
}, 20);
|
||||
}
|
||||
|
||||
$(document).on("scroll", lazyLoad);
|
||||
$(window).on("resize", lazyLoad);
|
||||
$(window).on("orientationChange", lazyLoad);
|
||||
}
|
||||
},
|
||||
|
||||
templateGridSearch: function( previewIframe, value ) {
|
||||
var price = previewIframe.find('.wpr-tplib-price').attr('data-filter');
|
||||
|
||||
if ( '' !== value ) {
|
||||
previewIframe.find('.wpr-tplib-template-wrap').hide();
|
||||
|
||||
if ('free' === price) {
|
||||
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)[data-title*="'+ value +'"]').show();
|
||||
} else if ('pro' === price) {
|
||||
previewIframe.find('.wpr-tplib-pro-wrap[data-title*="'+ value +'"]').show();
|
||||
} else {
|
||||
previewIframe.find('.wpr-tplib-template-wrap[data-title*="'+ value +'"]').show();
|
||||
}
|
||||
} else {
|
||||
if ('free' === price) {
|
||||
previewIframe.find('.wpr-tplib-pro-wrap').hide();
|
||||
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)').show();
|
||||
} else if ('pro' === price) {
|
||||
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)').hide();
|
||||
previewIframe.find('.wpr-tplib-pro-wrap').show();
|
||||
} else {
|
||||
previewIframe.find('.wpr-tplib-template-wrap').show();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
templateGridPreview: function( previewIframe ) {
|
||||
previewIframe.find( '.wpr-tplib-template-media' ).on( 'click', function() {
|
||||
let activeTab = previewIframe.find('.wpr-tplib-active-tab').attr('data-tab');
|
||||
|
||||
var module = $(this).parent().data('filter'),
|
||||
template = $(this).parent().data('slug'),
|
||||
kitID = $(this).parent().data('kit'),
|
||||
previewUrl = 'sections' !== activeTab ? 'https://royal-elementor-addons.com/premade-styles/'+ $(this).parent().data('preview-url') : $(this).parent().find('img').attr('src'),
|
||||
previewType = $(this).parent().data('preview-type'),
|
||||
proRefferal = '';
|
||||
|
||||
if ( $(this).closest('.wpr-tplib-pro-wrap').length ) {
|
||||
proRefferal = '-pro';
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').addClass('wpr-tplib-insert-pro');
|
||||
}
|
||||
|
||||
if ( $(this).closest('.wpr-tplib-woo-wrap').length ) {
|
||||
proRefferal = '-pro';
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').addClass('wpr-tplib-insert-woo');
|
||||
}
|
||||
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').attr('data-filter', module).attr('data-slug', template).attr('data-kit', kitID);
|
||||
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').html($(this).parent().find('.wpr-tplib-insert-template').html());
|
||||
|
||||
previewIframe.find('.wpr-tplib-close i').css('border-left', '1px solid #e8e8e8');
|
||||
|
||||
// Hide Extra
|
||||
previewIframe.find('.wpr-tplib-logo').hide();
|
||||
previewIframe.find('.wpr-tplib-header ul li').hide();
|
||||
previewIframe.find('.wpr-tplib-back').show();
|
||||
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').show();
|
||||
|
||||
// Load Iframe
|
||||
previewIframe.find('.wpr-tplib-content-wrap').hide();
|
||||
previewIframe.find('.wpr-tplib-preview-wrap').show();
|
||||
|
||||
if ( 'iframe' == previewType ) {
|
||||
if ( undefined !== kitID ) {
|
||||
previewUrl = previewUrl.replace('https://', 'https://demosites.').replace('premade-styles', kitID);
|
||||
}
|
||||
|
||||
previewIframe.find('.wpr-tplib-preview-wrap').html( '<div class="wpr-tplib-iframe"><iframe src="'+ previewUrl +'?ref=rea-plugin-library-preview'+ proRefferal +'"></iframe></div>' );
|
||||
previewIframe.find('.wpr-tplib-popup').css('overflow','hidden');
|
||||
} else {
|
||||
previewUrl = previewUrl.replace('premade-styles', 'library/premade-styles');
|
||||
previewIframe.find('.wpr-tplib-preview-wrap').html( '<div class="wpr-tplib-image"><img src="'+ previewUrl +'"></div>' );
|
||||
|
||||
// Enable Scroll for Image Previews
|
||||
previewIframe.find('.wpr-tplib-popup').css('overflow','scroll');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
templateGridImport: function( previewIframe ) {
|
||||
previewIframe.find( '.wpr-tplib-insert-template' ).off('click');
|
||||
previewIframe.find( '.wpr-tplib-insert-template' ).on( 'click', function() {
|
||||
var module = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-filter' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-filter' ),
|
||||
template = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-slug' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-slug' ),
|
||||
kitID = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-kit' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-kit' ),
|
||||
sectionSlug = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-filter' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-filter' ),
|
||||
activeTab = previewIframe.find('.wpr-tplib-active-tab').attr('data-tab');
|
||||
|
||||
// Is Woo Template and Woo is not Active
|
||||
if ( $(this).closest('.wpr-tplib-template-wrap').hasClass('wpr-tplib-woo-wrap') || $(this).hasClass('wpr-tplib-insert-woo') ) {
|
||||
alert('In order to import this Template, Please activate WooCommerce plugin.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Popup Templates
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type && 'popups' === activeTab ) {
|
||||
module = 'popups/'+ module;
|
||||
}
|
||||
|
||||
// Purchase Page
|
||||
if ( $(this).hasClass('wpr-tplib-insert-pro') ) {
|
||||
var href = window.location.href,
|
||||
adminUrl = href.substring(0, href.indexOf('/wp-admin')+9);
|
||||
|
||||
// window.open(adminUrl +'/admin.php?page=wpr-addons-pricing', '_blank');
|
||||
window.open('https://royal-elementor-addons.com/?ref=rea-plugin-library-'+ module +'-upgrade-pro#purchasepro', '_blank');
|
||||
return;
|
||||
}
|
||||
|
||||
previewIframe.find('.wpr-tplib-content-wrap').show();
|
||||
previewIframe.find('.wpr-tplib-preview-wrap').hide();
|
||||
WprLibraryTmpls.renderPopupLoader( previewIframe );
|
||||
|
||||
// Template Slug
|
||||
template = template.includes('-zzz') ? template.replace('-zzz', '') : template;
|
||||
template = 'pages' === activeTab ? template : module +'/'+ template;
|
||||
sectionSlug = 'sections' === activeTab ? sectionSlug : '';
|
||||
|
||||
// AJAX Data
|
||||
var data = {
|
||||
action: 'wpr_import_library_template',
|
||||
nonce: WprLibFrontLoc.nonce,
|
||||
slug: template,
|
||||
kit: kitID,
|
||||
section: sectionSlug
|
||||
};
|
||||
|
||||
// Update via AJAX
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
if ( 0 == response ) {
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
|
||||
var importFile = response.substring( 0, response.length-1 ),
|
||||
importFile = JSON.parse( importFile );
|
||||
|
||||
console.log(importFile);
|
||||
|
||||
importFile.content[0].id += WprLibraryTmpls.contentID;
|
||||
|
||||
// Insert Template
|
||||
window.elementor.getPreviewView().addChildModel( importFile.content, { at: WprLibraryTmpls.sectionIndex } );
|
||||
|
||||
// Import Page Settings
|
||||
if ( 'undefined' !== typeof importFile.page_settings && undefined !== kitID ) {
|
||||
elementor.settings.page.model.set( importFile.page_settings );
|
||||
}
|
||||
|
||||
// Popups
|
||||
if ( 'wpr-popups' === window.elementor.config.document.type && 'popups' === activeTab ) {
|
||||
var defaults = {
|
||||
popup_trigger: 'load',
|
||||
popup_show_again_delay: '0',
|
||||
popup_load_delay: '1',
|
||||
popup_display_as: 'modal',
|
||||
popup_width: {
|
||||
unit: 'px',
|
||||
size: '650'
|
||||
},
|
||||
popup_height: 'auto',
|
||||
popup_align_hr: 'center',
|
||||
popup_align_vr: 'center',
|
||||
popup_content_align: 'flex-start',
|
||||
popup_animation: 'fadeIn',
|
||||
popup_animation_duration: '1',
|
||||
popup_overlay_display: 'yes',
|
||||
popup_close_button_display: 'yes',
|
||||
popup_container_bg_background: 'classic',
|
||||
popup_container_bg_position: 'center center',
|
||||
popup_container_bg_repeat: 'no-repeat',
|
||||
popup_container_bg_size: 'cover',
|
||||
popup_overlay_bg_background: 'classic',
|
||||
popup_container_padding: {
|
||||
isLinked: true,
|
||||
unit: 'px',
|
||||
top: 20,
|
||||
right: 20,
|
||||
bottom: 20,
|
||||
left: 20,
|
||||
},
|
||||
popup_container_radius: {
|
||||
isLinked: true,
|
||||
unit: 'px',
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
}
|
||||
};
|
||||
// Reset Defaults
|
||||
elementor.settings.page.model.set(defaults);
|
||||
|
||||
// Import Page Settings
|
||||
elementor.settings.page.model.set( importFile.page_settings );
|
||||
}
|
||||
|
||||
// Fix Update Button
|
||||
window.elementor.panel.$el.find('#elementor-panel-footer-saver-publish button').removeClass('elementor-disabled');
|
||||
window.elementor.panel.$el.find('#elementor-panel-footer-saver-options button').removeClass('elementor-disabled');
|
||||
|
||||
// Reset Section Index
|
||||
WprLibraryTmpls.sectionIndex = null;
|
||||
|
||||
// Close Library
|
||||
$e.run( 'panel/open' );
|
||||
$('#wpr-template-settings-notification').show();
|
||||
previewIframe.find('html').css('overflow','auto');
|
||||
previewIframe.find( '.wpr-tplib-popup-overlay' ).fadeOut( 'fast', function() {
|
||||
previewIframe.find('.wpr-tplib-popup-overlay').remove();
|
||||
previewIframe.find('#wpr-library-btn').removeAttr('data-filter');
|
||||
});
|
||||
}).success(function() {
|
||||
let block = 'blocks' === activeTab ? template : '',
|
||||
section = 'sections' === activeTab ? template : '';
|
||||
|
||||
console.log(section);
|
||||
// Run Import Finished
|
||||
elementorCommon.ajax.addRequest( 'wpr_library_template_import_finished', {
|
||||
data: {
|
||||
template: template,
|
||||
kit: kitID,
|
||||
block: block,
|
||||
section: section//tzz
|
||||
},
|
||||
success: function() {
|
||||
// console.log(block);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
renderPopupLoader: function( previewIframe ) {
|
||||
previewIframe.find( '.wpr-tplib-content-wrap' ).prepend('<div class="wpr-tplib-loader"><div class="elementor-loader-wrapper"><div class="elementor-loader"><div class="elementor-loader-boxes"><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div></div></div><div class="elementor-loading-title">Loading</div></div></div>');
|
||||
},
|
||||
|
||||
renderPopupGrid: function( previewIframe ) {
|
||||
let activeTab = previewIframe.find('.wpr-tplib-active-tab').attr('data-tab'),
|
||||
gColumns = 'sections' === activeTab ? 4 : 5;
|
||||
|
||||
// Run Macy
|
||||
var macy = Macy({
|
||||
container: previewIframe.find('.wpr-tplib-template-gird-inner')[0],
|
||||
waitForImages: true,
|
||||
margin: 30,
|
||||
columns: gColumns,
|
||||
breakAt: {
|
||||
1450: 4,
|
||||
940: 3,
|
||||
520: 2,
|
||||
400: 1
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function(){
|
||||
macy.recalculate(true);
|
||||
}, 300 );
|
||||
|
||||
setTimeout(function(){
|
||||
macy.recalculate(true);
|
||||
}, 600 );
|
||||
|
||||
// Debounce function to limit the rate of recalculation
|
||||
function debounce(func, wait) {
|
||||
let timeout;
|
||||
return function(...args) {
|
||||
const context = this;
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => func.apply(context, args), wait);
|
||||
};
|
||||
}
|
||||
|
||||
const debouncedRecalculate = debounce(() => {
|
||||
macy.recalculate(true);
|
||||
}, 300);
|
||||
|
||||
// Use debounced function on resize
|
||||
$(window).on('resize', debouncedRecalculate);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$( window ).on( 'elementor:init', WprLibraryTmpls.init );
|
||||
|
||||
}( jQuery ) );
|
||||
@@ -0,0 +1,409 @@
|
||||
jQuery(document).ready(function( $ ) {
|
||||
"use strict";
|
||||
|
||||
var WprMegaMenuSettings = {
|
||||
|
||||
getLiveSettings: WprMegaMenuSettingsData.settingsData,
|
||||
|
||||
init: function() {
|
||||
WprMegaMenuSettings.initSettingsButtons();
|
||||
},
|
||||
|
||||
initSettingsButtons: function() {
|
||||
$( '#menu-to-edit .menu-item' ).each( function() {
|
||||
var $this = $(this),
|
||||
id = WprMegaMenuSettings.getNavItemId($this),
|
||||
depth = WprMegaMenuSettings.getNavItemDepth($this);
|
||||
|
||||
// Settings Button
|
||||
$this.append('<div class="wpr-mm-settings-btn" data-id="'+ id +'" data-depth="'+ depth +'"><span>R</span>Mega Menu</div>');
|
||||
});
|
||||
|
||||
// Open Popup
|
||||
$('.wpr-mm-settings-btn').on( 'click', WprMegaMenuSettings.openSettingsPopup );
|
||||
},
|
||||
|
||||
openSettingsPopup: function() {
|
||||
// Set Settings
|
||||
WprMegaMenuSettings.setSettings( $(this) );
|
||||
|
||||
// Show Popup
|
||||
$('.wpr-mm-settings-popup-wrap').fadeIn();
|
||||
|
||||
// Close Temmplate Editor Popup
|
||||
WprMegaMenuSettings.closeTemplateEditorPopup();
|
||||
|
||||
// Menu Width
|
||||
WprMegaMenuSettings.initMenuWidthToggle();
|
||||
|
||||
// Mobile Content
|
||||
WprMegaMenuSettings.initMobileContentToggle();
|
||||
|
||||
// Color Pickers
|
||||
WprMegaMenuSettings.initColorPickers();
|
||||
|
||||
// Icon Picker
|
||||
WprMegaMenuSettings.initIconPicker();
|
||||
|
||||
// Close Settings Popup
|
||||
WprMegaMenuSettings.closeSettingsPopup();
|
||||
|
||||
// Save Settings
|
||||
WprMegaMenuSettings.saveSettings( $(this) );
|
||||
|
||||
// Edit Menu Button
|
||||
WprMegaMenuSettings.initEditMenuButton( $(this) );
|
||||
|
||||
// Set Tite
|
||||
$('.wpr-mm-popup-title').find('span').text( $(this).closest('li').find('.menu-item-title').text() );
|
||||
},
|
||||
|
||||
closeSettingsPopup: function() {
|
||||
$('.wpr-mm-settings-close-popup-btn').on('click', function() {
|
||||
$('.wpr-mm-settings-popup-wrap').fadeOut();
|
||||
});
|
||||
|
||||
$('.wpr-mm-settings-popup-wrap').on('click', function(e) {
|
||||
if(e.target !== e.currentTarget) return;
|
||||
$(this).fadeOut();
|
||||
});
|
||||
|
||||
// Unbind Click
|
||||
$('.wpr-save-mega-menu-btn').off('click');
|
||||
$('.wpr-edit-mega-menu-btn').off('click');
|
||||
},
|
||||
|
||||
initEditMenuButton: function( selector ) {
|
||||
$('.wpr-edit-mega-menu-btn').on('click', function() {
|
||||
var id = selector.attr('data-id'),
|
||||
depth = selector.attr('data-depth');
|
||||
|
||||
WprMegaMenuSettings.createOrEditMenuTemplate(id, depth);
|
||||
});
|
||||
},
|
||||
|
||||
createOrEditMenuTemplate: function(id, depth) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'wpr_create_mega_menu_template',
|
||||
nonce: WprMegaMenuSettingsData.nonce,
|
||||
item_id: id,
|
||||
item_depth: depth
|
||||
},
|
||||
success: function( response ) {
|
||||
console.log(response.data['edit_link']);
|
||||
WprMegaMenuSettings.openTemplateEditorPopup(response.data['edit_link']);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
openTemplateEditorPopup: function( editorLink ) {
|
||||
$('.wpr-mm-editor-popup-wrap').fadeIn();
|
||||
|
||||
if ( !$('.wpr-mm-editor-popup-iframe').find('iframe').length ) {
|
||||
$('.wpr-mm-editor-popup-iframe').append('<iframe src="'+ editorLink +'" width="100%" height="100%"></iframe>');
|
||||
}
|
||||
|
||||
// $('body').css('overflow','hidden');
|
||||
},
|
||||
|
||||
closeTemplateEditorPopup: function() {
|
||||
$('.wpr-mm-editor-close-popup-btn').on('click', function() {
|
||||
$('.wpr-mm-editor-popup-wrap').fadeOut();
|
||||
setTimeout(function() {
|
||||
$('.wpr-mm-editor-popup-iframe').find('iframe').remove();
|
||||
// $('body').css('overflow','visible');
|
||||
}, 1000);
|
||||
});
|
||||
},
|
||||
|
||||
initColorPickers: function() {
|
||||
$('.wpr-mm-setting-color').find('input').wpColorPicker();
|
||||
|
||||
// Fix Color Picker
|
||||
if ( $('.wpr-mm-setting-color').length ) {
|
||||
$('.wpr-mm-setting-color').find('.wp-color-result-text').text('Select Color');
|
||||
$('.wpr-mm-setting-color').find('.wp-picker-clear').val('Clear');
|
||||
}
|
||||
},
|
||||
|
||||
initIconPicker: function() {
|
||||
$('#wpr_mm_icon_picker').iconpicker();
|
||||
|
||||
// Bind iconpicker events to the element
|
||||
$('#wpr_mm_icon_picker').on('iconpickerSelected', function(event) {
|
||||
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:last-child').addClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').addClass(event.iconpickerValue);
|
||||
});
|
||||
|
||||
// Bind iconpicker events to the element
|
||||
$('#wpr_mm_icon_picker').on('iconpickerHide', function(event) {
|
||||
setTimeout(function() {
|
||||
if ( 'wpr-mm-active-icon' == $('.wpr-mm-setting-icon div span:first-child').attr('class') ) {
|
||||
$('#wpr_mm_icon_picker').val('')
|
||||
}
|
||||
|
||||
$('.wpr-mm-settings-wrap').removeAttr('style');
|
||||
},100);
|
||||
});
|
||||
|
||||
$('.wpr-mm-setting-icon div span:first-child').on('click', function() {
|
||||
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
|
||||
$(this).addClass('wpr-mm-active-icon');
|
||||
});
|
||||
|
||||
$('.wpr-mm-setting-icon div span:last-child').on('click', function() {
|
||||
$('#wpr_mm_icon_picker').focus();
|
||||
$('.wpr-mm-settings-wrap').css('overflow', 'hidden');
|
||||
});
|
||||
},
|
||||
|
||||
saveSettings: function( selector ) {
|
||||
var $saveButton = $('.wpr-save-mega-menu-btn');
|
||||
|
||||
// Reset
|
||||
$saveButton.text('Save');
|
||||
|
||||
$saveButton.on('click', function() {
|
||||
var id = selector.attr('data-id'),
|
||||
depth = selector.attr('data-depth'),
|
||||
settings = WprMegaMenuSettings.getSettings();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'wpr_save_mega_menu_settings',
|
||||
nonce: WprMegaMenuSettingsData.nonce,
|
||||
item_id: id,
|
||||
item_depth: depth,
|
||||
item_settings: settings
|
||||
},
|
||||
success: function( response ) {
|
||||
$saveButton.text('Saved');
|
||||
$saveButton.append('<span class="dashicons dashicons-yes"></span>');
|
||||
|
||||
setTimeout(function() {
|
||||
$saveButton.find('.dashicons').remove();
|
||||
$saveButton.text('Save');
|
||||
$saveButton.blur();
|
||||
}, 1000);
|
||||
|
||||
// Update Settings
|
||||
WprMegaMenuSettings.getLiveSettings[id] = settings;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
getSettings: function() {
|
||||
var settings = {};
|
||||
|
||||
$('.wpr-mm-setting').each(function() {
|
||||
var $this = $(this),
|
||||
checkbox = $this.find('input[type="checkbox"]'),
|
||||
select = $this.find('select'),
|
||||
number = $this.find('input[type="number"]'),
|
||||
text = $this.find('input[type="text"]');
|
||||
|
||||
// Checkbox
|
||||
if ( checkbox.length ) {
|
||||
let id = checkbox.attr('id');
|
||||
settings[id] = checkbox.prop('checked') ? 'true' : 'false';
|
||||
}
|
||||
|
||||
// Select
|
||||
if ( select.length ) {
|
||||
let id = select.attr('id');
|
||||
settings[id] = select.val();
|
||||
}
|
||||
|
||||
// Multi Value
|
||||
// if ( $this.hasClass('wpr-mm-setting-radius') ) {
|
||||
// let multiValue = [],
|
||||
// id = $this.find('input').attr('id');
|
||||
|
||||
// $this.find('input').each(function() {
|
||||
// multiValue.push($(this).val());
|
||||
// });
|
||||
|
||||
// settings[id] = multiValue;
|
||||
// }
|
||||
|
||||
// Number
|
||||
if ( number.length ) {
|
||||
let id = number.attr('id');
|
||||
settings[id] = number.val();
|
||||
}
|
||||
|
||||
// Text
|
||||
if ( text.length ) {
|
||||
let id = text.attr('id');
|
||||
|
||||
if ( 'wpr_mm_icon_picker' !== id ) {
|
||||
settings[id] = text.val();
|
||||
} else {
|
||||
let icon_class = $('.wpr-mm-setting-icon div span.wpr-mm-active-icon').find('i').attr('class');
|
||||
settings[id] = 'fas fa-ban' !== icon_class ? icon_class : '';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return settings;
|
||||
},
|
||||
|
||||
getNavItemId: function( item ) {
|
||||
var id = item.attr( 'id' );
|
||||
return id.replace( 'menu-item-', '' );
|
||||
},
|
||||
|
||||
getNavItemDepth: function( item ) {
|
||||
var depthClass = item.attr( 'class' ).match( /menu-item-depth-\d/ );
|
||||
|
||||
if ( ! depthClass[0] ) {
|
||||
return 0;
|
||||
} else {
|
||||
return depthClass[0].replace( 'menu-item-depth-', '' );
|
||||
}
|
||||
},
|
||||
|
||||
initMenuWidthToggle: function() {
|
||||
var select = $('#wpr_mm_width'),
|
||||
option = $('#wpr_mm_custom_width').closest('.wpr-mm-setting');
|
||||
|
||||
if ( 'custom' === select.val() ) {
|
||||
option.show();
|
||||
} else {
|
||||
option.hide();
|
||||
}
|
||||
|
||||
select.on('change', function() {
|
||||
if ( 'custom' === select.val() ) {
|
||||
option.show();
|
||||
} else {
|
||||
option.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
initMobileContentToggle: function() {
|
||||
var select = $('#wpr_mm_mobile_content'),
|
||||
option = $('#wpr_mm_render').closest('.wpr-mm-setting');
|
||||
|
||||
if ( 'mega' === select.val() ) {
|
||||
option.show();
|
||||
} else {
|
||||
option.hide();
|
||||
}
|
||||
|
||||
select.on('change', function() {
|
||||
if ( 'mega' === select.val() ) {
|
||||
option.show();
|
||||
} else {
|
||||
option.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
setSettings: function( selector ) {
|
||||
var id = selector.attr('data-id'),
|
||||
settings = WprMegaMenuSettings.getLiveSettings[id];
|
||||
|
||||
if ( ! $.isEmptyObject(settings) ) {
|
||||
// General
|
||||
if ( 'true' == settings['wpr_mm_enable'] ) {
|
||||
$('#wpr_mm_enable').prop( 'checked', true );
|
||||
} else {
|
||||
$('#wpr_mm_enable').prop( 'checked', false );
|
||||
}
|
||||
|
||||
$('#wpr_mm_position').val(settings['wpr_mm_position']).trigger('change');
|
||||
$('#wpr_mm_width').val(settings['wpr_mm_width']).trigger('change');
|
||||
$('#wpr_mm_custom_width').val(settings['wpr_mm_custom_width']);
|
||||
$('#wpr_mm_render').val(settings['wpr_mm_render']).trigger('change');
|
||||
$('#wpr_mm_mobile_content').val(settings['wpr_mm_mobile_content']).trigger('change');
|
||||
|
||||
// Icon
|
||||
if ( '' !== settings['wpr_mm_icon_picker'] ) {
|
||||
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:last-child').addClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').addClass(settings['wpr_mm_icon_picker']);
|
||||
} else {
|
||||
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:first-child').addClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').addClass('fas fa-angle-down');
|
||||
}
|
||||
$('#wpr_mm_icon_color').val(settings['wpr_mm_icon_color']).trigger('keyup');
|
||||
$('#wpr_mm_icon_size').val(settings['wpr_mm_icon_size']);
|
||||
|
||||
// Badge
|
||||
$('#wpr_mm_badge_text').val(settings['wpr_mm_badge_text']);
|
||||
$('#wpr_mm_badge_color').val(settings['wpr_mm_badge_color']).trigger('keyup');
|
||||
$('#wpr_mm_badge_bg_color').val(settings['wpr_mm_badge_bg_color']).trigger('keyup');
|
||||
if ( 'true' == settings['wpr_mm_badge_animation'] ) {
|
||||
$('#wpr_mm_badge_animation').prop( 'checked', true );
|
||||
} else {
|
||||
$('#wpr_mm_badge_animation').prop( 'checked', false );
|
||||
}
|
||||
|
||||
// Default Values
|
||||
} else {
|
||||
// General
|
||||
$('#wpr_mm_enable').prop( 'checked', false );
|
||||
$('#wpr_mm_position').val('default').trigger('change');
|
||||
$('#wpr_mm_width').val('default').trigger('change');
|
||||
$('#wpr_mm_custom_width').val('600');
|
||||
$('#wpr_mm_render').val('default').trigger('change');
|
||||
$('#wpr_mm_mobile_content').val('mega').trigger('change');
|
||||
|
||||
// Icon
|
||||
if ( '' !== settings['wpr_mm_icon_picker'] ) {
|
||||
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:first-child').addClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').addClass('fas fa-angle-down');
|
||||
}
|
||||
$('#wpr_mm_icon_color').val('').trigger('change');
|
||||
$('#wpr_mm_icon_size').val('');
|
||||
|
||||
// Badge
|
||||
$('#wpr_mm_badge_text').val('');
|
||||
$('#wpr_mm_badge_color').val('#ffffff').trigger('keyup');
|
||||
$('#wpr_mm_badge_bg_color').val('#000000').trigger('keyup');
|
||||
$('#wpr_mm_badge_animation').prop( 'checked', false );
|
||||
}
|
||||
|
||||
if ( 'false' === $('.wpr-mm-settings-wrap').attr('data-pro-active') ) {
|
||||
$('#wpr_mm_render').val('default').trigger('change');
|
||||
$('#wpr_mm_mobile_content').val('mega').trigger('change');
|
||||
|
||||
// Icon
|
||||
if ( '' !== settings['wpr_mm_icon_picker'] ) {
|
||||
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:first-child').addClass('wpr-mm-active-icon');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
|
||||
$('.wpr-mm-setting-icon div span:last-child i').addClass('fas fa-angle-down');
|
||||
}
|
||||
$('#wpr_mm_icon_color').val('').trigger('change');
|
||||
$('#wpr_mm_icon_size').val('');
|
||||
|
||||
// Badge
|
||||
$('#wpr_mm_badge_text').val('');
|
||||
$('#wpr_mm_badge_color').val('#ffffff').trigger('keyup');
|
||||
$('#wpr_mm_badge_bg_color').val('#000000').trigger('keyup');
|
||||
$('#wpr_mm_badge_animation').prop( 'checked', false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Init
|
||||
WprMegaMenuSettings.init();
|
||||
|
||||
});
|
||||
@@ -0,0 +1,53 @@
|
||||
jQuery(document).ready(function ($) {
|
||||
|
||||
// Uploading files
|
||||
var file_frame;
|
||||
|
||||
jQuery.fn.upload_secondary_image = function (button) {
|
||||
var button_id = button.attr('id');
|
||||
var field_id = button_id.replace('_button', '');
|
||||
|
||||
// If the media frame already exists, reopen it.
|
||||
if (file_frame) {
|
||||
file_frame.open();
|
||||
return;
|
||||
}
|
||||
|
||||
// Create the media frame.
|
||||
file_frame = wp.media.frames.file_frame = wp.media({
|
||||
title: jQuery(this).data('uploader_title'),
|
||||
button: {
|
||||
text: jQuery(this).data('uploader_button_text'),
|
||||
},
|
||||
multiple: false
|
||||
});
|
||||
|
||||
// When an image is selected, run a callback.
|
||||
file_frame.on('select', function () {
|
||||
var attachment = file_frame.state().get('selection').first().toJSON();
|
||||
jQuery("#" + field_id).val(attachment.id);
|
||||
jQuery("#wpr-secondary-image img").attr('src', attachment.url);
|
||||
jQuery('#wpr-secondary-image img').show();
|
||||
jQuery('#' + button_id).attr('id', 'remove_secondary_image_button');
|
||||
jQuery('#remove_secondary_image_button').text('Remove secondary image');
|
||||
});
|
||||
|
||||
// Finally, open the modal
|
||||
file_frame.open();
|
||||
};
|
||||
|
||||
jQuery('#wpr-secondary-image').on('click', '#upload_secondary_image_button', function (event) {
|
||||
event.preventDefault();
|
||||
jQuery.fn.upload_secondary_image(jQuery(this));
|
||||
});
|
||||
|
||||
jQuery('#wpr-secondary-image').on('click', '#remove_secondary_image_button', function (event) {
|
||||
event.preventDefault();
|
||||
jQuery('#upload_secondary_image').val('');
|
||||
jQuery('#wpr-secondary-image img').attr('src', '');
|
||||
jQuery('#wpr-secondary-image img').hide();
|
||||
jQuery(this).attr('id', 'upload_secondary_image_button');
|
||||
jQuery('#upload_secondary_image_button').text('Set secondary image');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,961 @@
|
||||
jQuery(document).ready(function( $ ) {
|
||||
"use strict";
|
||||
|
||||
// Condition Selects
|
||||
var globalS = '.global-condition-select',
|
||||
archiveS = '.archives-condition-select',
|
||||
singleS = '.singles-condition-select',
|
||||
inputIDs = '.wpr-condition-input-ids';
|
||||
|
||||
// Condition Popup
|
||||
var conditionPupup = $( '.wpr-condition-popup-wrap' );
|
||||
|
||||
// Current Tab
|
||||
var currentTab = $('.nav-tab-active').attr( 'data-title' );
|
||||
if ( currentTab ) {
|
||||
currentTab = currentTab.trim().toLowerCase(),
|
||||
currentTab = currentTab.replace(' ', '_');
|
||||
}
|
||||
|
||||
/*
|
||||
** Get Active Filter -------------------------
|
||||
*/
|
||||
function getActiveFilter() {
|
||||
var type = currentTab.replace( /\W+/g, '-' ).toLowerCase();
|
||||
if ( $('.template-filters').length > 0 ) {
|
||||
type = $('.template-filters .active-filter').last().attr('data-class');
|
||||
type = type.substring( 0, type.length - 1);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/*
|
||||
** Render User Template -------------------------
|
||||
*/
|
||||
function renderUserTemplate( type, title, slug, id ) {
|
||||
var html = '';
|
||||
|
||||
html += '<li>';
|
||||
html += '<h3 class="wpr-title">'+ title +'</h3>';
|
||||
html += '<div class="wpr-action-buttons">';
|
||||
html += '<span class="wpr-template-conditions button-primary" data-slug="'+ slug +'">Manage Conditions</span>';
|
||||
html += '<a href="post.php?post='+ id +'&action=elementor" class="wpr-edit-template button-primary">Edit Template</a>';
|
||||
html += '<span class="wpr-delete-template button-primary" data-slug="'+ slug +'" data-warning="Are you sure you want to delete this template?"><span class="dashicons dashicons-no-alt"></span></span>';
|
||||
html += '</div>';
|
||||
html += '</li>';
|
||||
|
||||
// Render
|
||||
$( '.wpr-my-templates-list.wpr-'+ getActiveFilter() +'-templates-list' ).prepend( html );
|
||||
|
||||
if ( $('.wpr-empty-templates-message').length ) {
|
||||
$('.wpr-empty-templates-message').remove();
|
||||
}
|
||||
|
||||
// Run Functions
|
||||
changeTemplateConditions();
|
||||
deleteTemplate();
|
||||
}
|
||||
|
||||
/*
|
||||
** Create User Template -------------------------
|
||||
*/
|
||||
function createUserTemplate() {
|
||||
// Get Template Library
|
||||
var library = 'my_templates' === getActiveFilter() ? 'elementor_library' : 'wpr_templates';
|
||||
// Get Template Title
|
||||
var title = $('.wpr-user-template-title').val();
|
||||
|
||||
// Get Template Slug
|
||||
var slug = 'user-'+ getActiveFilter() +'-'+ title.replace( /\W+/g, '-' ).toLowerCase();
|
||||
|
||||
if ( 'elementor_library' === library ) {
|
||||
slug = getActiveFilter() +'-'+ title.replace( /\W+/g, '-' ).toLowerCase();
|
||||
}
|
||||
|
||||
// AJAX Data
|
||||
var data = {
|
||||
action: 'wpr_create_template',
|
||||
nonce: WprPluginOptions.nonce,
|
||||
user_template_library: library,
|
||||
user_template_title: title,
|
||||
user_template_slug: slug,
|
||||
user_template_type: getActiveFilter(),
|
||||
};
|
||||
|
||||
// Create Template
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
// Close Popup
|
||||
$('.wpr-user-template-popup-wrap').fadeOut();
|
||||
|
||||
// Open Conditions
|
||||
setTimeout(function() {
|
||||
// Get Template ID
|
||||
var id = response.substring( 0, response.length - 1 );
|
||||
|
||||
// Redirect User to Editor
|
||||
if ( 'my_templates' === currentTab.replace( /\W+/g, '-' ).toLowerCase() ) {
|
||||
window.location.href = 'post.php?post='+ id +'&action=elementor';
|
||||
return;
|
||||
}
|
||||
|
||||
// Set Template Slug & ID
|
||||
$( '.wpr-save-conditions' ).attr( 'data-slug', slug ).attr( 'data-id', id );
|
||||
|
||||
// Render Template
|
||||
renderUserTemplate( getActiveFilter(), $('.wpr-user-template-title').val(), slug, id );
|
||||
|
||||
if ( $('.wpr-no-templates').length ) {
|
||||
$('.wpr-no-templates').hide();
|
||||
}
|
||||
|
||||
// Open Popup
|
||||
openConditionsPopup( slug );
|
||||
conditionPupup.addClass( 'editor-redirect' );
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
// Open Popup
|
||||
$('.wpr-user-template').on( 'click', function() {
|
||||
if ( $(this).find('div').length ) {
|
||||
alert('Please Install/Activate WooCommerce!');
|
||||
return;
|
||||
}
|
||||
|
||||
$('.wpr-user-template-title').val('');
|
||||
$('.wpr-user-template-popup-wrap').fadeIn();
|
||||
});
|
||||
|
||||
// Close Popup
|
||||
$('.wpr-user-template-popup').find('.close-popup').on( 'click', function() {
|
||||
$('.wpr-user-template-popup-wrap').fadeOut();
|
||||
});
|
||||
|
||||
// Create - Click
|
||||
$('.wpr-create-template').on( 'click', function() {
|
||||
if ( '' === $('.wpr-user-template-title').val() ) {
|
||||
$('.wpr-user-template-title').css('border-color', 'red');
|
||||
if ( $('.wpr-fill-out-the-title').length < 1 ) {
|
||||
$('.wpr-create-template').before('<p class="wpr-fill-out-the-title"><em>Please fill the Title field.</em></p>');
|
||||
$('.wpr-fill-out-the-title').css('margin-top', '4px');
|
||||
$('.wpr-fill-out-the-title em').css({'color': '#7f8b96', 'font-size': 'smaller'});
|
||||
}
|
||||
} else {
|
||||
$('.wpr-user-template-title').removeAttr('style');
|
||||
$('.wpr-create-template + p').remove();
|
||||
|
||||
// Create Template
|
||||
createUserTemplate();
|
||||
}
|
||||
});
|
||||
|
||||
// Create - Enter Key
|
||||
$('.wpr-user-template-title').keypress(function(e) {
|
||||
if ( e.which == 13 ) {
|
||||
e.preventDefault();
|
||||
createUserTemplate();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
** Reset Template -------------------------
|
||||
*/
|
||||
function deleteTemplate() {
|
||||
$( '.wpr-delete-template' ).on( 'click', function() {
|
||||
|
||||
// Buttons
|
||||
var deleteButton = $(this);
|
||||
|
||||
if ( ! confirm(deleteButton.data('warning')) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get Template Library
|
||||
var library = 'my_templates' === getActiveFilter() ? 'elementor_library' : 'wpr_templates';
|
||||
|
||||
// Get Template Slug
|
||||
var slug = deleteButton.attr('data-slug');
|
||||
|
||||
var oneTimeNonce = deleteButton.attr('data-nonce');
|
||||
|
||||
// AJAX Data
|
||||
var data = {
|
||||
nonce: oneTimeNonce,
|
||||
action: 'wpr_delete_template',
|
||||
template_slug: slug,
|
||||
template_library: library,
|
||||
};
|
||||
|
||||
// Remove Template via AJAX
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
deleteButton.closest('li').remove();
|
||||
});
|
||||
|
||||
// Save Conditions
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
setTimeout(function(){
|
||||
if ( $('.wpr-my-templates-list li').length === 0 ) {
|
||||
$('.wpr-my-templates-list').append('<li class="wpr-no-templates">You don\'t have any templates yet!</li>');
|
||||
// $('.wpr-no-templates').hide();
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
|
||||
// Delete associated Conditions
|
||||
if ( 'my_templates' !== getActiveFilter() ) {
|
||||
var conditions = JSON.parse($( '#wpr_'+ currentTab +'_conditions' ).val());
|
||||
delete conditions[slug];
|
||||
|
||||
// Set Conditions
|
||||
$('#wpr_'+ currentTab +'_conditions').val( JSON.stringify(conditions) );
|
||||
|
||||
// AJAX Data
|
||||
var data = {
|
||||
action: 'wpr_save_template_conditions',
|
||||
nonce: WprPluginOptions.nonce,
|
||||
};
|
||||
data['wpr_'+ currentTab +'_conditions'] = JSON.stringify(conditions);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
deleteTemplate();
|
||||
|
||||
/*
|
||||
** Condition Popup -------------------------
|
||||
*/
|
||||
// Open Popup
|
||||
function changeTemplateConditions() {
|
||||
$( '.wpr-template-conditions' ).on( 'click', function() {
|
||||
var template = $(this).attr('data-slug');
|
||||
|
||||
// Set Template Slug
|
||||
$( '.wpr-save-conditions' ).attr( 'data-slug', template );
|
||||
|
||||
// Open Popup
|
||||
openConditionsPopup( template );
|
||||
});
|
||||
}
|
||||
|
||||
changeTemplateConditions();
|
||||
|
||||
// Close Popup
|
||||
conditionPupup.find('.close-popup').on( 'click', function() {
|
||||
conditionPupup.fadeOut();
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
** Popup: Clone Conditions -------------------------
|
||||
*/
|
||||
function popupCloneConditions() {
|
||||
// Clone
|
||||
$('.wpr-conditions-wrap').append( '<div class="wpr-conditions">'+ $('.wpr-conditions-sample').html() +'</div>' );
|
||||
|
||||
// Add Tab Class
|
||||
// why removing and adding again ?
|
||||
$('.wpr-conditions').removeClass( 'wpr-tab-'+ currentTab ).addClass( 'wpr-tab-'+ currentTab );
|
||||
var clone = $('.wpr-conditions').last();
|
||||
|
||||
// Reset Extra
|
||||
clone.find('select').not(':first-child').hide();
|
||||
|
||||
// Entrance Animation
|
||||
clone.hide().fadeIn();
|
||||
|
||||
// Hide Extra Options
|
||||
var currentFilter = $('.template-filters .active-filter').attr('data-class');
|
||||
|
||||
|
||||
if (clone.hasClass('wpr-tab-product_single')) {
|
||||
setTimeout(function() {
|
||||
clone.find('.wpr-condition-input-ids').each(function() {
|
||||
if ( !($(this).val()) ) {
|
||||
$(this).val('all').show();
|
||||
}
|
||||
});
|
||||
}, 600);
|
||||
}
|
||||
|
||||
if ( 'blog-posts' === currentFilter || 'custom-posts' === currentFilter ) {
|
||||
clone.find('.singles-condition-select').children(':nth-child(1),:nth-child(2),:nth-child(3)').remove();
|
||||
clone.find('.wpr-condition-input-ids').val('all').show();
|
||||
} else if ( 'woocommerce-products' === currentFilter ) {
|
||||
clone.find('.singles-condition-select').children().filter(function() {
|
||||
return 'product' !== $(this).val()
|
||||
}).remove();
|
||||
clone.find('.wpr-condition-input-ids').val('all').show();
|
||||
} else if ( '404-pages' === currentFilter ) {
|
||||
clone.find('.singles-condition-select').children().filter(function() {
|
||||
return 'page_404' !== $(this).val()
|
||||
}).remove();
|
||||
} else if ( 'blog-archives' === currentFilter || 'custom-archives' === currentFilter ) {
|
||||
clone.find('.archives-condition-select').children().filter(function() {
|
||||
return 'products' == $(this).val() || 'product_cat' == $(this).val() || 'product_tag' == $(this).val();
|
||||
}).remove();
|
||||
} else if ( 'woocommerce-archives' === currentFilter ) {
|
||||
clone.find('.archives-condition-select').children().filter(function() {
|
||||
return 'products' !== $(this).val() && 'product_cat' !== $(this).val() && 'product_tag' !== $(this).val();
|
||||
}).remove();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Popup: Add Conditions -------------------------
|
||||
*/
|
||||
function popupAddConditions() {
|
||||
$( '.wpr-add-conditions' ).on( 'click', function() {
|
||||
// Clone
|
||||
popupCloneConditions();
|
||||
|
||||
// Reset
|
||||
$('.wpr-conditions').last().find('input').hide();//tmp -maybe remove
|
||||
|
||||
// Show on Canvas
|
||||
if ( 'header' === currentTab || 'footer' === currentTab ) {
|
||||
$('.wpr-canvas-condition').show();
|
||||
}
|
||||
|
||||
// Run Functions
|
||||
popupDeleteConditions();
|
||||
popupMainConditionSelect();
|
||||
popupSubConditionSelect();
|
||||
});
|
||||
}
|
||||
|
||||
popupAddConditions();
|
||||
|
||||
/*
|
||||
** Popup: Set Conditions -------------------------
|
||||
*/
|
||||
function popupSetConditions( template ) {
|
||||
var conditions = $( '#wpr_'+ currentTab +'_conditions' ).val();
|
||||
conditions = '' !== conditions ? JSON.parse(conditions) : {};
|
||||
// Reset
|
||||
$('.wpr-conditions').remove();
|
||||
|
||||
// Setup Conditions
|
||||
if ( conditions[template] != undefined && conditions[template].length > 0 ) {
|
||||
// Clone
|
||||
for (var i = 0; i < conditions[template].length; i++) {
|
||||
popupCloneConditions();
|
||||
$( '.wpr-conditions' ).find('select').hide();
|
||||
}
|
||||
|
||||
// Set
|
||||
if ( $('.wpr-conditions').length ) {
|
||||
$('.wpr-conditions').each( function( index ) {
|
||||
var path = conditions[template][index].split( '/' );
|
||||
|
||||
for (var s = 0; s < path.length; s++) {
|
||||
if ( s === 0 ) {
|
||||
$(this).find(globalS).val(path[s]).trigger('change');
|
||||
$(this).find('.'+ path[s] +'s-condition-select').show();
|
||||
} else if ( s === 1 ) {
|
||||
path[s-1] = 'product_archive' === path[s-1] ? 'archive' : path[s-1];
|
||||
$(this).find('.'+ path[s-1] +'s-condition-select').val(path[s]).trigger('change');
|
||||
} else if ( s === 2 ) {
|
||||
$(this).find(inputIDs).val(path[s]).trigger('keyup').show();
|
||||
if ( typeof path[s + 1] !== 'undefined' ) {
|
||||
$(this).find(inputIDs).val(path[s] + '/' + path[s + 1]).trigger('keyup').show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Set Show on Canvas Switcher value
|
||||
var conditionsBtn = $('.wpr-template-conditions[data-slug='+ template +']');
|
||||
|
||||
if ( 'true' === conditionsBtn.attr('data-show-on-canvas') ) {
|
||||
$('.wpr-canvas-condition').find('input[type=checkbox]').attr('checked', 'checked');
|
||||
} else {
|
||||
$('.wpr-canvas-condition').find('input[type=checkbox]').removeAttr('checked');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Popup: Open -------------------------
|
||||
*/
|
||||
function openConditionsPopup( template ) {
|
||||
// Set Conditions
|
||||
popupSetConditions(template);
|
||||
popupMainConditionSelect();
|
||||
popupSubConditionSelect();
|
||||
showOnCanvasSwitcher();
|
||||
popupDeleteConditions();
|
||||
|
||||
// Conditions Wrap
|
||||
var conditionsWrap = $( '.wpr-conditions' );
|
||||
|
||||
// Reset Canvas Option
|
||||
$('.wpr-canvas-condition').hide();
|
||||
|
||||
// Show Conditions
|
||||
if ( 'single' === currentTab || 'product_single' === currentTab ) {
|
||||
conditionsWrap.find(singleS).show();
|
||||
} else if ( 'archive' === currentTab || 'product_archive' === currentTab ) {
|
||||
conditionsWrap.find(archiveS).show();
|
||||
} else {
|
||||
conditionsWrap.find(globalS).show();
|
||||
|
||||
// Show Canvas Option
|
||||
if ( $('.wpr-conditions').length ) {
|
||||
$('.wpr-canvas-condition').show();
|
||||
}
|
||||
}
|
||||
|
||||
// Add Current Filter Class
|
||||
$('.wpr-conditions-wrap').addClass( $('.template-filters .active-filter').attr('data-class') );
|
||||
|
||||
// Open Popup
|
||||
conditionPupup.fadeIn();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Popup: Delete Conditions -------------------------------
|
||||
*/
|
||||
function popupDeleteConditions() {
|
||||
$( '.wpr-delete-template-conditions' ).on( 'click', function() {
|
||||
var current = $(this).parent(),
|
||||
conditions = $( '#wpr_'+ currentTab +'_conditions' ).val();
|
||||
conditions = '' !== conditions ? JSON.parse(conditions) : {};
|
||||
|
||||
// Update Conditions
|
||||
$('#wpr_'+ currentTab +'_conditions').val( JSON.stringify( removeConditions( conditions, getConditionsPath(current) ) ) );
|
||||
|
||||
// Remove Conditions
|
||||
current.fadeOut( 500, function() {
|
||||
$(this).remove();
|
||||
|
||||
// Show on Canvas
|
||||
if ( 0 === $('.wpr-conditions').length ) {
|
||||
$('.wpr-canvas-condition').hide();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Popup: Condition Selection -------
|
||||
*/
|
||||
// General Condition Select
|
||||
function popupMainConditionSelect() {
|
||||
$(globalS).on( 'change', function() {
|
||||
var current = $(this).parent();
|
||||
|
||||
// Reset
|
||||
current.find(archiveS).hide();
|
||||
current.find(singleS).hide();
|
||||
current.find(inputIDs).hide();
|
||||
|
||||
// Show
|
||||
current.find( '.'+ $(this).val() +'s-condition-select' ).show();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// Sub Condition Select
|
||||
function popupSubConditionSelect() {
|
||||
$('.archives-condition-select, .singles-condition-select').on( 'change', function() {
|
||||
var current = $(this).parent(),
|
||||
selected = $( 'option:selected', this ),
|
||||
value = $(this).val();
|
||||
|
||||
// Show Custom ID input
|
||||
if ( selected.hasClass('custom-ids') || selected.hasClass('custom-type-ids') ) {
|
||||
current.find(inputIDs).val('all').trigger('keyup').show();
|
||||
} else {
|
||||
current.find(inputIDs).hide();
|
||||
}
|
||||
|
||||
console.log(value);
|
||||
|
||||
// Show/Hide Expert Notice
|
||||
if ( 0 === value.indexOf('pro-') ) {
|
||||
$('.wpr-expert-notice').show();
|
||||
} else {
|
||||
$('.wpr-expert-notice').hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Show on Canvas Switcher
|
||||
function showOnCanvasSwitcher() {
|
||||
$('.wpr-canvas-condition input[type=checkbox]').on('change', function() {
|
||||
$('.wpr-template-conditions[data-slug='+ $('.wpr-save-conditions').attr('data-slug') +']').attr('data-show-on-canvas', $(this).prop('checked'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Remove Conditions --------------------------
|
||||
*/
|
||||
function removeConditions( conditions, path ) {
|
||||
var data = [];
|
||||
|
||||
// Get Templates
|
||||
$('.wpr-template-conditions').each(function() {
|
||||
data.push($(this).attr('data-slug'))
|
||||
});
|
||||
|
||||
// Loop
|
||||
for ( var key in conditions ) {
|
||||
if ( conditions.hasOwnProperty(key) ) {
|
||||
// Remove Duplicate
|
||||
for (var i = 0; i < conditions[key].length; i++) {
|
||||
if ( path == conditions[key][i] ) {
|
||||
if ( 'popup' !== getActiveFilter() ) {
|
||||
conditions[key].splice(i, 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Clear Database
|
||||
if ( data.indexOf(key) === -1 ) {
|
||||
delete conditions[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return conditions;
|
||||
}
|
||||
|
||||
/*
|
||||
** Get Conditions Path -------------------------
|
||||
*/
|
||||
function getConditionsPath( current ) {
|
||||
var path = '';
|
||||
|
||||
// Selects
|
||||
var global = 'none' !== current.find(globalS).css('display') ? current.find(globalS).val() : currentTab,
|
||||
archive = current.find(archiveS).val(),
|
||||
single = current.find(singleS).val(),
|
||||
customIds = current.find(inputIDs);
|
||||
|
||||
if ( 'archive' === global || 'product_archive' === global ) {
|
||||
if ( 'none' !== customIds.css('display') ) {
|
||||
path = global +'/'+ archive +'/'+ customIds.val();
|
||||
} else {
|
||||
path = global +'/'+ archive;
|
||||
}
|
||||
} else if ( 'single' === global || 'product_single' === global ) {
|
||||
if ( 'none' !== customIds.css('display') ) {
|
||||
path = global +'/'+ single +'/'+ customIds.val();
|
||||
} else {
|
||||
path = global +'/'+ single;
|
||||
}
|
||||
} else {
|
||||
path = 'global';
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Get Conditions -------------------------
|
||||
*/
|
||||
function getConditions( template, conditions ) {
|
||||
// Conditions
|
||||
conditions = ('' === conditions || '[]' === conditions) ? {} : JSON.parse(conditions);
|
||||
conditions[template] = [];
|
||||
|
||||
$('.wpr-conditions').each( function() {
|
||||
var path = getConditionsPath( $(this) );
|
||||
|
||||
// Remove Duplicates
|
||||
conditions = removeConditions( conditions, path );
|
||||
|
||||
// Add New Values
|
||||
conditions[template].push( path );
|
||||
});
|
||||
|
||||
return conditions;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Save Conditions -------------------------
|
||||
*/
|
||||
function saveConditions() {
|
||||
$( '.wpr-save-conditions' ).on( 'click', function() {
|
||||
var proActive = (1 === $('.wpr-my-templates-list').data('pro')) ? true : false;
|
||||
|
||||
// Current Template
|
||||
var template = $(this).attr('data-slug'),
|
||||
TemplateID = $(this).attr('data-id');
|
||||
|
||||
// Get Conditions
|
||||
var conditions = getConditions( template, $( '#wpr_'+ currentTab +'_conditions' ).val() );
|
||||
|
||||
// Don't save if not active
|
||||
if ( !proActive && ('header' === currentTab || 'footer' == currentTab || 'product_archive' == currentTab) ) {
|
||||
if ( 'header' === currentTab || 'footer' == currentTab ) {
|
||||
if ( ('global' !== conditions[template][0] && 'undefined' !== typeof conditions[template][0]) || conditions[template].length > 1 ) {
|
||||
alert('Please select "Entire Site" to continue! Mutiple and custom conditions are fully supported in the Pro version.');
|
||||
return;
|
||||
}
|
||||
} else if ( 'product_archive' == currentTab ) {
|
||||
console.log(conditions[template][0]);
|
||||
if ( ('product_archive/products' !== conditions[template][0] && 'undefined' !== typeof conditions[template][0]) || conditions[template].length > 1 ) {
|
||||
alert('Please select "Entire Site" to continue! Mutiple and custom conditions are fully supported in the Pro version.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set Conditions
|
||||
$('#wpr_'+ currentTab +'_conditions').val( JSON.stringify(conditions) );
|
||||
|
||||
// AJAX Data
|
||||
var data = {
|
||||
action: 'wpr_save_template_conditions',
|
||||
nonce: WprPluginOptions.nonce,
|
||||
template: template
|
||||
};
|
||||
data['wpr_'+ currentTab +'_conditions'] = JSON.stringify(conditions);
|
||||
|
||||
if ( $('#wpr-show-on-canvas').length ) {
|
||||
data['wpr_'+ currentTab +'_show_on_canvas'] = $('#wpr-show-on-canvas').prop('checked');
|
||||
}
|
||||
|
||||
// Save Conditions
|
||||
$.post(ajaxurl, data, function(response) {
|
||||
// Close Popup
|
||||
conditionPupup.fadeOut();
|
||||
|
||||
// Set Active Class
|
||||
for ( var key in conditions ) {
|
||||
if ( conditions[key] && 0 !== conditions[key].length ) {
|
||||
$('.wpr-delete-template[data-slug="'+ key +'"]').closest('li').addClass('wpr-active-conditions-template');
|
||||
} else {
|
||||
$('.wpr-delete-template[data-slug="'+ key +'"]').closest('li').removeClass('wpr-active-conditions-template');
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect User to Editor
|
||||
if ( conditionPupup.hasClass('editor-redirect') ) {
|
||||
window.location.href = 'post.php?post='+ TemplateID +'&action=elementor';
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
saveConditions();
|
||||
|
||||
|
||||
/*
|
||||
** Highlight Templates with Active Conditions --------
|
||||
*/
|
||||
if ( $('body').hasClass('royal-addons_page_wpr-theme-builder') || $('body').hasClass('royal-addons_page_wpr-popups') ) {
|
||||
if ( currentTab && 'my_templates' !== currentTab ) {
|
||||
var conditions = $( '#wpr_'+ currentTab +'_conditions' ).val(),
|
||||
conditions = ('' === conditions || '[]' === conditions) ? {} : JSON.parse(conditions);
|
||||
|
||||
for ( var key in conditions ) {
|
||||
$('.wpr-delete-template[data-slug="'+ key +'"]').closest('li').addClass('wpr-active-conditions-template');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Save Options with Ajax -------------------------
|
||||
*/
|
||||
$('.wpr-settings-page form').submit(function () {
|
||||
var settings = $(this).serialize();
|
||||
|
||||
$.post( 'options.php', settings ).error(function() {
|
||||
// alert('error');
|
||||
}).success(function() {
|
||||
$('.wpr-settings-saved').stop().fadeIn(500).delay(1000).fadeOut(1000);
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.wpr-element').find('input').on( 'change', function() {
|
||||
$('.wpr-settings-page form').submit();
|
||||
});
|
||||
|
||||
/*
|
||||
** Elements Toggle -------------------------
|
||||
*/
|
||||
$('.wpr-elements-toggle').find('input').on( 'change', function() {
|
||||
if ( $(this).is(':checked') ) {
|
||||
$('.wpr-element').find('input').prop( 'checked', true );
|
||||
} else {
|
||||
$('.wpr-element').find('input').prop( 'checked', false );
|
||||
}
|
||||
|
||||
$('.wpr-settings-page form').submit();
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
** Elements Search --------------------------
|
||||
*/
|
||||
var searchTimeout = null;
|
||||
$('.wpr-widgets-search').find('input').keyup(function(e) {
|
||||
if ( e.which === 13 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var val = $(this).val().toLowerCase();
|
||||
|
||||
if (searchTimeout != null) {
|
||||
clearTimeout(searchTimeout);
|
||||
}
|
||||
|
||||
searchTimeout = setTimeout(function() {
|
||||
searchTimeout = null;
|
||||
let visibleElements = 'none';
|
||||
|
||||
// Reset
|
||||
$('.wpr-widgets-not-found').hide();
|
||||
$('.submit').show();
|
||||
|
||||
let keywords = ["appointment", "book"]; // Keywords to look for
|
||||
|
||||
// Check if any keyword matches the input
|
||||
let keywordFound = keywords.some(function(keyword) {
|
||||
return keyword.includes(val) || val.includes(keyword);
|
||||
});
|
||||
|
||||
// If a keyword is found and the div doesn't already exist
|
||||
if (keywordFound && !($('body').find('#wpr-info-box').length > 0)) {
|
||||
// Append the new div
|
||||
let infoBox = `
|
||||
<div id="wpr-info-box">
|
||||
Looking for Booking Solution? Check out the <a href="https://www.youtube.com/watch?v=asdMBXpd2Nw" target="_blank">Video Tutorial</a>.
|
||||
</div>
|
||||
`;
|
||||
$('.wpr-widgets-search').append(infoBox);
|
||||
}
|
||||
|
||||
// If no keyword is found and the div exists, remove it
|
||||
else if ( (!keywordFound || val === '') && $('body').find('#wpr-info-box').length > 0 ) {
|
||||
$('body').find('#wpr-info-box').remove();
|
||||
}
|
||||
|
||||
if ( '' !== val ) {
|
||||
$('.wpr-elements, .wpr-element, .wpr-elements-heading').hide();
|
||||
$('.wpr-widgets-not-found').hide();
|
||||
} else {
|
||||
$('.wpr-elements, .wpr-element, .wpr-elements-heading').show();
|
||||
$('.wpr-elements-filters li').first().trigger('click');
|
||||
}
|
||||
|
||||
$('.wpr-element').each(function(){
|
||||
let title = $(this).find('h3').text().toLowerCase();
|
||||
|
||||
if ( -1 !== title.indexOf(val) ) {
|
||||
$(this).show();
|
||||
$(this).parent().show();
|
||||
visibleElements = 'visible';
|
||||
}
|
||||
});
|
||||
|
||||
if ( 'none' === visibleElements ) {
|
||||
$('.wpr-widgets-not-found').css('display', 'flex');
|
||||
$('.submit').hide();
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'wpr_backend_widget_search_query_results',
|
||||
search_query: val
|
||||
},
|
||||
success: function( response ) {}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
/*
|
||||
** Elements Filters -----------------------------------
|
||||
*/
|
||||
$('.wpr-elements-filters li').on('click', function() {
|
||||
let filter = $(this).data('filter');
|
||||
|
||||
$('.wpr-elements-toggle').hide();
|
||||
$('.wpr-elements-filters li').removeClass('wpr-active-filter');
|
||||
$(this).addClass('wpr-active-filter');
|
||||
|
||||
if ( 'all' === filter ) {
|
||||
$('.wpr-elements, .wpr-elements-heading').show();
|
||||
$('.wpr-elements-toggle').show();
|
||||
} else if ( 'theme' === filter ) {
|
||||
$('.wpr-elements, .wpr-elements-heading').hide();
|
||||
$('.wpr-elements-theme').show();
|
||||
$('.wpr-elements-theme').prev('.wpr-elements-heading').show();
|
||||
} else {
|
||||
$('.wpr-elements, .wpr-elements-heading').hide();
|
||||
$('.wpr-elements-woo').show();
|
||||
$('.wpr-elements-woo').prev('.wpr-elements-heading').show();
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
** Settings Tab ------------------------------
|
||||
*/
|
||||
|
||||
// Lightbox Settings
|
||||
jQuery(document).ready(function($){
|
||||
$('#wpr_lb_bg_color').wpColorPicker();
|
||||
$('#wpr_lb_toolbar_color').wpColorPicker();
|
||||
$('#wpr_lb_caption_color').wpColorPicker();
|
||||
$('#wpr_lb_gallery_color').wpColorPicker();
|
||||
$('#wpr_lb_pb_color').wpColorPicker();
|
||||
$('#wpr_lb_ui_color').wpColorPicker();
|
||||
$('#wpr_lb_ui_hr_color').wpColorPicker();
|
||||
$('#wpr_lb_text_color').wpColorPicker();
|
||||
|
||||
// Fix Color Picker
|
||||
if ( $('.wpr-settings').length ) {
|
||||
$('.wpr-settings').find('.wp-color-result-text').text('Select Color');
|
||||
$('.wpr-settings').find('.wp-picker-clear').val('Clear');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
** Image Upload Option -----------------------
|
||||
*/
|
||||
$('body').on( 'click', '.wpr-setting-custom-img-upload button', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
var button = $(this);
|
||||
|
||||
if ( ! button.find('img').length ) {
|
||||
var custom_uploader = wp.media({
|
||||
title: 'Insert image',
|
||||
library : {
|
||||
uploadedTo : wp.media.view.settings.post.id, // attach to the current post?
|
||||
type : 'image'
|
||||
},
|
||||
button: {
|
||||
text: 'Use this image' // button label text
|
||||
},
|
||||
multiple: false
|
||||
}).on('select', function() {
|
||||
var attachment = custom_uploader.state().get('selection').first().toJSON();
|
||||
|
||||
button.find('i').remove();
|
||||
button.prepend('<img src="' + attachment.url + '">');
|
||||
button.find('span').text('Remove Image');
|
||||
|
||||
$('#wpr_wl_plugin_logo').val(attachment.id);
|
||||
}).open();
|
||||
} else {
|
||||
button.find('img').remove();
|
||||
button.prepend('<i class="dashicons dashicons-cloud-upload"></i>');
|
||||
button.find('span').text('Upload Image');
|
||||
|
||||
$('#wpr_wl_plugin_logo').val('');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// $('a.wpr-authorize-instagram').on('click', function() {
|
||||
// window.open('https://www.instagram.com/oauth/authorize?client_id=5484217328332432&redirect_uri=https://reastats.kinsta.cloud/token/social-network.php&scope=user_profile,user_media&response_type=code','popup','width=600,height=600');
|
||||
// return false;
|
||||
// });
|
||||
|
||||
|
||||
//TODO: Remove this - only for development
|
||||
// $('.nav-tab-wrapper').after( '<p>'+ $('.nav-tab-wrapper').next('input').val() +'</p>' );
|
||||
|
||||
|
||||
/*
|
||||
** Free vs Pro Options Dropdown ---------------
|
||||
*/
|
||||
$('.wpr-pro-widgets > ul > li > span').on('click', function() {
|
||||
let options = $(this).parent('li').find('ul'),
|
||||
display = options.css('display');
|
||||
|
||||
// Reset
|
||||
$('.wpr-pro-widgets ul ul').slideUp();
|
||||
|
||||
// Show
|
||||
if ( 'none' === display ) {
|
||||
options.slideDown();
|
||||
if ( $(this).hasClass('wpr-premium-template-kit-lib') ) {
|
||||
setTimeout(function() {
|
||||
window.open('https://demosites.royal-elementor-addons.com/elementor-templates/?ref=rea-plugin-backend-freevsprotab-pro', '_blank');
|
||||
}, 600);
|
||||
}
|
||||
if ( $(this).hasClass('wpr-advanced-sticky-options') ) {
|
||||
setTimeout(function() {
|
||||
window.open('https://royal-elementor-addons.com/advanced-sticky-header/?ref=rea-plugin-backend-freevsprotab-pro', '_blank');
|
||||
}, 600);
|
||||
}
|
||||
} else {
|
||||
options.slideUp();
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
** Free vs Pro Search -------------------------
|
||||
*/
|
||||
var searchTimeoutFP = null;
|
||||
$('.wpr-free-pro-search').find('input').keyup(function(e) {
|
||||
if ( e.which === 13 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var val = $(this).val().toLowerCase();
|
||||
|
||||
if (searchTimeoutFP != null) {
|
||||
clearTimeout(searchTimeoutFP);
|
||||
}
|
||||
|
||||
searchTimeoutFP = setTimeout(function() {
|
||||
searchTimeoutFP = null;
|
||||
let visibleElements = 'none';
|
||||
|
||||
// Reset
|
||||
$('.wpr-feature-not-found').hide();
|
||||
$('.wpr-free-pro-upgrade.last').show();
|
||||
|
||||
if ( '' !== val ) {
|
||||
$('.wpr-free-vs-pro > div > ul > li').hide();
|
||||
} else {
|
||||
$('.wpr-free-vs-pro > div > ul > li').show();
|
||||
}
|
||||
|
||||
$('.wpr-free-vs-pro > div > ul > li').each(function(){
|
||||
let title = $(this).find('span').text().toLowerCase();
|
||||
|
||||
if ( -1 !== title.indexOf(val) ) {
|
||||
$(this).show();
|
||||
$(this).parent().show();
|
||||
visibleElements = 'visible';
|
||||
}
|
||||
});
|
||||
|
||||
if ( 'none' === visibleElements ) {
|
||||
$('.wpr-feature-not-found').css('display', 'flex');
|
||||
$('.wpr-free-pro-upgrade.last').hide();
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'wpr_backend_freepro_search_query_results',
|
||||
search_query: val
|
||||
},
|
||||
success: function( response ) {}
|
||||
});
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
}); // end dom ready
|
||||
@@ -0,0 +1,143 @@
|
||||
jQuery( document ).ready( function() {
|
||||
|
||||
if ( jQuery('#wpr-notice-confetti').length ) {
|
||||
const wprConfetti = confetti.create( document.getElementById('wpr-notice-confetti'), {
|
||||
resize: true
|
||||
});
|
||||
|
||||
setTimeout( function () {
|
||||
wprConfetti( {
|
||||
particleCount: 150,
|
||||
origin: { x: 1, y: 2 },
|
||||
gravity: 0.3,
|
||||
spread: 50,
|
||||
ticks: 150,
|
||||
angle: 120,
|
||||
startVelocity: 60,
|
||||
colors: [
|
||||
'#0e6ef1',
|
||||
'#f5b800',
|
||||
'#ff344c',
|
||||
'#98e027',
|
||||
'#9900f1',
|
||||
],
|
||||
} );
|
||||
}, 500 );
|
||||
|
||||
setTimeout( function () {
|
||||
wprConfetti( {
|
||||
particleCount: 150,
|
||||
origin: { x: 0, y: 2 },
|
||||
gravity: 0.3,
|
||||
spread: 50,
|
||||
ticks: 200,
|
||||
angle: 60,
|
||||
startVelocity: 60,
|
||||
colors: [
|
||||
'#0e6ef1',
|
||||
'#f5b800',
|
||||
'#ff344c',
|
||||
'#98e027',
|
||||
'#9900f1',
|
||||
],
|
||||
} );
|
||||
}, 900 );
|
||||
}
|
||||
|
||||
// Update Notice
|
||||
jQuery(document).on( 'click', '.wpr-plugin-update-notice .notice-dismiss', function() {
|
||||
jQuery(document).find('.wpr-plugin-update-notice').slideUp();
|
||||
console.log('works update dismiss');
|
||||
jQuery.post({
|
||||
url: WprPluginNotice.ajaxurl,
|
||||
data: {
|
||||
nonce: WprPluginNotice.nonce,
|
||||
action: 'wpr_plugin_update_dismiss_notice',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Plugin Sale Notice
|
||||
jQuery(document).on( 'click', '.wpr-plugin-sale-notice .notice-dismiss', function() {
|
||||
jQuery(document).find('.wpr-plugin-sale-notice').slideUp();
|
||||
jQuery.post({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
nonce: WprPluginNotice.nonce,
|
||||
action: 'wpr_plugin_sale_dismiss_notice'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(document).on( 'click', '.wpr-plugin-sale-notice .wpr-remind-later', function(e) {
|
||||
e.preventDefault();
|
||||
jQuery(document).find('.wpr-plugin-sale-notice').slideUp();
|
||||
jQuery.post({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
nonce: WprPluginNotice.nonce,
|
||||
action: 'wpr_sale_remind_me_later',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(document).on( 'click', '.wpr-pro-features-notice .notice-dismiss', function() {
|
||||
|
||||
jQuery('body').removeClass('wpr-pro-features-body');
|
||||
|
||||
jQuery(document).find('.wpr-pro-features-notice-wrap').fadeOut();
|
||||
jQuery(document).find('.wpr-pro-features-notice').slideUp();
|
||||
jQuery.post({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
nonce: WprPluginNotice.nonce,
|
||||
action: 'wpr_pro_features_dismiss_notice'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Rating Notice
|
||||
jQuery(document).on( 'click', '.wpr-notice-dismiss-2', function() {
|
||||
jQuery(document).find('.wpr-rating-notice').slideUp();
|
||||
jQuery.post({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
nonce: WprPluginNotice.nonce,
|
||||
action: 'wpr_rating_dismiss_notice',
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
jQuery(document).on( 'click', '.wpr-maybe-later', function() {
|
||||
jQuery(document).find('.wpr-rating-notice').slideUp();
|
||||
jQuery.post({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
nonce: WprPluginNotice.nonce,
|
||||
action: 'wpr_rating_maybe_later',
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
jQuery(document).on( 'click', '.wpr-already-rated', function() {
|
||||
jQuery(document).find('.wpr-rating-notice').slideUp();
|
||||
jQuery.post({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
nonce: WprPluginNotice.nonce,
|
||||
action: 'wpr_rating_already_rated',
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
jQuery(document).on( 'click', '.wpr-need-support', function() {
|
||||
jQuery.post({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
nonce: WprPluginNotice.nonce,
|
||||
action: 'wpr_rating_need_help',
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
});
|
||||