first commit
58
.htaccess
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# BEGIN LSCACHE
|
||||||
|
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
|
||||||
|
<IfModule LiteSpeed>
|
||||||
|
RewriteEngine on
|
||||||
|
CacheLookup on
|
||||||
|
RewriteRule .* - [E=Cache-Control:no-autoflush]
|
||||||
|
RewriteRule litespeed/debug/.*\.log$ - [F,L]
|
||||||
|
RewriteRule \.litespeed_conf\.dat - [F,L]
|
||||||
|
|
||||||
|
### marker ASYNC start ###
|
||||||
|
RewriteCond %{REQUEST_URI} /wp-admin/admin-ajax\.php
|
||||||
|
RewriteCond %{QUERY_STRING} action=async_litespeed
|
||||||
|
RewriteRule .* - [E=noabort:1]
|
||||||
|
### marker ASYNC end ###
|
||||||
|
|
||||||
|
### marker DROPQS start ###
|
||||||
|
CacheKeyModify -qs:fbclid
|
||||||
|
CacheKeyModify -qs:gclid
|
||||||
|
CacheKeyModify -qs:utm*
|
||||||
|
CacheKeyModify -qs:_ga
|
||||||
|
### marker DROPQS end ###
|
||||||
|
|
||||||
|
</IfModule>
|
||||||
|
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
|
||||||
|
# END LSCACHE
|
||||||
|
# BEGIN NON_LSCACHE
|
||||||
|
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
|
||||||
|
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
|
||||||
|
# END NON_LSCACHE
|
||||||
|
# BEGIN WordPress
|
||||||
|
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
|
||||||
|
# dynamically generated, and should only be modified via WordPress filters.
|
||||||
|
# Any changes to the directives between these markers will be overwritten.
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
RewriteBase /
|
||||||
|
RewriteRule ^index\.php$ - [L]
|
||||||
|
RewriteRule ^en/wp-login.php /wp-login.php [QSA,L]
|
||||||
|
RewriteRule ^de/wp-login.php /wp-login.php [QSA,L]
|
||||||
|
RewriteRule ^pl/wp-login.php /wp-login.php [QSA,L]
|
||||||
|
RewriteRule ^ru/wp-login.php /wp-login.php [QSA,L]
|
||||||
|
RewriteRule ^uk/wp-login.php /wp-login.php [QSA,L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /index.php [L]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# END WordPress
|
||||||
|
|
||||||
|
# BEGIN LiteSpeed
|
||||||
|
# The directives (lines) between "BEGIN LiteSpeed" and "END LiteSpeed" are
|
||||||
|
# dynamically generated, and should only be modified via WordPress filters.
|
||||||
|
# Any changes to the directives between these markers will be overwritten.
|
||||||
|
<IfModule Litespeed>
|
||||||
|
SetEnv noabort 1
|
||||||
|
</IfModule>
|
||||||
|
# END LiteSpeed
|
||||||
23
.htaccess.bk
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# BEGIN WordPress
|
||||||
|
<IfModule mod_expires.c>
|
||||||
|
ExpiresActive On
|
||||||
|
ExpiresByType image/jpg "access plus 1 year"
|
||||||
|
ExpiresByType image/jpeg "access plus 1 year"
|
||||||
|
ExpiresByType image/gif "access plus 1 year"
|
||||||
|
ExpiresByType image/png "access plus 1 year"
|
||||||
|
ExpiresByType text/css "access plus 1 month"
|
||||||
|
ExpiresByType application/pdf "access plus 1 month"
|
||||||
|
ExpiresByType text/javascript "access plus 1 month"
|
||||||
|
ExpiresByType image/x-icon "access plus 1 year"
|
||||||
|
ExpiresDefault "access plus 1 weeks"
|
||||||
|
</IfModule>
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
RewriteBase /
|
||||||
|
RewriteRule ^index\.php$ - [L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule . /index.php [L]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# END WordPress
|
||||||
17
.vscode/ftp-kr.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"host": "145.223.76.240",
|
||||||
|
"username": "u350065327",
|
||||||
|
"password": "QpJFkYkT48TwiWOm!",
|
||||||
|
"remotePath": "/domains/lightseagreen-crab-771745.hostingersite.com/public_html",
|
||||||
|
"protocol": "ftp",
|
||||||
|
"port": 0,
|
||||||
|
"fileNameEncoding": "utf8",
|
||||||
|
"autoUpload": true,
|
||||||
|
"autoDelete": false,
|
||||||
|
"autoDownload": false,
|
||||||
|
"ignoreRemoteModification": true,
|
||||||
|
"ignore": [
|
||||||
|
".git",
|
||||||
|
"/.vscode"
|
||||||
|
]
|
||||||
|
}
|
||||||
12
.vscode/sftp.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "145.223.76.240",
|
||||||
|
"host": "145.223.76.240",
|
||||||
|
"protocol": "ftp",
|
||||||
|
"port": 21,
|
||||||
|
"username": "u350065327",
|
||||||
|
"password": "QpJFkYkT48TwiWOm!",
|
||||||
|
"remotePath": "/domains/lightseagreen-crab-771745.hostingersite.com/public_html",
|
||||||
|
"uploadOnSave": false,
|
||||||
|
"useTempFile": false,
|
||||||
|
"openSsh": false
|
||||||
|
}
|
||||||
195
default.php
Normal file
17
index.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Front to the WordPress application. This file doesn't do anything, but loads
|
||||||
|
* wp-blog-header.php which does and tells WordPress to load the theme.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells WordPress to load the WordPress theme and output it.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
define( 'WP_USE_THEMES', true );
|
||||||
|
|
||||||
|
/** Loads the WordPress Environment and Template */
|
||||||
|
require __DIR__ . '/wp-blog-header.php';
|
||||||
384
license.txt
Normal file
@@ -0,0 +1,384 @@
|
|||||||
|
WordPress - Web publishing software
|
||||||
|
|
||||||
|
Copyright 2011-2025 by the contributors
|
||||||
|
|
||||||
|
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 2 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, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
This program incorporates work covered by the following copyright and
|
||||||
|
permission notices:
|
||||||
|
|
||||||
|
b2 is (c) 2001, 2002 Michel Valdrighi - Cafelog
|
||||||
|
|
||||||
|
Wherever third party code has been used, credit has been given in the code's
|
||||||
|
comments.
|
||||||
|
|
||||||
|
b2 is released under the GPL
|
||||||
|
|
||||||
|
and
|
||||||
|
|
||||||
|
WordPress - Web publishing software
|
||||||
|
|
||||||
|
Copyright 2003-2010 by the contributors
|
||||||
|
|
||||||
|
WordPress is released under the GPL
|
||||||
|
|
||||||
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) 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
|
||||||
|
this service 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 make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. 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.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
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
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the 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 a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE 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.
|
||||||
|
|
||||||
|
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
|
||||||
|
convey 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 2 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, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision 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, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This 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.
|
||||||
|
|
||||||
|
WRITTEN OFFER
|
||||||
|
|
||||||
|
The source code for any program binaries or compressed scripts that are
|
||||||
|
included with WordPress can be freely obtained at the following URL:
|
||||||
|
|
||||||
|
https://wordpress.org/download/source/
|
||||||
98
readme.html
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="robots" content="noindex,nofollow" />
|
||||||
|
<title>WordPress › ReadMe</title>
|
||||||
|
<link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 id="logo">
|
||||||
|
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
|
||||||
|
</h1>
|
||||||
|
<p style="text-align: center">Semantic Personal Publishing Platform</p>
|
||||||
|
|
||||||
|
<h2>First Things First</h2>
|
||||||
|
<p>Welcome. WordPress is a very special project to me. Every developer and contributor adds something unique to the mix, and together we create something beautiful that I am proud to be a part of. Thousands of hours have gone into WordPress, and we are dedicated to making it better every day. Thank you for making it part of your world.</p>
|
||||||
|
<p style="text-align: right">— Matt Mullenweg</p>
|
||||||
|
|
||||||
|
<h2>Installation: Famous 5-minute install</h2>
|
||||||
|
<ol>
|
||||||
|
<li>Unzip the package in an empty directory and upload everything.</li>
|
||||||
|
<li>Open <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> in your browser. It will take you through the process to set up a <code>wp-config.php</code> file with your database connection details.
|
||||||
|
<ol>
|
||||||
|
<li>If for some reason this does not work, do not worry. It may not work on all web hosts. Open up <code>wp-config-sample.php</code> with a text editor like WordPad or similar and fill in your database connection details.</li>
|
||||||
|
<li>Save the file as <code>wp-config.php</code> and upload it.</li>
|
||||||
|
<li>Open <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> in your browser.</li>
|
||||||
|
</ol>
|
||||||
|
</li>
|
||||||
|
<li>Once the configuration file is set up, the installer will set up the tables needed for your site. If there is an error, double check your <code>wp-config.php</code> file, and try again. If it fails again, please go to the <a href="https://wordpress.org/support/forums/">WordPress support forums</a> with as much data as you can gather.</li>
|
||||||
|
<li><strong>If you did not enter a password, note the password given to you.</strong> If you did not provide a username, it will be <code>admin</code>.</li>
|
||||||
|
<li>The installer should then send you to the <a href="wp-login.php">login page</a>. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on “Profile” to change the password.</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<h2>Updating</h2>
|
||||||
|
<h3>Using the Automatic Updater</h3>
|
||||||
|
<ol>
|
||||||
|
<li>Open <span class="file"><a href="wp-admin/update-core.php">wp-admin/update-core.php</a></span> in your browser and follow the instructions.</li>
|
||||||
|
<li>You wanted more, perhaps? That’s it!</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<h3>Updating Manually</h3>
|
||||||
|
<ol>
|
||||||
|
<li>Before you update anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</li>
|
||||||
|
<li>Delete your old WordPress files, saving ones you’ve modified.</li>
|
||||||
|
<li>Upload the new files.</li>
|
||||||
|
<li>Point your browser to <span class="file"><a href="wp-admin/upgrade.php">/wp-admin/upgrade.php</a>.</span></li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<h2>Migrating from other systems</h2>
|
||||||
|
<p>WordPress can <a href="https://developer.wordpress.org/advanced-administration/wordpress/import/">import from a number of systems</a>. First you need to get WordPress installed and working as described above, before using <a href="wp-admin/import.php">our import tools</a>.</p>
|
||||||
|
|
||||||
|
<h2>System Requirements</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://www.php.net/">PHP</a> version <strong>7.2.24</strong> or greater.</li>
|
||||||
|
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.5.5</strong> or greater.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Recommendations</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://www.php.net/">PHP</a> version <strong>7.4</strong> or greater.</li>
|
||||||
|
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>8.0</strong> or greater OR <a href="https://mariadb.org/">MariaDB</a> version <strong>10.5</strong> or greater.</li>
|
||||||
|
<li>The <a href="https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html">mod_rewrite</a> Apache module.</li>
|
||||||
|
<li><a href="https://wordpress.org/news/2016/12/moving-toward-ssl/">HTTPS</a> support.</li>
|
||||||
|
<li>A link to <a href="https://wordpress.org/">wordpress.org</a> on your site.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Online Resources</h2>
|
||||||
|
<p>If you have any questions that are not addressed in this document, please take advantage of WordPress’ numerous online resources:</p>
|
||||||
|
<dl>
|
||||||
|
<dt><a href="https://wordpress.org/documentation/">HelpHub</a></dt>
|
||||||
|
<dd>HelpHub is the encyclopedia of all things WordPress. It is the most comprehensive source of information for WordPress available.</dd>
|
||||||
|
<dt><a href="https://wordpress.org/news/">The WordPress Blog</a></dt>
|
||||||
|
<dd>This is where you’ll find the latest updates and news related to WordPress. Recent WordPress news appears in your administrative dashboard by default.</dd>
|
||||||
|
<dt><a href="https://planet.wordpress.org/">WordPress Planet</a></dt>
|
||||||
|
<dd>The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web.</dd>
|
||||||
|
<dt><a href="https://wordpress.org/support/forums/">WordPress Support Forums</a></dt>
|
||||||
|
<dd>If you’ve looked everywhere and still cannot find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.</dd>
|
||||||
|
<dt><a href="https://make.wordpress.org/support/handbook/appendix/other-support-locations/introduction-to-irc/">WordPress <abbr>IRC</abbr> (Internet Relay Chat) Channel</a></dt>
|
||||||
|
<dd>There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (<a href="https://web.libera.chat/#wordpress">irc.libera.chat #wordpress</a>)</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<h2>Final Notes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the <a href="https://wordpress.org/support/forums/">Support Forums</a>.</li>
|
||||||
|
<li>WordPress has a robust plugin <abbr>API</abbr> (Application Programming Interface) that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://developer.wordpress.org/plugins/">Plugin Developer Handbook</a>. You shouldn’t modify any of the core code.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Share the Love</h2>
|
||||||
|
<p>WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better—you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgeable than yourself, or writing the author of a media article that overlooks us.</p>
|
||||||
|
|
||||||
|
<p>WordPress is the official continuation of b2/cafélog, which came from Michel V. The work has been continued by the <a href="https://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="https://wordpress.org/donate/">donating</a>.</p>
|
||||||
|
|
||||||
|
<h2>License</h2>
|
||||||
|
<p>WordPress is free software, and is released under the terms of the <abbr>GPL</abbr> (GNU General Public License) version 2 or (at your option) any later version. See <a href="license.txt">license.txt</a>.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
218
wp-activate.php
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Confirms that the activation key that is sent in an email after a user signs
|
||||||
|
* up for a new site matches the key for that user and then displays confirmation.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
define( 'WP_INSTALLING', true );
|
||||||
|
|
||||||
|
/** Sets up the WordPress Environment. */
|
||||||
|
require __DIR__ . '/wp-load.php';
|
||||||
|
|
||||||
|
require __DIR__ . '/wp-blog-header.php';
|
||||||
|
|
||||||
|
if ( ! is_multisite() ) {
|
||||||
|
wp_redirect( wp_registration_url() );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
$valid_error_codes = array( 'already_active', 'blog_taken' );
|
||||||
|
|
||||||
|
list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
|
||||||
|
$activate_cookie = 'wp-activate-' . COOKIEHASH;
|
||||||
|
|
||||||
|
$key = '';
|
||||||
|
$result = null;
|
||||||
|
|
||||||
|
if ( isset( $_GET['key'] ) && isset( $_POST['key'] ) && $_GET['key'] !== $_POST['key'] ) {
|
||||||
|
wp_die( __( 'A key value mismatch has been detected. Please follow the link provided in your activation email.' ), __( 'An error occurred during the activation' ), 400 );
|
||||||
|
} elseif ( ! empty( $_GET['key'] ) ) {
|
||||||
|
$key = $_GET['key'];
|
||||||
|
} elseif ( ! empty( $_POST['key'] ) ) {
|
||||||
|
$key = $_POST['key'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $key ) {
|
||||||
|
$redirect_url = remove_query_arg( 'key' );
|
||||||
|
|
||||||
|
if ( remove_query_arg( false ) !== $redirect_url ) {
|
||||||
|
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
|
||||||
|
wp_safe_redirect( $redirect_url );
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
$result = wpmu_activate_signup( $key );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( null === $result && isset( $_COOKIE[ $activate_cookie ] ) ) {
|
||||||
|
$key = $_COOKIE[ $activate_cookie ];
|
||||||
|
$result = wpmu_activate_signup( $key );
|
||||||
|
setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( null === $result || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
|
||||||
|
status_header( 404 );
|
||||||
|
} elseif ( is_wp_error( $result ) ) {
|
||||||
|
$error_code = $result->get_error_code();
|
||||||
|
|
||||||
|
if ( ! in_array( $error_code, $valid_error_codes, true ) ) {
|
||||||
|
status_header( 400 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nocache_headers();
|
||||||
|
|
||||||
|
if ( is_object( $wp_object_cache ) ) {
|
||||||
|
$wp_object_cache->cache_enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fix for page title.
|
||||||
|
$wp_query->is_404 = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires before the Site Activation page is loaded.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'activate_header' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an action hook specific to this page.
|
||||||
|
*
|
||||||
|
* Fires on {@see 'wp_head'}.
|
||||||
|
*
|
||||||
|
* @since MU (3.0.0)
|
||||||
|
*/
|
||||||
|
function do_activate_header() {
|
||||||
|
/**
|
||||||
|
* Fires within the `<head>` section of the Site Activation page.
|
||||||
|
*
|
||||||
|
* Fires on the {@see 'wp_head'} action.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*/
|
||||||
|
do_action( 'activate_wp_head' );
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'do_activate_header' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads styles specific to this page.
|
||||||
|
*
|
||||||
|
* @since MU (3.0.0)
|
||||||
|
*/
|
||||||
|
function wpmu_activate_stylesheet() {
|
||||||
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
.wp-activate-container { width: 90%; margin: 0 auto; }
|
||||||
|
.wp-activate-container form { margin-top: 2em; }
|
||||||
|
#submit, #key { width: 100%; font-size: 24px; box-sizing: border-box; }
|
||||||
|
#language { margin-top: 0.5em; }
|
||||||
|
.wp-activate-container .error { background: #f66; color: #333; }
|
||||||
|
span.h3 { padding: 0 8px; font-size: 1.3em; font-weight: 600; }
|
||||||
|
</style>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
|
||||||
|
add_action( 'wp_head', 'wp_strict_cross_origin_referrer' );
|
||||||
|
add_filter( 'wp_robots', 'wp_robots_sensitive_page' );
|
||||||
|
|
||||||
|
get_header( 'wp-activate' );
|
||||||
|
|
||||||
|
$blog_details = get_site();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="signup-content" class="widecolumn">
|
||||||
|
<div class="wp-activate-container">
|
||||||
|
<?php if ( ! $key ) { ?>
|
||||||
|
|
||||||
|
<h2><?php _e( 'Activation Key Required' ); ?></h2>
|
||||||
|
<form name="activateform" id="activateform" method="post" action="<?php echo esc_url( network_site_url( $blog_details->path . 'wp-activate.php' ) ); ?>">
|
||||||
|
<p>
|
||||||
|
<label for="key"><?php _e( 'Activation Key:' ); ?></label>
|
||||||
|
<br /><input type="text" name="key" id="key" value="" size="50" autofocus="autofocus" />
|
||||||
|
</p>
|
||||||
|
<p class="submit">
|
||||||
|
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e( 'Activate' ); ?>" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes, true ) ) {
|
||||||
|
$signup = $result->get_error_data();
|
||||||
|
?>
|
||||||
|
<h2><?php _e( 'Your account is now active!' ); ?></h2>
|
||||||
|
<?php
|
||||||
|
echo '<p class="lead-in">';
|
||||||
|
if ( '' === $signup->domain . $signup->path ) {
|
||||||
|
printf(
|
||||||
|
/* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */
|
||||||
|
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
|
||||||
|
esc_url( network_site_url( $blog_details->path . 'wp-login.php', 'login' ) ),
|
||||||
|
esc_html( $signup->user_login ),
|
||||||
|
esc_html( $signup->user_email ),
|
||||||
|
esc_url( wp_lostpassword_url() )
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
printf(
|
||||||
|
/* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */
|
||||||
|
__( 'Your site at %1$s is active. You may now log in to your site using your chosen username of “%2$s”. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
|
||||||
|
sprintf( '<a href="http://%1$s">%1$s</a>', esc_url( $signup->domain . $blog_details->path ) ),
|
||||||
|
esc_html( $signup->user_login ),
|
||||||
|
esc_html( $signup->user_email ),
|
||||||
|
esc_url( wp_lostpassword_url() )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
echo '</p>';
|
||||||
|
} elseif ( null === $result || is_wp_error( $result ) ) {
|
||||||
|
?>
|
||||||
|
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
|
||||||
|
<?php if ( is_wp_error( $result ) ) : ?>
|
||||||
|
<p><?php echo esc_html( $result->get_error_message() ); ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
$url = isset( $result['blog_id'] ) ? esc_url( get_home_url( (int) $result['blog_id'] ) ) : '';
|
||||||
|
$user = get_userdata( (int) $result['user_id'] );
|
||||||
|
?>
|
||||||
|
<h2><?php _e( 'Your account is now active!' ); ?></h2>
|
||||||
|
|
||||||
|
<div id="signup-welcome">
|
||||||
|
<p><span class="h3"><?php _e( 'Username:' ); ?></span> <?php echo esc_html( $user->user_login ); ?></p>
|
||||||
|
<p><span class="h3"><?php _e( 'Password:' ); ?></span> <?php echo esc_html( $result['password'] ); ?></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ( $url && network_home_url( '', 'http' ) !== $url ) :
|
||||||
|
switch_to_blog( (int) $result['blog_id'] );
|
||||||
|
$login_url = wp_login_url();
|
||||||
|
restore_current_blog();
|
||||||
|
?>
|
||||||
|
<p class="view">
|
||||||
|
<?php
|
||||||
|
/* translators: 1: Site URL, 2: Login URL. */
|
||||||
|
printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), esc_url( $url ), esc_url( $login_url ) );
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<?php else : ?>
|
||||||
|
<p class="view">
|
||||||
|
<?php
|
||||||
|
printf(
|
||||||
|
/* translators: 1: Login URL, 2: Network home URL. */
|
||||||
|
__( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ),
|
||||||
|
esc_url( network_site_url( $blog_details->path . 'wp-login.php', 'login' ) ),
|
||||||
|
esc_url( network_home_url( $blog_details->path ) )
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
endif;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
get_footer( 'wp-activate' );
|
||||||
21
wp-blog-header.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Loads the WordPress environment and template.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! isset( $wp_did_header ) ) {
|
||||||
|
|
||||||
|
$wp_did_header = true;
|
||||||
|
|
||||||
|
// Load the WordPress library.
|
||||||
|
require_once __DIR__ . '/wp-load.php';
|
||||||
|
|
||||||
|
// Set up the WordPress query.
|
||||||
|
wp();
|
||||||
|
|
||||||
|
// Load the theme template.
|
||||||
|
require_once ABSPATH . WPINC . '/template-loader.php';
|
||||||
|
|
||||||
|
}
|
||||||
81
wp-comments-post.php
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Handles Comment Post to WordPress and prevents duplicate comment posting.
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
|
||||||
|
$protocol = $_SERVER['SERVER_PROTOCOL'];
|
||||||
|
if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0', 'HTTP/3' ), true ) ) {
|
||||||
|
$protocol = 'HTTP/1.0';
|
||||||
|
}
|
||||||
|
|
||||||
|
header( 'Allow: POST' );
|
||||||
|
header( "$protocol 405 Method Not Allowed" );
|
||||||
|
header( 'Content-Type: text/plain' );
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets up the WordPress Environment. */
|
||||||
|
require __DIR__ . '/wp-load.php';
|
||||||
|
|
||||||
|
nocache_headers();
|
||||||
|
|
||||||
|
$comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
|
||||||
|
if ( is_wp_error( $comment ) ) {
|
||||||
|
$data = (int) $comment->get_error_data();
|
||||||
|
if ( ! empty( $data ) ) {
|
||||||
|
wp_die(
|
||||||
|
'<p>' . $comment->get_error_message() . '</p>',
|
||||||
|
__( 'Comment Submission Failure' ),
|
||||||
|
array(
|
||||||
|
'response' => $data,
|
||||||
|
'back_link' => true,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = wp_get_current_user();
|
||||||
|
$cookies_consent = ( isset( $_POST['wp-comment-cookies-consent'] ) );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after comment cookies are set.
|
||||||
|
*
|
||||||
|
* @since 3.4.0
|
||||||
|
* @since 4.9.6 The `$cookies_consent` parameter was added.
|
||||||
|
*
|
||||||
|
* @param WP_Comment $comment Comment object.
|
||||||
|
* @param WP_User $user Comment author's user object. The user may not exist.
|
||||||
|
* @param bool $cookies_consent Comment author's consent to store cookies.
|
||||||
|
*/
|
||||||
|
do_action( 'set_comment_cookies', $comment, $user, $cookies_consent );
|
||||||
|
|
||||||
|
$location = empty( $_POST['redirect_to'] ) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment->comment_ID;
|
||||||
|
|
||||||
|
// If user didn't consent to cookies, add specific query arguments to display the awaiting moderation message.
|
||||||
|
if ( ! $cookies_consent && 'unapproved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_author_email ) ) {
|
||||||
|
$location = add_query_arg(
|
||||||
|
array(
|
||||||
|
'unapproved' => $comment->comment_ID,
|
||||||
|
'moderation-hash' => wp_hash( $comment->comment_date_gmt ),
|
||||||
|
),
|
||||||
|
$location
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filters the location URI to send the commenter after posting.
|
||||||
|
*
|
||||||
|
* @since 2.0.5
|
||||||
|
*
|
||||||
|
* @param string $location The 'redirect_to' URI sent via $_POST.
|
||||||
|
* @param WP_Comment $comment Comment object.
|
||||||
|
*/
|
||||||
|
$location = apply_filters( 'comment_post_redirect', $location, $comment );
|
||||||
|
|
||||||
|
wp_safe_redirect( $location );
|
||||||
|
exit;
|
||||||
102
wp-config-sample.php
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The base configuration for WordPress
|
||||||
|
*
|
||||||
|
* The wp-config.php creation script uses this file during the installation.
|
||||||
|
* You don't have to use the website, you can copy this file to "wp-config.php"
|
||||||
|
* and fill in the values.
|
||||||
|
*
|
||||||
|
* This file contains the following configurations:
|
||||||
|
*
|
||||||
|
* * Database settings
|
||||||
|
* * Secret keys
|
||||||
|
* * Database table prefix
|
||||||
|
* * ABSPATH
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ** Database settings - You can get this info from your web host ** //
|
||||||
|
/** The name of the database for WordPress */
|
||||||
|
define( 'DB_NAME', 'database_name_here' );
|
||||||
|
|
||||||
|
/** Database username */
|
||||||
|
define( 'DB_USER', 'username_here' );
|
||||||
|
|
||||||
|
/** Database password */
|
||||||
|
define( 'DB_PASSWORD', 'password_here' );
|
||||||
|
|
||||||
|
/** Database hostname */
|
||||||
|
define( 'DB_HOST', 'localhost' );
|
||||||
|
|
||||||
|
/** Database charset to use in creating database tables. */
|
||||||
|
define( 'DB_CHARSET', 'utf8' );
|
||||||
|
|
||||||
|
/** The database collate type. Don't change this if in doubt. */
|
||||||
|
define( 'DB_COLLATE', '' );
|
||||||
|
|
||||||
|
/**#@+
|
||||||
|
* Authentication unique keys and salts.
|
||||||
|
*
|
||||||
|
* Change these to different unique phrases! You can generate these using
|
||||||
|
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
|
||||||
|
*
|
||||||
|
* You can change these at any point in time to invalidate all existing cookies.
|
||||||
|
* This will force all users to have to log in again.
|
||||||
|
*
|
||||||
|
* @since 2.6.0
|
||||||
|
*/
|
||||||
|
define( 'AUTH_KEY', 'put your unique phrase here' );
|
||||||
|
define( 'SECURE_AUTH_KEY', 'put your unique phrase here' );
|
||||||
|
define( 'LOGGED_IN_KEY', 'put your unique phrase here' );
|
||||||
|
define( 'NONCE_KEY', 'put your unique phrase here' );
|
||||||
|
define( 'AUTH_SALT', 'put your unique phrase here' );
|
||||||
|
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
|
||||||
|
define( 'LOGGED_IN_SALT', 'put your unique phrase here' );
|
||||||
|
define( 'NONCE_SALT', 'put your unique phrase here' );
|
||||||
|
|
||||||
|
/**#@-*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress database table prefix.
|
||||||
|
*
|
||||||
|
* You can have multiple installations in one database if you give each
|
||||||
|
* a unique prefix. Only numbers, letters, and underscores please!
|
||||||
|
*
|
||||||
|
* At the installation time, database tables are created with the specified prefix.
|
||||||
|
* Changing this value after WordPress is installed will make your site think
|
||||||
|
* it has not been installed.
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#table-prefix
|
||||||
|
*/
|
||||||
|
$table_prefix = 'wp_';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For developers: WordPress debugging mode.
|
||||||
|
*
|
||||||
|
* Change this to true to enable the display of notices during development.
|
||||||
|
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
||||||
|
* in their development environments.
|
||||||
|
*
|
||||||
|
* For information on other constants that can be used for debugging,
|
||||||
|
* visit the documentation.
|
||||||
|
*
|
||||||
|
* @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
|
||||||
|
*/
|
||||||
|
define( 'WP_DEBUG', false );
|
||||||
|
|
||||||
|
/* Add any custom values between this line and the "stop editing" line. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* That's all, stop editing! Happy publishing. */
|
||||||
|
|
||||||
|
/** Absolute path to the WordPress directory. */
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
define( 'ABSPATH', __DIR__ . '/' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets up WordPress vars and included files. */
|
||||||
|
require_once ABSPATH . 'wp-settings.php';
|
||||||
107
wp-config.php
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<?php
|
||||||
|
define( 'WP_CACHE', true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base configuration for WordPress
|
||||||
|
*
|
||||||
|
* The wp-config.php creation script uses this file during the installation.
|
||||||
|
* You don't have to use the web site, you can copy this file to "wp-config.php"
|
||||||
|
* and fill in the values.
|
||||||
|
*
|
||||||
|
* This file contains the following configurations:
|
||||||
|
*
|
||||||
|
* * Database settings
|
||||||
|
* * Secret keys
|
||||||
|
* * Database table prefix
|
||||||
|
* * Localized language
|
||||||
|
* * ABSPATH
|
||||||
|
*
|
||||||
|
* @link https://wordpress.org/support/article/editing-wp-config-php/
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
*/
|
||||||
|
|
||||||
|
// ** Database settings - You can get this info from your web host ** //
|
||||||
|
/** The name of the database for WordPress */
|
||||||
|
define( 'DB_NAME', 'u350065327_huR77' );
|
||||||
|
|
||||||
|
/** Database username */
|
||||||
|
define( 'DB_USER', 'u350065327_D6Jeq' );
|
||||||
|
|
||||||
|
/** Database password */
|
||||||
|
define( 'DB_PASSWORD', 'DL0XbjfRIc' );
|
||||||
|
|
||||||
|
/** Database hostname */
|
||||||
|
define( 'DB_HOST', '127.0.0.1' );
|
||||||
|
|
||||||
|
/** Database charset to use in creating database tables. */
|
||||||
|
define( 'DB_CHARSET', 'utf8' );
|
||||||
|
|
||||||
|
/** The database collate type. Don't change this if in doubt. */
|
||||||
|
define( 'DB_COLLATE', '' );
|
||||||
|
|
||||||
|
/**#@+
|
||||||
|
* Authentication unique keys and salts.
|
||||||
|
*
|
||||||
|
* Change these to different unique phrases! You can generate these using
|
||||||
|
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
|
||||||
|
*
|
||||||
|
* You can change these at any point in time to invalidate all existing cookies.
|
||||||
|
* This will force all users to have to log in again.
|
||||||
|
*
|
||||||
|
* @since 2.6.0
|
||||||
|
*/
|
||||||
|
define( 'AUTH_KEY', '2jY8*JwC7)J:i8+<[LrO)qqsAtZgZ#4Zf~Czir`7!V/T300nCc!I<zCtK/i>Ti5`' );
|
||||||
|
define( 'SECURE_AUTH_KEY', 'Lt`jyyG8rlj2Ob4C#S`5@il?/K;m$aPD_[FTpbvNcTnM`kLr@<I3<tO Jn6ZVBfL' );
|
||||||
|
define( 'LOGGED_IN_KEY', 'VsoMhG0&8Mi9x9m9+Huj 97s5![3XW/Ukv<|Llp3R%VH)FB!rM6y tMb#F>Ka:gE' );
|
||||||
|
define( 'NONCE_KEY', 'f]YMtwi(M-.R%T>:Wu3;_xQ|yOI$70;!iCS{0rMYTMS aHALC0i3;gxsUy9p:f#S' );
|
||||||
|
define( 'AUTH_SALT', 'T}Z_ey~gMnPn/r;3:kYWuAlQQ;N&Az/r:<%Sq1jg]Rg )S&L@9*RHWm/BF;i(;<' );
|
||||||
|
define( 'SECURE_AUTH_SALT', 'g5Q*|b:5yAhI;I-w_dEW =,8qv12sgk =mlgE&U{)xA}or#TY0644Q.V9*:,Twbh' );
|
||||||
|
define( 'LOGGED_IN_SALT', 'CcXKc 4^37_~b6mWxg5Pi| 3{ -NmvJm}Wx$M u.5l|3hHW23$}[Ibj!]]P%o5Y' );
|
||||||
|
define( 'NONCE_SALT', 'Rzbhp$1T)5AYy(bg+ls~q V#&+86S,sKU<CqcZ=NgLc<1-24#9JZRRHLwctJ8fRN' );
|
||||||
|
define( 'WP_CACHE_KEY_SALT', 'vl/c9--7ZO60U$FP;o;Bt9a6vmAt< _Ou5VQB4qZm%iub]dsX5FxiO3Wp(S]DA;~' );
|
||||||
|
|
||||||
|
|
||||||
|
/**#@-*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WordPress database table prefix.
|
||||||
|
*
|
||||||
|
* You can have multiple installations in one database if you give each
|
||||||
|
* a unique prefix. Only numbers, letters, and underscores please!
|
||||||
|
*/
|
||||||
|
$table_prefix = 'wp_';
|
||||||
|
|
||||||
|
|
||||||
|
/* Add any custom values between this line and the "stop editing" line. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For developers: WordPress debugging mode.
|
||||||
|
*
|
||||||
|
* Change this to true to enable the display of notices during development.
|
||||||
|
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
||||||
|
* in their development environments.
|
||||||
|
*
|
||||||
|
* For information on other constants that can be used for debugging,
|
||||||
|
* visit the documentation.
|
||||||
|
*
|
||||||
|
* @link https://wordpress.org/support/article/debugging-in-wordpress/
|
||||||
|
*/
|
||||||
|
if ( ! defined( 'WP_DEBUG' ) ) {
|
||||||
|
define( 'WP_DEBUG', false );
|
||||||
|
}
|
||||||
|
|
||||||
|
define( 'FS_METHOD', 'direct' );
|
||||||
|
define( 'COOKIEHASH', '00f8fbe9998e97c997a6d722dc4ebb14' );
|
||||||
|
define( 'WP_AUTO_UPDATE_CORE', 'minor' );
|
||||||
|
/* That's all, stop editing! Happy publishing. */
|
||||||
|
|
||||||
|
/** Absolute path to the WordPress directory. */
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
define( 'ABSPATH', __DIR__ . '/' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets up WordPress vars and included files. */
|
||||||
|
require_once ABSPATH . 'wp-settings.php';
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#accordion-section-hello-options .accordion-section-title,#accordion-section-hello-options .accordion-section-title:after{color:#c36}#customize-control-hello-header-footer .hello-action-links{margin:15px auto;text-align:center}#customize-control-hello-header-footer .hello-action-links-title{font-weight:600;margin:10px 0}#customize-control-hello-header-footer .hello-action-links-message{margin:0 0 20px}#accordion-section-hello-upsell-elementor-pro{background-color:#fff;box-shadow:-2px 8px 20px 0 rgba(0,0,0,.2);display:flex!important;flex-direction:column;gap:8px;margin:20px 20px 30px;padding:16px}#accordion-section-hello-upsell-elementor-pro .accordion-section-title:after{display:none}#accordion-section-hello-upsell-elementor-pro h3,#accordion-section-hello-upsell-elementor-pro p{background-color:transparent!important;border:0!important;margin:0;padding:0;text-decoration:none}#accordion-section-hello-upsell-elementor-pro h3{font-weight:700}#accordion-section-hello-upsell-elementor-pro .accordion-section-buttons{display:flex;gap:8px;justify-content:flex-end;margin-block-start:16px}#accordion-section-hello-upsell-elementor-pro .accordion-section-buttons a{background-color:#92003b;border-radius:4px;color:#fff;padding:8px 16px;text-decoration:none}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => 'aa90c0c82912bd3a64ea');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#accordion-section-hello-options .accordion-section-title,#accordion-section-hello-options .accordion-section-title:after{color:#c36}#customize-control-hello-header-footer .hello-action-links{margin:15px auto;text-align:center}#customize-control-hello-header-footer .hello-action-links-title{font-weight:600;margin:10px 0}#customize-control-hello-header-footer .hello-action-links-message{margin:0 0 20px}#accordion-section-hello-upsell-elementor-pro{background-color:#fff;box-shadow:2px 8px 20px 0 rgba(0,0,0,.2);display:flex!important;flex-direction:column;gap:8px;margin:20px 20px 30px;padding:16px}#accordion-section-hello-upsell-elementor-pro .accordion-section-title:after{display:none}#accordion-section-hello-upsell-elementor-pro h3,#accordion-section-hello-upsell-elementor-pro p{background-color:transparent!important;border:0!important;margin:0;padding:0;text-decoration:none}#accordion-section-hello-upsell-elementor-pro h3{font-weight:700}#accordion-section-hello-upsell-elementor-pro .accordion-section-buttons{display:flex;gap:8px;justify-content:flex-end;margin-block-start:16px}#accordion-section-hello-upsell-elementor-pro .accordion-section-buttons a{background-color:#92003b;border-radius:4px;color:#fff;padding:8px 16px;text-decoration:none}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.hello-elementor.elementor-nerd-box .elementor-nerd-box-title{margin-block-start:24px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-message{margin-block-start:12px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-link{margin-block-start:24px}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}p{margin-block-end:.75rem}img{border-style:none;height:auto;max-width:100%;vertical-align:middle}pre{font-family:monospace;font-size:1em;white-space:pre-wrap}code,kbd,pre,samp{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem}blockquote{font-style:italic}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => '377baf681f2138bc7e58');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}p{margin-block-end:.75rem}img{border-style:none;height:auto;max-width:100%;vertical-align:middle}pre{font-family:monospace;font-size:1em;white-space:pre-wrap}code,kbd,pre,samp{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem}blockquote{font-style:italic}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => '29d3ef9742e2e1da326c');
|
||||||
1
wp-content/themes/hello-elementor/assets/css/editor.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.hello-elementor.elementor-nerd-box .elementor-nerd-box-title{margin-block-start:24px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-message{margin-block-start:12px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-link{margin-block-start:24px}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => '35eef2f211c36a776630');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => '02f39e3cb7d776085f4a');
|
||||||
1
wp-content/themes/hello-elementor/assets/css/reset.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => 'aad983901f10bf7e4e52');
|
||||||
1
wp-content/themes/hello-elementor/assets/css/theme.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<g id="BrandYoutube">
|
||||||
|
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M4.95964 4.64459C3.76302 4.64459 2.79297 5.61464 2.79297 6.81126V10.8113C2.79297 12.0079 3.76302 12.9779 4.95964 12.9779H11.6263C12.8229 12.9779 13.793 12.0079 13.793 10.8113V6.81126C13.793 5.61464 12.8229 4.64459 11.6263 4.64459H4.95964ZM1.79297 6.81126C1.79297 5.06236 3.21073 3.64459 4.95964 3.64459H11.6263C13.3752 3.64459 14.793 5.06236 14.793 6.81126V10.8113C14.793 12.5602 13.3752 13.9779 11.6263 13.9779H4.95964C3.21073 13.9779 1.79297 12.5602 1.79297 10.8113V6.81126ZM6.71329 6.37616C6.87004 6.28741 7.06242 6.28983 7.21688 6.38251L10.5502 8.38251C10.7008 8.47287 10.793 8.63563 10.793 8.81126C10.793 8.98689 10.7008 9.14964 10.5502 9.24001L7.21688 11.24C7.06242 11.3327 6.87004 11.3351 6.71329 11.2464C6.55653 11.1576 6.45964 10.9914 6.45964 10.8113V6.81126C6.45964 6.63112 6.55653 6.46491 6.71329 6.37616ZM7.45964 7.69435V9.92816L9.32114 8.81126L7.45964 7.69435Z" fill="black" fill-opacity="0.54"/>
|
||||||
|
</g>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<g id="ElementorLogo">
|
||||||
|
<g id="Vector">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.29297 15.8113C4.42698 15.8113 1.29297 12.6773 1.29297 8.81128C1.29297 4.94529 4.42698 1.81128 8.29297 1.81128C12.159 1.81128 15.293 4.94529 15.293 8.81128C15.293 12.6773 12.159 15.8113 8.29297 15.8113ZM8.29297 2.81128C4.97926 2.81128 2.29297 5.49757 2.29297 8.81128C2.29297 12.125 4.97926 14.8113 8.29297 14.8113C11.6067 14.8113 14.293 12.125 14.293 8.81128C14.293 5.49757 11.6067 2.81128 8.29297 2.81128Z" fill="black" fill-opacity="0.54" />
|
||||||
|
<path d="M5.95964 6.14461H6.95948V11.1448H5.95964V6.14461Z" fill="black" fill-opacity="0.54" />
|
||||||
|
<path d="M7.95934 6.14461H10.9589V7.14445H7.95934V6.14461Z" fill="black" fill-opacity="0.54" />
|
||||||
|
<path d="M7.95934 8.14432H10.9589V9.14416H7.95934V8.14432Z" fill="black" fill-opacity="0.54" />
|
||||||
|
<path d="M7.95934 10.1449H10.9589V11.1448H7.95934V10.1449Z" fill="black" fill-opacity="0.54" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
BIN
wp-content/themes/hello-elementor/assets/images/ai.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="23" height="24" fill="none" xmlns:v="https://vecta.io/nano"><path d="M11.5.45a11.26 11.26 0 0 0-5.796 1.564 11.64 11.64 0 0 0-4.14 4.14A11.26 11.26 0 0 0 0 11.95a11.26 11.26 0 0 0 1.564 5.796 11.64 11.64 0 0 0 4.14 4.14c1.779 1.043 3.711 1.564 5.796 1.564s4.017-.521 5.796-1.564a11.64 11.64 0 0 0 4.14-4.14C22.479 15.967 23 14.035 23 11.95s-.521-4.017-1.564-5.796a11.64 11.64 0 0 0-4.14-4.14A11.26 11.26 0 0 0 11.5.45zM8.625 16.734H6.716V7.166h1.909v9.568zm7.659 0h-5.75v-1.909h5.75v1.909zm0-3.818h-5.75v-1.932h5.75v1.932zm0-3.841h-5.75V7.166h5.75v1.909z" fill="black"/></svg>
|
||||||
|
After Width: | Height: | Size: 624 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1,12 @@
|
|||||||
|
<svg width="298" height="321" viewBox="0 0 298 321" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_38_2198)">
|
||||||
|
<rect width="298" height="321" rx="8" fill="#FFE1F9"/>
|
||||||
|
<path opacity="0.8" d="M51.1458 70.0189C51.2625 69.6831 51.7375 69.6831 51.8542 70.0189L65.8221 110.198C65.8602 110.308 65.947 110.394 66.0571 110.431L106.94 124.144C107.281 124.259 107.281 124.741 106.94 124.856L66.0571 138.569C65.947 138.606 65.8602 138.692 65.8221 138.802L51.8542 178.981C51.7375 179.317 51.2625 179.317 51.1458 178.981L37.1779 138.802C37.1398 138.692 37.053 138.606 36.9429 138.569L-3.94012 124.856C-4.2811 124.741 -4.2811 124.259 -3.94012 124.144L36.9429 110.431C37.053 110.394 37.1398 110.308 37.1779 110.198L51.1458 70.0189Z" fill="#FFC5F3"/>
|
||||||
|
<path opacity="0.8" d="M219.538 217.877V152.719C219.538 150.732 217.12 149.753 215.738 151.181L13.6283 360.001C12.2704 361.404 13.2646 363.75 15.2171 363.75H381.42C382.641 363.75 383.631 362.76 383.631 361.539V98.8461C383.631 96.9507 381.403 95.9338 379.971 97.176L147.479 298.917L219.538 217.877Z" fill="#FFC5F3"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_38_2198">
|
||||||
|
<rect width="298" height="321" rx="8" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="72" height="72" rx="8" fill="#FF7BE5"/>
|
||||||
|
<path d="M22.6561 13.4253C22.7433 13.1728 23.1004 13.1728 23.1877 13.4253L25.8479 21.1216C25.8764 21.2039 25.9414 21.2684 26.0239 21.2963L33.8038 23.921C34.059 24.0071 34.059 24.3679 33.8038 24.454L26.0239 27.0787C25.9414 27.1066 25.8764 27.1711 25.8479 27.2534L23.1877 34.9497C23.1004 35.2022 22.7433 35.2022 22.6561 34.9497L19.9958 27.2534C19.9674 27.1711 19.9024 27.1066 19.8199 27.0787L12.0399 24.454C11.7848 24.3679 11.7848 24.0071 12.0399 23.921L19.8199 21.2963C19.9024 21.2684 19.9674 21.2039 19.9958 21.1216L22.6561 13.4253Z" fill="white"/>
|
||||||
|
<path d="M38.7521 41.0697V32.7816C38.7521 32.5288 38.4446 32.4044 38.2688 32.586L12.5602 59.1482C12.3875 59.3266 12.514 59.625 12.7623 59.625H59.3438C59.4991 59.625 59.625 59.4991 59.625 59.3438V25.9289C59.625 25.6878 59.3415 25.5585 59.1594 25.7165L29.5861 51.3782L38.7521 41.0697Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1004 B |
|
After Width: | Height: | Size: 218 KiB |
BIN
wp-content/themes/hello-elementor/assets/images/send-logo.gif
Normal file
|
After Width: | Height: | Size: 561 KiB |
1
wp-content/themes/hello-elementor/assets/js/271.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[271],{1271:function(e,l,s){s.r(l);var d=s(1609),t=s(3072),h=s(790);const a=d.forwardRef(((e,l)=>(0,h.jsxs)(t.A,{viewBox:"0 0 24 24",...e,ref:l,children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21C6.47715 21 2 16.5228 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 16.5228 17.5228 21 12 21ZM12 3C7.58172 3 4 6.58172 4 11C4 15.4183 7.58172 19 12 19C16.4183 19 20 15.4183 20 11C20 6.58172 16.4183 3 12 3Z"}),(0,h.jsx)("path",{d:"M8.5 7H10V15H8.5V7Z"}),(0,h.jsx)("path",{d:"M11.5 7H16V9H11.5V7Z"}),(0,h.jsx)("path",{d:"M11.5 10H16V12H11.5V10Z"}),(0,h.jsx)("path",{d:"M11.5 13H16V15H11.5V13Z"})]})));l.default=a}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/299.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[299],{1299:function(e,L,C){C.r(L),C.d(L,{default:function(){return t}});var l=C(1609),n=C(3072),t=l.forwardRef(((e,L)=>l.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:L},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0001 2C12.266 2 12.5089 2.15027 12.6266 2.38762L15.3384 7.85709L21.4017 8.73178C21.665 8.76976 21.8838 8.95331 21.9659 9.20518C22.0481 9.45705 21.9794 9.73351 21.7888 9.91822L17.395 14.1754L18.431 20.1871C18.476 20.4481 18.3681 20.7118 18.1528 20.8674C17.9375 21.0229 17.6522 21.0433 17.4168 20.9198L12.0063 18.0819L6.58287 20.9201C6.3475 21.0433 6.06229 21.0228 5.84715 20.8672C5.63202 20.7116 5.52429 20.448 5.56925 20.1871L6.60527 14.1754L2.21146 9.91822C2.02081 9.73351 1.95213 9.45705 2.0343 9.20518C2.11647 8.95331 2.33523 8.76976 2.59853 8.73178L8.66185 7.85709L11.3737 2.38762C11.4914 2.15027 11.7342 2 12.0001 2ZM12.0001 4.26658L9.75213 8.80054C9.65033 9.00586 9.45352 9.14813 9.22588 9.18097L4.20166 9.90576L7.84321 13.4341C8.0081 13.5938 8.08337 13.8242 8.04447 14.0499L7.18563 19.0334L11.6815 16.6806C11.8853 16.574 12.1287 16.5741 12.3323 16.6809L16.8143 19.0318L15.9558 14.0499C15.9169 13.8242 15.9921 13.5938 16.157 13.4341L19.7986 9.90576L14.7744 9.18097C14.5467 9.14813 14.3499 9.00586 14.2481 8.80054L12.0001 4.26658Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/380.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[380],{4380:function(e,l,n){n.r(l),n.d(l,{default:function(){return o}});var t=n(1609),r=n(3072),o=t.forwardRef(((e,l)=>t.createElement(r.A,{viewBox:"0 0 24 24",...e,ref:l},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.75C4.86193 4.75 4.75 4.86193 4.75 5V7.25H19.25V5C19.25 4.86193 19.1381 4.75 19 4.75H5ZM20.75 5C20.75 4.0335 19.9665 3.25 19 3.25H5C4.0335 3.25 3.25 4.0335 3.25 5V19C3.25 19.9665 4.0335 20.75 5 20.75H19C19.9665 20.75 20.75 19.9665 20.75 19V5ZM19.25 8.75H4.75V19C4.75 19.1381 4.86193 19.25 5 19.25H19C19.1381 19.25 19.25 19.1381 19.25 19V8.75Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/387.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[387],{3387:function(e,C,l){l.r(C),l.d(C,{default:function(){return r}});var t=l(1609),n=l(3072),r=t.forwardRef(((e,C)=>t.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:C},t.createElement("path",{d:"M15 7.25C14.5858 7.25 14.25 7.58579 14.25 8C14.25 8.41421 14.5858 8.75 15 8.75H15.01C15.4242 8.75 15.76 8.41421 15.76 8C15.76 7.58579 15.4242 7.25 15.01 7.25H15Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.75 6C21.75 5.00544 21.3549 4.05161 20.6517 3.34835C19.9484 2.64509 18.9946 2.25 18 2.25H6C5.00544 2.25 4.05161 2.64509 3.34835 3.34835C2.64509 4.05161 2.25 5.00544 2.25 6V18C2.25 18.9946 2.64509 19.9484 3.34835 20.6517C4.05161 21.3549 5.00544 21.75 6 21.75H18C18.9946 21.75 19.9484 21.3549 20.6517 20.6517C21.3549 19.9484 21.75 18.9946 21.75 18V6ZM4.40901 4.40901C4.83097 3.98705 5.40326 3.75 6 3.75H18C18.5967 3.75 19.169 3.98705 19.591 4.40901C20.0129 4.83097 20.25 5.40326 20.25 6V14.1894L18.5303 12.4697L18.52 12.4596C17.9434 11.9048 17.2466 11.5803 16.5 11.5803C15.7534 11.5803 15.0566 11.9048 14.48 12.4596L14.4697 12.4697L14 12.9394L11.5303 10.4697L11.52 10.4596C10.9434 9.90478 10.2466 9.58032 9.5 9.58032C8.75344 9.58032 8.05657 9.90478 7.47996 10.4596L7.46967 10.4697L3.75 14.1894V6C3.75 5.40326 3.98705 4.83097 4.40901 4.40901ZM15.0607 14.0001L15.5249 13.5358C15.8745 13.2012 16.2119 13.0803 16.5 13.0803C16.7881 13.0803 17.1254 13.2012 17.4751 13.5358L20.25 16.3107V18C20.25 18.5967 20.0129 19.169 19.591 19.591C19.169 20.0129 18.5967 20.25 18 20.25H6C5.40326 20.25 4.83097 20.0129 4.40901 19.591C3.98705 19.169 3.75 18.5967 3.75 18V16.3107L8.52489 11.5358C8.87455 11.2012 9.21189 11.0803 9.5 11.0803C9.78811 11.0803 10.1254 11.2012 10.4751 11.5358L15.4697 16.5304C15.7626 16.8233 16.2374 16.8233 16.5303 16.5304C16.8232 16.2375 16.8232 15.7626 16.5303 15.4697L15.0607 14.0001Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/415.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[415],{8415:function(C,e,l){l.r(e),l.d(e,{default:function(){return d}});var t=l(1609),n=l(3072),d=t.forwardRef(((C,e)=>t.createElement(n.A,{viewBox:"0 0 24 24",...C,ref:e},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.76256 3.76256C4.09075 3.43438 4.53587 3.25 5 3.25H9C9.46413 3.25 9.90925 3.43438 10.2374 3.76256C10.5656 4.09075 10.75 4.53587 10.75 5V9C10.75 9.46413 10.5656 9.90925 10.2374 10.2374C9.90925 10.5656 9.46413 10.75 9 10.75H5C4.53587 10.75 4.09075 10.5656 3.76256 10.2374C3.43438 9.90925 3.25 9.46413 3.25 9V5C3.25 4.53587 3.43438 4.09075 3.76256 3.76256ZM5 4.75C4.9337 4.75 4.87011 4.77634 4.82322 4.82322C4.77634 4.87011 4.75 4.9337 4.75 5V9C4.75 9.0663 4.77634 9.12989 4.82322 9.17678C4.87011 9.22366 4.9337 9.25 5 9.25H9C9.0663 9.25 9.12989 9.22366 9.17678 9.17678C9.22366 9.12989 9.25 9.0663 9.25 9V5C9.25 4.9337 9.22366 4.87011 9.17678 4.82322C9.12989 4.77634 9.0663 4.75 9 4.75H5Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.76256 13.7626C4.09075 13.4344 4.53587 13.25 5 13.25H9C9.46413 13.25 9.90925 13.4344 10.2374 13.7626C10.5656 14.0908 10.75 14.5359 10.75 15V19C10.75 19.4641 10.5656 19.9092 10.2374 20.2374C9.90925 20.5656 9.46413 20.75 9 20.75H5C4.53587 20.75 4.09075 20.5656 3.76256 20.2374C3.43437 19.9092 3.25 19.4641 3.25 19V15C3.25 14.5359 3.43438 14.0908 3.76256 13.7626ZM5 14.75C4.9337 14.75 4.87011 14.7763 4.82322 14.8232C4.77634 14.8701 4.75 14.9337 4.75 15V19C4.75 19.0663 4.77634 19.1299 4.82322 19.1768C4.87011 19.2237 4.93369 19.25 5 19.25H9C9.06631 19.25 9.12989 19.2237 9.17678 19.1768C9.22366 19.1299 9.25 19.0663 9.25 19V15C9.25 14.9337 9.22366 14.8701 9.17678 14.8232C9.12989 14.7763 9.0663 14.75 9 14.75H5Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 13.25C14.5359 13.25 14.0908 13.4344 13.7626 13.7626C13.4344 14.0908 13.25 14.5359 13.25 15V19C13.25 19.4641 13.4344 19.9092 13.7626 20.2374C14.0908 20.5656 14.5359 20.75 15 20.75H19C19.4641 20.75 19.9092 20.5656 20.2374 20.2374C20.5656 19.9092 20.75 19.4641 20.75 19V15C20.75 14.5359 20.5656 14.0908 20.2374 13.7626C19.9092 13.4344 19.4641 13.25 19 13.25H15ZM14.8232 14.8232C14.8701 14.7763 14.9337 14.75 15 14.75H19C19.0663 14.75 19.1299 14.7763 19.1768 14.8232C19.2237 14.8701 19.25 14.9337 19.25 15V19C19.25 19.0663 19.2237 19.1299 19.1768 19.1768C19.1299 19.2237 19.0663 19.25 19 19.25H15C14.9337 19.25 14.8701 19.2237 14.8232 19.1768C14.7763 19.1299 14.75 19.0663 14.75 19V15C14.75 14.9337 14.7763 14.8701 14.8232 14.8232Z"}),t.createElement("path",{d:"M13.25 7C13.25 6.58579 13.5858 6.25 14 6.25H16.25V4C16.25 3.58579 16.5858 3.25 17 3.25C17.4142 3.25 17.75 3.58579 17.75 4V6.25H20C20.4142 6.25 20.75 6.58579 20.75 7C20.75 7.41421 20.4142 7.75 20 7.75H17.75V10C17.75 10.4142 17.4142 10.75 17 10.75C16.5858 10.75 16.25 10.4142 16.25 10V7.75H14C13.5858 7.75 13.25 7.41421 13.25 7Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/468.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[468],{3468:function(C,e,L){L.r(e),L.d(e,{default:function(){return t}});var l=L(1609),n=L(3072),t=l.forwardRef(((C,e)=>l.createElement(n.A,{viewBox:"0 0 24 24",...C,ref:e},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.0221 2.2505C14.7086 2.2428 14.3993 2.32462 14.1306 2.48639C13.8619 2.64816 13.6449 2.88316 13.5049 3.16386L10.9999 8.19197L3.92384 11.2998C3.49889 11.4865 3.16549 11.8343 2.99698 12.2667C2.82848 12.6992 2.83867 13.1809 3.02531 13.6058L4.63384 17.2682C4.82048 17.6931 5.16829 18.0265 5.60074 18.195C6.0332 18.3635 6.51489 18.3533 6.93984 18.1667L8.9999 17.2619L10.709 21.1532C10.8956 21.5781 11.2434 21.9115 11.6759 22.08C12.1083 22.2485 12.59 22.2383 13.015 22.0517L13.9306 21.6496C14.3555 21.4629 14.6889 21.1151 14.8574 20.6827C15.0259 20.2502 15.0157 19.7685 14.8291 19.3436L13.12 15.4523L14.0159 15.0588L19.4131 16.616C19.7145 16.7029 20.0346 16.7021 20.3355 16.6137C20.6364 16.5253 20.9059 16.3529 21.1124 16.1168C21.3188 15.8807 21.4537 15.5907 21.5013 15.2806C21.5488 14.9707 21.507 14.6537 21.3808 14.3667M21.3808 14.3667L20.4142 12.1659C21.0102 11.7447 21.4752 11.1551 21.7441 10.4649C22.1052 9.53824 22.0834 8.50606 21.6834 7.59546C21.2835 6.68486 20.5382 5.97043 19.6115 5.60934C18.9213 5.3404 18.1726 5.28388 17.4591 5.43778L16.4927 3.23726C16.3667 2.95018 16.1613 2.70457 15.901 2.52988C15.6405 2.35511 15.3357 2.2582 15.0221 2.2505M18.0836 6.85961C18.4152 6.83504 18.7512 6.88399 19.0669 7.00698C19.6229 7.22364 20.0701 7.6523 20.3101 8.19866C20.55 8.74502 20.5631 9.36433 20.3465 9.92035C20.2235 10.236 20.0321 10.5166 19.7897 10.7441L18.0836 6.85961ZM15.1191 3.8401C15.1077 3.81399 15.0889 3.79133 15.0652 3.77544C15.0415 3.75956 15.0138 3.75075 14.9853 3.75005C14.9568 3.74935 14.9287 3.75678 14.9042 3.77149C14.8798 3.7862 14.8601 3.80756 14.8474 3.83308L12.2214 9.10391C12.1432 9.26095 12.0123 9.38559 11.8517 9.45615L10.7072 9.95881L12.5168 14.0789L13.6613 13.5763C13.8219 13.5057 14.0022 13.4937 14.1708 13.5423L19.8288 15.1748C19.8562 15.1827 19.8852 15.1826 19.9126 15.1746C19.9399 15.1665 19.9645 15.1509 19.9832 15.1294C20.002 15.1079 20.0143 15.0816 20.0186 15.0534C20.0229 15.0252 20.0191 14.9964 20.0076 14.9703L15.1191 3.8401ZM11.7466 16.0555L13.4557 19.9468C13.4824 20.0075 13.4838 20.0763 13.4598 20.1381C13.4357 20.1999 13.3881 20.2495 13.3274 20.2762L12.4118 20.6783C12.3511 20.705 12.2823 20.7064 12.2205 20.6824C12.1587 20.6583 12.109 20.6107 12.0824 20.55L10.3733 16.6587L11.7466 16.0555ZM11.1434 14.6821L9.33384 10.562L4.52704 12.6732C4.46633 12.6999 4.4187 12.7496 4.39463 12.8113C4.37056 12.8731 4.37201 12.9419 4.39868 13.0026L6.00721 16.665C6.03387 16.7257 6.08356 16.7733 6.14534 16.7974C6.20712 16.8214 6.27593 16.82 6.33664 16.7933L11.1434 14.6821Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/495.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[495],{8495:function(e,C,t){t.r(C),t.d(C,{default:function(){return r}});var l=t(1609),n=t(3072),r=l.forwardRef(((e,C)=>l.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:C},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75 2C6.02066 2 5.32118 2.28973 4.80546 2.80546C4.28973 3.32118 4 4.02065 4 4.75V18.75C4 19.4793 4.28973 20.1788 4.80546 20.6945C5.32118 21.2103 6.02065 21.5 6.75 21.5H16.75C17.4793 21.5 18.1788 21.2103 18.6945 20.6945C19.2103 20.1788 19.5 19.4793 19.5 18.75V7.75C19.5 7.55109 19.421 7.36032 19.2803 7.21967L14.2803 2.21967C14.1397 2.07902 13.9489 2 13.75 2H6.75ZM5.86612 3.86612C6.10054 3.6317 6.41848 3.5 6.75 3.5H13V6.75C13 7.21413 13.1844 7.65925 13.5126 7.98744C13.8408 8.31563 14.2859 8.5 14.75 8.5H18V18.75C18 19.0815 17.8683 19.3995 17.6339 19.6339C17.3995 19.8683 17.0815 20 16.75 20H6.75C6.41848 20 6.10054 19.8683 5.86612 19.6339C5.6317 19.3995 5.5 19.0815 5.5 18.75V4.75C5.5 4.41848 5.6317 4.10054 5.86612 3.86612ZM16.9393 7L14.5 4.56066V6.75C14.5 6.8163 14.5263 6.87989 14.5732 6.92678C14.6201 6.97366 14.6837 7 14.75 7H16.9393Z"}),l.createElement("path",{d:"M8.5 12.25C8.08579 12.25 7.75 12.5858 7.75 13C7.75 13.4142 8.08579 13.75 8.5 13.75H15C15.4142 13.75 15.75 13.4142 15.75 13C15.75 12.5858 15.4142 12.25 15 12.25H8.5Z"}),l.createElement("path",{d:"M8.5 16.25C8.08579 16.25 7.75 16.5858 7.75 17C7.75 17.4142 8.08579 17.75 8.5 17.75H15C15.4142 17.75 15.75 17.4142 15.75 17C15.75 16.5858 15.4142 16.25 15 16.25H8.5Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/502.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[502],{3502:function(e,C,l){l.r(C),l.d(C,{default:function(){return t}});var H=l(1609),n=l(3072),t=H.forwardRef(((e,C)=>H.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:C},H.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9341 3.93414C12.0125 2.8558 13.475 2.25 15 2.25H18C18.4142 2.25 18.75 2.58579 18.75 3V7C18.75 7.41421 18.4142 7.75 18 7.75H15C14.9337 7.75 14.8701 7.77634 14.8232 7.82322C14.7763 7.87011 14.75 7.9337 14.75 8V9.25H18C18.231 9.25 18.449 9.3564 18.5912 9.53844C18.7333 9.72048 18.7836 9.95785 18.7276 10.1819L17.7276 14.1819C17.6441 14.5158 17.3442 14.75 17 14.75H14.75V21C14.75 21.4142 14.4142 21.75 14 21.75H10C9.58579 21.75 9.25 21.4142 9.25 21V14.75H7C6.58579 14.75 6.25 14.4142 6.25 14V10C6.25 9.58579 6.58579 9.25 7 9.25H9.25V8C9.25 6.47501 9.8558 5.01247 10.9341 3.93414ZM15 3.75C13.8728 3.75 12.7918 4.19777 11.9948 4.9948C11.1978 5.79183 10.75 6.87283 10.75 8V10C10.75 10.4142 10.4142 10.75 10 10.75H7.75V13.25H10C10.4142 13.25 10.75 13.5858 10.75 14V20.25H13.25V14C13.25 13.5858 13.5858 13.25 14 13.25H16.4144L17.0394 10.75H14C13.5858 10.75 13.25 10.4142 13.25 10V8C13.25 7.53587 13.4344 7.09075 13.7626 6.76256C14.0908 6.43437 14.5359 6.25 15 6.25H17.25V3.75H15Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/516.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[516],{1516:function(e,t,r){r.r(t),r.d(t,{default:function(){return n}});var C=r(1609),l=r(3072),n=C.forwardRef(((e,t)=>C.createElement(l.A,{viewBox:"0 0 24 24",...e,ref:t},C.createElement("path",{d:"M4.25 5C4.25 4.58579 4.58579 4.25 5 4.25H19C19.4142 4.25 19.75 4.58579 19.75 5V7C19.75 7.41421 19.4142 7.75 19 7.75C18.5858 7.75 18.25 7.41421 18.25 7V5.75H12.75V18.25H14C14.4142 18.25 14.75 18.5858 14.75 19C14.75 19.4142 14.4142 19.75 14 19.75H10C9.58579 19.75 9.25 19.4142 9.25 19C9.25 18.5858 9.58579 18.25 10 18.25H11.25V5.75H5.75V7C5.75 7.41421 5.41421 7.75 5 7.75C4.58579 7.75 4.25 7.41421 4.25 7V5Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/612.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[612],{3612:function(e,C,l){l.r(C),l.d(C,{default:function(){return r}});var n=l(1609),t=l(3072),r=n.forwardRef(((e,C)=>n.createElement(t.A,{viewBox:"0 0 24 24",...e,ref:C},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3.75C6.66848 3.75 6.35054 3.8817 6.11612 4.11612C5.8817 4.35054 5.75 4.66848 5.75 5V19C5.75 19.3315 5.8817 19.6495 6.11612 19.8839C6.35054 20.1183 6.66848 20.25 7 20.25H17C17.3315 20.25 17.6495 20.1183 17.8839 19.8839C18.1183 19.6495 18.25 19.3315 18.25 19V8.75H15C14.5359 8.75 14.0908 8.56563 13.7626 8.23744C13.4344 7.90925 13.25 7.46413 13.25 7V3.75H7ZM14.75 4.81066L17.1893 7.25H15C14.9337 7.25 14.8701 7.22366 14.8232 7.17678C14.7763 7.12989 14.75 7.0663 14.75 7V4.81066ZM5.05546 3.05546C5.57118 2.53973 6.27065 2.25 7 2.25H14C14.1989 2.25 14.3897 2.32902 14.5303 2.46967L19.5303 7.46967C19.671 7.61032 19.75 7.80109 19.75 8V19C19.75 19.7293 19.4603 20.4288 18.9445 20.9445C18.4288 21.4603 17.7293 21.75 17 21.75H7C6.27065 21.75 5.57118 21.4603 5.05546 20.9445C4.53973 20.4288 4.25 19.7293 4.25 19V5C4.25 4.27065 4.53973 3.57118 5.05546 3.05546Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/763.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[763],{7763:function(e,C,l){l.r(C),l.d(C,{default:function(){return t}});var H=l(1609),n=l(3072),t=H.forwardRef(((e,C)=>H.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:C},H.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.75C4.86193 4.75 4.75 4.86193 4.75 5V7C4.75 7.13807 4.86193 7.25 5 7.25H19C19.1381 7.25 19.25 7.13807 19.25 7V5C19.25 4.86193 19.1381 4.75 19 4.75H5ZM3.25 5C3.25 4.0335 4.0335 3.25 5 3.25H19C19.9665 3.25 20.75 4.0335 20.75 5V7C20.75 7.9665 19.9665 8.75 19 8.75H5C4.0335 8.75 3.25 7.9665 3.25 7V5ZM5 12.75C4.86193 12.75 4.75 12.8619 4.75 13V19C4.75 19.1381 4.86193 19.25 5 19.25H9C9.13807 19.25 9.25 19.1381 9.25 19V13C9.25 12.8619 9.13807 12.75 9 12.75H5ZM3.25 13C3.25 12.0335 4.0335 11.25 5 11.25H9C9.9665 11.25 10.75 12.0335 10.75 13V19C10.75 19.9665 9.9665 20.75 9 20.75H5C4.0335 20.75 3.25 19.9665 3.25 19V13ZM13.25 12C13.25 11.5858 13.5858 11.25 14 11.25H20C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75H14C13.5858 12.75 13.25 12.4142 13.25 12ZM13.25 16C13.25 15.5858 13.5858 15.25 14 15.25H20C20.4142 15.25 20.75 15.5858 20.75 16C20.75 16.4142 20.4142 16.75 20 16.75H14C13.5858 16.75 13.25 16.4142 13.25 16ZM13.25 20C13.25 19.5858 13.5858 19.25 14 19.25H20C20.4142 19.25 20.75 19.5858 20.75 20C20.75 20.4142 20.4142 20.75 20 20.75H14C13.5858 20.75 13.25 20.4142 13.25 20Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/768.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[768],{9768:function(e,C,l){l.r(C),l.d(C,{default:function(){return r}});var n=l(1609),t=l(3072),r=n.forwardRef(((e,C)=>n.createElement(t.A,{viewBox:"0 0 24 24",...e,ref:C},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.75C7.44365 3.75 3.75 7.44365 3.75 12C3.75 16.5563 7.44365 20.25 12 20.25C16.5563 20.25 20.25 16.5563 20.25 12C20.25 7.44365 16.5563 3.75 12 3.75ZM2.25 12C2.25 6.61522 6.61522 2.25 12 2.25C17.3848 2.25 21.75 6.61522 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C6.61522 21.75 2.25 17.3848 2.25 12ZM11.4346 6.31004C12.1055 6.17314 12.8016 6.27204 13.4089 6.58932L13.4116 6.59074C14.0173 6.91037 14.4974 7.42629 14.7778 8.05316C15.0582 8.6798 15.1241 9.38318 14.9657 10.0516C14.8073 10.7201 14.4329 11.3179 13.8992 11.7478C13.5634 12.0182 13.1769 12.2121 12.766 12.3194L12.766 13C12.766 13.4142 12.4302 13.75 12.016 13.75C11.6018 13.75 11.266 13.4142 11.266 13L11.266 11.6666C11.266 11.2533 11.6003 10.9179 12.0136 10.9166C12.3547 10.9155 12.6874 10.7978 12.9583 10.5796C13.2296 10.3611 13.4236 10.054 13.5061 9.7057C13.5887 9.35728 13.5541 8.99081 13.4087 8.66579C13.2635 8.34144 13.0175 8.07918 12.7129 7.91806C12.4103 7.76042 12.0658 7.71214 11.7345 7.77976C11.4024 7.84752 11.0997 8.02843 10.8772 8.29658C10.6126 8.61532 10.1398 8.65925 9.82106 8.39471C9.50232 8.13018 9.45839 7.65734 9.72293 7.3386C10.1611 6.81066 10.7638 6.44691 11.4346 6.31004ZM12 15.25C12.4142 15.25 12.75 15.5858 12.75 16V16.04C12.75 16.4542 12.4142 16.79 12 16.79C11.5858 16.79 11.25 16.4542 11.25 16.04V16C11.25 15.5858 11.5858 15.25 12 15.25Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/770.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[770],{6770:function(C,e,l){l.r(e),l.d(e,{default:function(){return t}});var L=l(1609),n=l(3072),t=L.forwardRef(((C,e)=>L.createElement(n.A,{viewBox:"0 0 24 24",...C,ref:e},L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.9461 4.49382C12.7055 3.50206 11.2945 3.50206 11.0539 4.49382L11.0538 4.49421C10.6578 6.12252 8.79686 6.89441 7.36336 6.02285L7.36299 6.02262C6.49035 5.49135 5.49253 6.49022 6.0235 7.3618C6.22619 7.69432 6.34752 8.06998 6.37762 8.45824C6.40773 8.84659 6.34572 9.23656 6.19663 9.59641C6.04755 9.95627 5.8156 10.2758 5.51966 10.5291C5.22378 10.7823 4.8723 10.9621 4.49382 11.0539C3.50206 11.2945 3.50206 12.7055 4.49382 12.9461L4.49422 12.9462C4.87244 13.0382 5.22363 13.2181 5.51923 13.4714C5.81483 13.7246 6.0465 14.0441 6.19542 14.4037C6.34433 14.7633 6.40629 15.153 6.37625 15.5411C6.34621 15.9292 6.22502 16.3047 6.02253 16.6371C5.49145 17.5098 6.49026 18.5074 7.3618 17.9765C7.69431 17.7738 8.06998 17.6525 8.45824 17.6224C8.84659 17.5923 9.23656 17.6543 9.59641 17.8034C9.95627 17.9525 10.2758 18.1844 10.5291 18.4803C10.7823 18.7762 10.9621 19.1277 11.0539 19.5062C11.2945 20.4979 12.7055 20.4979 12.9461 19.5062L12.9462 19.5058C13.0382 19.1276 13.2181 18.7764 13.4714 18.4808C13.7246 18.1852 14.0441 17.9535 14.4037 17.8046C14.7633 17.6557 15.153 17.5937 15.5411 17.6238C15.9292 17.6538 16.3047 17.775 16.6371 17.9775C17.5097 18.5085 18.5074 17.5097 17.9765 16.6382C17.7738 16.3057 17.6525 15.93 17.6224 15.5418C17.5923 15.1534 17.6543 14.7634 17.8034 14.4036C17.9525 14.0437 18.1844 13.7242 18.4803 13.4709C18.7762 13.2177 19.1277 13.0379 19.5062 12.9461C20.4979 12.7055 20.4979 11.2945 19.5062 11.0539L19.5058 11.0538C19.1276 10.9618 18.7764 10.7819 18.4808 10.5286C18.1852 10.2754 17.9535 9.95594 17.8046 9.59631C17.6557 9.23668 17.5937 8.84698 17.6238 8.45889C17.6538 8.07081 17.775 7.69528 17.9775 7.36285C18.5085 6.49025 17.5097 5.49256 16.6382 6.0235C16.3057 6.22619 15.93 6.34752 15.5418 6.37762C15.1534 6.40773 14.7634 6.34572 14.4036 6.19663C14.0437 6.04755 13.7242 5.8156 13.4709 5.51966C13.2177 5.22378 13.0379 4.8723 12.9461 4.49382ZM9.59624 4.13979C10.2079 1.61994 13.7925 1.62007 14.4039 4.14018L14.4039 4.14039C14.44 4.28943 14.5108 4.42783 14.6105 4.54434C14.7102 4.66085 14.836 4.75216 14.9777 4.81086C15.1194 4.86955 15.2729 4.89397 15.4258 4.88211C15.5787 4.87026 15.7266 4.82247 15.8576 4.74264L15.8578 4.7425C18.0722 3.39347 20.6074 5.92764 19.2586 8.14301L19.2585 8.14315C19.1788 8.27403 19.1311 8.42187 19.1193 8.57465C19.1075 8.72744 19.1318 8.88086 19.1905 9.02245C19.2491 9.16404 19.3403 9.28979 19.4567 9.38949C19.573 9.4891 19.7111 9.5599 19.8598 9.59614C22.3801 10.2075 22.3801 13.7925 19.8598 14.4039L19.8596 14.4039C19.7106 14.44 19.5722 14.5108 19.4557 14.6105C19.3392 14.7102 19.2478 14.836 19.1891 14.9777C19.1304 15.1194 19.106 15.2729 19.1179 15.4258C19.1297 15.5787 19.1775 15.7266 19.2574 15.8576L19.2575 15.8578C20.6065 18.0722 18.0724 20.6074 15.857 19.2586L15.8569 19.2585C15.726 19.1788 15.5781 19.1311 15.4253 19.1193C15.2726 19.1075 15.1191 19.1318 14.9776 19.1905C14.836 19.2491 14.7102 19.3403 14.6105 19.4567C14.5109 19.573 14.4401 19.7111 14.4039 19.8598C13.7925 22.3801 10.2075 22.3801 9.59614 19.8598L9.59609 19.8596C9.55998 19.7106 9.48919 19.5722 9.38948 19.4557C9.28977 19.3392 9.16396 19.2478 9.02228 19.1891C8.88061 19.1304 8.72708 19.106 8.57419 19.1179C8.4213 19.1297 8.27337 19.1775 8.14244 19.2574L8.1422 19.2575C5.92778 20.6065 3.39265 18.0724 4.74138 15.857L4.74147 15.8569C4.82118 15.726 4.86889 15.5781 4.88072 15.4253C4.89255 15.2726 4.86816 15.1191 4.80953 14.9776C4.7509 14.836 4.65969 14.7102 4.54332 14.6105C4.42705 14.5109 4.28893 14.4401 4.14018 14.4039C1.61994 13.7925 1.61994 10.2075 4.14018 9.59614L4.14039 9.59609C4.28943 9.55998 4.42783 9.48919 4.54434 9.38948C4.66085 9.28977 4.75216 9.16396 4.81086 9.02228C4.86955 8.88061 4.89397 8.72708 4.88211 8.57419C4.87026 8.4213 4.82247 8.27337 4.74264 8.14244L4.7425 8.1422C3.39354 5.92791 5.92736 3.39294 8.14263 4.74115C8.70903 5.08552 9.4399 4.7816 9.59614 4.14018M12 9.75C10.7574 9.75 9.75 10.7574 9.75 12C9.75 13.2426 10.7574 14.25 12 14.25C13.2426 14.25 14.25 13.2426 14.25 12C14.25 10.7574 13.2426 9.75 12 9.75ZM8.25 12C8.25 9.92893 9.92893 8.25 12 8.25C14.0711 8.25 15.75 9.92893 15.75 12C15.75 14.0711 14.0711 15.75 12 15.75C9.92893 15.75 8.25 14.0711 8.25 12Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/799.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[799],{5180:function(e,l,C){C.r(l),C.d(l,{default:function(){return r}});var n=C(1609),t=C(3072),r=n.forwardRef(((e,l)=>n.createElement(t.A,{viewBox:"0 0 24 24",...e,ref:l},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.75C5 4.33579 5.33579 4 5.75 4H18.6203C19.0345 4 19.3703 4.33579 19.3703 4.75V6.46604C19.3703 6.88026 19.0345 7.21604 18.6203 7.21604C18.2061 7.21604 17.8703 6.88026 17.8703 6.46604V5.5H12.9355V15.3932H13.7594C14.1736 15.3932 14.5094 15.729 14.5094 16.1432C14.5094 16.5574 14.1736 16.8932 13.7594 16.8932H10.6113C10.1971 16.8932 9.8613 16.5574 9.8613 16.1432C9.8613 15.729 10.1971 15.3932 10.6113 15.3932H11.4355V5.5H6.5V6.46604C6.5 6.88026 6.16421 7.21604 5.75 7.21604C5.33579 7.21604 5 6.88026 5 6.46604V4.75ZM6 19.1426C6 18.7284 6.33579 18.3926 6.75 18.3926H17.6203C18.0345 18.3926 18.3703 18.7284 18.3703 19.1426C18.3703 19.5568 18.0345 19.8926 17.6203 19.8926H6.75C6.33579 19.8926 6 19.5568 6 19.1426Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/835.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[835],{1835:function(e,C,l){l.r(C);var n=l(1609),o=l(3072),r=l(790);const d=n.forwardRef(((e,C)=>(0,r.jsx)(o.A,{viewBox:"0 0 24 24",...e,ref:C,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.95964 2.64459C2.76302 2.64459 1.79297 3.61464 1.79297 4.81126V12.8113C1.79297 14.0079 2.76302 14.9779 3.95964 14.9779H16.6263C17.8229 14.9779 18.793 14.0079 18.793 12.8113V4.81126C18.793 3.61464 17.8229 2.64459 16.6263 2.64459H3.95964ZM0.79297 4.81126C0.79297 3.06236 2.21073 1.64459 3.95964 1.64459H16.6263C18.3752 1.64459 19.793 3.06236 19.793 4.81126V12.8113C19.793 14.5602 18.3752 15.9779 16.6263 15.9779H3.95964C2.21073 15.9779 0.79297 14.5602 0.79297 12.8113V4.81126ZM7.71329 4.87616C7.87004 4.78741 8.06242 4.78983 8.21688 4.88251L13.5502 7.88251C13.7008 7.97287 13.793 8.13563 13.793 8.31126C13.793 8.48689 13.7008 8.64964 13.5502 8.74001L8.21688 11.74C8.06242 11.8327 7.87004 11.8351 7.71329 11.7464C7.55653 11.6576 7.45964 11.4914 7.45964 11.3113V5.31126C7.45964 5.13112 7.55653 4.96491 7.71329 4.87616ZM8.45964 6.19435V10.4282L12.3211 8.31126L8.45964 6.19435Z"})})));C.default=d}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/91.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[91],{3091:function(C,e,l){l.r(e),l.d(e,{default:function(){return r}});var n=l(1609),t=l(3072),r=n.forwardRef(((C,e)=>n.createElement(t.A,{viewBox:"0 0 24 24",...C,ref:e},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.8815 2.25919C20.9203 2.25301 20.9599 2.24983 21 2.24988C21.0827 2.24978 21.1629 2.26335 21.2384 2.2887C21.367 2.33162 21.4784 2.40776 21.5642 2.5058C21.6895 2.64891 21.76 2.83868 21.749 3.03992C21.7477 3.06492 21.7452 3.08966 21.7414 3.11407C21.3311 6.09743 20.124 8.91507 18.2472 11.2703C16.5079 13.4529 14.2532 15.1635 11.6906 16.2509C11.8289 17.1168 11.7249 18.0054 11.3884 18.8177C11.0289 19.6857 10.4201 20.4275 9.63896 20.9495C8.85782 21.4714 7.93946 21.75 7 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V17C2.25 16.0605 2.52858 15.1421 3.05052 14.361C3.57246 13.5799 4.3143 12.9711 5.18225 12.6115C5.99455 12.2751 6.88314 12.1711 7.74905 12.3094C8.83643 9.74682 10.547 7.49212 12.7296 5.75287C15.0837 3.87693 17.8998 2.67012 20.8815 2.25919ZM10.0984 16.0649C10.077 16.0082 10.0629 15.9506 10.0557 15.893C9.89413 15.4471 9.63624 15.04 9.2981 14.7019C8.96001 14.3638 8.55301 14.1059 8.10721 13.9444C8.04953 13.9372 7.99178 13.9231 7.93499 13.9016C7.90509 13.8903 7.87632 13.8773 7.84877 13.8628C7.77794 13.8436 7.70633 13.8268 7.63404 13.8124C7.0036 13.687 6.35014 13.7514 5.75628 13.9974C5.16242 14.2433 4.65484 14.6599 4.29772 15.1944C3.94061 15.7288 3.75 16.3572 3.75 17V20.25H7C7.64279 20.25 8.27114 20.0594 8.8056 19.7022C9.34006 19.3451 9.75662 18.8376 10.0026 18.2437C10.2486 17.6498 10.313 16.9964 10.1876 16.3659C10.1732 16.2935 10.1563 16.2218 10.1371 16.1509C10.1226 16.1234 10.1097 16.0947 10.0984 16.0649ZM10.3588 13.6412C10.7069 13.9894 10.9969 14.3876 11.2204 14.8204C12.2258 14.3839 13.1782 13.8417 14.0621 13.2048C13.3066 11.827 12.173 10.6933 10.7952 9.93782C10.1583 10.8218 9.61603 11.7741 9.17957 12.7795C9.61238 13.0031 10.0106 13.293 10.3588 13.6412ZM11.7434 8.75107C13.1943 9.59789 14.4021 10.8057 15.2489 12.2565C15.9093 11.6727 16.5204 11.0304 17.0741 10.3355C18.5698 8.45849 19.5983 6.25889 20.0821 3.9179C17.7411 4.40165 15.5415 5.43018 13.6644 6.92595C12.9696 7.47964 12.3273 8.0907 11.7434 8.75107Z"}))))}}]);
|
||||||
1
wp-content/themes/hello-elementor/assets/js/998.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[998],{9998:function(e,l,n){n.r(l),n.d(l,{default:function(){return L}});var t=n(1609),r=n(3072),L=t.forwardRef(((e,l)=>t.createElement(r.A,{viewBox:"0 0 24 24",...e,ref:l},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 19.25C19.1381 19.25 19.25 19.1381 19.25 19L19.25 16.75L4.75 16.75L4.75 19C4.75 19.1381 4.86193 19.25 5 19.25L19 19.25ZM3.25 19C3.25 19.9665 4.0335 20.75 5 20.75L19 20.75C19.9665 20.75 20.75 19.9665 20.75 19L20.75 5C20.75 4.0335 19.9665 3.25 19 3.25L5 3.25C4.0335 3.25 3.25 4.0335 3.25 5L3.25 19ZM4.75 15.25L19.25 15.25L19.25 5C19.25 4.86193 19.1381 4.75 19 4.75L5 4.75C4.86193 4.75 4.75 4.86193 4.75 5L4.75 15.25Z"}))))}}]);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-i18n'), 'version' => '6dedc5c6d6554468b9db');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => 'e289788a50eecad5c287');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
!function(){"use strict";class e extends $e.modules.hookUI.After{getCommand(){return"document/elements/settings"}getId(){return"hello-elementor-editor-controls-handler"}getHelloThemeControls(){return{hello_header_logo_display:{selector:".site-header .site-logo, .site-header .site-title",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_header_logo_display)}},hello_header_menu_display:{selector:".site-header .site-navigation, .site-header .site-navigation-toggle-holder",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_header_menu_display)}},hello_header_tagline_display:{selector:".site-header .site-description",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_header_tagline_display)}},hello_header_logo_type:{selector:".site-header .site-branding",callback:(e,o)=>{const t=o.container.controls.hello_header_logo_type.options,l=o.settings.hello_header_logo_type;this.toggleLayoutClass(e,"show-",t,l)}},hello_header_layout:{selector:".site-header",callback:(e,o)=>{const t=o.container.controls.hello_header_layout.options,l=o.settings.hello_header_layout;this.toggleLayoutClass(e,"header-",t,l)}},hello_header_width:{selector:".site-header",callback:(e,o)=>{const t=o.container.controls.hello_header_width.options,l=o.settings.hello_header_width;this.toggleLayoutClass(e,"header-",t,l)}},hello_header_menu_layout:{selector:".site-header",callback:(e,o)=>{const t=o.container.controls.hello_header_menu_layout.options,l=o.settings.hello_header_menu_layout;e.find(".site-navigation-toggle-holder").removeClass("elementor-active"),e.find(".site-navigation-dropdown").removeClass("show"),this.toggleLayoutClass(e,"menu-layout-",t,l)}},hello_header_menu_dropdown:{selector:".site-header",callback:(e,o)=>{const t=o.container.controls.hello_header_menu_dropdown.options,l=o.settings.hello_header_menu_dropdown;this.toggleLayoutClass(e,"menu-dropdown-",t,l)}},hello_footer_logo_display:{selector:".site-footer .site-logo, .site-footer .site-title",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_footer_logo_display)}},hello_footer_tagline_display:{selector:".site-footer .site-description",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_footer_tagline_display)}},hello_footer_menu_display:{selector:".site-footer .site-navigation",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_footer_menu_display)}},hello_footer_copyright_display:{selector:".site-footer .copyright",callback:(e,o)=>{const t=e.closest("#site-footer"),l=o.settings.hello_footer_copyright_display;this.toggleShowHideClass(e,l),t.toggleClass("footer-has-copyright","yes"===l)}},hello_footer_logo_type:{selector:".site-footer .site-branding",callback:(e,o)=>{const t=o.container.controls.hello_footer_logo_type.options,l=o.settings.hello_footer_logo_type;this.toggleLayoutClass(e,"show-",t,l)}},hello_footer_layout:{selector:".site-footer",callback:(e,o)=>{const t=o.container.controls.hello_footer_layout.options,l=o.settings.hello_footer_layout;this.toggleLayoutClass(e,"footer-",t,l)}},hello_footer_width:{selector:".site-footer",callback:(e,o)=>{const t=o.container.controls.hello_footer_width.options,l=o.settings.hello_footer_width;this.toggleLayoutClass(e,"footer-",t,l)}},hello_footer_copyright_text:{selector:".site-footer .copyright",callback:(e,o)=>{const t=o.settings.hello_footer_copyright_text;e.find("p").text(t)}}}}toggleShowHideClass(e,o){e.removeClass("hide").removeClass("show").addClass(o?"show":"hide")}toggleLayoutClass(e,o,t,l){Object.entries(t).forEach((([t])=>{e.removeClass(o+t)})),""!==l&&e.addClass(o+l)}getConditions(e){const o="kit"===elementor.documents.getCurrent().config.type,t=Object.keys(e.settings),l=1===t.length;return!!(o&&e.settings&&l)&&!!Object.keys(this.getHelloThemeControls()).includes(t[0])}apply(e){const o=this.getHelloThemeControls()[Object.keys(e.settings)[0]],t=elementor.$previewContents.find(o.selector);o.callback(t,e)}}var o=class extends $e.modules.ComponentBase{pages={};getNamespace(){return"hello-elementor"}defaultHooks(){return this.importHooks({ControlsHook:e})}};$e.components.register(new o)}();
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => 'd45683985595780d10ad');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll('a[href="admin.php?page=hello-elementor-ai-site-planner"], a[href="admin.php?page=hello-elementor-theme-builder"]').forEach((e=>{e.setAttribute("target","_blank")}))}));
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-i18n', 'wp-notices'), 'version' => '2946f8c6e691a77887bc');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-i18n'), 'version' => 'ad52abaee6adea314f36');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array(), 'version' => 'ce55f4e617b3eb2a4c17');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
!function(){class e{constructor(){this.initSettings(),this.initElements(),this.bindEvents()}initSettings(){this.settings={selectors:{menuToggle:".site-header .site-navigation-toggle",menuToggleHolder:".site-header .site-navigation-toggle-holder",dropdownMenu:".site-header .site-navigation-dropdown"}}}initElements(){this.elements={window:window,menuToggle:document.querySelector(this.settings.selectors.menuToggle),menuToggleHolder:document.querySelector(this.settings.selectors.menuToggleHolder),dropdownMenu:document.querySelector(this.settings.selectors.dropdownMenu)}}bindEvents(){this.elements.menuToggleHolder&&!this.elements.menuToggleHolder?.classList.contains("hide")&&(this.elements.menuToggle.addEventListener("click",(()=>this.handleMenuToggle())),this.elements.dropdownMenu.querySelectorAll(".menu-item-has-children > a").forEach((e=>e.addEventListener("click",(e=>this.handleMenuChildren(e))))))}closeMenuItems(){this.elements.menuToggleHolder.classList.remove("elementor-active"),this.elements.window.removeEventListener("resize",(()=>this.closeMenuItems()))}handleMenuToggle(){const e=!this.elements.menuToggleHolder.classList.contains("elementor-active");this.elements.menuToggle.setAttribute("aria-expanded",e),this.elements.dropdownMenu.setAttribute("aria-hidden",!e),this.elements.dropdownMenu.inert=!e,this.elements.menuToggleHolder.classList.toggle("elementor-active",e),this.elements.dropdownMenu.querySelectorAll(".elementor-active").forEach((e=>e.classList.remove("elementor-active"))),e?this.elements.window.addEventListener("resize",(()=>this.closeMenuItems())):this.elements.window.removeEventListener("resize",(()=>this.closeMenuItems()))}handleMenuChildren(e){const t=e.currentTarget.parentElement;t?.classList&&t.classList.toggle("elementor-active")}}document.addEventListener("DOMContentLoaded",(()=>{new e}))}();
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-i18n'), 'version' => '34f5ea01de78b25cc630');
|
||||||
101
wp-content/themes/hello-elementor/assets/js/hello-home-app.js
Normal file
78
wp-content/themes/hello-elementor/comments.php
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying the list of comments and the comment form.
|
||||||
|
*
|
||||||
|
* @package HelloElementor
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! post_type_supports( get_post_type(), 'comments' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! have_comments() && ! comments_open() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Comment Reply Script.
|
||||||
|
if ( comments_open() && get_option( 'thread_comments' ) ) {
|
||||||
|
wp_enqueue_script( 'comment-reply' );
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<section id="comments" class="comments-area">
|
||||||
|
|
||||||
|
<?php if ( have_comments() ) : ?>
|
||||||
|
<h2 class="title-comments">
|
||||||
|
<?php
|
||||||
|
$comments_number = get_comments_number();
|
||||||
|
if ( '1' === $comments_number ) {
|
||||||
|
printf( esc_html_x( 'One Response', 'comments title', 'hello-elementor' ) );
|
||||||
|
} else {
|
||||||
|
printf(
|
||||||
|
/* translators: %s: Number of comments. */
|
||||||
|
esc_html(
|
||||||
|
_nx(
|
||||||
|
'%s Response',
|
||||||
|
'%s Responses',
|
||||||
|
$comments_number,
|
||||||
|
'comments title',
|
||||||
|
'hello-elementor'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
esc_html( number_format_i18n( $comments_number ) )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<?php the_comments_navigation(); ?>
|
||||||
|
|
||||||
|
<ol class="comment-list">
|
||||||
|
<?php
|
||||||
|
wp_list_comments(
|
||||||
|
[
|
||||||
|
'style' => 'ol',
|
||||||
|
'short_ping' => true,
|
||||||
|
'avatar_size' => 42,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<?php the_comments_navigation(); ?>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
comment_form(
|
||||||
|
[
|
||||||
|
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
|
||||||
|
'title_reply_after' => '</h2>',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
|
||||||
|
</section>
|
||||||
27
wp-content/themes/hello-elementor/footer.php
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying the footer.
|
||||||
|
*
|
||||||
|
* Contains the body & html closing tags.
|
||||||
|
*
|
||||||
|
* @package HelloElementor
|
||||||
|
*/
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'footer' ) ) {
|
||||||
|
if ( hello_elementor_display_header_footer() ) {
|
||||||
|
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
|
||||||
|
get_template_part( 'template-parts/dynamic-footer' );
|
||||||
|
} else {
|
||||||
|
get_template_part( 'template-parts/footer' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php wp_footer(); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
273
wp-content/themes/hello-elementor/functions.php
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Theme functions and definitions
|
||||||
|
*
|
||||||
|
* @package HelloElementor
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
define( 'HELLO_ELEMENTOR_VERSION', '3.4.4' );
|
||||||
|
define( 'EHP_THEME_SLUG', 'hello-elementor' );
|
||||||
|
|
||||||
|
define( 'HELLO_THEME_PATH', get_template_directory() );
|
||||||
|
define( 'HELLO_THEME_URL', get_template_directory_uri() );
|
||||||
|
define( 'HELLO_THEME_ASSETS_PATH', HELLO_THEME_PATH . '/assets/' );
|
||||||
|
define( 'HELLO_THEME_ASSETS_URL', HELLO_THEME_URL . '/assets/' );
|
||||||
|
define( 'HELLO_THEME_SCRIPTS_PATH', HELLO_THEME_ASSETS_PATH . 'js/' );
|
||||||
|
define( 'HELLO_THEME_SCRIPTS_URL', HELLO_THEME_ASSETS_URL . 'js/' );
|
||||||
|
define( 'HELLO_THEME_STYLE_PATH', HELLO_THEME_ASSETS_PATH . 'css/' );
|
||||||
|
define( 'HELLO_THEME_STYLE_URL', HELLO_THEME_ASSETS_URL . 'css/' );
|
||||||
|
define( 'HELLO_THEME_IMAGES_PATH', HELLO_THEME_ASSETS_PATH . 'images/' );
|
||||||
|
define( 'HELLO_THEME_IMAGES_URL', HELLO_THEME_ASSETS_URL . 'images/' );
|
||||||
|
|
||||||
|
if ( ! isset( $content_width ) ) {
|
||||||
|
$content_width = 800; // Pixels.
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! function_exists( 'hello_elementor_setup' ) ) {
|
||||||
|
/**
|
||||||
|
* Set up theme support.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function hello_elementor_setup() {
|
||||||
|
if ( is_admin() ) {
|
||||||
|
hello_maybe_update_theme_version_in_db();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( apply_filters( 'hello_elementor_register_menus', true ) ) {
|
||||||
|
register_nav_menus( [ 'menu-1' => esc_html__( 'Header', 'hello-elementor' ) ] );
|
||||||
|
register_nav_menus( [ 'menu-2' => esc_html__( 'Footer', 'hello-elementor' ) ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( apply_filters( 'hello_elementor_post_type_support', true ) ) {
|
||||||
|
add_post_type_support( 'page', 'excerpt' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( apply_filters( 'hello_elementor_add_theme_support', true ) ) {
|
||||||
|
add_theme_support( 'post-thumbnails' );
|
||||||
|
add_theme_support( 'automatic-feed-links' );
|
||||||
|
add_theme_support( 'title-tag' );
|
||||||
|
add_theme_support(
|
||||||
|
'html5',
|
||||||
|
[
|
||||||
|
'search-form',
|
||||||
|
'comment-form',
|
||||||
|
'comment-list',
|
||||||
|
'gallery',
|
||||||
|
'caption',
|
||||||
|
'script',
|
||||||
|
'style',
|
||||||
|
'navigation-widgets',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
add_theme_support(
|
||||||
|
'custom-logo',
|
||||||
|
[
|
||||||
|
'height' => 100,
|
||||||
|
'width' => 350,
|
||||||
|
'flex-height' => true,
|
||||||
|
'flex-width' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
add_theme_support( 'align-wide' );
|
||||||
|
add_theme_support( 'responsive-embeds' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Editor Styles
|
||||||
|
*/
|
||||||
|
add_theme_support( 'editor-styles' );
|
||||||
|
add_editor_style( 'editor-styles.css' );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WooCommerce.
|
||||||
|
*/
|
||||||
|
if ( apply_filters( 'hello_elementor_add_woocommerce_support', true ) ) {
|
||||||
|
// WooCommerce in general.
|
||||||
|
add_theme_support( 'woocommerce' );
|
||||||
|
// Enabling WooCommerce product gallery features (are off by default since WC 3.0.0).
|
||||||
|
// zoom.
|
||||||
|
add_theme_support( 'wc-product-gallery-zoom' );
|
||||||
|
// lightbox.
|
||||||
|
add_theme_support( 'wc-product-gallery-lightbox' );
|
||||||
|
// swipe.
|
||||||
|
add_theme_support( 'wc-product-gallery-slider' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'after_setup_theme', 'hello_elementor_setup' );
|
||||||
|
|
||||||
|
function hello_maybe_update_theme_version_in_db() {
|
||||||
|
$theme_version_option_name = 'hello_theme_version';
|
||||||
|
// The theme version saved in the database.
|
||||||
|
$hello_theme_db_version = get_option( $theme_version_option_name );
|
||||||
|
|
||||||
|
// If the 'hello_theme_version' option does not exist in the DB, or the version needs to be updated, do the update.
|
||||||
|
if ( ! $hello_theme_db_version || version_compare( $hello_theme_db_version, HELLO_ELEMENTOR_VERSION, '<' ) ) {
|
||||||
|
update_option( $theme_version_option_name, HELLO_ELEMENTOR_VERSION );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! function_exists( 'hello_elementor_display_header_footer' ) ) {
|
||||||
|
/**
|
||||||
|
* Check whether to display header footer.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function hello_elementor_display_header_footer() {
|
||||||
|
$hello_elementor_header_footer = true;
|
||||||
|
|
||||||
|
return apply_filters( 'hello_elementor_header_footer', $hello_elementor_header_footer );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! function_exists( 'hello_elementor_scripts_styles' ) ) {
|
||||||
|
/**
|
||||||
|
* Theme Scripts & Styles.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function hello_elementor_scripts_styles() {
|
||||||
|
if ( apply_filters( 'hello_elementor_enqueue_style', true ) ) {
|
||||||
|
wp_enqueue_style(
|
||||||
|
'hello-elementor',
|
||||||
|
HELLO_THEME_STYLE_URL . 'reset.css',
|
||||||
|
[],
|
||||||
|
HELLO_ELEMENTOR_VERSION
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( apply_filters( 'hello_elementor_enqueue_theme_style', true ) ) {
|
||||||
|
wp_enqueue_style(
|
||||||
|
'hello-elementor-theme-style',
|
||||||
|
HELLO_THEME_STYLE_URL . 'theme.css',
|
||||||
|
[],
|
||||||
|
HELLO_ELEMENTOR_VERSION
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( hello_elementor_display_header_footer() ) {
|
||||||
|
wp_enqueue_style(
|
||||||
|
'hello-elementor-header-footer',
|
||||||
|
HELLO_THEME_STYLE_URL . 'header-footer.css',
|
||||||
|
[],
|
||||||
|
HELLO_ELEMENTOR_VERSION
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'wp_enqueue_scripts', 'hello_elementor_scripts_styles' );
|
||||||
|
|
||||||
|
if ( ! function_exists( 'hello_elementor_register_elementor_locations' ) ) {
|
||||||
|
/**
|
||||||
|
* Register Elementor Locations.
|
||||||
|
*
|
||||||
|
* @param ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager $elementor_theme_manager theme manager.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function hello_elementor_register_elementor_locations( $elementor_theme_manager ) {
|
||||||
|
if ( apply_filters( 'hello_elementor_register_elementor_locations', true ) ) {
|
||||||
|
$elementor_theme_manager->register_all_core_location();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'elementor/theme/register_locations', 'hello_elementor_register_elementor_locations' );
|
||||||
|
|
||||||
|
if ( ! function_exists( 'hello_elementor_content_width' ) ) {
|
||||||
|
/**
|
||||||
|
* Set default content width.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function hello_elementor_content_width() {
|
||||||
|
$GLOBALS['content_width'] = apply_filters( 'hello_elementor_content_width', 800 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'after_setup_theme', 'hello_elementor_content_width', 0 );
|
||||||
|
|
||||||
|
if ( ! function_exists( 'hello_elementor_add_description_meta_tag' ) ) {
|
||||||
|
/**
|
||||||
|
* Add description meta tag with excerpt text.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function hello_elementor_add_description_meta_tag() {
|
||||||
|
if ( ! apply_filters( 'hello_elementor_description_meta_tag', true ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! is_singular() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$post = get_queried_object();
|
||||||
|
if ( empty( $post->post_excerpt ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<meta name="description" content="' . esc_attr( wp_strip_all_tags( $post->post_excerpt ) ) . '">' . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
|
||||||
|
|
||||||
|
// Settings page
|
||||||
|
require get_template_directory() . '/includes/settings-functions.php';
|
||||||
|
|
||||||
|
// Header & footer styling option, inside Elementor
|
||||||
|
require get_template_directory() . '/includes/elementor-functions.php';
|
||||||
|
|
||||||
|
if ( ! function_exists( 'hello_elementor_customizer' ) ) {
|
||||||
|
// Customizer controls
|
||||||
|
function hello_elementor_customizer() {
|
||||||
|
if ( ! is_customize_preview() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! hello_elementor_display_header_footer() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
require get_template_directory() . '/includes/customizer-functions.php';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'init', 'hello_elementor_customizer' );
|
||||||
|
|
||||||
|
if ( ! function_exists( 'hello_elementor_check_hide_title' ) ) {
|
||||||
|
/**
|
||||||
|
* Check whether to display the page title.
|
||||||
|
*
|
||||||
|
* @param bool $val default value.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function hello_elementor_check_hide_title( $val ) {
|
||||||
|
if ( defined( 'ELEMENTOR_VERSION' ) ) {
|
||||||
|
$current_doc = Elementor\Plugin::instance()->documents->get( get_the_ID() );
|
||||||
|
if ( $current_doc && 'yes' === $current_doc->get_settings( 'hide_title' ) ) {
|
||||||
|
$val = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_filter( 'hello_elementor_page_title', 'hello_elementor_check_hide_title' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BC:
|
||||||
|
* In v2.7.0 the theme removed the `hello_elementor_body_open()` from `header.php` replacing it with `wp_body_open()`.
|
||||||
|
* The following code prevents fatal errors in child themes that still use this function.
|
||||||
|
*/
|
||||||
|
if ( ! function_exists( 'hello_elementor_body_open' ) ) {
|
||||||
|
function hello_elementor_body_open() {
|
||||||
|
wp_body_open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
require HELLO_THEME_PATH . '/theme.php';
|
||||||
|
|
||||||
|
HelloTheme\Theme::instance();
|
||||||
42
wp-content/themes/hello-elementor/header.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The template for displaying the header
|
||||||
|
*
|
||||||
|
* This is the template that displays all of the <head> section, opens the <body> tag and adds the site's header.
|
||||||
|
*
|
||||||
|
* @package HelloElementor
|
||||||
|
*/
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
$viewport_content = apply_filters( 'hello_elementor_viewport_content', 'width=device-width, initial-scale=1' );
|
||||||
|
$enable_skip_link = apply_filters( 'hello_elementor_enable_skip_link', true );
|
||||||
|
$skip_link_url = apply_filters( 'hello_elementor_skip_link_url', '#content' );
|
||||||
|
?>
|
||||||
|
<!doctype html>
|
||||||
|
<html <?php language_attributes(); ?>>
|
||||||
|
<head>
|
||||||
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||||
|
<meta name="viewport" content="<?php echo esc_attr( $viewport_content ); ?>">
|
||||||
|
<link rel="profile" href="https://gmpg.org/xfn/11">
|
||||||
|
<?php wp_head(); ?>
|
||||||
|
</head>
|
||||||
|
<body <?php body_class(); ?>>
|
||||||
|
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
|
|
||||||
|
<?php if ( $enable_skip_link ) { ?>
|
||||||
|
<a class="skip-link screen-reader-text" href="<?php echo esc_url( $skip_link_url ); ?>"><?php echo esc_html__( 'Skip to content', 'hello-elementor' ); ?></a>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'header' ) ) {
|
||||||
|
if ( hello_elementor_display_header_footer() ) {
|
||||||
|
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
|
||||||
|
get_template_part( 'template-parts/dynamic-header' );
|
||||||
|
} else {
|
||||||
|
get_template_part( 'template-parts/header' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
<?php
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register Customizer controls for header & footer.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function hello_customizer_register( $wp_customize ) {
|
||||||
|
require_once get_template_directory() . '/includes/customizer/customizer-action-links.php';
|
||||||
|
|
||||||
|
$wp_customize->add_section(
|
||||||
|
'hello-options',
|
||||||
|
[
|
||||||
|
'title' => esc_html__( 'Header & Footer', 'hello-elementor' ),
|
||||||
|
'capability' => 'edit_theme_options',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_setting(
|
||||||
|
'hello-header-footer',
|
||||||
|
[
|
||||||
|
'sanitize_callback' => false,
|
||||||
|
'transport' => 'refresh',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$wp_customize->add_control(
|
||||||
|
new HelloElementor\Includes\Customizer\Hello_Customizer_Action_Links(
|
||||||
|
$wp_customize,
|
||||||
|
'hello-header-footer',
|
||||||
|
[
|
||||||
|
'section' => 'hello-options',
|
||||||
|
'priority' => 20,
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
add_action( 'customize_register', 'hello_customizer_register' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register Customizer controls for Elementor Pro upsell.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function hello_customizer_register_elementor_pro_upsell( $wp_customize ) {
|
||||||
|
if ( function_exists( 'elementor_pro_load_plugin' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once get_template_directory() . '/includes/customizer/customizer-upsell.php';
|
||||||
|
|
||||||
|
$wp_customize->add_section(
|
||||||
|
new HelloElementor\Includes\Customizer\Hello_Customizer_Upsell(
|
||||||
|
$wp_customize,
|
||||||
|
'hello-upsell-elementor-pro',
|
||||||
|
[
|
||||||
|
'heading' => esc_html__( 'Customize your entire website with Elementor Pro', 'hello-elementor' ),
|
||||||
|
'description' => esc_html__( 'Build and customize every part of your website, including Theme Parts with Elementor Pro.', 'hello-elementor' ),
|
||||||
|
'button_text' => esc_html__( 'Upgrade Now', 'hello-elementor' ),
|
||||||
|
'button_url' => 'https://elementor.com/pro/?utm_source=hello-theme-customize&utm_campaign=gopro&utm_medium=wp-dash',
|
||||||
|
'priority' => 999999,
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
add_action( 'customize_register', 'hello_customizer_register_elementor_pro_upsell' );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enqueue Customizer CSS.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function hello_customizer_styles() {
|
||||||
|
wp_enqueue_style(
|
||||||
|
'hello-elementor-customizer',
|
||||||
|
HELLO_THEME_STYLE_URL . 'customizer.css',
|
||||||
|
[],
|
||||||
|
HELLO_ELEMENTOR_VERSION
|
||||||
|
);
|
||||||
|
}
|
||||||
|
add_action( 'admin_enqueue_scripts', 'hello_customizer_styles' );
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
<?php
|
||||||
|
namespace HelloElementor\Includes\Customizer;
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Utils;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
class Hello_Customizer_Action_Links extends \WP_Customize_Control {
|
||||||
|
|
||||||
|
// Whitelist content parameter
|
||||||
|
public $content = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render the control's content.
|
||||||
|
*
|
||||||
|
* Allows the content to be overridden without having to rewrite the wrapper.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function render_content() {
|
||||||
|
$this->print_customizer_action_links();
|
||||||
|
|
||||||
|
if ( isset( $this->description ) ) {
|
||||||
|
echo '<span class="description customize-control-description">' . wp_kses_post( $this->description ) . '</span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print customizer action links.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private function print_customizer_action_links() {
|
||||||
|
if ( ! function_exists( 'get_plugins' ) ) {
|
||||||
|
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
$action_link_data = [];
|
||||||
|
$action_link_type = Utils::get_action_link_type();
|
||||||
|
|
||||||
|
switch ( $action_link_type ) {
|
||||||
|
case 'install-elementor':
|
||||||
|
$action_link_data = [
|
||||||
|
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||||
|
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||||
|
'title' => esc_html__( 'Install Elementor', 'hello-elementor' ),
|
||||||
|
'message' => esc_html__( 'Create cross-site header & footer using Elementor.', 'hello-elementor' ),
|
||||||
|
'button' => esc_html__( 'Install Elementor', 'hello-elementor' ),
|
||||||
|
'link' => wp_nonce_url(
|
||||||
|
add_query_arg(
|
||||||
|
[
|
||||||
|
'action' => 'install-plugin',
|
||||||
|
'plugin' => 'elementor',
|
||||||
|
],
|
||||||
|
admin_url( 'update.php' )
|
||||||
|
),
|
||||||
|
'install-plugin_elementor'
|
||||||
|
),
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 'activate-elementor':
|
||||||
|
$action_link_data = [
|
||||||
|
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||||
|
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||||
|
'title' => esc_html__( 'Activate Elementor', 'hello-elementor' ),
|
||||||
|
'message' => esc_html__( 'Create cross-site header & footer using Elementor.', 'hello-elementor' ),
|
||||||
|
'button' => esc_html__( 'Activate Elementor', 'hello-elementor' ),
|
||||||
|
'link' => wp_nonce_url( 'plugins.php?action=activate&plugin=elementor/elementor.php', 'activate-plugin_elementor/elementor.php' ),
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 'activate-header-footer-experiment':
|
||||||
|
$action_link_data = [
|
||||||
|
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||||
|
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||||
|
'title' => esc_html__( 'Style using Elementor', 'hello-elementor' ),
|
||||||
|
'message' => esc_html__( 'Design your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor' ),
|
||||||
|
'button' => esc_html__( 'Activate header & footer experiment', 'hello-elementor' ),
|
||||||
|
'link' => wp_nonce_url( 'admin.php?page=elementor#tab-experiments' ),
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 'style-header-footer':
|
||||||
|
$action_link_data = [
|
||||||
|
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||||
|
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||||
|
'title' => esc_html__( 'Style cross-site header & footer', 'hello-elementor' ),
|
||||||
|
'message' => esc_html__( 'Customize your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor' ),
|
||||||
|
'button' => esc_html__( 'Start Designing', 'hello-elementor' ),
|
||||||
|
'link' => wp_nonce_url( 'post.php?post=' . get_option( 'elementor_active_kit' ) . '&action=elementor' ),
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$customizer_content = $this->get_customizer_action_links_html( $action_link_data );
|
||||||
|
|
||||||
|
echo wp_kses_post( $customizer_content );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the customizer action links HTML.
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function get_customizer_action_links_html( $data ) {
|
||||||
|
if (
|
||||||
|
empty( $data )
|
||||||
|
|| ! isset( $data['image'] )
|
||||||
|
|| ! isset( $data['alt'] )
|
||||||
|
|| ! isset( $data['title'] )
|
||||||
|
|| ! isset( $data['message'] )
|
||||||
|
|| ! isset( $data['link'] )
|
||||||
|
|| ! isset( $data['button'] )
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sprintf(
|
||||||
|
'<div class="hello-action-links">
|
||||||
|
<img src="%1$s" alt="%2$s">
|
||||||
|
<p class="hello-action-links-title">%3$s</p>
|
||||||
|
<p class="hello-action-links-message">%4$s</p>
|
||||||
|
<a class="button button-primary" target="_blank" href="%5$s">%6$s</a>
|
||||||
|
</div>',
|
||||||
|
$data['image'],
|
||||||
|
$data['alt'],
|
||||||
|
$data['title'],
|
||||||
|
$data['message'],
|
||||||
|
$data['link'],
|
||||||
|
$data['button'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
namespace HelloElementor\Includes\Customizer;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
class Hello_Customizer_Upsell extends \WP_Customize_Section {
|
||||||
|
|
||||||
|
public $heading;
|
||||||
|
|
||||||
|
public $description;
|
||||||
|
|
||||||
|
public $button_text;
|
||||||
|
|
||||||
|
public $button_url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render the section, and the controls that have been added to it.
|
||||||
|
*/
|
||||||
|
protected function render() {
|
||||||
|
?>
|
||||||
|
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section control-section control-section-<?php echo esc_attr( $this->id ); ?> cannot-expand">
|
||||||
|
<h3 class="accordion-section-title"><?php echo esc_html( $this->heading ); ?></h3>
|
||||||
|
<p class="accordion-section-description"><?php echo esc_html( $this->description ); ?></p>
|
||||||
|
<div class="accordion-section-buttons">
|
||||||
|
<a href="<?php echo esc_url( $this->button_url ); ?>" target="_blank"><?php echo esc_html( $this->button_text ); ?></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,246 @@
|
|||||||
|
<?php
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register Site Settings Controls.
|
||||||
|
*/
|
||||||
|
|
||||||
|
add_action( 'elementor/init', 'hello_elementor_settings_init' );
|
||||||
|
|
||||||
|
function hello_elementor_settings_init() {
|
||||||
|
if ( ! hello_header_footer_experiment_active() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'settings/settings-header.php';
|
||||||
|
require 'settings/settings-footer.php';
|
||||||
|
|
||||||
|
add_action( 'elementor/kit/register_tabs', function( \Elementor\Core\Kits\Documents\Kit $kit ) {
|
||||||
|
if ( ! hello_elementor_display_header_footer() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$kit->register_tab( 'hello-settings-header', HelloElementor\Includes\Settings\Settings_Header::class );
|
||||||
|
$kit->register_tab( 'hello-settings-footer', HelloElementor\Includes\Settings\Settings_Footer::class );
|
||||||
|
}, 1, 40 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to return a setting.
|
||||||
|
*
|
||||||
|
* Saves 2 lines to get kit, then get setting. Also caches the kit and setting.
|
||||||
|
*
|
||||||
|
* @param string $setting_id
|
||||||
|
* @return string|array same as the Elementor internal function does.
|
||||||
|
*/
|
||||||
|
function hello_elementor_get_setting( $setting_id ) {
|
||||||
|
global $hello_elementor_settings;
|
||||||
|
|
||||||
|
$return = '';
|
||||||
|
|
||||||
|
if ( ! isset( $hello_elementor_settings['kit_settings'] ) ) {
|
||||||
|
$kit = \Elementor\Plugin::$instance->kits_manager->get_active_kit();
|
||||||
|
$hello_elementor_settings['kit_settings'] = $kit->get_settings();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( isset( $hello_elementor_settings['kit_settings'][ $setting_id ] ) ) {
|
||||||
|
$return = $hello_elementor_settings['kit_settings'][ $setting_id ];
|
||||||
|
}
|
||||||
|
|
||||||
|
return apply_filters( 'hello_elementor_' . $setting_id, $return );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to show/hide elements
|
||||||
|
*
|
||||||
|
* This works with switches, if the setting ID that has been passed is toggled on, we'll return show, otherwise we'll return hide
|
||||||
|
*
|
||||||
|
* @param string $setting_id
|
||||||
|
* @return string|array same as the Elementor internal function does.
|
||||||
|
*/
|
||||||
|
function hello_show_or_hide( $setting_id ) {
|
||||||
|
return ( 'yes' === hello_elementor_get_setting( $setting_id ) ? 'show' : 'hide' );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to translate the header layout setting into a class name.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function hello_get_header_layout_class() {
|
||||||
|
$layout_classes = [];
|
||||||
|
|
||||||
|
$header_layout = hello_elementor_get_setting( 'hello_header_layout' );
|
||||||
|
if ( 'inverted' === $header_layout ) {
|
||||||
|
$layout_classes[] = 'header-inverted';
|
||||||
|
} elseif ( 'stacked' === $header_layout ) {
|
||||||
|
$layout_classes[] = 'header-stacked';
|
||||||
|
}
|
||||||
|
|
||||||
|
$header_width = hello_elementor_get_setting( 'hello_header_width' );
|
||||||
|
if ( 'full-width' === $header_width ) {
|
||||||
|
$layout_classes[] = 'header-full-width';
|
||||||
|
}
|
||||||
|
|
||||||
|
$header_menu_dropdown = hello_elementor_get_setting( 'hello_header_menu_dropdown' );
|
||||||
|
if ( 'tablet' === $header_menu_dropdown ) {
|
||||||
|
$layout_classes[] = 'menu-dropdown-tablet';
|
||||||
|
} elseif ( 'mobile' === $header_menu_dropdown ) {
|
||||||
|
$layout_classes[] = 'menu-dropdown-mobile';
|
||||||
|
} elseif ( 'none' === $header_menu_dropdown ) {
|
||||||
|
$layout_classes[] = 'menu-dropdown-none';
|
||||||
|
}
|
||||||
|
|
||||||
|
$hello_header_menu_layout = hello_elementor_get_setting( 'hello_header_menu_layout' );
|
||||||
|
if ( 'dropdown' === $hello_header_menu_layout ) {
|
||||||
|
$layout_classes[] = 'menu-layout-dropdown';
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode( ' ', $layout_classes );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to translate the footer layout setting into a class name.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function hello_get_footer_layout_class() {
|
||||||
|
$footer_layout = hello_elementor_get_setting( 'hello_footer_layout' );
|
||||||
|
|
||||||
|
$layout_classes = [];
|
||||||
|
|
||||||
|
if ( 'inverted' === $footer_layout ) {
|
||||||
|
$layout_classes[] = 'footer-inverted';
|
||||||
|
} elseif ( 'stacked' === $footer_layout ) {
|
||||||
|
$layout_classes[] = 'footer-stacked';
|
||||||
|
}
|
||||||
|
|
||||||
|
$footer_width = hello_elementor_get_setting( 'hello_footer_width' );
|
||||||
|
|
||||||
|
if ( 'full-width' === $footer_width ) {
|
||||||
|
$layout_classes[] = 'footer-full-width';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( hello_elementor_get_setting( 'hello_footer_copyright_display' ) && '' !== hello_elementor_get_setting( 'hello_footer_copyright_text' ) ) {
|
||||||
|
$layout_classes[] = 'footer-has-copyright';
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode( ' ', $layout_classes );
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'elementor/editor/after_enqueue_scripts', function() {
|
||||||
|
if ( ! hello_header_footer_experiment_active() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||||
|
|
||||||
|
wp_enqueue_script(
|
||||||
|
'hello-theme-editor',
|
||||||
|
HELLO_THEME_SCRIPTS_URL . 'hello-editor.js',
|
||||||
|
[ 'jquery', 'elementor-editor' ],
|
||||||
|
HELLO_ELEMENTOR_VERSION,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
wp_enqueue_style(
|
||||||
|
'hello-editor',
|
||||||
|
HELLO_THEME_STYLE_URL . 'editor.css',
|
||||||
|
[],
|
||||||
|
HELLO_ELEMENTOR_VERSION
|
||||||
|
);
|
||||||
|
} );
|
||||||
|
|
||||||
|
add_action( 'wp_enqueue_scripts', function() {
|
||||||
|
if ( ! hello_elementor_display_header_footer() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! hello_header_footer_experiment_active() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
wp_enqueue_script(
|
||||||
|
'hello-theme-frontend',
|
||||||
|
HELLO_THEME_SCRIPTS_URL . 'hello-frontend.js',
|
||||||
|
[],
|
||||||
|
HELLO_ELEMENTOR_VERSION,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
\Elementor\Plugin::$instance->kits_manager->frontend_before_enqueue_styles();
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to decide whether to output the header template.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function hello_get_header_display() {
|
||||||
|
$is_editor = isset( $_GET['elementor-preview'] );
|
||||||
|
|
||||||
|
return (
|
||||||
|
$is_editor
|
||||||
|
|| hello_elementor_get_setting( 'hello_header_logo_display' )
|
||||||
|
|| hello_elementor_get_setting( 'hello_header_tagline_display' )
|
||||||
|
|| hello_elementor_get_setting( 'hello_header_menu_display' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to decide whether to output the footer template.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
function hello_get_footer_display() {
|
||||||
|
$is_editor = isset( $_GET['elementor-preview'] );
|
||||||
|
|
||||||
|
return (
|
||||||
|
$is_editor
|
||||||
|
|| hello_elementor_get_setting( 'hello_footer_logo_display' )
|
||||||
|
|| hello_elementor_get_setting( 'hello_footer_tagline_display' )
|
||||||
|
|| hello_elementor_get_setting( 'hello_footer_menu_display' )
|
||||||
|
|| hello_elementor_get_setting( 'hello_footer_copyright_display' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add Hello Elementor theme Header & Footer to Experiments.
|
||||||
|
*/
|
||||||
|
add_action( 'elementor/experiments/default-features-registered', function( \Elementor\Core\Experiments\Manager $experiments_manager ) {
|
||||||
|
$experiments_manager->add_feature( [
|
||||||
|
'name' => 'hello-theme-header-footer',
|
||||||
|
'title' => esc_html__( 'Header & Footer', 'hello-elementor' ),
|
||||||
|
'tag' => esc_html__( 'Hello Theme', 'hello-elementor' ),
|
||||||
|
'description' => sprintf(
|
||||||
|
'%1$s <a href="%2$s" target="_blank">%3$s</a>',
|
||||||
|
esc_html__( 'Customize and style the builtin Hello Theme’s cross-site header & footer from the Elementor "Site Settings" panel.', 'hello-elementor' ),
|
||||||
|
'https://go.elementor.com/wp-dash-header-footer',
|
||||||
|
esc_html__( 'Learn More', 'hello-elementor' )
|
||||||
|
),
|
||||||
|
'release_status' => $experiments_manager::RELEASE_STATUS_STABLE,
|
||||||
|
'new_site' => [
|
||||||
|
'minimum_installation_version' => '3.3.0',
|
||||||
|
'default_active' => $experiments_manager::STATE_ACTIVE,
|
||||||
|
],
|
||||||
|
] );
|
||||||
|
} );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to check if Header & Footer Experiment is Active/Inactive
|
||||||
|
*/
|
||||||
|
function hello_header_footer_experiment_active() {
|
||||||
|
// If Elementor is not active, return false
|
||||||
|
if ( ! did_action( 'elementor/loaded' ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Backwards compat.
|
||||||
|
if ( ! method_exists( \Elementor\Plugin::$instance->experiments, 'is_feature_active' ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (bool) ( \Elementor\Plugin::$instance->experiments->is_feature_active( 'hello-theme-header-footer' ) );
|
||||||
|
}
|
||||||
284
wp-content/themes/hello-elementor/includes/module-base.php
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Includes;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module Base.
|
||||||
|
*
|
||||||
|
* An abstract class providing the properties and methods needed to
|
||||||
|
* manage and handle modules in inheriting classes.
|
||||||
|
*
|
||||||
|
* @abstract
|
||||||
|
* @package HelloTheme
|
||||||
|
* @subpackage HelloThemeModules
|
||||||
|
*/
|
||||||
|
abstract class Module_Base {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module class reflection.
|
||||||
|
*
|
||||||
|
* Holds the information about a class.
|
||||||
|
* @access private
|
||||||
|
*
|
||||||
|
* @var ?\ReflectionClass
|
||||||
|
*/
|
||||||
|
private ?\ReflectionClass $reflection = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module components.
|
||||||
|
*
|
||||||
|
* Holds the module components.
|
||||||
|
* @access private
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
private array $components = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module instance.
|
||||||
|
*
|
||||||
|
* Holds the module instance.
|
||||||
|
* @access protected
|
||||||
|
*
|
||||||
|
* @var Module_Base[]
|
||||||
|
*/
|
||||||
|
protected static array $instances = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get module name.
|
||||||
|
*
|
||||||
|
* Retrieve the module name.
|
||||||
|
* @access public
|
||||||
|
* @abstract
|
||||||
|
*
|
||||||
|
* @return string Module name.
|
||||||
|
*/
|
||||||
|
abstract public static function get_name(): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @abstract
|
||||||
|
* @access protected
|
||||||
|
*
|
||||||
|
* @return string[]
|
||||||
|
*/
|
||||||
|
abstract protected function get_component_ids(): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Singleton Instance.
|
||||||
|
*
|
||||||
|
* Ensures only one instance of the module class is loaded or can be loaded.
|
||||||
|
* @access public
|
||||||
|
* @static
|
||||||
|
*
|
||||||
|
* @return Module_Base An instance of the class.
|
||||||
|
*/
|
||||||
|
public static function instance(): Module_Base {
|
||||||
|
$class_name = static::class_name();
|
||||||
|
|
||||||
|
if ( empty( static::$instances[ $class_name ] ) ) {
|
||||||
|
static::$instances[ $class_name ] = new static(); // @codeCoverageIgnore
|
||||||
|
}
|
||||||
|
|
||||||
|
return static::$instances[ $class_name ];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* is_active
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @static
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function is_active(): bool {
|
||||||
|
/**
|
||||||
|
* allow enabling/disabling the module on run-time
|
||||||
|
*
|
||||||
|
* @param bool $is_active the filters value
|
||||||
|
*/
|
||||||
|
return apply_filters( 'hello-plus-theme/modules/' . static::get_name() . '/is-active', true );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class name.
|
||||||
|
*
|
||||||
|
* Retrieve the name of the class.
|
||||||
|
* @access public
|
||||||
|
* @static
|
||||||
|
*/
|
||||||
|
public static function class_name(): string {
|
||||||
|
return get_called_class();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @return \ReflectionClass
|
||||||
|
*/
|
||||||
|
public function get_reflection(): \ReflectionClass {
|
||||||
|
if ( null === $this->reflection ) {
|
||||||
|
try {
|
||||||
|
$this->reflection = new \ReflectionClass( $this );
|
||||||
|
} catch ( \ReflectionException $e ) {
|
||||||
|
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||||
|
error_log( $e->getMessage() ); //phpcs:ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->reflection;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add module component.
|
||||||
|
*
|
||||||
|
* Add new component to the current module.
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @param string $id Component ID.
|
||||||
|
* @param mixed $instance An instance of the component.
|
||||||
|
*/
|
||||||
|
public function add_component( string $id, $instance ) {
|
||||||
|
$this->components[ $id ] = $instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function get_components(): array {
|
||||||
|
return $this->components;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get module component.
|
||||||
|
*
|
||||||
|
* Retrieve the module component.
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @param string $id Component ID.
|
||||||
|
*
|
||||||
|
* @return mixed An instance of the component, or `null` if the component
|
||||||
|
* doesn't exist.
|
||||||
|
*/
|
||||||
|
public function get_component( string $id ) {
|
||||||
|
if ( isset( $this->components[ $id ] ) ) {
|
||||||
|
return $this->components[ $id ];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve the namespace of the class
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @access public
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function namespace_name(): string {
|
||||||
|
$class_name = static::class_name();
|
||||||
|
return substr( $class_name, 0, strrpos( $class_name, '\\' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds an array of components.
|
||||||
|
* Assumes namespace structure contains `\Components\`
|
||||||
|
*
|
||||||
|
* @access protected
|
||||||
|
*
|
||||||
|
* @param ?array $components_ids => component's class name.
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function register_components( ?array $components_ids = null ): void {
|
||||||
|
if ( empty( $components_ids ) ) {
|
||||||
|
$components_ids = $this->get_component_ids();
|
||||||
|
}
|
||||||
|
$namespace = static::namespace_name();
|
||||||
|
foreach ( $components_ids as $component_id ) {
|
||||||
|
$class_name = $namespace . '\\Components\\' . $component_id;
|
||||||
|
$this->add_component( $component_id, new $class_name() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers the Module's widgets.
|
||||||
|
* Assumes namespace structure contains `\Widgets\`
|
||||||
|
*
|
||||||
|
* @access protected
|
||||||
|
*
|
||||||
|
* @param \Elementor\Widgets_Manager $widgets_manager
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function register_widgets( \Elementor\Widgets_Manager $widgets_manager ): void {
|
||||||
|
$widget_ids = $this->get_widget_ids();
|
||||||
|
$namespace = static::namespace_name();
|
||||||
|
|
||||||
|
foreach ( $widget_ids as $widget_id ) {
|
||||||
|
$class_name = $namespace . '\\Widgets\\' . $widget_id;
|
||||||
|
$widgets_manager->register( new $class_name() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @access protected
|
||||||
|
*
|
||||||
|
* @return string[]
|
||||||
|
*/
|
||||||
|
protected function get_widget_ids(): array {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @access protected
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function register_hooks(): void {
|
||||||
|
add_action( 'elementor/widgets/register', [ $this, 'register_widgets' ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clone.
|
||||||
|
*
|
||||||
|
* Disable class cloning and throw an error on object clone.
|
||||||
|
*
|
||||||
|
* The whole idea of the singleton design pattern is that there is a single
|
||||||
|
* object. Therefore, we don't want the object to be cloned.
|
||||||
|
*
|
||||||
|
* @access private
|
||||||
|
*/
|
||||||
|
public function __clone() {
|
||||||
|
// Cloning instances of the class is forbidden
|
||||||
|
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'hello-elementor' ), '0.0.1' ); // @codeCoverageIgnore
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wakeup.
|
||||||
|
*
|
||||||
|
* Disable un-serializing of the class.
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public function __wakeup() {
|
||||||
|
// Un-serializing instances of the class is forbidden
|
||||||
|
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'hello-elementor' ), '0.0.1' ); // @codeCoverageIgnore
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* class constructor
|
||||||
|
*
|
||||||
|
* @access protected
|
||||||
|
*
|
||||||
|
* @param ?string[] $components_list
|
||||||
|
*/
|
||||||
|
protected function __construct( ?array $components_list = null ) {
|
||||||
|
$this->register_components( $components_list );
|
||||||
|
$this->register_hooks();
|
||||||
|
}
|
||||||
|
}
|
||||||
43
wp-content/themes/hello-elementor/includes/script.php
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Includes;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
class Script {
|
||||||
|
|
||||||
|
protected string $handle;
|
||||||
|
protected array $dependencies;
|
||||||
|
|
||||||
|
public function __construct( string $handle, array $dependencies = [] ) {
|
||||||
|
$this->handle = $handle;
|
||||||
|
$this->dependencies = $dependencies;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function enqueue() {
|
||||||
|
$asset_path = HELLO_THEME_SCRIPTS_PATH . $this->handle . '.asset.php';
|
||||||
|
$asset_url = HELLO_THEME_SCRIPTS_URL;
|
||||||
|
|
||||||
|
if ( ! file_exists( $asset_path ) ) {
|
||||||
|
throw new \Exception( $asset_path . ' - You need to run `npm run build` for the "hello-elementor" first.' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$script_asset = require $asset_path;
|
||||||
|
|
||||||
|
foreach ( $this->dependencies as $dependency ) {
|
||||||
|
$script_asset['dependencies'][] = $dependency;
|
||||||
|
}
|
||||||
|
|
||||||
|
wp_enqueue_script(
|
||||||
|
$this->handle,
|
||||||
|
$asset_url . "$this->handle.js",
|
||||||
|
$script_asset['dependencies'],
|
||||||
|
$script_asset['version'],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
\wp_set_script_translations( $this->handle, 'hello-elementor' );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use HelloTheme\Theme;
|
||||||
|
use HelloTheme\Modules\AdminHome\Components\Settings_Controller;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'init', 'hello_elementor_tweak_settings', 0 );
|
||||||
|
|
||||||
|
function hello_elementor_tweak_settings() {
|
||||||
|
/**
|
||||||
|
* @var Settings_Controller $settings_controller
|
||||||
|
*/
|
||||||
|
$settings_controller = Theme::instance()
|
||||||
|
->get_module( 'AdminHome' )
|
||||||
|
->get_component( 'Settings_Controller' );
|
||||||
|
|
||||||
|
$settings_controller->legacy_register_settings();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Register a new setting.
|
||||||
|
*
|
||||||
|
* @deprecated 3.4.0
|
||||||
|
*/
|
||||||
|
function hello_elementor_register_settings( $settings_group, $settings ) {
|
||||||
|
/**
|
||||||
|
* @var Settings_Controller $settings_controller
|
||||||
|
*/
|
||||||
|
$settings_controller = Theme::instance()
|
||||||
|
->get_module( 'AdminHome' )
|
||||||
|
->get_component( 'Settings_Controller' );
|
||||||
|
|
||||||
|
$settings_controller->register_settings( $settings_group, $settings );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run a tweek only if the user requested it.
|
||||||
|
*
|
||||||
|
* @deprecated 3.4.0
|
||||||
|
*/
|
||||||
|
function hello_elementor_do_tweak( $setting, $tweak_callback ) {
|
||||||
|
/**
|
||||||
|
* @var Settings_Controller $settings_controller
|
||||||
|
*/
|
||||||
|
$settings_controller = Theme::instance()
|
||||||
|
->get_module( 'AdminHome' )
|
||||||
|
->get_component( 'Settings_Controller' );
|
||||||
|
|
||||||
|
$settings_controller->apply_setting( $setting, $tweak_callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render theme tweaks.
|
||||||
|
*
|
||||||
|
* @deprecated 3.4.0
|
||||||
|
*/
|
||||||
|
function hello_elementor_render_tweaks( $settings_group, $settings ) {
|
||||||
|
/**
|
||||||
|
* @var Settings_Controller $settings_controller
|
||||||
|
*/
|
||||||
|
$settings_controller = Theme::instance()
|
||||||
|
->get_module( 'AdminHome' )
|
||||||
|
->get_component( 'Settings_Controller' );
|
||||||
|
|
||||||
|
$settings_controller->apply_settings( $settings_group, $settings );
|
||||||
|
}
|
||||||
@@ -0,0 +1,756 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloElementor\Includes\Settings;
|
||||||
|
|
||||||
|
use Elementor\Controls_Manager;
|
||||||
|
use Elementor\Group_Control_Background;
|
||||||
|
use Elementor\Group_Control_Text_Shadow;
|
||||||
|
use Elementor\Group_Control_Text_Stroke;
|
||||||
|
use Elementor\Group_Control_Typography;
|
||||||
|
use Elementor\Core\Kits\Documents\Tabs\Tab_Base;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly
|
||||||
|
}
|
||||||
|
|
||||||
|
class Settings_Footer extends Tab_Base {
|
||||||
|
|
||||||
|
public function get_id() {
|
||||||
|
return 'hello-settings-footer';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_title() {
|
||||||
|
return esc_html__( 'Hello Theme Footer', 'hello-elementor' );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_icon() {
|
||||||
|
return 'eicon-footer';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_help_url() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_group() {
|
||||||
|
return 'theme-style';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function register_tab_controls() {
|
||||||
|
$start = is_rtl() ? 'right' : 'left';
|
||||||
|
$end = ! is_rtl() ? 'right' : 'left';
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_footer_section',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-footer',
|
||||||
|
'label' => esc_html__( 'Footer', 'hello-elementor' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_logo_display',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SWITCHER,
|
||||||
|
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||||
|
'default' => 'yes',
|
||||||
|
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||||
|
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||||
|
'selector' => '.site-footer .site-branding',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_tagline_display',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SWITCHER,
|
||||||
|
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||||
|
'default' => 'yes',
|
||||||
|
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||||
|
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||||
|
'selector' => '.site-footer .site-description',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_menu_display',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SWITCHER,
|
||||||
|
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||||
|
'default' => 'yes',
|
||||||
|
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||||
|
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||||
|
'selector' => '.site-footer .site-navigation',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_copyright_display',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SWITCHER,
|
||||||
|
'label' => esc_html__( 'Copyright', 'hello-elementor' ),
|
||||||
|
'default' => 'yes',
|
||||||
|
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||||
|
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||||
|
'selector' => '.site-footer .copyright',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_disable_note',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'warning',
|
||||||
|
'content' => sprintf(
|
||||||
|
/* translators: %s: Link that opens the theme settings page. */
|
||||||
|
__( 'Note: Hiding all the elements, only hides them visually. To disable them completely go to <a href="%s">Theme Settings</a> .', 'hello-elementor' ),
|
||||||
|
admin_url( 'themes.php?page=hello-theme-settings' )
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => '',
|
||||||
|
'hello_footer_tagline_display' => '',
|
||||||
|
'hello_footer_menu_display' => '',
|
||||||
|
'hello_footer_copyright_display' => '',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_layout',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::CHOOSE,
|
||||||
|
'label' => esc_html__( 'Layout', 'hello-elementor' ),
|
||||||
|
'options' => [
|
||||||
|
'inverted' => [
|
||||||
|
'title' => esc_html__( 'Inverted', 'hello-elementor' ),
|
||||||
|
'icon' => "eicon-arrow-$start",
|
||||||
|
],
|
||||||
|
'stacked' => [
|
||||||
|
'title' => esc_html__( 'Centered', 'hello-elementor' ),
|
||||||
|
'icon' => 'eicon-h-align-center',
|
||||||
|
],
|
||||||
|
'default' => [
|
||||||
|
'title' => esc_html__( 'Default', 'hello-elementor' ),
|
||||||
|
'icon' => "eicon-arrow-$end",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'toggle' => false,
|
||||||
|
'selector' => '.site-footer',
|
||||||
|
'default' => 'default',
|
||||||
|
'separator' => 'before',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_footer_tagline_position',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::CHOOSE,
|
||||||
|
'label' => esc_html__( 'Tagline Position', 'hello-elementor' ),
|
||||||
|
'options' => [
|
||||||
|
'before' => [
|
||||||
|
'title' => esc_html__( 'Before', 'hello-elementor' ),
|
||||||
|
'icon' => "eicon-arrow-$start",
|
||||||
|
],
|
||||||
|
'below' => [
|
||||||
|
'title' => esc_html__( 'Below', 'hello-elementor' ),
|
||||||
|
'icon' => 'eicon-arrow-down',
|
||||||
|
],
|
||||||
|
'after' => [
|
||||||
|
'title' => esc_html__( 'After', 'hello-elementor' ),
|
||||||
|
'icon' => "eicon-arrow-$end",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'toggle' => false,
|
||||||
|
'default' => 'below',
|
||||||
|
'selectors_dictionary' => [
|
||||||
|
'before' => 'flex-direction: row-reverse; align-items: center;',
|
||||||
|
'below' => 'flex-direction: column; align-items: stretch;',
|
||||||
|
'after' => 'flex-direction: row; align-items: center;',
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_tagline_display' => 'yes',
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .site-branding' => '{{VALUE}}',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_footer_tagline_gap',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'label' => esc_html__( 'Tagline Gap', 'hello-elementor' ),
|
||||||
|
'size_units' => [ 'px', 'em ', 'rem', 'custom' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'em' => [
|
||||||
|
'max' => 10,
|
||||||
|
],
|
||||||
|
'rem' => [
|
||||||
|
'max' => 10,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_tagline_display' => 'yes',
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .site-branding' => 'gap: {{SIZE}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_width',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SELECT,
|
||||||
|
'label' => esc_html__( 'Width', 'hello-elementor' ),
|
||||||
|
'options' => [
|
||||||
|
'boxed' => esc_html__( 'Boxed', 'hello-elementor' ),
|
||||||
|
'full-width' => esc_html__( 'Full Width', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'selector' => '.site-footer',
|
||||||
|
'default' => 'boxed',
|
||||||
|
'separator' => 'before',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_footer_custom_width',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'label' => esc_html__( 'Content Width', 'hello-elementor' ),
|
||||||
|
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'max' => 2000,
|
||||||
|
],
|
||||||
|
'em' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'rem' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_width' => 'boxed',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .footer-inner' => 'width: {{SIZE}}{{UNIT}}; max-width: 100%;',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_footer_gap',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'label' => esc_html__( 'Side Margins', 'hello-elementor' ),
|
||||||
|
'size_units' => [ '%', 'px', 'em ', 'rem', 'vw', 'custom' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'em' => [
|
||||||
|
'max' => 5,
|
||||||
|
],
|
||||||
|
'rem' => [
|
||||||
|
'max' => 5,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer' => 'padding-inline-end: {{SIZE}}{{UNIT}}; padding-inline-start: {{SIZE}}{{UNIT}}',
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_layout!' => 'stacked',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Background::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_background',
|
||||||
|
'label' => esc_html__( 'Background', 'hello-elementor' ),
|
||||||
|
'types' => [ 'classic', 'gradient' ],
|
||||||
|
'separator' => 'before',
|
||||||
|
'selector' => '.site-footer',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_footer_logo_section',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-footer',
|
||||||
|
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display!' => '',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_logo_link',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'content' => sprintf(
|
||||||
|
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||||
|
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s logo', 'hello-elementor' ),
|
||||||
|
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'logo',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_title_link',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'content' => sprintf(
|
||||||
|
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||||
|
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s title', 'hello-elementor' ),
|
||||||
|
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_logo_type',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Type', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::SELECT,
|
||||||
|
'default' => 'logo',
|
||||||
|
'options' => [
|
||||||
|
'logo' => esc_html__( 'Logo', 'hello-elementor' ),
|
||||||
|
'title' => esc_html__( 'Title', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'frontend_available' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_footer_logo_width',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'label' => esc_html__( 'Logo Width', 'hello-elementor' ),
|
||||||
|
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'max' => 1000,
|
||||||
|
],
|
||||||
|
'em' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'rem' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'logo',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .site-branding .site-logo img' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_title_typography',
|
||||||
|
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selector' => '.site-footer .site-title',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_title_text_shadow',
|
||||||
|
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selector' => '.site-footer .site-title a',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Stroke::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_title_text_stroke',
|
||||||
|
'label' => esc_html__( 'Text Stroke', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selector' => '.site-footer .site-title a',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->start_controls_tabs( 'hello_footer_title_colors' );
|
||||||
|
|
||||||
|
$this->start_controls_tab(
|
||||||
|
'hello_footer_title_colors_normal',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Normal', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_title_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .site-title a' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_tab();
|
||||||
|
|
||||||
|
$this->start_controls_tab(
|
||||||
|
'hello_footer_title_colors_hover',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Hover', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_title_hover_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_logo_display' => 'yes',
|
||||||
|
'hello_footer_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .site-title a:hover' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_title_hover_color_transition_duration',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Transition Duration', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'size_units' => [ 's', 'ms', 'custom' ],
|
||||||
|
'default' => [
|
||||||
|
'unit' => 's',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .site-title a' => 'transition-duration: {{SIZE}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_tab();
|
||||||
|
|
||||||
|
$this->end_controls_tabs();
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_footer_tagline',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-footer',
|
||||||
|
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_tagline_link',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'content' => sprintf(
|
||||||
|
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||||
|
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s tagline', 'hello-elementor' ),
|
||||||
|
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_tagline_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .site-description' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_tagline_typography',
|
||||||
|
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selector' => '.site-footer .site-description',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_tagline_text_shadow',
|
||||||
|
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selector' => '.site-footer .site-description',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_footer_menu_tab',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-footer',
|
||||||
|
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_menu_display' => 'yes',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$available_menus = wp_get_nav_menus();
|
||||||
|
|
||||||
|
$menus = [ '0' => esc_html__( '— Select a Menu —', 'hello-elementor' ) ];
|
||||||
|
foreach ( $available_menus as $available_menu ) {
|
||||||
|
$menus[ $available_menu->term_id ] = $available_menu->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( 1 === count( $menus ) ) {
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_menu_notice',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'heading' => esc_html__( 'There are no menus in your site.', 'hello-elementor' ),
|
||||||
|
'content' => sprintf(
|
||||||
|
__( 'Go to <a href="%s" target="_blank">Menus screen</a> to create one.', 'hello-elementor' ),
|
||||||
|
admin_url( 'nav-menus.php?action=edit&menu=0' )
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_menu_warning',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'content' => sprintf(
|
||||||
|
__( 'Go to the <a href="%s" target="_blank">Menus screen</a> to manage your menus. Changes will be reflected in the preview only after the page reloads.', 'hello-elementor' ),
|
||||||
|
admin_url( 'nav-menus.php' )
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_menu',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::SELECT,
|
||||||
|
'options' => $menus,
|
||||||
|
'default' => array_keys( $menus )[0],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_menu_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'footer .footer-inner .site-navigation a' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_menu_typography',
|
||||||
|
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||||
|
'selector' => 'footer .footer-inner .site-navigation a',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_menu_text_shadow',
|
||||||
|
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||||
|
'selector' => 'footer .footer-inner .site-navigation a',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_footer_copyright_section',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-footer',
|
||||||
|
'label' => esc_html__( 'Copyright', 'hello-elementor' ),
|
||||||
|
'conditions' => [
|
||||||
|
'relation' => 'and',
|
||||||
|
'terms' => [
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_copyright_display',
|
||||||
|
'operator' => '=',
|
||||||
|
'value' => 'yes',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_copyright_text',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::TEXTAREA,
|
||||||
|
'label' => esc_html__( 'Text', 'hello-elementor' ),
|
||||||
|
'default' => esc_html__( 'All rights reserved', 'hello-elementor' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_footer_copyright_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_copyright_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-footer .copyright p' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_copyright_typography',
|
||||||
|
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_copyright_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selector' => '.site-footer .copyright p',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_footer_copyright_text_shadow',
|
||||||
|
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_footer_copyright_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selector' => '.site-footer .copyright p',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function on_save( $data ) {
|
||||||
|
// Save chosen footer menu to the WP settings.
|
||||||
|
if ( isset( $data['settings']['hello_footer_menu'] ) ) {
|
||||||
|
$menu_id = $data['settings']['hello_footer_menu'];
|
||||||
|
$locations = get_theme_mod( 'nav_menu_locations' );
|
||||||
|
$locations['menu-2'] = (int) $menu_id;
|
||||||
|
set_theme_mod( 'nav_menu_locations', $locations );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_additional_tab_content() {
|
||||||
|
$content_template = '
|
||||||
|
<div class="hello-elementor elementor-nerd-box">
|
||||||
|
<img src="%1$s" class="elementor-nerd-box-icon" alt="%2$s">
|
||||||
|
<p class="elementor-nerd-box-title">%3$s</p>
|
||||||
|
<p class="elementor-nerd-box-message">%4$s</p>
|
||||||
|
<a class="elementor-nerd-box-link elementor-button go-pro" target="_blank" href="%5$s">%6$s</a>
|
||||||
|
</div>';
|
||||||
|
|
||||||
|
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
|
||||||
|
return sprintf(
|
||||||
|
$content_template,
|
||||||
|
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||||
|
esc_attr__( 'Get Elementor Pro', 'hello-elementor' ),
|
||||||
|
esc_html__( 'Create custom footers', 'hello-elementor' ),
|
||||||
|
esc_html__( 'Adjust your footer to include contact forms, sitemaps and more with Elementor Pro.', 'hello-elementor' ),
|
||||||
|
'https://go.elementor.com/hello-theme-footer/',
|
||||||
|
esc_html__( 'Upgrade Now', 'hello-elementor' )
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return sprintf(
|
||||||
|
$content_template,
|
||||||
|
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||||
|
esc_attr__( 'Elementor Pro', 'hello-elementor' ),
|
||||||
|
esc_html__( 'Create a custom footer with the Theme Builder', 'hello-elementor' ),
|
||||||
|
esc_html__( 'With the Theme Builder you can jump directly into each part of your site', 'hello-elementor' ),
|
||||||
|
get_admin_url( null, 'admin.php?page=elementor-app#/site-editor/templates/footer' ),
|
||||||
|
esc_html__( 'Create Footer', 'hello-elementor' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,789 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloElementor\Includes\Settings;
|
||||||
|
|
||||||
|
use Elementor\Plugin;
|
||||||
|
use Elementor\Controls_Manager;
|
||||||
|
use Elementor\Group_Control_Background;
|
||||||
|
use Elementor\Group_Control_Text_Shadow;
|
||||||
|
use Elementor\Group_Control_Text_Stroke;
|
||||||
|
use Elementor\Group_Control_Typography;
|
||||||
|
use Elementor\Core\Kits\Documents\Tabs\Tab_Base;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly
|
||||||
|
}
|
||||||
|
|
||||||
|
class Settings_Header extends Tab_Base {
|
||||||
|
|
||||||
|
public function get_id() {
|
||||||
|
return 'hello-settings-header';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_title() {
|
||||||
|
return esc_html__( 'Hello Theme Header', 'hello-elementor' );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_icon() {
|
||||||
|
return 'eicon-header';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_help_url() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_group() {
|
||||||
|
return 'theme-style';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function register_tab_controls() {
|
||||||
|
$start = is_rtl() ? 'right' : 'left';
|
||||||
|
$end = ! is_rtl() ? 'right' : 'left';
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_header_section',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-header',
|
||||||
|
'label' => esc_html__( 'Header', 'hello-elementor' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_logo_display',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SWITCHER,
|
||||||
|
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||||
|
'default' => 'yes',
|
||||||
|
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||||
|
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_tagline_display',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SWITCHER,
|
||||||
|
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||||
|
'default' => 'yes',
|
||||||
|
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||||
|
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu_display',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SWITCHER,
|
||||||
|
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||||
|
'default' => 'yes',
|
||||||
|
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||||
|
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_disable_note',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'warning',
|
||||||
|
'content' => sprintf(
|
||||||
|
/* translators: %s: Link that opens the theme settings page. */
|
||||||
|
__( 'Note: Hiding all the elements, only hides them visually. To disable them completely go to <a href="%s">Theme Settings</a> .', 'hello-elementor' ),
|
||||||
|
admin_url( 'themes.php?page=hello-theme-settings' )
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => '',
|
||||||
|
'hello_header_tagline_display' => '',
|
||||||
|
'hello_header_menu_display' => '',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_layout',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::CHOOSE,
|
||||||
|
'label' => esc_html__( 'Layout', 'hello-elementor' ),
|
||||||
|
'options' => [
|
||||||
|
'inverted' => [
|
||||||
|
'title' => esc_html__( 'Inverted', 'hello-elementor' ),
|
||||||
|
'icon' => "eicon-arrow-$start",
|
||||||
|
],
|
||||||
|
'stacked' => [
|
||||||
|
'title' => esc_html__( 'Centered', 'hello-elementor' ),
|
||||||
|
'icon' => 'eicon-h-align-center',
|
||||||
|
],
|
||||||
|
'default' => [
|
||||||
|
'title' => esc_html__( 'Default', 'hello-elementor' ),
|
||||||
|
'icon' => "eicon-arrow-$end",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'toggle' => false,
|
||||||
|
'selector' => '.site-header',
|
||||||
|
'default' => 'default',
|
||||||
|
'separator' => 'before',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_header_tagline_position',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::CHOOSE,
|
||||||
|
'label' => esc_html__( 'Tagline Position', 'hello-elementor' ),
|
||||||
|
'options' => [
|
||||||
|
'before' => [
|
||||||
|
'title' => esc_html__( 'Before', 'hello-elementor' ),
|
||||||
|
'icon' => "eicon-arrow-$start",
|
||||||
|
],
|
||||||
|
'below' => [
|
||||||
|
'title' => esc_html__( 'Below', 'hello-elementor' ),
|
||||||
|
'icon' => 'eicon-arrow-down',
|
||||||
|
],
|
||||||
|
'after' => [
|
||||||
|
'title' => esc_html__( 'After', 'hello-elementor' ),
|
||||||
|
'icon' => "eicon-arrow-$end",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'toggle' => false,
|
||||||
|
'default' => 'below',
|
||||||
|
'selectors_dictionary' => [
|
||||||
|
'before' => 'flex-direction: row-reverse; align-items: center;',
|
||||||
|
'below' => 'flex-direction: column; align-items: stretch;',
|
||||||
|
'after' => 'flex-direction: row; align-items: center;',
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_tagline_display' => 'yes',
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-branding' => '{{VALUE}}',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_header_tagline_gap',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'label' => esc_html__( 'Tagline Gap', 'hello-elementor' ),
|
||||||
|
'size_units' => [ 'px', 'em ', 'rem', 'custom' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'em' => [
|
||||||
|
'max' => 10,
|
||||||
|
],
|
||||||
|
'rem' => [
|
||||||
|
'max' => 10,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_tagline_display' => 'yes',
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-branding' => 'gap: {{SIZE}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_width',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SELECT,
|
||||||
|
'label' => esc_html__( 'Width', 'hello-elementor' ),
|
||||||
|
'options' => [
|
||||||
|
'boxed' => esc_html__( 'Boxed', 'hello-elementor' ),
|
||||||
|
'full-width' => esc_html__( 'Full Width', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'selector' => '.site-header',
|
||||||
|
'default' => 'boxed',
|
||||||
|
'separator' => 'before',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_header_custom_width',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'label' => esc_html__( 'Content Width', 'hello-elementor' ),
|
||||||
|
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'max' => 2000,
|
||||||
|
],
|
||||||
|
'em' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'rem' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_width' => 'boxed',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .header-inner' => 'width: {{SIZE}}{{UNIT}}; max-width: 100%;',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_header_gap',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'label' => esc_html__( 'Side Margins', 'hello-elementor' ),
|
||||||
|
'size_units' => [ '%', 'px', 'em ', 'rem', 'vw', 'custom' ],
|
||||||
|
'default' => [
|
||||||
|
'size' => '0',
|
||||||
|
],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'em' => [
|
||||||
|
'max' => 5,
|
||||||
|
],
|
||||||
|
'rem' => [
|
||||||
|
'max' => 5,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header' => 'padding-inline-end: {{SIZE}}{{UNIT}}; padding-inline-start: {{SIZE}}{{UNIT}}',
|
||||||
|
],
|
||||||
|
'conditions' => [
|
||||||
|
'relation' => 'and',
|
||||||
|
'terms' => [
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_layout',
|
||||||
|
'operator' => '!=',
|
||||||
|
'value' => 'stacked',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Background::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_background',
|
||||||
|
'label' => esc_html__( 'Background', 'hello-elementor' ),
|
||||||
|
'types' => [ 'classic', 'gradient' ],
|
||||||
|
'separator' => 'before',
|
||||||
|
'selector' => '.site-header',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_header_logo_section',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-header',
|
||||||
|
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||||
|
'conditions' => [
|
||||||
|
'relation' => 'and',
|
||||||
|
'terms' => [
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_logo_display',
|
||||||
|
'operator' => '=',
|
||||||
|
'value' => 'yes',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_logo_link',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'content' => sprintf(
|
||||||
|
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||||
|
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s logo', 'hello-elementor' ),
|
||||||
|
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'logo',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_title_link',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'content' => sprintf(
|
||||||
|
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||||
|
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s title', 'hello-elementor' ),
|
||||||
|
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_logo_type',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Type', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::SELECT,
|
||||||
|
'default' => ( has_custom_logo() ? 'logo' : 'title' ),
|
||||||
|
'options' => [
|
||||||
|
'logo' => esc_html__( 'Logo', 'hello-elementor' ),
|
||||||
|
'title' => esc_html__( 'Title', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'frontend_available' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'hello_header_logo_width',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'label' => esc_html__( 'Logo Width', 'hello-elementor' ),
|
||||||
|
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'max' => 1000,
|
||||||
|
],
|
||||||
|
'em' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'rem' => [
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'logo',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-branding .site-logo img' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_title_typography',
|
||||||
|
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selector' => '.site-header .site-title',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_title_text_shadow',
|
||||||
|
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selector' => '.site-header .site-title a',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Stroke::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_title_text_stroke',
|
||||||
|
'label' => esc_html__( 'Text Stroke', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selector' => '.site-header .site-title a',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->start_controls_tabs( 'hello_header_title_colors' );
|
||||||
|
|
||||||
|
$this->start_controls_tab(
|
||||||
|
'hello_header_title_colors_normal',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Normal', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_title_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-title a' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_tab();
|
||||||
|
|
||||||
|
$this->start_controls_tab(
|
||||||
|
'hello_header_title_colors_hover',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Hover', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_title_hover_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_logo_display' => 'yes',
|
||||||
|
'hello_header_logo_type' => 'title',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-title a:hover' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_title_hover_color_transition_duration',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Transition Duration', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'size_units' => [ 's', 'ms', 'custom' ],
|
||||||
|
'default' => [
|
||||||
|
'unit' => 's',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-title a' => 'transition-duration: {{SIZE}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_tab();
|
||||||
|
|
||||||
|
$this->end_controls_tabs();
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_header_tagline',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-header',
|
||||||
|
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||||
|
'conditions' => [
|
||||||
|
'relation' => 'and',
|
||||||
|
'terms' => [
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_tagline_display',
|
||||||
|
'operator' => '=',
|
||||||
|
'value' => 'yes',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_tagline_link',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'content' => sprintf(
|
||||||
|
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||||
|
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s tagline', 'hello-elementor' ),
|
||||||
|
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_tagline_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-description' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_tagline_typography',
|
||||||
|
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selector' => '.site-header .site-description',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_tagline_text_shadow',
|
||||||
|
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_tagline_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selector' => '.site-header .site-description',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'hello_header_menu_tab',
|
||||||
|
[
|
||||||
|
'tab' => 'hello-settings-header',
|
||||||
|
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||||
|
'conditions' => [
|
||||||
|
'relation' => 'and',
|
||||||
|
'terms' => [
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_menu_display',
|
||||||
|
'operator' => '=',
|
||||||
|
'value' => 'yes',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$available_menus = wp_get_nav_menus();
|
||||||
|
|
||||||
|
$menus = [ '0' => esc_html__( '— Select a Menu —', 'hello-elementor' ) ];
|
||||||
|
foreach ( $available_menus as $available_menu ) {
|
||||||
|
$menus[ $available_menu->term_id ] = $available_menu->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( 1 === count( $menus ) ) {
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu_notice',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'heading' => esc_html__( 'There are no menus in your site.', 'hello-elementor' ),
|
||||||
|
'content' => sprintf(
|
||||||
|
__( 'Go to <a href="%s" target="_blank">Menus screen</a> to create one.', 'hello-elementor' ),
|
||||||
|
admin_url( 'nav-menus.php?action=edit&menu=0' )
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu_warning',
|
||||||
|
[
|
||||||
|
'type' => Controls_Manager::ALERT,
|
||||||
|
'alert_type' => 'info',
|
||||||
|
'content' => sprintf(
|
||||||
|
__( 'Go to the <a href="%s" target="_blank">Menus screen</a> to manage your menus. Changes will be reflected in the preview only after the page reloads.', 'hello-elementor' ),
|
||||||
|
admin_url( 'nav-menus.php' )
|
||||||
|
),
|
||||||
|
'render_type' => 'ui',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::SELECT,
|
||||||
|
'options' => $menus,
|
||||||
|
'default' => array_keys( $menus )[0],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu_layout',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Menu Layout', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::SELECT,
|
||||||
|
'default' => 'horizontal',
|
||||||
|
'options' => [
|
||||||
|
'horizontal' => esc_html__( 'Horizontal', 'hello-elementor' ),
|
||||||
|
'dropdown' => esc_html__( 'Dropdown', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'frontend_available' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$dropdown_options = [];
|
||||||
|
$active_breakpoints = Plugin::$instance->breakpoints->get_active_breakpoints();
|
||||||
|
$selected_breakpoints = [ 'mobile', 'tablet' ];
|
||||||
|
|
||||||
|
foreach ( $active_breakpoints as $breakpoint_key => $breakpoint_instance ) {
|
||||||
|
if ( ! in_array( $breakpoint_key, $selected_breakpoints, true ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$dropdown_options[ $breakpoint_key ] = sprintf(
|
||||||
|
/* translators: 1: Breakpoint label, 2: Breakpoint value. */
|
||||||
|
esc_html__( '%1$s (> %2$dpx)', 'hello-elementor' ),
|
||||||
|
$breakpoint_instance->get_label(),
|
||||||
|
$breakpoint_instance->get_value()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$dropdown_options['none'] = esc_html__( 'None', 'hello-elementor' );
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu_dropdown',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Breakpoint', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::SELECT,
|
||||||
|
'default' => 'tablet',
|
||||||
|
'options' => $dropdown_options,
|
||||||
|
'selector' => '.site-header',
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_menu_layout!' => 'dropdown',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_menu_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-navigation ul.menu li a' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu_toggle_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Toggle Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_menu_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-navigation-toggle .site-navigation-toggle-icon' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'hello_header_menu_toggle_background_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Toggle Background Color', 'hello-elementor' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_menu_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'.site-header .site-navigation-toggle' => 'background-color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_menu_typography',
|
||||||
|
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_menu_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selector' => '.site-header .site-navigation .menu li',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Text_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'hello_header_menu_text_shadow',
|
||||||
|
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||||
|
'condition' => [
|
||||||
|
'hello_header_menu_display' => 'yes',
|
||||||
|
],
|
||||||
|
'selector' => '.site-header .site-navigation .menu li',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function on_save( $data ) {
|
||||||
|
// Save chosen header menu to the WP settings.
|
||||||
|
if ( isset( $data['settings']['hello_header_menu'] ) ) {
|
||||||
|
$menu_id = $data['settings']['hello_header_menu'];
|
||||||
|
$locations = get_theme_mod( 'nav_menu_locations' );
|
||||||
|
$locations['menu-1'] = (int) $menu_id;
|
||||||
|
set_theme_mod( 'nav_menu_locations', $locations );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_additional_tab_content() {
|
||||||
|
$content_template = '
|
||||||
|
<div class="hello-elementor elementor-nerd-box">
|
||||||
|
<img src="%1$s" class="elementor-nerd-box-icon" alt="%2$s">
|
||||||
|
<p class="elementor-nerd-box-title">%3$s</p>
|
||||||
|
<p class="elementor-nerd-box-message">%4$s</p>
|
||||||
|
<a class="elementor-nerd-box-link elementor-button go-pro" target="_blank" href="%5$s">%6$s</a>
|
||||||
|
</div>';
|
||||||
|
|
||||||
|
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
|
||||||
|
return sprintf(
|
||||||
|
$content_template,
|
||||||
|
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||||
|
esc_attr__( 'Get Elementor Pro', 'hello-elementor' ),
|
||||||
|
esc_html__( 'Create custom headers', 'hello-elementor' ),
|
||||||
|
esc_html__( 'Add mega menus, search bars, login buttons and more with Elementor Pro.', 'hello-elementor' ),
|
||||||
|
'https://go.elementor.com/hello-theme-header/',
|
||||||
|
esc_html__( 'Upgrade Now', 'hello-elementor' )
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return sprintf(
|
||||||
|
$content_template,
|
||||||
|
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||||
|
esc_attr__( 'Elementor Pro', 'hello-elementor' ),
|
||||||
|
esc_html__( 'Create a custom header with the Theme Builder', 'hello-elementor' ),
|
||||||
|
esc_html__( 'With the Theme Builder you can jump directly into each part of your site', 'hello-elementor' ),
|
||||||
|
get_admin_url( null, 'admin.php?page=elementor-app#/site-editor/templates/header' ),
|
||||||
|
esc_html__( 'Create Header', 'hello-elementor' )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
115
wp-content/themes/hello-elementor/includes/utils.php
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Includes;
|
||||||
|
|
||||||
|
use Elementor\App\App;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* class Utils
|
||||||
|
**/
|
||||||
|
class Utils {
|
||||||
|
|
||||||
|
public static function elementor(): \Elementor\Plugin {
|
||||||
|
return \Elementor\Plugin::$instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function has_pro(): bool {
|
||||||
|
return defined( 'ELEMENTOR_PRO_VERSION' );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function is_elementor_active(): bool {
|
||||||
|
static $elementor_active = null;
|
||||||
|
if ( null === $elementor_active ) {
|
||||||
|
$elementor_active = defined( 'ELEMENTOR_VERSION' );
|
||||||
|
}
|
||||||
|
|
||||||
|
return $elementor_active;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function is_elementor_installed(): bool {
|
||||||
|
static $elementor_installed = null;
|
||||||
|
if ( null === $elementor_installed ) {
|
||||||
|
$elementor_installed = file_exists( WP_PLUGIN_DIR . '/elementor/elementor.php' );
|
||||||
|
}
|
||||||
|
|
||||||
|
return $elementor_installed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get_theme_builder_slug(): string {
|
||||||
|
if ( ! class_exists( 'Elementor\App\App' ) ) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( self::has_pro() ) {
|
||||||
|
return App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION . '#site-editor';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( self::is_elementor_active() ) {
|
||||||
|
return App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION . '#site-editor/promotion';
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get_theme_builder_url(): string {
|
||||||
|
if ( ! class_exists( 'Elementor\App\App' ) ) {
|
||||||
|
return 'https://go.elementor.com/hello-theme-builder';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( self::has_pro() ) {
|
||||||
|
return admin_url( 'admin.php?page=' . App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION ) . '#site-editor';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( self::is_elementor_active() ) {
|
||||||
|
return admin_url( 'admin.php?page=' . App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION ) . '#site-editor/promotion';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'https://go.elementor.com/hello-theme-builder';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get_elementor_activation_link(): string {
|
||||||
|
$plugin = 'elementor/elementor.php';
|
||||||
|
|
||||||
|
$url = 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all';
|
||||||
|
|
||||||
|
return add_query_arg( '_wpnonce', wp_create_nonce( 'activate-plugin_' . $plugin ), $url );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get_ai_site_planner_url(): string {
|
||||||
|
return 'https://go.elementor.com/hello-site-planner';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get_plugin_install_url( $plugin_slug ): string {
|
||||||
|
$action = 'install-plugin';
|
||||||
|
|
||||||
|
$url = add_query_arg(
|
||||||
|
[
|
||||||
|
'action' => $action,
|
||||||
|
'plugin' => $plugin_slug,
|
||||||
|
'referrer' => 'hello-elementor',
|
||||||
|
],
|
||||||
|
admin_url( 'update.php' )
|
||||||
|
);
|
||||||
|
|
||||||
|
return add_query_arg( '_wpnonce', wp_create_nonce( $action . '_' . $plugin_slug ), $url );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get_action_link_type() {
|
||||||
|
$installed_plugins = get_plugins();
|
||||||
|
|
||||||
|
if ( ! isset( $installed_plugins['elementor/elementor.php'] ) ) {
|
||||||
|
$action_link_type = 'install-elementor';
|
||||||
|
} elseif ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
||||||
|
$action_link_type = 'activate-elementor';
|
||||||
|
} elseif ( ! hello_header_footer_experiment_active() ) {
|
||||||
|
$action_link_type = 'activate-header-footer-experiment';
|
||||||
|
} else {
|
||||||
|
$action_link_type = 'style-header-footer';
|
||||||
|
}
|
||||||
|
return $action_link_type;
|
||||||
|
}
|
||||||
|
}
|
||||||
36
wp-content/themes/hello-elementor/index.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The site's entry point.
|
||||||
|
*
|
||||||
|
* Loads the relevant template part,
|
||||||
|
* the loop is executed (when needed) by the relevant template part.
|
||||||
|
*
|
||||||
|
* @package HelloElementor
|
||||||
|
*/
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
|
||||||
|
$is_elementor_theme_exist = function_exists( 'elementor_theme_do_location' );
|
||||||
|
|
||||||
|
if ( is_singular() ) {
|
||||||
|
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
|
||||||
|
get_template_part( 'template-parts/single' );
|
||||||
|
}
|
||||||
|
} elseif ( is_archive() || is_home() ) {
|
||||||
|
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
|
||||||
|
get_template_part( 'template-parts/archive' );
|
||||||
|
}
|
||||||
|
} elseif ( is_search() ) {
|
||||||
|
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
|
||||||
|
get_template_part( 'template-parts/search' );
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
|
||||||
|
get_template_part( 'template-parts/404' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
get_footer();
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Components;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Script;
|
||||||
|
use HelloTheme\Includes\Utils;
|
||||||
|
|
||||||
|
class Admin_Menu_Controller {
|
||||||
|
|
||||||
|
const MENU_PAGE_ICON = 'dashicons-plus-alt';
|
||||||
|
const MENU_PAGE_POSITION = 59.9;
|
||||||
|
const AI_SITE_PLANNER_SLUG = '-ai-site-planner';
|
||||||
|
const THEME_BUILDER_SLUG = '-theme-builder';
|
||||||
|
|
||||||
|
public function admin_menu(): void {
|
||||||
|
add_menu_page(
|
||||||
|
__( 'Hello', 'hello-elementor' ),
|
||||||
|
__( 'Hello', 'hello-elementor' ),
|
||||||
|
'manage_options',
|
||||||
|
EHP_THEME_SLUG,
|
||||||
|
[ $this, 'render_home' ],
|
||||||
|
self::MENU_PAGE_ICON,
|
||||||
|
self::MENU_PAGE_POSITION
|
||||||
|
);
|
||||||
|
|
||||||
|
add_submenu_page(
|
||||||
|
EHP_THEME_SLUG,
|
||||||
|
__( 'Home', 'hello-elementor' ),
|
||||||
|
__( 'Home', 'hello-elementor' ),
|
||||||
|
'manage_options',
|
||||||
|
EHP_THEME_SLUG,
|
||||||
|
[ $this, 'render_home' ]
|
||||||
|
);
|
||||||
|
|
||||||
|
do_action( 'hello-plus-theme/admin-menu', EHP_THEME_SLUG );
|
||||||
|
|
||||||
|
$theme_builder_slug = Utils::get_theme_builder_slug();
|
||||||
|
add_submenu_page(
|
||||||
|
EHP_THEME_SLUG,
|
||||||
|
__( 'Theme Builder', 'hello-elementor' ),
|
||||||
|
__( 'Theme Builder', 'hello-elementor' ),
|
||||||
|
'manage_options',
|
||||||
|
empty( $theme_builder_slug ) ? EHP_THEME_SLUG . self::THEME_BUILDER_SLUG : $theme_builder_slug,
|
||||||
|
[ $this, 'render_home' ]
|
||||||
|
);
|
||||||
|
|
||||||
|
add_submenu_page(
|
||||||
|
EHP_THEME_SLUG,
|
||||||
|
__( 'AI Site Planner', 'hello-elementor' ),
|
||||||
|
__( 'AI Site Planner', 'hello-elementor' ),
|
||||||
|
'manage_options',
|
||||||
|
EHP_THEME_SLUG . self::AI_SITE_PLANNER_SLUG,
|
||||||
|
[ $this, 'render_home' ]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render_home(): void {
|
||||||
|
echo '<div id="ehe-admin-home"></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function redirect_menus(): void {
|
||||||
|
$page = sanitize_key( filter_input( INPUT_GET, 'page', FILTER_UNSAFE_RAW ) );
|
||||||
|
|
||||||
|
switch ( $page ) {
|
||||||
|
case EHP_THEME_SLUG . self::AI_SITE_PLANNER_SLUG:
|
||||||
|
wp_redirect( Utils::get_ai_site_planner_url() );
|
||||||
|
exit;
|
||||||
|
|
||||||
|
case EHP_THEME_SLUG . self::THEME_BUILDER_SLUG:
|
||||||
|
wp_redirect( Utils::get_theme_builder_url() );
|
||||||
|
exit;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function admin_enqueue_scripts() {
|
||||||
|
$script = new Script(
|
||||||
|
'hello-elementor-menu',
|
||||||
|
);
|
||||||
|
|
||||||
|
$script->enqueue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
add_action( 'admin_menu', [ $this, 'admin_menu' ] );
|
||||||
|
add_action( 'admin_init', [ $this, 'redirect_menus' ] );
|
||||||
|
add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Components;
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Script;
|
||||||
|
use HelloTheme\Includes\Utils;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
class Admin_Top_Bar {
|
||||||
|
|
||||||
|
private function render_admin_top_bar() {
|
||||||
|
?>
|
||||||
|
<div id="ehe-admin-top-bar-root" style="height: 50px">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
private function is_top_bar_active() {
|
||||||
|
$current_screen = get_current_screen();
|
||||||
|
|
||||||
|
return ( false !== strpos( $current_screen->id ?? '', EHP_THEME_SLUG ) ) &&
|
||||||
|
! Utils::is_elementor_active();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function enqueue_scripts() {
|
||||||
|
$script = new Script(
|
||||||
|
'hello-elementor-topbar',
|
||||||
|
);
|
||||||
|
|
||||||
|
$script->enqueue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
if ( ! is_admin() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'current_screen', function () {
|
||||||
|
if ( ! $this->is_top_bar_active() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'in_admin_header', function () {
|
||||||
|
$this->render_admin_top_bar();
|
||||||
|
} );
|
||||||
|
|
||||||
|
add_action( 'admin_enqueue_scripts', function () {
|
||||||
|
$this->enqueue_scripts();
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Components;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
class Ajax_Handler {
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
add_action( 'wp_ajax_ehe_install_elementor', [ $this, 'install_elementor' ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function install_elementor() {
|
||||||
|
wp_ajax_install_plugin();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Components;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
use HelloTheme\Modules\AdminHome\Rest\Admin_Config;
|
||||||
|
use HelloTheme\Modules\AdminHome\Rest\Promotions;
|
||||||
|
use HelloTheme\Modules\AdminHome\Rest\Theme_Settings;
|
||||||
|
use HelloTheme\Modules\AdminHome\Rest\Whats_New;
|
||||||
|
|
||||||
|
class Api_Controller {
|
||||||
|
|
||||||
|
protected $endpoints = [];
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->endpoints['promotions'] = new Promotions();
|
||||||
|
$this->endpoints['admin-config'] = new Admin_Config();
|
||||||
|
$this->endpoints['theme-settings'] = new Theme_Settings();
|
||||||
|
$this->endpoints['whats-new'] = new Whats_New();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Components;
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Script;
|
||||||
|
use HelloTheme\Includes\Utils;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
class Conversion_Banner {
|
||||||
|
|
||||||
|
private function render_conversion_banner() {
|
||||||
|
?>
|
||||||
|
<div id="ehe-admin-cb" style="width: calc(100% - 48px)">
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
private function is_conversion_banner_active(): bool {
|
||||||
|
if ( get_user_meta( get_current_user_id(), '_hello_elementor_install_notice', true ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( Utils::has_pro() && Utils::is_elementor_active() ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$current_screen = get_current_screen();
|
||||||
|
|
||||||
|
return false === strpos( $current_screen->id ?? '', EHP_THEME_SLUG );
|
||||||
|
}
|
||||||
|
|
||||||
|
private function enqueue_scripts() {
|
||||||
|
$script = new Script(
|
||||||
|
'hello-conversion-banner',
|
||||||
|
[ 'wp-util' ]
|
||||||
|
);
|
||||||
|
|
||||||
|
$script->enqueue();
|
||||||
|
|
||||||
|
$is_installing_plugin_with_uploader = 'upload-plugin' === filter_input( INPUT_GET, 'action', FILTER_UNSAFE_RAW );
|
||||||
|
|
||||||
|
wp_localize_script(
|
||||||
|
'hello-conversion-banner',
|
||||||
|
'ehe_cb',
|
||||||
|
[
|
||||||
|
'nonce' => wp_create_nonce( 'ehe_cb_nonce' ),
|
||||||
|
'beforeWrap' => $is_installing_plugin_with_uploader,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dismiss_theme_notice() {
|
||||||
|
check_ajax_referer( 'ehe_cb_nonce', 'nonce' );
|
||||||
|
|
||||||
|
update_user_meta( get_current_user_id(), '_hello_elementor_install_notice', true );
|
||||||
|
|
||||||
|
wp_send_json_success( [ 'message' => __( 'Notice dismissed.', 'hello-elementor' ) ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
|
||||||
|
add_action( 'wp_ajax_ehe_dismiss_theme_notice', [ $this, 'dismiss_theme_notice' ] );
|
||||||
|
|
||||||
|
add_action( 'current_screen', function () {
|
||||||
|
if ( ! $this->is_conversion_banner_active() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action( 'in_admin_header', function () {
|
||||||
|
$this->render_conversion_banner();
|
||||||
|
}, 11 );
|
||||||
|
|
||||||
|
add_action( 'admin_enqueue_scripts', function () {
|
||||||
|
$this->enqueue_scripts();
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Components;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
use Elementor\WPNotificationsPackage\V120\Notifications as Notifications_SDK;
|
||||||
|
|
||||||
|
class Notificator {
|
||||||
|
private ?Notifications_SDK $notificator = null;
|
||||||
|
|
||||||
|
public function get_notifications_by_conditions( $force_request = false ) {
|
||||||
|
return $this->notificator->get_notifications_by_conditions( $force_request );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
if ( ! class_exists( 'Elementor\WPNotificationsPackage\V120\Notifications' ) ) {
|
||||||
|
require_once HELLO_THEME_PATH . '/vendor/autoload.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->notificator = new Notifications_SDK( [
|
||||||
|
'app_name' => 'hello-elementor',
|
||||||
|
'app_version' => HELLO_ELEMENTOR_VERSION,
|
||||||
|
'short_app_name' => 'hello-elementor',
|
||||||
|
'app_data' => [
|
||||||
|
'theme_name' => 'hello-elementor',
|
||||||
|
],
|
||||||
|
] );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Components;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Script;
|
||||||
|
|
||||||
|
class Scripts_Controller {
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function admin_enqueue_scripts() {
|
||||||
|
$screen = get_current_screen();
|
||||||
|
|
||||||
|
if ( 'toplevel_page_' . EHP_THEME_SLUG !== $screen->id ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$script = new Script(
|
||||||
|
'hello-home-app',
|
||||||
|
[ 'wp-util' ]
|
||||||
|
);
|
||||||
|
|
||||||
|
$script->enqueue();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Components;
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Script;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
class Settings_Controller {
|
||||||
|
|
||||||
|
const SETTINGS_FILTER_NAME = 'hello-plus-theme/settings';
|
||||||
|
const SETTINGS_PAGE_SLUG = 'hello-elementor-settings';
|
||||||
|
const SETTING_PREFIX = 'hello_elementor_settings';
|
||||||
|
const SETTINGS = [
|
||||||
|
'DESCRIPTION_META_TAG' => '_description_meta_tag',
|
||||||
|
'SKIP_LINK' => '_skip_link',
|
||||||
|
'HEADER_FOOTER' => '_header_footer',
|
||||||
|
'PAGE_TITLE' => '_page_title',
|
||||||
|
'HELLO_STYLE' => '_hello_style',
|
||||||
|
'HELLO_THEME' => '_hello_theme',
|
||||||
|
];
|
||||||
|
|
||||||
|
public static function get_settings_mapping(): array {
|
||||||
|
return array_map(
|
||||||
|
function ( $key ) {
|
||||||
|
return self::SETTING_PREFIX . $key;
|
||||||
|
},
|
||||||
|
self::SETTINGS
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function get_settings(): array {
|
||||||
|
|
||||||
|
$settings = array_map( function ( $key ) {
|
||||||
|
return self::get_option( $key ) === 'true';
|
||||||
|
}, self::get_settings_mapping() );
|
||||||
|
|
||||||
|
return apply_filters( self::SETTINGS_FILTER_NAME, $settings );
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function get_option( string $option_name, $default_value = false ) {
|
||||||
|
$option = get_option( $option_name, $default_value );
|
||||||
|
|
||||||
|
return apply_filters( self::SETTINGS_FILTER_NAME . '/' . $option_name, $option );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function legacy_register_settings() {
|
||||||
|
$this->register_settings();
|
||||||
|
$this->apply_settings();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function apply_setting( $setting, $tweak_callback ) {
|
||||||
|
$option = get_option( $setting );
|
||||||
|
|
||||||
|
if ( isset( $option ) && ( 'true' === $option ) && is_callable( $tweak_callback ) ) {
|
||||||
|
$tweak_callback();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function apply_settings( $settings_group = self::SETTING_PREFIX, $settings = self::SETTINGS ) {
|
||||||
|
|
||||||
|
$this->apply_setting(
|
||||||
|
$settings_group . $settings['DESCRIPTION_META_TAG'],
|
||||||
|
function () {
|
||||||
|
remove_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->apply_setting(
|
||||||
|
$settings_group . $settings['SKIP_LINK'],
|
||||||
|
function () {
|
||||||
|
add_filter( 'hello_elementor_enable_skip_link', '__return_false' );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->apply_setting(
|
||||||
|
$settings_group . $settings['HEADER_FOOTER'],
|
||||||
|
function () {
|
||||||
|
add_filter( 'hello_elementor_header_footer', '__return_false' );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->apply_setting(
|
||||||
|
$settings_group . $settings['PAGE_TITLE'],
|
||||||
|
function () {
|
||||||
|
add_filter( 'hello_elementor_page_title', '__return_false' );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->apply_setting(
|
||||||
|
$settings_group . $settings['HELLO_STYLE'],
|
||||||
|
function () {
|
||||||
|
add_filter( 'hello_elementor_enqueue_style', '__return_false' );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->apply_setting(
|
||||||
|
$settings_group . $settings['HELLO_THEME'],
|
||||||
|
function () {
|
||||||
|
add_filter( 'hello_elementor_enqueue_theme_style', '__return_false' );
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function register_settings( $settings_group = self::SETTING_PREFIX, $settings = self::SETTINGS ) {
|
||||||
|
foreach ( $settings as $setting_value ) {
|
||||||
|
register_setting(
|
||||||
|
$settings_group,
|
||||||
|
$settings_group . $setting_value,
|
||||||
|
[
|
||||||
|
'default' => '',
|
||||||
|
'show_in_rest' => true,
|
||||||
|
'type' => 'string',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function enqueue_hello_plus_settings_scripts() {
|
||||||
|
$screen = get_current_screen();
|
||||||
|
|
||||||
|
if ( ! str_ends_with( $screen->id, '_page_' . self::SETTINGS_PAGE_SLUG ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$script = new Script(
|
||||||
|
'hello-elementor-settings',
|
||||||
|
[ 'wp-util' ]
|
||||||
|
);
|
||||||
|
|
||||||
|
$script->enqueue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function register_settings_page( $parent_slug ): void {
|
||||||
|
add_submenu_page(
|
||||||
|
$parent_slug,
|
||||||
|
__( 'Settings', 'hello-elementor' ),
|
||||||
|
__( 'Settings', 'hello-elementor' ),
|
||||||
|
'manage_options',
|
||||||
|
self::SETTINGS_PAGE_SLUG,
|
||||||
|
[ $this, 'render_settings_page' ]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function render_settings_page(): void {
|
||||||
|
echo '<div id="ehe-admin-settings"></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_hello_plus_settings_scripts' ] );
|
||||||
|
add_action( 'hello-plus-theme/admin-menu', [ $this, 'register_settings_page' ], 10, 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome;
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Module_Base;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* class Module
|
||||||
|
*
|
||||||
|
* @package HelloPlus
|
||||||
|
* @subpackage HelloPlusModules
|
||||||
|
*/
|
||||||
|
class Module extends Module_Base {
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function get_name(): string {
|
||||||
|
return 'admin-home';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
protected function get_component_ids(): array {
|
||||||
|
return [
|
||||||
|
'Admin_Menu_Controller',
|
||||||
|
'Scripts_Controller',
|
||||||
|
'Api_Controller',
|
||||||
|
'Ajax_Handler',
|
||||||
|
'Conversion_Banner',
|
||||||
|
'Admin_Top_Bar',
|
||||||
|
'Settings_Controller',
|
||||||
|
'Notificator',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,319 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Utils;
|
||||||
|
use WP_REST_Server;
|
||||||
|
|
||||||
|
class Admin_Config extends Rest_Base {
|
||||||
|
|
||||||
|
public function register_routes() {
|
||||||
|
register_rest_route(
|
||||||
|
self::ROUTE_NAMESPACE,
|
||||||
|
'/admin-settings',
|
||||||
|
[
|
||||||
|
'methods' => WP_REST_Server::READABLE,
|
||||||
|
'callback' => [ $this, 'get_admin_config' ],
|
||||||
|
'permission_callback' => [ $this, 'permission_callback' ],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_admin_config() {
|
||||||
|
$config = $this->get_welcome_box_config( [] );
|
||||||
|
|
||||||
|
$config = $this->get_site_parts( $config );
|
||||||
|
|
||||||
|
$config = $this->get_resources( $config );
|
||||||
|
|
||||||
|
$config = apply_filters( 'hello-plus-theme/rest/admin-config', $config );
|
||||||
|
|
||||||
|
$config['config'] = [
|
||||||
|
'nonceInstall' => wp_create_nonce( 'updates' ),
|
||||||
|
'slug' => 'elementor',
|
||||||
|
];
|
||||||
|
|
||||||
|
return rest_ensure_response( [ 'config' => $config ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_resources( array $config ) {
|
||||||
|
$config['resourcesData'] = [
|
||||||
|
'community' => [
|
||||||
|
[
|
||||||
|
'title' => __( 'Facebook', 'hello-elementor' ),
|
||||||
|
'link' => 'https://www.facebook.com/groups/Elementors/',
|
||||||
|
'icon' => 'BrandFacebookIcon',
|
||||||
|
'target' => '_blank',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => __( 'YouTube', 'hello-elementor' ),
|
||||||
|
'link' => 'https://www.youtube.com/@Elementor',
|
||||||
|
'icon' => 'BrandYoutubeIcon',
|
||||||
|
'target' => '_blank',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => __( 'Discord', 'hello-elementor' ),
|
||||||
|
'link' => 'https://discord.com/servers/elementor-official-community-1164474724626206720',
|
||||||
|
'target' => '_blank',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => __( 'Rate Us', 'hello-elementor' ),
|
||||||
|
'link' => 'https://wordpress.org/support/theme/hello-elementor/reviews/#new-post',
|
||||||
|
'icon' => 'StarIcon',
|
||||||
|
'target' => '_blank',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'resources' => [
|
||||||
|
[
|
||||||
|
'title' => __( 'Help Center', 'hello-elementor' ),
|
||||||
|
'link' => ' https://go.elementor.com/hello-help/',
|
||||||
|
'icon' => 'HelpIcon',
|
||||||
|
'target' => '_blank',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => __( 'Blog', 'hello-elementor' ),
|
||||||
|
'link' => 'https://go.elementor.com/hello-blog/',
|
||||||
|
'icon' => 'SpeakerphoneIcon',
|
||||||
|
'target' => '_blank',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => __( 'Platinum Support', 'hello-elementor' ),
|
||||||
|
'link' => 'https://go.elementor.com/platinum-support',
|
||||||
|
'icon' => 'BrandElementorIcon',
|
||||||
|
'target' => '_blank',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_site_parts( array $config ): array {
|
||||||
|
$last_five_pages_query = new \WP_Query(
|
||||||
|
[
|
||||||
|
'posts_per_page' => 5,
|
||||||
|
'post_type' => 'page',
|
||||||
|
'post_status' => 'publish',
|
||||||
|
'orderby' => 'post_date',
|
||||||
|
'order' => 'DESC',
|
||||||
|
'fields' => 'ids',
|
||||||
|
'no_found_rows' => true,
|
||||||
|
'lazy_load_term_meta' => true,
|
||||||
|
'update_post_meta_cache' => false,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$site_pages = [];
|
||||||
|
|
||||||
|
if ( $last_five_pages_query->have_posts() ) {
|
||||||
|
$elementor_active = Utils::is_elementor_active();
|
||||||
|
$edit_with_elementor = $elementor_active ? '&action=elementor' : '';
|
||||||
|
while ( $last_five_pages_query->have_posts() ) {
|
||||||
|
$last_five_pages_query->the_post();
|
||||||
|
$site_pages[] = [
|
||||||
|
'title' => get_the_title(),
|
||||||
|
'link' => get_edit_post_link( get_the_ID(), 'admin' ) . $edit_with_elementor,
|
||||||
|
'icon' => 'PagesIcon',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$general = [
|
||||||
|
[
|
||||||
|
'title' => __( 'Add New Page', 'hello-elementor' ),
|
||||||
|
'link' => self_admin_url( 'post-new.php?post_type=page' ),
|
||||||
|
'icon' => 'PageTypeIcon',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => __( 'Settings', 'hello-elementor' ),
|
||||||
|
'link' => self_admin_url( 'admin.php?page=hello-elementor-settings' ),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$common_parts = [];
|
||||||
|
|
||||||
|
$customizer_header_footer_url = $this->get_open_homepage_with_tab( '', [ 'autofocus[section]' => 'hello-options' ] );
|
||||||
|
|
||||||
|
$header_part = [
|
||||||
|
'id' => 'header',
|
||||||
|
'title' => __( 'Header', 'hello-elementor' ),
|
||||||
|
'link' => $customizer_header_footer_url,
|
||||||
|
'icon' => 'HeaderTemplateIcon',
|
||||||
|
'sublinks' => [],
|
||||||
|
];
|
||||||
|
$footer_part = [
|
||||||
|
'id' => 'footer',
|
||||||
|
'title' => __( 'Footer', 'hello-elementor' ),
|
||||||
|
'link' => $customizer_header_footer_url,
|
||||||
|
'icon' => 'FooterTemplateIcon',
|
||||||
|
'sublinks' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
if ( Utils::is_elementor_active() ) {
|
||||||
|
$common_parts = [
|
||||||
|
[
|
||||||
|
'title' => __( 'Theme Builder', 'hello-elementor' ),
|
||||||
|
'link' => Utils::get_theme_builder_url(),
|
||||||
|
'icon' => 'ThemeBuilderIcon',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
$header_part['link'] = $this->get_open_homepage_with_tab( 'hello-settings-header' );
|
||||||
|
$footer_part['link'] = $this->get_open_homepage_with_tab( 'hello-settings-footer' );
|
||||||
|
|
||||||
|
if ( Utils::has_pro() ) {
|
||||||
|
$header_part = $this->update_pro_part( $header_part, 'header' );
|
||||||
|
$footer_part = $this->update_pro_part( $footer_part, 'footer' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$site_parts = [
|
||||||
|
'siteParts' => array_merge(
|
||||||
|
[
|
||||||
|
$header_part,
|
||||||
|
$footer_part,
|
||||||
|
],
|
||||||
|
$common_parts
|
||||||
|
),
|
||||||
|
'sitePages' => $site_pages,
|
||||||
|
'general' => $general,
|
||||||
|
];
|
||||||
|
|
||||||
|
$config['siteParts'] = apply_filters( 'hello-plus-theme/template-parts', $site_parts );
|
||||||
|
|
||||||
|
return $this->get_quicklinks( $config );
|
||||||
|
}
|
||||||
|
|
||||||
|
private function update_pro_part( array $part, string $location ): array {
|
||||||
|
$theme_builder_module = \ElementorPro\Modules\ThemeBuilder\Module::instance();
|
||||||
|
$conditions_manager = $theme_builder_module->get_conditions_manager();
|
||||||
|
|
||||||
|
$documents = $conditions_manager->get_documents_for_location( $location );
|
||||||
|
if ( ! empty( $documents ) ) {
|
||||||
|
$first_document_id = array_key_first( $documents );
|
||||||
|
$edit_link = get_edit_post_link( $first_document_id, 'admin' ) . '&action=elementor';
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$edit_link = $this->get_open_homepage_with_tab( 'hello-settings-' . $location );
|
||||||
|
}
|
||||||
|
$part['sublinks'] = [
|
||||||
|
[
|
||||||
|
'title' => __( 'Edit', 'hello-elementor' ),
|
||||||
|
'link' => $edit_link,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'title' => __( 'Add New', 'hello-elementor' ),
|
||||||
|
'link' => \Elementor\Plugin::instance()->app->get_base_url() . '#/site-editor/templates/' . $location,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $part;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_open_homepage_with_tab( $action, $customizer_fallback_args = [] ): string {
|
||||||
|
if ( Utils::is_elementor_active() && method_exists( \Elementor\Core\DocumentTypes\Page::class, 'get_site_settings_url_config' ) ) {
|
||||||
|
return \Elementor\Core\DocumentTypes\Page::get_site_settings_url_config( $action )['url'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return add_query_arg( $customizer_fallback_args, self_admin_url( 'customize.php' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_quicklinks( $config ): array {
|
||||||
|
$config['quickLinks'] = [
|
||||||
|
'site_name' => [
|
||||||
|
'title' => __( 'Site Name', 'hello-elementor' ),
|
||||||
|
'link' => $this->get_open_homepage_with_tab( 'settings-site-identity', [ 'autofocus[section]' => 'title_tagline' ] ),
|
||||||
|
'icon' => 'TextIcon',
|
||||||
|
|
||||||
|
],
|
||||||
|
'site_logo' => [
|
||||||
|
'title' => __( 'Site Logo', 'hello-elementor' ),
|
||||||
|
'link' => $this->get_open_homepage_with_tab( 'settings-site-identity', [ 'autofocus[section]' => 'title_tagline' ] ),
|
||||||
|
'icon' => 'PhotoIcon',
|
||||||
|
],
|
||||||
|
'site_favicon' => [
|
||||||
|
'title' => __( 'Site Favicon', 'hello-elementor' ),
|
||||||
|
'link' => $this->get_open_homepage_with_tab( 'settings-site-identity', [ 'autofocus[section]' => 'title_tagline' ] ),
|
||||||
|
'icon' => 'AppsIcon',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
if ( Utils::is_elementor_active() ) {
|
||||||
|
$config['quickLinks']['site_colors'] = [
|
||||||
|
'title' => __( 'Site Colors', 'hello-elementor' ),
|
||||||
|
'link' => $this->get_open_homepage_with_tab( 'global-colors' ),
|
||||||
|
'icon' => 'BrushIcon',
|
||||||
|
];
|
||||||
|
|
||||||
|
$config['quickLinks']['site_fonts'] = [
|
||||||
|
'title' => __( 'Site Fonts', 'hello-elementor' ),
|
||||||
|
'link' => $this->get_open_homepage_with_tab( 'global-typography' ),
|
||||||
|
'icon' => 'UnderlineIcon',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_welcome_box_config( array $config ): array {
|
||||||
|
$is_elementor_installed = Utils::is_elementor_installed();
|
||||||
|
$is_elementor_active = Utils::is_elementor_active();
|
||||||
|
$has_pro = Utils::has_pro();
|
||||||
|
|
||||||
|
if ( ! $is_elementor_active ) {
|
||||||
|
$link = $is_elementor_installed ? Utils::get_elementor_activation_link() : 'install';
|
||||||
|
|
||||||
|
$action_link_type = Utils::get_action_link_type();
|
||||||
|
|
||||||
|
if ( 'activate-elementor' === $action_link_type ) {
|
||||||
|
$cta_text = __( 'Activate Elementor', 'hello-elementor' );
|
||||||
|
} else {
|
||||||
|
$cta_text = __( 'Install Elementor', 'hello-elementor' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$config['welcome'] = [
|
||||||
|
'title' => __( 'Thanks for installing the Hello Theme!', 'hello-elementor' ),
|
||||||
|
'text' => __( 'Welcome to Hello Theme—a lightweight, blank canvas designed to integrate seamlessly with Elementor, the most popular, no-code visual website builder. By installing and activating Elementor, you\'ll unlock the power to craft a professional website with advanced features and functionalities.', 'hello-elementor' ),
|
||||||
|
'buttons' => [
|
||||||
|
[
|
||||||
|
'linkText' => $cta_text,
|
||||||
|
'variant' => 'contained',
|
||||||
|
'link' => $link,
|
||||||
|
'color' => 'primary',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'image' => [
|
||||||
|
'src' => HELLO_THEME_IMAGES_URL . 'install-elementor.png',
|
||||||
|
'alt' => $cta_text,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $is_elementor_active && ! $has_pro ) {
|
||||||
|
$config['welcome'] = [
|
||||||
|
'title' => __( 'Go Pro, Go Limitless', 'hello-elementor' ),
|
||||||
|
'text' => __( 'Unlock the theme builder, popup builder, 100+ widgets and more advanced tools to take your website to the next level.', 'hello-elementor' ),
|
||||||
|
'buttons' => [
|
||||||
|
[
|
||||||
|
'linkText' => __( 'Upgrade now', 'hello-elementor' ),
|
||||||
|
'variant' => 'contained',
|
||||||
|
'link' => 'https://go.elementor.com/hello-upgrade-epro/',
|
||||||
|
'color' => 'primary',
|
||||||
|
'target' => '_blank',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
$config['welcome'] = [];
|
||||||
|
|
||||||
|
return $config;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||||
|
|
||||||
|
use HelloTheme\Includes\Utils;
|
||||||
|
use WP_REST_Server;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
class Promotions extends Rest_Base {
|
||||||
|
|
||||||
|
public function get_promotions() {
|
||||||
|
$action_links_data = [];
|
||||||
|
|
||||||
|
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) && Utils::is_elementor_active() ) {
|
||||||
|
$action_links_data[] = [
|
||||||
|
'type' => 'go-pro',
|
||||||
|
'image' => HELLO_THEME_IMAGES_URL . 'go-pro.svg',
|
||||||
|
'url' => 'https://go.elementor.com/hello-upgrade-epro/',
|
||||||
|
'alt' => __( 'Elementor Pro', 'hello-elementor' ),
|
||||||
|
'title' => __( 'Bring your vision to life', 'hello-elementor' ),
|
||||||
|
'messages' => [
|
||||||
|
__( 'Get complete design flexibility for your website with Elementor Pro’s advanced tools and premium features.', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'button' => __( 'Upgrade Now', 'hello-elementor' ),
|
||||||
|
'upgrade' => true,
|
||||||
|
'features' => [
|
||||||
|
__( 'Popup Builder', 'hello-elementor' ),
|
||||||
|
__( 'Custom Code & CSS', 'hello-elementor' ),
|
||||||
|
__( 'E-commerce Features', 'hello-elementor' ),
|
||||||
|
__( 'Collaborative Notes', 'hello-elementor' ),
|
||||||
|
__( 'Form Submission', 'hello-elementor' ),
|
||||||
|
__( 'Form Integrations', 'hello-elementor' ),
|
||||||
|
__( 'Customs Attribute', 'hello-elementor' ),
|
||||||
|
__( 'Role Manager', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
! defined( 'ELEMENTOR_IMAGE_OPTIMIZER_VERSION' ) &&
|
||||||
|
! defined( 'IMAGE_OPTIMIZATION_VERSION' )
|
||||||
|
) {
|
||||||
|
$action_links_data[] = [
|
||||||
|
'type' => 'go-image-optimizer',
|
||||||
|
'image' => HELLO_THEME_IMAGES_URL . 'image-optimizer.svg',
|
||||||
|
'url' => Utils::get_plugin_install_url( 'image-optimization' ),
|
||||||
|
'alt' => __( 'Elementor Image Optimizer', 'hello-elementor' ),
|
||||||
|
'title' => '',
|
||||||
|
'messages' => [
|
||||||
|
__( 'Optimize Images.', 'hello-elementor' ),
|
||||||
|
__( 'Reduce Size.', 'hello-elementor' ),
|
||||||
|
__( 'Improve Speed.', 'hello-elementor' ),
|
||||||
|
__( 'Try Image Optimizer for free', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'button' => __( 'Install', 'hello-elementor' ),
|
||||||
|
'width' => 72,
|
||||||
|
'height' => 'auto',
|
||||||
|
'target' => '_self',
|
||||||
|
'backgroundImage' => HELLO_THEME_IMAGES_URL . 'image-optimization-bg.svg',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! defined( 'SEND_VERSION' ) ) {
|
||||||
|
$action_links_data[] = [
|
||||||
|
'type' => 'go-send',
|
||||||
|
'image' => HELLO_THEME_IMAGES_URL . 'send-logo.gif',
|
||||||
|
'backgroundColor' => '#EFEFFF',
|
||||||
|
'url' => 'https://go.elementor.com/Hello_send',
|
||||||
|
'alt' => __( 'Send', 'hello-elementor' ),
|
||||||
|
'title' => '',
|
||||||
|
'messages' => [
|
||||||
|
__( 'Connect any website to automated Email & SMS workflows in a click with Send.', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'button' => __( 'Install', 'hello-elementor' ),
|
||||||
|
'buttonBgColor' => '#524CFF',
|
||||||
|
'width' => 72,
|
||||||
|
'height' => 'auto',
|
||||||
|
];
|
||||||
|
} elseif (
|
||||||
|
! defined( 'ELEMENTOR_AI_VERSION' ) &&
|
||||||
|
Utils::is_elementor_installed()
|
||||||
|
) {
|
||||||
|
$action_links_data[] = [
|
||||||
|
'type' => 'go-ai',
|
||||||
|
'image' => HELLO_THEME_IMAGES_URL . 'ai.png',
|
||||||
|
'url' => 'https://go.elementor.com/hello-site-planner',
|
||||||
|
'alt' => __( 'Elementor AI', 'hello-elementor' ),
|
||||||
|
'title' => __( 'Elementor AI', 'hello-elementor' ),
|
||||||
|
'messages' => [
|
||||||
|
__( 'Boost creativity with Elementor AI. Craft & enhance copy, create custom CSS & Code, and generate images to elevate your website.', 'hello-elementor' ),
|
||||||
|
],
|
||||||
|
'button' => __( 'Let\'s Go', 'hello-elementor' ),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return rest_ensure_response( [ 'links' => $action_links_data ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function register_routes() {
|
||||||
|
register_rest_route(
|
||||||
|
self::ROUTE_NAMESPACE,
|
||||||
|
'/promotions',
|
||||||
|
[
|
||||||
|
'methods' => WP_REST_Server::READABLE,
|
||||||
|
'callback' => [ $this, 'get_promotions' ],
|
||||||
|
'permission_callback' => [ $this, 'permission_callback' ],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||||
|
|
||||||
|
use HelloTheme\Modules\AdminHome\Module;
|
||||||
|
use WP_REST_Server;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract class Rest_Base {
|
||||||
|
const ROUTE_NAMESPACE = 'elementor-hello-elementor/v1';
|
||||||
|
|
||||||
|
abstract public function register_routes();
|
||||||
|
|
||||||
|
public function permission_callback(): bool {
|
||||||
|
return current_user_can( 'manage_options' );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
add_action( 'rest_api_init', [ $this, 'register_routes' ] );
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit; // Exit if accessed directly.
|
||||||
|
}
|
||||||
|
|
||||||
|
use HelloTheme\Modules\AdminHome\Components\Settings_Controller;
|
||||||
|
use WP_REST_Server;
|
||||||
|
|
||||||
|
class Theme_Settings extends Rest_Base {
|
||||||
|
|
||||||
|
public function register_routes() {
|
||||||
|
register_rest_route(
|
||||||
|
self::ROUTE_NAMESPACE,
|
||||||
|
'/theme-settings',
|
||||||
|
[
|
||||||
|
'methods' => WP_REST_Server::READABLE,
|
||||||
|
'callback' => [ $this, 'get_theme_settings' ],
|
||||||
|
'permission_callback' => [ $this, 'permission_callback' ],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
register_rest_route(
|
||||||
|
self::ROUTE_NAMESPACE,
|
||||||
|
'/theme-settings',
|
||||||
|
[
|
||||||
|
'methods' => WP_REST_Server::EDITABLE,
|
||||||
|
'callback' => [ $this, 'set_theme_settings' ],
|
||||||
|
'permission_callback' => [ $this, 'permission_callback' ],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_theme_settings() {
|
||||||
|
return rest_ensure_response(
|
||||||
|
[
|
||||||
|
'settings' => Settings_Controller::get_settings(),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function set_theme_settings( \WP_REST_Request $request ) {
|
||||||
|
$settings = $request->get_param( 'settings' );
|
||||||
|
|
||||||
|
if ( ! is_array( $settings ) ) {
|
||||||
|
return new \WP_Error(
|
||||||
|
'invalid_settings',
|
||||||
|
esc_html__( 'Settings must be an array', 'hello-elementor' ),
|
||||||
|
[ 'status' => 400 ]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$settings_map = Settings_Controller::get_settings_mapping();
|
||||||
|
|
||||||
|
foreach ( $settings as $key => $value ) {
|
||||||
|
if ( ! array_key_exists( $key, $settings_map ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$value = $value ? 'true' : 'false';
|
||||||
|
|
||||||
|
update_option( $settings_map[ $key ], $value );
|
||||||
|
}
|
||||||
|
|
||||||
|
return rest_ensure_response( [ 'settings' => $settings ] );
|
||||||
|
}
|
||||||
|
}
|
||||||