first commit
2
wp-content/index.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
34
wp-content/plugins/akismet/.htaccess
Normal file
@@ -0,0 +1,34 @@
|
||||
# Only allow direct access to specific Web-available files.
|
||||
|
||||
# Apache 2.2
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Deny,Allow
|
||||
Deny from all
|
||||
</IfModule>
|
||||
|
||||
# Apache 2.4
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
|
||||
# Akismet CSS and JS
|
||||
<FilesMatch "^(form\.js|akismet(-frontend|-admin)?\.js|akismet(-admin)?(-rtl)?\.css|inter\.css)$">
|
||||
<IfModule !mod_authz_core.c>
|
||||
Allow from all
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
|
||||
# Akismet images
|
||||
<FilesMatch "^(logo-(a|full)-2x\.png|akismet-refresh-logo\.svg|akismet-refresh-logo@2x\.png|arrow-left\.svg|icon-external\.svg)$">
|
||||
<IfModule !mod_authz_core.c>
|
||||
Allow from all
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
339
wp-content/plugins/akismet/LICENSE.txt
Normal file
@@ -0,0 +1,339 @@
|
||||
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.
|
||||
378
wp-content/plugins/akismet/_inc/akismet-admin.css
Normal file
@@ -0,0 +1,378 @@
|
||||
#akismet-plugin-container {
|
||||
background-color: var(--akismet-color-light-grey);
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
|
||||
--akismet-color-charcoal: #272635;
|
||||
--akismet-color-light-grey: #f6f7f7;
|
||||
--akismet-color-mid-grey: #a7aaad;
|
||||
--akismet-color-dark-grey: #646970;
|
||||
--akismet-color-grey-80: #2c3338;
|
||||
--akismet-color-grey-100: #101517;
|
||||
--akismet-color-white: #fff;
|
||||
--akismet-color-mid-green: #357b49;
|
||||
--akismet-color-mid-red: #e82c3f;
|
||||
--akismet-color-light-blue: #256eff;
|
||||
--akismet-color-notice-light-green: #dbf0e1;
|
||||
--akismet-color-notice-dark-green: #69bf82;
|
||||
--akismet-color-notice-light-red: #ffdbde;
|
||||
--akismet-color-notice-dark-red: #ff6676;
|
||||
}
|
||||
|
||||
#akismet-plugin-container a {
|
||||
color: var(--akismet-color-mid-green);
|
||||
}
|
||||
|
||||
#akismet-plugin-container button:focus-visible,
|
||||
#akismet-plugin-container input:focus-visible {
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
outline: 2px solid var(--akismet-color-light-blue);
|
||||
}
|
||||
|
||||
.akismet-masthead {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.akismet-masthead__logo {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.akismet-section-header {
|
||||
box-shadow: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.akismet-section-header__label {
|
||||
color: var(--akismet-color-charcoal);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.akismet-button, .akismet-button:hover {
|
||||
background-color: var(--akismet-color-mid-green);
|
||||
border: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Need this specificity to override the existing header rule */
|
||||
.akismet-new-snapshot h3.akismet-new-snapshot__header {
|
||||
background: none;
|
||||
font-size: 13px;
|
||||
color: var(--akismet-color-charcoal);
|
||||
text-align: left;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot .akismet-new-snapshot__number {
|
||||
color: var(--akismet-color-charcoal);
|
||||
letter-spacing: -1px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot li.akismet-new-snapshot__item {
|
||||
color: var(--akismet-color-dark-grey);
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.akismet-masthead__logo-link {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.akismet-masthead__back-link-container {
|
||||
margin-top: 16px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
/* Need this specificity to override the existing link rule */
|
||||
#akismet-plugin-container a.akismet-masthead__back-link {
|
||||
background-image: url(img/arrow-left.svg);
|
||||
background-position: left;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 16px;
|
||||
color: var(--akismet-color-charcoal);
|
||||
font-weight: 400;
|
||||
padding-left: 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#akismet-plugin-container a.akismet-masthead__back-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__item {
|
||||
border-top: 1px solid var(--akismet-color-light-grey);
|
||||
border-left: 1px solid var(--akismet-color-light-grey);
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot li:first-child {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__list {
|
||||
display: flex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__item {
|
||||
flex: 1 0 33.33%;
|
||||
margin-bottom: 0;
|
||||
padding-left: 1.5em;
|
||||
padding-right: 1.5em;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__chart {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.akismet-box {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.akismet-box,
|
||||
.akismet-card {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 0 2px rgba(0, 0, 0, 0.16);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.akismet-card {
|
||||
margin: 32px auto 0 auto;
|
||||
}
|
||||
|
||||
.akismet-lower {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.akismet-lower .inside {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.akismet-section-header__label {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-settings__row {
|
||||
border-bottom: 1px solid var(--akismet-color-light-grey);
|
||||
display: block;
|
||||
padding: 1em 1.5em;
|
||||
}
|
||||
|
||||
.akismet-settings__row-input {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.akismet-settings__row-title {
|
||||
font-weight: 500;
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.akismet-settings__row-description {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
.akismet-card-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.akismet-card-actions__secondary-action {
|
||||
align-self: center;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.akismet-card-actions__secondary-action a[target="_blank"]::after {
|
||||
background: url('img/icon-external.svg') no-repeat;
|
||||
background-size: contain;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
margin-left: 5px;
|
||||
vertical-align: middle;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.akismet-settings__row label {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
.akismet-settings__row-note {
|
||||
font-size: 0.9em;
|
||||
margin-top: 0.4em;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"],
|
||||
.akismet-settings__row input[type="radio"] {
|
||||
accent-color: var(--akismet-color-mid-green);
|
||||
box-shadow: none;
|
||||
flex-shrink: 0;
|
||||
margin: 2px 0 0 0;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"] {
|
||||
margin-top: 1px;
|
||||
vertical-align: top;
|
||||
-webkit-appearance: checkbox;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="radio"] {
|
||||
-webkit-appearance: radio;
|
||||
}
|
||||
|
||||
/* Fix up misbehaving wp-admin styles in Chrome (from forms and colors stylesheets) */
|
||||
.akismet-settings__row input[type="checkbox"]:checked:before {
|
||||
content: '';
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="radio"]:checked:before {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"]:checked:hover,
|
||||
.akismet-settings__row input[type="radio"]:checked:hover {
|
||||
accent-color: var(--akismet-color-mid-green);
|
||||
}
|
||||
|
||||
.akismet-button:disabled {
|
||||
background-color: var(--akismet-color-mid-grey);
|
||||
color: var(--akismet-color-white);
|
||||
cursor: arrow;
|
||||
}
|
||||
|
||||
.akismet-awaiting-stats,
|
||||
.akismet-account {
|
||||
padding: 0 1rem 1rem 1rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-account {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.akismet-account th {
|
||||
font-weight: 500;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
.akismet-account th, .akismet-account td {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
.akismet-settings__row-input-label {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.akismet-settings__row-label-text {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.akismet-alert {
|
||||
border-left: 8px solid;
|
||||
border-radius: 8px;
|
||||
margin: 20px 0;
|
||||
padding: 0.2em 1em;
|
||||
}
|
||||
|
||||
.akismet-alert__heading {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.akismet-alert.is-good {
|
||||
background-color: var(--akismet-color-notice-light-green);
|
||||
border-left-color: var(--akismet-color-notice-dark-green);
|
||||
}
|
||||
|
||||
.akismet-alert.is-neutral {
|
||||
background-color: var(--akismet-color-white);
|
||||
border-left-color: var(--akismet-color-dark-grey);
|
||||
}
|
||||
|
||||
.akismet-alert.is-bad {
|
||||
background-color: var(--akismet-color-notice-light-red);
|
||||
border-left-color: var(--akismet-color-notice-dark-red);
|
||||
}
|
||||
|
||||
#akismet-plugin-container .akismet-alert.is-good a,
|
||||
#akismet-plugin-container .akismet-alert.is-bad a {
|
||||
/* For better contrast - green isn't great */
|
||||
color: var(--akismet-color-grey-80);
|
||||
}
|
||||
|
||||
/* Setup - API key input */
|
||||
.akismet-enter-api-key-box {
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.akismet-enter-api-key-box__reveal {
|
||||
background: none;
|
||||
border: 0;
|
||||
color: var(--akismet-color-mid-green);
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.akismet-enter-api-key-box__form-wrapper {
|
||||
display: none;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-enter-api-key-box__input-wrapper {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
padding: 0 1.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.akismet-enter-api-key-box__key-input {
|
||||
flex-grow: 1;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
h3.akismet-enter-api-key-box__header {
|
||||
padding-top: 0;
|
||||
padding-bottom: 1em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
.akismet-new-snapshot__list {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__number {
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
margin-top: -16px;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__header {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__text {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"],
|
||||
.akismet-settings__row input[type="radio"] {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.akismet-settings__row-label-text {
|
||||
padding-left: 0.8em;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"],
|
||||
.akismet-settings__row input[type="radio"] {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
7
wp-content/plugins/akismet/_inc/akismet-admin.js
Normal file
@@ -0,0 +1,7 @@
|
||||
document.addEventListener( 'DOMContentLoaded', function() {
|
||||
// Prevent aggressive iframe caching in Firefox
|
||||
var statsIframe = document.getElementById( 'stats-iframe' );
|
||||
if ( statsIframe ) {
|
||||
statsIframe.contentWindow.location.href = statsIframe.src;
|
||||
}
|
||||
} );
|
||||
376
wp-content/plugins/akismet/_inc/akismet-frontend.js
Normal file
@@ -0,0 +1,376 @@
|
||||
/**
|
||||
* Observe how the user enters content into the comment form in order to determine whether it's a bot or not.
|
||||
*
|
||||
* Note that no actual input is being saved here, only counts and timings between events.
|
||||
*/
|
||||
|
||||
( function() {
|
||||
// Passive event listeners are guaranteed to never call e.preventDefault(),
|
||||
// but they're not supported in all browsers. Use this feature detection
|
||||
// to determine whether they're available for use.
|
||||
var supportsPassive = false;
|
||||
|
||||
try {
|
||||
var opts = Object.defineProperty( {}, 'passive', {
|
||||
get : function() {
|
||||
supportsPassive = true;
|
||||
}
|
||||
} );
|
||||
|
||||
window.addEventListener( 'testPassive', null, opts );
|
||||
window.removeEventListener( 'testPassive', null, opts );
|
||||
} catch ( e ) {}
|
||||
|
||||
function init() {
|
||||
var input_begin = '';
|
||||
|
||||
var keydowns = {};
|
||||
var lastKeyup = null;
|
||||
var lastKeydown = null;
|
||||
var keypresses = [];
|
||||
|
||||
var modifierKeys = [];
|
||||
var correctionKeys = [];
|
||||
|
||||
var lastMouseup = null;
|
||||
var lastMousedown = null;
|
||||
var mouseclicks = [];
|
||||
|
||||
var mousemoveTimer = null;
|
||||
var lastMousemoveX = null;
|
||||
var lastMousemoveY = null;
|
||||
var mousemoveStart = null;
|
||||
var mousemoves = [];
|
||||
|
||||
var touchmoveCountTimer = null;
|
||||
var touchmoveCount = 0;
|
||||
|
||||
var lastTouchEnd = null;
|
||||
var lastTouchStart = null;
|
||||
var touchEvents = [];
|
||||
|
||||
var scrollCountTimer = null;
|
||||
var scrollCount = 0;
|
||||
|
||||
var correctionKeyCodes = [ 'Backspace', 'Delete', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown' ];
|
||||
var modifierKeyCodes = [ 'Shift', 'CapsLock' ];
|
||||
|
||||
var forms = document.querySelectorAll( 'form[method=post]' );
|
||||
|
||||
for ( var i = 0; i < forms.length; i++ ) {
|
||||
var form = forms[i];
|
||||
|
||||
var formAction = form.getAttribute( 'action' );
|
||||
|
||||
// Ignore forms that POST directly to other domains; these could be things like payment forms.
|
||||
if ( formAction ) {
|
||||
// Check that the form is posting to an external URL, not a path.
|
||||
if ( formAction.indexOf( 'http://' ) == 0 || formAction.indexOf( 'https://' ) == 0 ) {
|
||||
if ( formAction.indexOf( 'http://' + window.location.hostname + '/' ) != 0 && formAction.indexOf( 'https://' + window.location.hostname + '/' ) != 0 ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
form.addEventListener( 'submit', function () {
|
||||
var ak_bkp = prepare_timestamp_array_for_request( keypresses );
|
||||
var ak_bmc = prepare_timestamp_array_for_request( mouseclicks );
|
||||
var ak_bte = prepare_timestamp_array_for_request( touchEvents );
|
||||
var ak_bmm = prepare_timestamp_array_for_request( mousemoves );
|
||||
|
||||
var input_fields = {
|
||||
// When did the user begin entering any input?
|
||||
'bib': input_begin,
|
||||
|
||||
// When was the form submitted?
|
||||
'bfs': Date.now(),
|
||||
|
||||
// How many keypresses did they make?
|
||||
'bkpc': keypresses.length,
|
||||
|
||||
// How quickly did they press a sample of keys, and how long between them?
|
||||
'bkp': ak_bkp,
|
||||
|
||||
// How quickly did they click the mouse, and how long between clicks?
|
||||
'bmc': ak_bmc,
|
||||
|
||||
// How many mouseclicks did they make?
|
||||
'bmcc': mouseclicks.length,
|
||||
|
||||
// When did they press modifier keys (like Shift or Capslock)?
|
||||
'bmk': modifierKeys.join( ';' ),
|
||||
|
||||
// When did they correct themselves? e.g., press Backspace, or use the arrow keys to move the cursor back
|
||||
'bck': correctionKeys.join( ';' ),
|
||||
|
||||
// How many times did they move the mouse?
|
||||
'bmmc': mousemoves.length,
|
||||
|
||||
// How many times did they move around using a touchscreen?
|
||||
'btmc': touchmoveCount,
|
||||
|
||||
// How many times did they scroll?
|
||||
'bsc': scrollCount,
|
||||
|
||||
// How quickly did they perform touch events, and how long between them?
|
||||
'bte': ak_bte,
|
||||
|
||||
// How many touch events were there?
|
||||
'btec' : touchEvents.length,
|
||||
|
||||
// How quickly did they move the mouse, and how long between moves?
|
||||
'bmm' : ak_bmm
|
||||
};
|
||||
|
||||
var akismet_field_prefix = 'ak_';
|
||||
|
||||
if ( this.getElementsByClassName ) {
|
||||
// Check to see if we've used an alternate field name prefix. We store this as an attribute of the container around some of the Akismet fields.
|
||||
var possible_akismet_containers = this.getElementsByClassName( 'akismet-fields-container' );
|
||||
|
||||
for ( var containerIndex = 0; containerIndex < possible_akismet_containers.length; containerIndex++ ) {
|
||||
var container = possible_akismet_containers.item( containerIndex );
|
||||
|
||||
if ( container.getAttribute( 'data-prefix' ) ) {
|
||||
akismet_field_prefix = container.getAttribute( 'data-prefix' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( var field_name in input_fields ) {
|
||||
var field = document.createElement( 'input' );
|
||||
field.setAttribute( 'type', 'hidden' );
|
||||
field.setAttribute( 'name', akismet_field_prefix + field_name );
|
||||
field.setAttribute( 'value', input_fields[ field_name ] );
|
||||
this.appendChild( field );
|
||||
}
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
form.addEventListener( 'keydown', function ( e ) {
|
||||
// If you hold a key down, some browsers send multiple keydown events in a row.
|
||||
// Ignore any keydown events for a key that hasn't come back up yet.
|
||||
if ( e.key in keydowns ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var keydownTime = ( new Date() ).getTime();
|
||||
keydowns[ e.key ] = [ keydownTime ];
|
||||
|
||||
if ( ! input_begin ) {
|
||||
input_begin = keydownTime;
|
||||
}
|
||||
|
||||
// In some situations, we don't want to record an interval since the last keypress -- for example,
|
||||
// on the first keypress, or on a keypress after focus has changed to another element. Normally,
|
||||
// we want to record the time between the last keyup and this keydown. But if they press a
|
||||
// key while already pressing a key, we want to record the time between the two keydowns.
|
||||
|
||||
var lastKeyEvent = Math.max( lastKeydown, lastKeyup );
|
||||
|
||||
if ( lastKeyEvent ) {
|
||||
keydowns[ e.key ].push( keydownTime - lastKeyEvent );
|
||||
}
|
||||
|
||||
lastKeydown = keydownTime;
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
form.addEventListener( 'keyup', function ( e ) {
|
||||
if ( ! ( e.key in keydowns ) ) {
|
||||
// This key was pressed before this script was loaded, or a mouseclick happened during the keypress, or...
|
||||
return;
|
||||
}
|
||||
|
||||
var keyupTime = ( new Date() ).getTime();
|
||||
|
||||
if ( 'TEXTAREA' === e.target.nodeName || 'INPUT' === e.target.nodeName ) {
|
||||
if ( -1 !== modifierKeyCodes.indexOf( e.key ) ) {
|
||||
modifierKeys.push( keypresses.length - 1 );
|
||||
} else if ( -1 !== correctionKeyCodes.indexOf( e.key ) ) {
|
||||
correctionKeys.push( keypresses.length - 1 );
|
||||
} else {
|
||||
// ^ Don't record timings for keys like Shift or backspace, since they
|
||||
// typically get held down for longer than regular typing.
|
||||
|
||||
var keydownTime = keydowns[ e.key ][0];
|
||||
|
||||
var keypress = [];
|
||||
|
||||
// Keypress duration.
|
||||
keypress.push( keyupTime - keydownTime );
|
||||
|
||||
// Amount of time between this keypress and the previous keypress.
|
||||
if ( keydowns[ e.key ].length > 1 ) {
|
||||
keypress.push( keydowns[ e.key ][1] );
|
||||
}
|
||||
|
||||
keypresses.push( keypress );
|
||||
}
|
||||
}
|
||||
|
||||
delete keydowns[ e.key ];
|
||||
|
||||
lastKeyup = keyupTime;
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
form.addEventListener( "focusin", function ( e ) {
|
||||
lastKeydown = null;
|
||||
lastKeyup = null;
|
||||
keydowns = {};
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
form.addEventListener( "focusout", function ( e ) {
|
||||
lastKeydown = null;
|
||||
lastKeyup = null;
|
||||
keydowns = {};
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
}
|
||||
|
||||
document.addEventListener( 'mousedown', function ( e ) {
|
||||
lastMousedown = ( new Date() ).getTime();
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
document.addEventListener( 'mouseup', function ( e ) {
|
||||
if ( ! lastMousedown ) {
|
||||
// If the mousedown happened before this script was loaded, but the mouseup happened after...
|
||||
return;
|
||||
}
|
||||
|
||||
var now = ( new Date() ).getTime();
|
||||
|
||||
var mouseclick = [];
|
||||
mouseclick.push( now - lastMousedown );
|
||||
|
||||
if ( lastMouseup ) {
|
||||
mouseclick.push( lastMousedown - lastMouseup );
|
||||
}
|
||||
|
||||
mouseclicks.push( mouseclick );
|
||||
|
||||
lastMouseup = now;
|
||||
|
||||
// If the mouse has been clicked, don't record this time as an interval between keypresses.
|
||||
lastKeydown = null;
|
||||
lastKeyup = null;
|
||||
keydowns = {};
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
document.addEventListener( 'mousemove', function ( e ) {
|
||||
if ( mousemoveTimer ) {
|
||||
clearTimeout( mousemoveTimer );
|
||||
mousemoveTimer = null;
|
||||
}
|
||||
else {
|
||||
mousemoveStart = ( new Date() ).getTime();
|
||||
lastMousemoveX = e.offsetX;
|
||||
lastMousemoveY = e.offsetY;
|
||||
}
|
||||
|
||||
mousemoveTimer = setTimeout( function ( theEvent, originalMousemoveStart ) {
|
||||
var now = ( new Date() ).getTime() - 500; // To account for the timer delay.
|
||||
|
||||
var mousemove = [];
|
||||
mousemove.push( now - originalMousemoveStart );
|
||||
mousemove.push(
|
||||
Math.round(
|
||||
Math.sqrt(
|
||||
Math.pow( theEvent.offsetX - lastMousemoveX, 2 ) +
|
||||
Math.pow( theEvent.offsetY - lastMousemoveY, 2 )
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ( mousemove[1] > 0 ) {
|
||||
// If there was no measurable distance, then it wasn't really a move.
|
||||
mousemoves.push( mousemove );
|
||||
}
|
||||
|
||||
mousemoveStart = null;
|
||||
mousemoveTimer = null;
|
||||
}, 500, e, mousemoveStart );
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
document.addEventListener( 'touchmove', function ( e ) {
|
||||
if ( touchmoveCountTimer ) {
|
||||
clearTimeout( touchmoveCountTimer );
|
||||
}
|
||||
|
||||
touchmoveCountTimer = setTimeout( function () {
|
||||
touchmoveCount++;
|
||||
}, 500 );
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
document.addEventListener( 'touchstart', function ( e ) {
|
||||
lastTouchStart = ( new Date() ).getTime();
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
document.addEventListener( 'touchend', function ( e ) {
|
||||
if ( ! lastTouchStart ) {
|
||||
// If the touchstart happened before this script was loaded, but the touchend happened after...
|
||||
return;
|
||||
}
|
||||
|
||||
var now = ( new Date() ).getTime();
|
||||
|
||||
var touchEvent = [];
|
||||
touchEvent.push( now - lastTouchStart );
|
||||
|
||||
if ( lastTouchEnd ) {
|
||||
touchEvent.push( lastTouchStart - lastTouchEnd );
|
||||
}
|
||||
|
||||
touchEvents.push( touchEvent );
|
||||
|
||||
lastTouchEnd = now;
|
||||
|
||||
// Don't record this time as an interval between keypresses.
|
||||
lastKeydown = null;
|
||||
lastKeyup = null;
|
||||
keydowns = {};
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
|
||||
document.addEventListener( 'scroll', function ( e ) {
|
||||
if ( scrollCountTimer ) {
|
||||
clearTimeout( scrollCountTimer );
|
||||
}
|
||||
|
||||
scrollCountTimer = setTimeout( function () {
|
||||
scrollCount++;
|
||||
}, 500 );
|
||||
}, supportsPassive ? { passive: true } : false );
|
||||
}
|
||||
|
||||
/**
|
||||
* For the timestamp data that is collected, don't send more than `limit` data points in the request.
|
||||
* Choose a random slice and send those.
|
||||
*/
|
||||
function prepare_timestamp_array_for_request( a, limit ) {
|
||||
if ( ! limit ) {
|
||||
limit = 100;
|
||||
}
|
||||
|
||||
var rv = '';
|
||||
|
||||
if ( a.length > 0 ) {
|
||||
var random_starting_point = Math.max( 0, Math.floor( Math.random() * a.length - limit ) );
|
||||
|
||||
for ( var i = 0; i < limit && i < a.length; i++ ) {
|
||||
rv += a[ random_starting_point + i ][0];
|
||||
|
||||
if ( a[ random_starting_point + i ].length >= 2 ) {
|
||||
rv += "," + a[ random_starting_point + i ][1];
|
||||
}
|
||||
|
||||
rv += ";";
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
if ( document.readyState !== 'loading' ) {
|
||||
init();
|
||||
} else {
|
||||
document.addEventListener( 'DOMContentLoaded', init );
|
||||
}
|
||||
})();
|
||||
648
wp-content/plugins/akismet/_inc/akismet.css
Normal file
@@ -0,0 +1,648 @@
|
||||
.wp-admin.jetpack_page_akismet-key-config, .wp-admin.settings_page_akismet-key-config {
|
||||
background-color:#f3f6f8;
|
||||
}
|
||||
|
||||
#submitted-on {
|
||||
position: relative;
|
||||
}
|
||||
#the-comment-list .author .akismet-user-comment-count {
|
||||
display: inline;
|
||||
}
|
||||
#the-comment-list .author a span {
|
||||
text-decoration: none;
|
||||
color: #999;
|
||||
}
|
||||
#the-comment-list .author a span.akismet-span-link {
|
||||
text-decoration: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
#the-comment-list .akismet_remove_url {
|
||||
margin-left: 3px;
|
||||
color: #999;
|
||||
padding: 2px 3px 2px 0;
|
||||
}
|
||||
#the-comment-list .akismet_remove_url:hover {
|
||||
color: #A7301F;
|
||||
font-weight: bold;
|
||||
padding: 2px 2px 2px 0;
|
||||
}
|
||||
#dashboard_recent_comments .akismet-status {
|
||||
display: none;
|
||||
}
|
||||
.akismet-status {
|
||||
float: right;
|
||||
}
|
||||
.akismet-status a {
|
||||
color: #AAA;
|
||||
font-style: italic;
|
||||
}
|
||||
table.comments td.comment p a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
table.comments td.comment p a:after {
|
||||
content: attr(href);
|
||||
color: #aaa;
|
||||
display: inline-block; /* Show the URL without the link's underline extending under it. */
|
||||
padding: 0 1ex; /* Because it's inline block, we can't just use spaces in the content: attribute to separate it from the link text. */
|
||||
}
|
||||
.mshot-arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 10px solid transparent;
|
||||
border-bottom: 10px solid transparent;
|
||||
border-right: 10px solid #5C5C5C;
|
||||
position: absolute;
|
||||
left: -6px;
|
||||
top: 91px;
|
||||
}
|
||||
.mshot-container {
|
||||
background: #5C5C5C;
|
||||
position: absolute;
|
||||
top: -94px;
|
||||
padding: 7px;
|
||||
width: 450px;
|
||||
height: 338px;
|
||||
z-index: 20000;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-webkit-border-radius: 6px;
|
||||
}
|
||||
.akismet-mshot {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
}
|
||||
.akismet-mshot .mshot-image {
|
||||
margin: 0;
|
||||
height: 338px;
|
||||
width: 450px;
|
||||
}
|
||||
.checkforspam {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.checkforspam-spinner {
|
||||
display: inline-block;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.akismet-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.akismet-card .akismet-right {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.akismet-alert-text {
|
||||
color: #dd3d36;
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot {
|
||||
margin-top: 1em;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot h3 {
|
||||
background: #f5f5f5;
|
||||
color: #888;
|
||||
font-size: 11px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot ul li {
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__number {
|
||||
display: block;
|
||||
font-size: 32px;
|
||||
font-weight: lighter;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.akismet-settings th:first-child {
|
||||
vertical-align: top;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.akismet-settings th.akismet-api-key {
|
||||
vertical-align: middle;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.akismet-settings span.akismet-note{
|
||||
float: left;
|
||||
padding-left: 23px;
|
||||
font-size: 75%;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
/**
|
||||
* For the activation notice on the plugins page.
|
||||
*/
|
||||
|
||||
#akismet_setup_prompt {
|
||||
background: none;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.akismet_activate {
|
||||
border: 1px solid #4F800D;
|
||||
padding: 5px;
|
||||
margin: 15px 0;
|
||||
background: #83AF24;
|
||||
background-image: -webkit-gradient(linear, 0% 0, 80% 100%, from(#83AF24), to(#4F800D));
|
||||
background-image: -moz-linear-gradient(80% 100% 120deg, #4F800D, #83AF24);
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_a {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: 10px;
|
||||
font-size: 140px;
|
||||
color: #769F33;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button {
|
||||
font-weight: bold;
|
||||
border: 1px solid #029DD6;
|
||||
border-top: 1px solid #06B9FD;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
padding: 9px 0 8px 0;
|
||||
color: #FFF;
|
||||
background: #029DD6;
|
||||
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#029DD6), to(#0079B1));
|
||||
background-image: -moz-linear-gradient(0% 100% 90deg, #0079B1, #029DD6);
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button:hover {
|
||||
text-decoration: none !important;
|
||||
border: 1px solid #029DD6;
|
||||
border-bottom: 1px solid #00A8EF;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
padding: 9px 0 8px 0;
|
||||
color: #F0F8FB;
|
||||
background: #0079B1;
|
||||
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#0079B1), to(#0092BF));
|
||||
background-image: -moz-linear-gradient(0% 100% 90deg, #0092BF, #0079B1);
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button_border {
|
||||
border: 1px solid #006699;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
background: #029DD6;
|
||||
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#029DD6), to(#0079B1));
|
||||
background-image: -moz-linear-gradient(0% 100% 90deg, #0079B1, #029DD6);
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button_container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
background: #DEF1B8;
|
||||
padding: 5px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
width: 266px;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_description {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
left: 285px;
|
||||
margin-left: 25px;
|
||||
color: #E5F2B1;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_description strong {
|
||||
color: #FFF;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
.akismet_activate .aa_a {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button_container {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 782px) {
|
||||
.akismet_activate {
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
#akismet_setup_prompt .aa_description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.akismet_activate {
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.jetpack_page_akismet-key-config #wpcontent, .settings_page_akismet-key-config #wpcontent {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.akismet-masthead {
|
||||
background-color:#fff;
|
||||
text-align:center;
|
||||
box-shadow:0 1px 0 rgba(200,215,225,0.5),0 1px 2px #e9eff3
|
||||
}
|
||||
@media (max-width: 45rem) {
|
||||
.akismet-masthead {
|
||||
padding:0 1.25rem
|
||||
}
|
||||
}
|
||||
|
||||
.akismet-masthead__inside-container {
|
||||
padding:.375rem 0;
|
||||
margin:0 auto;
|
||||
width:100%;
|
||||
max-width:45rem;
|
||||
text-align: left;
|
||||
}
|
||||
.akismet-masthead__logo-container {
|
||||
padding:.3125rem 0 0
|
||||
}
|
||||
.akismet-masthead__logo-link {
|
||||
display:inline-block;
|
||||
outline:none;
|
||||
vertical-align:middle
|
||||
}
|
||||
.akismet-masthead__logo-link:focus {
|
||||
line-height:0;
|
||||
box-shadow:0 0 0 2px #78dcfa
|
||||
}
|
||||
.akismet-masthead__logo-link+code {
|
||||
margin:0 10px;
|
||||
padding:5px 9px;
|
||||
border-radius:2px;
|
||||
background:#e6ecf1;
|
||||
color:#647a88
|
||||
}
|
||||
.akismet-masthead__links {
|
||||
display:-ms-flexbox;
|
||||
display:flex;
|
||||
-ms-flex-flow:row wrap;
|
||||
flex-flow:row wrap;
|
||||
-ms-flex:2 50%;
|
||||
flex:2 50%;
|
||||
-ms-flex-pack:end;
|
||||
justify-content:flex-end;
|
||||
margin:0
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.akismet-masthead__links {
|
||||
padding-right:.625rem
|
||||
}
|
||||
}
|
||||
.akismet-masthead__link-li {
|
||||
margin:0;
|
||||
padding:0
|
||||
}
|
||||
.akismet-masthead__link {
|
||||
font-style:normal;
|
||||
color:#0087be;
|
||||
padding:.625rem;
|
||||
display:inline-block
|
||||
}
|
||||
.akismet-masthead__link:visited {
|
||||
color:#0087be
|
||||
}
|
||||
.akismet-masthead__link:active,.akismet-masthead__link:hover {
|
||||
color:#00aadc
|
||||
}
|
||||
.akismet-masthead__link:hover {
|
||||
text-decoration:underline
|
||||
}
|
||||
.akismet-masthead__link .dashicons {
|
||||
display:none
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.akismet-masthead__link:hover,.akismet-masthead__link:active {
|
||||
text-decoration:none
|
||||
}
|
||||
.akismet-masthead__link .dashicons {
|
||||
display:block;
|
||||
font-size:1.75rem
|
||||
}
|
||||
.akismet-masthead__link span+span {
|
||||
display:none
|
||||
}
|
||||
}
|
||||
.akismet-masthead__link-li:last-of-type .akismet-masthead__link {
|
||||
padding-right:0
|
||||
}
|
||||
|
||||
.akismet-lower {
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
max-width: 45rem;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-lower .notice {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.akismet-card {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.akismet-card:after, .akismet-card .inside:after, .akismet-masthead__logo-container:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.akismet-card .inside {
|
||||
padding: 1.5rem;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.akismet-card .akismet-card-actions {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.jetpack_page_akismet-key-config .update-nag, .settings_page_akismet-key-config .update-nag {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.akismet-masthead .akismet-right {
|
||||
line-height: 2.125rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.akismet-box {
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
border: 1px solid rgba(200, 215, 225, 0.5);
|
||||
}
|
||||
|
||||
.akismet-box h2, .akismet-box h3 {
|
||||
padding: 1.5rem 1.5rem .5rem 1.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-box p {
|
||||
padding: 0 1.5rem 1.5rem 1.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-jetpack-email {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.akismet-jetpack-gravatar {
|
||||
padding: 0 0 0 1.5rem;
|
||||
float: left;
|
||||
margin-right: 1rem;
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
.akismet-box p:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.akismet-box .akismet-right {
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-boxes .akismet-box {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.akismet-boxes .akismet-box:last-child {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-boxes .akismet-box:first-child {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-box-header {
|
||||
max-width: 700px;
|
||||
margin: 0 auto 40px auto;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.akismet-box-header h2 {
|
||||
margin: 1.5rem 10% 0;
|
||||
font-size: 1.375rem;
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.akismet-box .centered {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.akismet-box .akismet-toggles {
|
||||
margin: 3rem 0;
|
||||
}
|
||||
|
||||
.akismet-box .akismet-ak-connect, .akismet-box .toggle-jp-connect {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.akismet-button, .akismet-button:hover, .akismet-button:visited {
|
||||
background: white;
|
||||
border-color: #c8d7e1;
|
||||
border-style: solid;
|
||||
border-width: 1px 1px 2px;
|
||||
color: #2e4453;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
text-overflow: ellipsis;
|
||||
text-decoration: none;
|
||||
vertical-align: top;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
border-radius: 4px;
|
||||
padding: 7px 14px 9px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.akismet-button:hover {
|
||||
border-color: #a8bece;
|
||||
}
|
||||
|
||||
.akismet-button:active {
|
||||
border-width: 2px 1px 1px;
|
||||
}
|
||||
|
||||
.akismet-is-primary, .akismet-is-primary:hover, .akismet-is-primary:visited {
|
||||
background: #00aadc;
|
||||
border-color: #0087be;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.akismet-is-primary:hover, .akismet-is-primary:focus {
|
||||
border-color: #005082;
|
||||
}
|
||||
|
||||
.akismet-is-primary:hover {
|
||||
border-color: #005082;
|
||||
}
|
||||
|
||||
.akismet-section-header {
|
||||
position: relative;
|
||||
margin: 0 auto 0.625rem auto;
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3;
|
||||
background: #ffffff;
|
||||
width: 100%;
|
||||
padding-top: 0.6875rem;
|
||||
padding-bottom: 0.6875rem;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.akismet-section-header__label {
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
line-height: 1.75rem;
|
||||
position: relative;
|
||||
font-size: 0.875rem;
|
||||
color: #4f748e;
|
||||
}
|
||||
|
||||
.akismet-section-header__actions {
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
|
||||
.akismet-setup-instructions {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.akismet-setup-instructions form {
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
div.error.akismet-usage-limit-alert {
|
||||
padding: 25px 45px 25px 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#akismet-plugin-container .akismet-usage-limit-alert {
|
||||
margin: 0 auto 0.625rem auto;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3;
|
||||
border: none;
|
||||
border-left: 4px solid #d63638;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-logo {
|
||||
width: 38px;
|
||||
min-width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 20px;
|
||||
margin-right: 18px;
|
||||
background: black;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-logo img {
|
||||
position: absolute;
|
||||
width: 22px;
|
||||
left: 8px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-text {
|
||||
flex-grow: 1;
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-cta {
|
||||
border-color: none;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#akismet-plugin-container .akismet-usage-limit-cta a {
|
||||
color: #d63638;
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
div.error.akismet-usage-limit-alert {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-logo,
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-text {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-cta {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
421
wp-content/plugins/akismet/_inc/akismet.js
Normal file
@@ -0,0 +1,421 @@
|
||||
jQuery( function ( $ ) {
|
||||
var mshotRemovalTimer = null;
|
||||
var mshotRetryTimer = null;
|
||||
var mshotTries = 0;
|
||||
var mshotRetryInterval = 1000;
|
||||
var mshotEnabledLinkSelector = 'a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type, td.comment p a';
|
||||
|
||||
var preloadedMshotURLs = [];
|
||||
|
||||
$('.akismet-status').each(function () {
|
||||
var thisId = $(this).attr('commentid');
|
||||
$(this).prependTo('#comment-' + thisId + ' .column-comment');
|
||||
});
|
||||
$('.akismet-user-comment-count').each(function () {
|
||||
var thisId = $(this).attr('commentid');
|
||||
$(this).insertAfter('#comment-' + thisId + ' .author strong:first').show();
|
||||
});
|
||||
|
||||
akismet_enable_comment_author_url_removal();
|
||||
|
||||
$( '#the-comment-list' ).on( 'click', '.akismet_remove_url', function () {
|
||||
var thisId = $(this).attr('commentid');
|
||||
var data = {
|
||||
action: 'comment_author_deurl',
|
||||
_wpnonce: WPAkismet.comment_author_url_nonce,
|
||||
id: thisId
|
||||
};
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
// Removes "x" link
|
||||
$("a[commentid='"+ thisId +"']").hide();
|
||||
// Show temp status
|
||||
$("#author_comment_url_"+ thisId).html( $( '<span/>' ).text( WPAkismet.strings['Removing...'] ) );
|
||||
},
|
||||
success: function (response) {
|
||||
if (response) {
|
||||
// Show status/undo link
|
||||
$("#author_comment_url_"+ thisId)
|
||||
.attr('cid', thisId)
|
||||
.addClass('akismet_undo_link_removal')
|
||||
.html(
|
||||
$( '<span/>' ).text( WPAkismet.strings['URL removed'] )
|
||||
)
|
||||
.append( ' ' )
|
||||
.append(
|
||||
$( '<span/>' )
|
||||
.text( WPAkismet.strings['(undo)'] )
|
||||
.addClass( 'akismet-span-link' )
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
}).on( 'click', '.akismet_undo_link_removal', function () {
|
||||
var thisId = $(this).attr('cid');
|
||||
var thisUrl = $(this).attr('href');
|
||||
var data = {
|
||||
action: 'comment_author_reurl',
|
||||
_wpnonce: WPAkismet.comment_author_url_nonce,
|
||||
id: thisId,
|
||||
url: thisUrl
|
||||
};
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
type: 'POST',
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
// Show temp status
|
||||
$("#author_comment_url_"+ thisId).html( $( '<span/>' ).text( WPAkismet.strings['Re-adding...'] ) );
|
||||
},
|
||||
success: function (response) {
|
||||
if (response) {
|
||||
// Add "x" link
|
||||
$("a[commentid='"+ thisId +"']").show();
|
||||
// Show link. Core strips leading http://, so let's do that too.
|
||||
$("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').text( thisUrl.replace( /^http:\/\/(www\.)?/ig, '' ) );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Show a preview image of the hovered URL. Applies to author URLs and URLs inside the comments.
|
||||
if ( "enable_mshots" in WPAkismet && WPAkismet.enable_mshots ) {
|
||||
$( '#the-comment-list' ).on( 'mouseover', mshotEnabledLinkSelector, function () {
|
||||
clearTimeout( mshotRemovalTimer );
|
||||
|
||||
if ( $( '.akismet-mshot' ).length > 0 ) {
|
||||
if ( $( '.akismet-mshot:first' ).data( 'link' ) == this ) {
|
||||
// The preview is already showing for this link.
|
||||
return;
|
||||
}
|
||||
else {
|
||||
// A new link is being hovered, so remove the old preview.
|
||||
$( '.akismet-mshot' ).remove();
|
||||
}
|
||||
}
|
||||
|
||||
clearTimeout( mshotRetryTimer );
|
||||
|
||||
var linkUrl = $( this ).attr( 'href' );
|
||||
|
||||
if ( preloadedMshotURLs.indexOf( linkUrl ) !== -1 ) {
|
||||
// This preview image was already preloaded, so begin with a retry URL so the user doesn't see the placeholder image for the first second.
|
||||
mshotTries = 2;
|
||||
}
|
||||
else {
|
||||
mshotTries = 1;
|
||||
}
|
||||
|
||||
var mShot = $( '<div class="akismet-mshot mshot-container"><div class="mshot-arrow"></div><img src="' + akismet_mshot_url( linkUrl, mshotTries ) + '" width="450" height="338" class="mshot-image" /></div>' );
|
||||
mShot.data( 'link', this );
|
||||
mShot.data( 'url', linkUrl );
|
||||
|
||||
mShot.find( 'img' ).on( 'load', function () {
|
||||
$( '.akismet-mshot' ).data( 'pending-request', false );
|
||||
} );
|
||||
|
||||
var offset = $( this ).offset();
|
||||
|
||||
mShot.offset( {
|
||||
left : Math.min( $( window ).width() - 475, offset.left + $( this ).width() + 10 ), // Keep it on the screen if the link is near the edge of the window.
|
||||
top: offset.top + ( $( this ).height() / 2 ) - 101 // 101 = top offset of the arrow plus the top border thickness
|
||||
} );
|
||||
|
||||
$( 'body' ).append( mShot );
|
||||
|
||||
mshotRetryTimer = setTimeout( retryMshotUntilLoaded, mshotRetryInterval );
|
||||
} ).on( 'mouseout', 'a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type, td.comment p a', function () {
|
||||
mshotRemovalTimer = setTimeout( function () {
|
||||
clearTimeout( mshotRetryTimer );
|
||||
|
||||
$( '.akismet-mshot' ).remove();
|
||||
}, 200 );
|
||||
} );
|
||||
|
||||
var preloadDelayTimer = null;
|
||||
|
||||
$( window ).on( 'scroll resize', function () {
|
||||
clearTimeout( preloadDelayTimer );
|
||||
|
||||
preloadDelayTimer = setTimeout( preloadMshotsInViewport, 500 );
|
||||
} );
|
||||
|
||||
preloadMshotsInViewport();
|
||||
}
|
||||
|
||||
/**
|
||||
* The way mShots works is if there was no screenshot already recently generated for the URL,
|
||||
* it returns a "loading..." image for the first request. Then, some subsequent request will
|
||||
* receive the actual screenshot, but it's unknown how long it will take. So, what we do here
|
||||
* is continually re-request the mShot, waiting a second after every response until we get the
|
||||
* actual screenshot.
|
||||
*/
|
||||
function retryMshotUntilLoaded() {
|
||||
clearTimeout( mshotRetryTimer );
|
||||
|
||||
var imageWidth = $( '.akismet-mshot img' ).get(0).naturalWidth;
|
||||
|
||||
if ( imageWidth == 0 ) {
|
||||
// It hasn't finished loading yet the first time. Check again shortly.
|
||||
setTimeout( retryMshotUntilLoaded, mshotRetryInterval );
|
||||
}
|
||||
else if ( imageWidth == 400 ) {
|
||||
// It loaded the preview image.
|
||||
|
||||
if ( mshotTries == 20 ) {
|
||||
// Give up if we've requested the mShot 20 times already.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $( '.akismet-mshot' ).data( 'pending-request' ) ) {
|
||||
$( '.akismet-mshot' ).data( 'pending-request', true );
|
||||
|
||||
mshotTries++;
|
||||
|
||||
$( '.akismet-mshot .mshot-image' ).attr( 'src', akismet_mshot_url( $( '.akismet-mshot' ).data( 'url' ), mshotTries ) );
|
||||
}
|
||||
|
||||
mshotRetryTimer = setTimeout( retryMshotUntilLoaded, mshotRetryInterval );
|
||||
}
|
||||
else {
|
||||
// All done.
|
||||
}
|
||||
}
|
||||
|
||||
function preloadMshotsInViewport() {
|
||||
var windowWidth = $( window ).width();
|
||||
var windowHeight = $( window ).height();
|
||||
|
||||
$( '#the-comment-list' ).find( mshotEnabledLinkSelector ).each( function ( index, element ) {
|
||||
var linkUrl = $( this ).attr( 'href' );
|
||||
|
||||
// Don't attempt to preload an mshot for a single link twice.
|
||||
if ( preloadedMshotURLs.indexOf( linkUrl ) !== -1 ) {
|
||||
// The URL is already preloaded.
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( typeof element.getBoundingClientRect !== 'function' ) {
|
||||
// The browser is too old. Return false to stop this preloading entirely.
|
||||
return false;
|
||||
}
|
||||
|
||||
var rect = element.getBoundingClientRect();
|
||||
|
||||
if ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= windowHeight && rect.right <= windowWidth ) {
|
||||
akismet_preload_mshot( linkUrl );
|
||||
$( this ).data( 'akismet-mshot-preloaded', true );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
$( '.checkforspam.enable-on-load' ).on( 'click', function( e ) {
|
||||
if ( $( this ).hasClass( 'ajax-disabled' ) ) {
|
||||
// Akismet hasn't been configured yet. Allow the user to proceed to the button's link.
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if ( $( this ).hasClass( 'button-disabled' ) ) {
|
||||
window.location.href = $( this ).data( 'success-url' ).replace( '__recheck_count__', 0 ).replace( '__spam_count__', 0 );
|
||||
return;
|
||||
}
|
||||
|
||||
$('.checkforspam').addClass('button-disabled').addClass( 'checking' );
|
||||
$('.checkforspam-spinner').addClass( 'spinner' ).addClass( 'is-active' );
|
||||
|
||||
akismet_check_for_spam(0, 100);
|
||||
}).removeClass( 'button-disabled' );
|
||||
|
||||
var spam_count = 0;
|
||||
var recheck_count = 0;
|
||||
|
||||
function akismet_check_for_spam(offset, limit) {
|
||||
var check_for_spam_buttons = $( '.checkforspam' );
|
||||
|
||||
var nonce = check_for_spam_buttons.data( 'nonce' );
|
||||
|
||||
// We show the percentage complete down to one decimal point so even queues with 100k
|
||||
// pending comments will show some progress pretty quickly.
|
||||
var percentage_complete = Math.round( ( recheck_count / check_for_spam_buttons.data( 'pending-comment-count' ) ) * 1000 ) / 10;
|
||||
|
||||
// Update the progress counter on the "Check for Spam" button.
|
||||
$( '.checkforspam' ).text( check_for_spam_buttons.data( 'progress-label' ).replace( '%1$s', percentage_complete ) );
|
||||
|
||||
$.post(
|
||||
ajaxurl,
|
||||
{
|
||||
'action': 'akismet_recheck_queue',
|
||||
'offset': offset,
|
||||
'limit': limit,
|
||||
'nonce': nonce
|
||||
},
|
||||
function(result) {
|
||||
if ( 'error' in result ) {
|
||||
// An error is only returned in the case of a missing nonce, so we don't need the actual error message.
|
||||
window.location.href = check_for_spam_buttons.data( 'failure-url' );
|
||||
return;
|
||||
}
|
||||
|
||||
recheck_count += result.counts.processed;
|
||||
spam_count += result.counts.spam;
|
||||
|
||||
if (result.counts.processed < limit) {
|
||||
window.location.href = check_for_spam_buttons.data( 'success-url' ).replace( '__recheck_count__', recheck_count ).replace( '__spam_count__', spam_count );
|
||||
}
|
||||
else {
|
||||
// Account for comments that were caught as spam and moved out of the queue.
|
||||
akismet_check_for_spam(offset + limit - result.counts.spam, limit);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ( "start_recheck" in WPAkismet && WPAkismet.start_recheck ) {
|
||||
$( '.checkforspam' ).click();
|
||||
}
|
||||
|
||||
if ( typeof MutationObserver !== 'undefined' ) {
|
||||
// Dynamically add the "X" next the the author URL links when a comment is quick-edited.
|
||||
var comment_list_container = document.getElementById( 'the-comment-list' );
|
||||
|
||||
if ( comment_list_container ) {
|
||||
var observer = new MutationObserver( function ( mutations ) {
|
||||
for ( var i = 0, _len = mutations.length; i < _len; i++ ) {
|
||||
if ( mutations[i].addedNodes.length > 0 ) {
|
||||
akismet_enable_comment_author_url_removal();
|
||||
|
||||
// Once we know that we'll have to check for new author links, skip the rest of the mutations.
|
||||
break;
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
observer.observe( comment_list_container, { attributes: true, childList: true, characterData: true } );
|
||||
}
|
||||
}
|
||||
|
||||
function akismet_enable_comment_author_url_removal() {
|
||||
$( '#the-comment-list' )
|
||||
.find( 'tr.comment, tr[id ^= "comment-"]' )
|
||||
.find( '.column-author a[href^="http"]:first' ) // Ignore mailto: links, which would be the comment author's email.
|
||||
.each(function () {
|
||||
if ( $( this ).parent().find( '.akismet_remove_url' ).length > 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var linkHref = $(this).attr( 'href' );
|
||||
|
||||
// Ignore any links to the current domain, which are diagnostic tools, like the IP address link
|
||||
// or any other links another plugin might add.
|
||||
var currentHostParts = document.location.href.split( '/' );
|
||||
var currentHost = currentHostParts[0] + '//' + currentHostParts[2] + '/';
|
||||
|
||||
if ( linkHref.indexOf( currentHost ) != 0 ) {
|
||||
var thisCommentId = $(this).parents('tr:first').attr('id').split("-");
|
||||
|
||||
$(this)
|
||||
.attr("id", "author_comment_url_"+ thisCommentId[1])
|
||||
.after(
|
||||
$( '<a href="#" class="akismet_remove_url">x</a>' )
|
||||
.attr( 'commentid', thisCommentId[1] )
|
||||
.attr( 'title', WPAkismet.strings['Remove this URL'] )
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an mShot URL if given a link URL.
|
||||
*
|
||||
* @param string linkUrl
|
||||
* @param int retry If retrying a request, the number of the retry.
|
||||
* @return string The mShot URL;
|
||||
*/
|
||||
function akismet_mshot_url( linkUrl, retry ) {
|
||||
var mshotUrl = '//s0.wp.com/mshots/v1/' + encodeURIComponent( linkUrl ) + '?w=900';
|
||||
|
||||
if ( retry > 1 ) {
|
||||
mshotUrl += '&r=' + encodeURIComponent( retry );
|
||||
}
|
||||
|
||||
mshotUrl += '&source=akismet';
|
||||
|
||||
return mshotUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Begin loading an mShot preview of a link.
|
||||
*
|
||||
* @param string linkUrl
|
||||
*/
|
||||
function akismet_preload_mshot( linkUrl ) {
|
||||
var img = new Image();
|
||||
img.src = akismet_mshot_url( linkUrl );
|
||||
|
||||
preloadedMshotURLs.push( linkUrl );
|
||||
}
|
||||
|
||||
$( '.akismet-could-be-primary' ).each( function () {
|
||||
var form = $( this ).closest( 'form' );
|
||||
|
||||
form.data( 'initial-state', form.serialize() );
|
||||
|
||||
form.on( 'change keyup', function () {
|
||||
var self = $( this );
|
||||
var submit_button = self.find( '.akismet-could-be-primary' );
|
||||
|
||||
if ( self.serialize() != self.data( 'initial-state' ) ) {
|
||||
submit_button.addClass( 'akismet-is-primary' );
|
||||
}
|
||||
else {
|
||||
submit_button.removeClass( 'akismet-is-primary' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
/**
|
||||
* Shows the Enter API key form
|
||||
*/
|
||||
$( '.akismet-enter-api-key-box__reveal' ).on( 'click', function ( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
var div = $( '.akismet-enter-api-key-box__form-wrapper' );
|
||||
div.show( 500 );
|
||||
div.find( 'input[name=key]' ).focus();
|
||||
|
||||
$( this ).hide();
|
||||
} );
|
||||
|
||||
/**
|
||||
* Hides the Connect with Jetpack form | Shows the Activate Akismet Account form
|
||||
*/
|
||||
$( 'a.toggle-ak-connect' ).on( 'click', function ( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
$( '.akismet-ak-connect' ).slideToggle('slow');
|
||||
$( 'a.toggle-ak-connect' ).hide();
|
||||
$( '.akismet-jp-connect' ).hide();
|
||||
$( 'a.toggle-jp-connect' ).show();
|
||||
} );
|
||||
|
||||
/**
|
||||
* Shows the Connect with Jetpack form | Hides the Activate Akismet Account form
|
||||
*/
|
||||
$( 'a.toggle-jp-connect' ).on( 'click', function ( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
$( '.akismet-jp-connect' ).slideToggle('slow');
|
||||
$( 'a.toggle-jp-connect' ).hide();
|
||||
$( '.akismet-ak-connect' ).hide();
|
||||
$( 'a.toggle-ak-connect' ).show();
|
||||
} );
|
||||
});
|
||||
67
wp-content/plugins/akismet/_inc/fonts/inter.css
Normal file
@@ -0,0 +1,67 @@
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("https://s0.wp.com/i/fonts/inter/Inter-Regular.woff2?v=3.19") format("woff2"),
|
||||
url("https://s0.wp.com/i/fonts/inter/Inter-Regular.woff?v=3.19") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("https://s0.wp.com/i/fonts/inter/Inter-Italic.woff2?v=3.19") format("woff2"),
|
||||
url("https://s0.wp.com/i/fonts/inter/Inter-Italic.woff?v=3.19") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url("https://s0.wp.com/i/fonts/inter/Inter-Medium.woff2?v=3.19") format("woff2"),
|
||||
url("https://s0.wp.com/i/fonts/inter/Inter-Medium.woff?v=3.19") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url("https://s0.wp.com/i/fonts/inter/Inter-MediumItalic.woff2?v=3.19") format("woff2"),
|
||||
url("https://s0.wp.com/i/fonts/inter/Inter-MediumItalic.woff?v=3.19") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("https://s0.wp.com/i/fonts/inter/Inter-SemiBold.woff2?v=3.19") format("woff2"),
|
||||
url("https://s0.wp.com/i/fonts/inter/Inter-SemiBold.woff?v=3.19") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url("https://s0.wp.com/i/fonts/inter/Inter-SemiBoldItalic.woff2?v=3.19") format("woff2"),
|
||||
url("https://s0.wp.com/i/fonts/inter/Inter-SemiBoldItalic.woff?v=3.19") format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("https://s0.wp.com/i/fonts/inter/Inter-Bold.woff2?v=3.19") format("woff2"),
|
||||
url("https://s0.wp.com/i/fonts/inter/Inter-Bold.woff?v=3.19") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("https://s0.wp.com/i/fonts/inter/Inter-BoldItalic.woff2?v=3.19") format("woff2"),
|
||||
url("https://s0.wp.com/i/fonts/inter/Inter-BoldItalic.woff?v=3.19") format("woff");
|
||||
}
|
||||
|
After Width: | Height: | Size: 8.4 KiB |
BIN
wp-content/plugins/akismet/_inc/img/akismet-refresh-logo@2x.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
1
wp-content/plugins/akismet/_inc/img/arrow-left.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"></path></svg>
|
||||
|
After Width: | Height: | Size: 199 B |
1
wp-content/plugins/akismet/_inc/img/icon-external.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path fill="#357b49" d="M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 350 B |
BIN
wp-content/plugins/akismet/_inc/img/logo-a-2x.png
Normal file
|
After Width: | Height: | Size: 904 B |
BIN
wp-content/plugins/akismet/_inc/img/logo-full-2x.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
380
wp-content/plugins/akismet/_inc/rtl/akismet-admin-rtl.css
Normal file
@@ -0,0 +1,380 @@
|
||||
/* This file was automatically generated on Nov 20 2023 03:10:42 */
|
||||
|
||||
#akismet-plugin-container {
|
||||
background-color: var(--akismet-color-light-grey);
|
||||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
|
||||
--akismet-color-charcoal: #272635;
|
||||
--akismet-color-light-grey: #f6f7f7;
|
||||
--akismet-color-mid-grey: #a7aaad;
|
||||
--akismet-color-dark-grey: #646970;
|
||||
--akismet-color-grey-80: #2c3338;
|
||||
--akismet-color-grey-100: #101517;
|
||||
--akismet-color-white: #fff;
|
||||
--akismet-color-mid-green: #357b49;
|
||||
--akismet-color-mid-red: #e82c3f;
|
||||
--akismet-color-light-blue: #256eff;
|
||||
--akismet-color-notice-light-green: #dbf0e1;
|
||||
--akismet-color-notice-dark-green: #69bf82;
|
||||
--akismet-color-notice-light-red: #ffdbde;
|
||||
--akismet-color-notice-dark-red: #ff6676;
|
||||
}
|
||||
|
||||
#akismet-plugin-container a {
|
||||
color: var(--akismet-color-mid-green);
|
||||
}
|
||||
|
||||
#akismet-plugin-container button:focus-visible,
|
||||
#akismet-plugin-container input:focus-visible {
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
outline: 2px solid var(--akismet-color-light-blue);
|
||||
}
|
||||
|
||||
.akismet-masthead {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.akismet-masthead__logo {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.akismet-section-header {
|
||||
box-shadow: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.akismet-section-header__label {
|
||||
color: var(--akismet-color-charcoal);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.akismet-button, .akismet-button:hover {
|
||||
background-color: var(--akismet-color-mid-green);
|
||||
border: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Need this specificity to override the existing header rule */
|
||||
.akismet-new-snapshot h3.akismet-new-snapshot__header {
|
||||
background: none;
|
||||
font-size: 13px;
|
||||
color: var(--akismet-color-charcoal);
|
||||
text-align: right;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot .akismet-new-snapshot__number {
|
||||
color: var(--akismet-color-charcoal);
|
||||
letter-spacing: -1px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot li.akismet-new-snapshot__item {
|
||||
color: var(--akismet-color-dark-grey);
|
||||
font-size: 13px;
|
||||
text-align: right;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.akismet-masthead__logo-link {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.akismet-masthead__back-link-container {
|
||||
margin-top: 16px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
/* Need this specificity to override the existing link rule */
|
||||
#akismet-plugin-container a.akismet-masthead__back-link {
|
||||
background-image: url(../img/arrow-left.svg);
|
||||
background-position: right;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 16px;
|
||||
color: var(--akismet-color-charcoal);
|
||||
font-weight: 400;
|
||||
padding-right: 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#akismet-plugin-container a.akismet-masthead__back-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__item {
|
||||
border-top: 1px solid var(--akismet-color-light-grey);
|
||||
border-right: 1px solid var(--akismet-color-light-grey);
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot li:first-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__list {
|
||||
display: flex;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__item {
|
||||
flex: 1 0 33.33%;
|
||||
margin-bottom: 0;
|
||||
padding-right: 1.5em;
|
||||
padding-left: 1.5em;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__chart {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.akismet-box {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.akismet-box,
|
||||
.akismet-card {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 0 2px rgba(0, 0, 0, 0.16);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.akismet-card {
|
||||
margin: 32px auto 0 auto;
|
||||
}
|
||||
|
||||
.akismet-lower {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.akismet-lower .inside {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.akismet-section-header__label {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-settings__row {
|
||||
border-bottom: 1px solid var(--akismet-color-light-grey);
|
||||
display: block;
|
||||
padding: 1em 1.5em;
|
||||
}
|
||||
|
||||
.akismet-settings__row-input {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.akismet-settings__row-title {
|
||||
font-weight: 500;
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.akismet-settings__row-description {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
.akismet-card-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.akismet-card-actions__secondary-action {
|
||||
align-self: center;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.akismet-card-actions__secondary-action a[target="_blank"]::after {
|
||||
background: url('../img/icon-external.svg') no-repeat;
|
||||
background-size: contain;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.akismet-settings__row label {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
.akismet-settings__row-note {
|
||||
font-size: 0.9em;
|
||||
margin-top: 0.4em;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"],
|
||||
.akismet-settings__row input[type="radio"] {
|
||||
accent-color: var(--akismet-color-mid-green);
|
||||
box-shadow: none;
|
||||
flex-shrink: 0;
|
||||
margin: 2px 0 0 0;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"] {
|
||||
margin-top: 1px;
|
||||
vertical-align: top;
|
||||
-webkit-appearance: checkbox;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="radio"] {
|
||||
-webkit-appearance: radio;
|
||||
}
|
||||
|
||||
/* Fix up misbehaving wp-admin styles in Chrome (from forms and colors stylesheets) */
|
||||
.akismet-settings__row input[type="checkbox"]:checked:before {
|
||||
content: '';
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="radio"]:checked:before {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"]:checked:hover,
|
||||
.akismet-settings__row input[type="radio"]:checked:hover {
|
||||
accent-color: var(--akismet-color-mid-green);
|
||||
}
|
||||
|
||||
.akismet-button:disabled {
|
||||
background-color: var(--akismet-color-mid-grey);
|
||||
color: var(--akismet-color-white);
|
||||
cursor: arrow;
|
||||
}
|
||||
|
||||
.akismet-awaiting-stats,
|
||||
.akismet-account {
|
||||
padding: 0 1rem 1rem 1rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-account {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.akismet-account th {
|
||||
font-weight: 500;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.akismet-account th, .akismet-account td {
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
.akismet-settings__row-input-label {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.akismet-settings__row-label-text {
|
||||
padding-right: 0.5em;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.akismet-alert {
|
||||
border-right: 8px solid;
|
||||
border-radius: 8px;
|
||||
margin: 20px 0;
|
||||
padding: 0.2em 1em;
|
||||
}
|
||||
|
||||
.akismet-alert__heading {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.akismet-alert.is-good {
|
||||
background-color: var(--akismet-color-notice-light-green);
|
||||
border-right-color: var(--akismet-color-notice-dark-green);
|
||||
}
|
||||
|
||||
.akismet-alert.is-neutral {
|
||||
background-color: var(--akismet-color-white);
|
||||
border-right-color: var(--akismet-color-dark-grey);
|
||||
}
|
||||
|
||||
.akismet-alert.is-bad {
|
||||
background-color: var(--akismet-color-notice-light-red);
|
||||
border-right-color: var(--akismet-color-notice-dark-red);
|
||||
}
|
||||
|
||||
#akismet-plugin-container .akismet-alert.is-good a,
|
||||
#akismet-plugin-container .akismet-alert.is-bad a {
|
||||
/* For better contrast - green isn't great */
|
||||
color: var(--akismet-color-grey-80);
|
||||
}
|
||||
|
||||
/* Setup - API key input */
|
||||
.akismet-enter-api-key-box {
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.akismet-enter-api-key-box__reveal {
|
||||
background: none;
|
||||
border: 0;
|
||||
color: var(--akismet-color-mid-green);
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.akismet-enter-api-key-box__form-wrapper {
|
||||
display: none;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-enter-api-key-box__input-wrapper {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
padding: 0 1.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.akismet-enter-api-key-box__key-input {
|
||||
flex-grow: 1;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
h3.akismet-enter-api-key-box__header {
|
||||
padding-top: 0;
|
||||
padding-bottom: 1em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
.akismet-new-snapshot__list {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__number {
|
||||
float: left;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
margin-top: -16px;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__header {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__text {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"],
|
||||
.akismet-settings__row input[type="radio"] {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.akismet-settings__row-label-text {
|
||||
padding-right: 0.8em;
|
||||
}
|
||||
|
||||
.akismet-settings__row input[type="checkbox"],
|
||||
.akismet-settings__row input[type="radio"] {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
649
wp-content/plugins/akismet/_inc/rtl/akismet-rtl.css
Normal file
@@ -0,0 +1,649 @@
|
||||
/* This file was automatically generated on Aug 25 2023 03:41:43 */
|
||||
|
||||
.wp-admin.jetpack_page_akismet-key-config, .wp-admin.settings_page_akismet-key-config {
|
||||
background-color:#f3f6f8;
|
||||
}
|
||||
|
||||
#submitted-on {
|
||||
position: relative;
|
||||
}
|
||||
#the-comment-list .author .akismet-user-comment-count {
|
||||
display: inline;
|
||||
}
|
||||
#the-comment-list .author a span {
|
||||
text-decoration: none;
|
||||
color: #999;
|
||||
}
|
||||
#the-comment-list .author a span.akismet-span-link {
|
||||
text-decoration: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
#the-comment-list .akismet_remove_url {
|
||||
margin-right: 3px;
|
||||
color: #999;
|
||||
padding: 2px 0 2px 3px;
|
||||
}
|
||||
#the-comment-list .akismet_remove_url:hover {
|
||||
color: #A7301F;
|
||||
font-weight: bold;
|
||||
padding: 2px 0 2px 2px;
|
||||
}
|
||||
#dashboard_recent_comments .akismet-status {
|
||||
display: none;
|
||||
}
|
||||
.akismet-status {
|
||||
float: left;
|
||||
}
|
||||
.akismet-status a {
|
||||
color: #AAA;
|
||||
font-style: italic;
|
||||
}
|
||||
table.comments td.comment p a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
table.comments td.comment p a:after {
|
||||
content: attr(href);
|
||||
color: #aaa;
|
||||
display: inline-block; /* Show the URL without the link's underline extending under it. */
|
||||
padding: 0 1ex; /* Because it's inline block, we can't just use spaces in the content: attribute to separate it from the link text. */
|
||||
}
|
||||
.mshot-arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 10px solid transparent;
|
||||
border-bottom: 10px solid transparent;
|
||||
border-left: 10px solid #5C5C5C;
|
||||
position: absolute;
|
||||
right: -6px;
|
||||
top: 91px;
|
||||
}
|
||||
.mshot-container {
|
||||
background: #5C5C5C;
|
||||
position: absolute;
|
||||
top: -94px;
|
||||
padding: 7px;
|
||||
width: 450px;
|
||||
height: 338px;
|
||||
z-index: 20000;
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-webkit-border-radius: 6px;
|
||||
}
|
||||
.akismet-mshot {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
}
|
||||
.akismet-mshot .mshot-image {
|
||||
margin: 0;
|
||||
height: 338px;
|
||||
width: 450px;
|
||||
}
|
||||
.checkforspam {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.checkforspam-spinner {
|
||||
display: inline-block;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.akismet-right {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.akismet-card .akismet-right {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.akismet-alert-text {
|
||||
color: #dd3d36;
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot {
|
||||
margin-top: 1em;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot h3 {
|
||||
background: #f5f5f5;
|
||||
color: #888;
|
||||
font-size: 11px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot ul li {
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.akismet-new-snapshot__number {
|
||||
display: block;
|
||||
font-size: 32px;
|
||||
font-weight: lighter;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.akismet-settings th:first-child {
|
||||
vertical-align: top;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.akismet-settings th.akismet-api-key {
|
||||
vertical-align: middle;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.akismet-settings span.akismet-note{
|
||||
float: right;
|
||||
padding-right: 23px;
|
||||
font-size: 75%;
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
/**
|
||||
* For the activation notice on the plugins page.
|
||||
*/
|
||||
|
||||
#akismet_setup_prompt {
|
||||
background: none;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.akismet_activate {
|
||||
border: 1px solid #4F800D;
|
||||
padding: 5px;
|
||||
margin: 15px 0;
|
||||
background: #83AF24;
|
||||
background-image: -webkit-gradient(linear, 0% 0, 80% 100%, from(#83AF24), to(#4F800D));
|
||||
background-image: -moz-linear-gradient(-80% 100% 120deg, #4F800D, #83AF24);
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_a {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 10px;
|
||||
font-size: 140px;
|
||||
color: #769F33;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button {
|
||||
font-weight: bold;
|
||||
border: 1px solid #029DD6;
|
||||
border-top: 1px solid #06B9FD;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
padding: 9px 0 8px 0;
|
||||
color: #FFF;
|
||||
background: #029DD6;
|
||||
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#029DD6), to(#0079B1));
|
||||
background-image: -moz-linear-gradient(0% 100% 90deg, #0079B1, #029DD6);
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button:hover {
|
||||
text-decoration: none !important;
|
||||
border: 1px solid #029DD6;
|
||||
border-bottom: 1px solid #00A8EF;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
padding: 9px 0 8px 0;
|
||||
color: #F0F8FB;
|
||||
background: #0079B1;
|
||||
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#0079B1), to(#0092BF));
|
||||
background-image: -moz-linear-gradient(0% 100% 90deg, #0092BF, #0079B1);
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button_border {
|
||||
border: 1px solid #006699;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
background: #029DD6;
|
||||
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#029DD6), to(#0079B1));
|
||||
background-image: -moz-linear-gradient(0% 100% 90deg, #0079B1, #029DD6);
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button_container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
background: #DEF1B8;
|
||||
padding: 5px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
width: 266px;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_description {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
right: 285px;
|
||||
margin-right: 25px;
|
||||
color: #E5F2B1;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_description strong {
|
||||
color: #FFF;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
.akismet_activate .aa_a {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.akismet_activate .aa_button_container {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 782px) {
|
||||
.akismet_activate {
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
#akismet_setup_prompt .aa_description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.akismet_activate {
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.jetpack_page_akismet-key-config #wpcontent, .settings_page_akismet-key-config #wpcontent {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.akismet-masthead {
|
||||
background-color:#fff;
|
||||
text-align:center;
|
||||
box-shadow:0 1px 0 rgba(200,215,225,0.5),0 1px 2px #e9eff3
|
||||
}
|
||||
@media (max-width: 45rem) {
|
||||
.akismet-masthead {
|
||||
padding:0 1.25rem
|
||||
}
|
||||
}
|
||||
|
||||
.akismet-masthead__inside-container {
|
||||
padding:.375rem 0;
|
||||
margin:0 auto;
|
||||
width:100%;
|
||||
max-width:45rem;
|
||||
text-align: right;
|
||||
}
|
||||
.akismet-masthead__logo-container {
|
||||
padding:.3125rem 0 0
|
||||
}
|
||||
.akismet-masthead__logo-link {
|
||||
display:inline-block;
|
||||
outline:none;
|
||||
vertical-align:middle
|
||||
}
|
||||
.akismet-masthead__logo-link:focus {
|
||||
line-height:0;
|
||||
box-shadow:0 0 0 2px #78dcfa
|
||||
}
|
||||
.akismet-masthead__logo-link+code {
|
||||
margin:0 10px;
|
||||
padding:5px 9px;
|
||||
border-radius:2px;
|
||||
background:#e6ecf1;
|
||||
color:#647a88
|
||||
}
|
||||
.akismet-masthead__links {
|
||||
display:-ms-flexbox;
|
||||
display:flex;
|
||||
-ms-flex-flow:row wrap;
|
||||
flex-flow:row wrap;
|
||||
-ms-flex:2 50%;
|
||||
flex:2 50%;
|
||||
-ms-flex-pack:end;
|
||||
justify-content:flex-end;
|
||||
margin:0
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.akismet-masthead__links {
|
||||
padding-left:.625rem
|
||||
}
|
||||
}
|
||||
.akismet-masthead__link-li {
|
||||
margin:0;
|
||||
padding:0
|
||||
}
|
||||
.akismet-masthead__link {
|
||||
font-style:normal;
|
||||
color:#0087be;
|
||||
padding:.625rem;
|
||||
display:inline-block
|
||||
}
|
||||
.akismet-masthead__link:visited {
|
||||
color:#0087be
|
||||
}
|
||||
.akismet-masthead__link:active,.akismet-masthead__link:hover {
|
||||
color:#00aadc
|
||||
}
|
||||
.akismet-masthead__link:hover {
|
||||
text-decoration:underline
|
||||
}
|
||||
.akismet-masthead__link .dashicons {
|
||||
display:none
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.akismet-masthead__link:hover,.akismet-masthead__link:active {
|
||||
text-decoration:none
|
||||
}
|
||||
.akismet-masthead__link .dashicons {
|
||||
display:block;
|
||||
font-size:1.75rem
|
||||
}
|
||||
.akismet-masthead__link span+span {
|
||||
display:none
|
||||
}
|
||||
}
|
||||
.akismet-masthead__link-li:last-of-type .akismet-masthead__link {
|
||||
padding-left:0
|
||||
}
|
||||
|
||||
.akismet-lower {
|
||||
margin: 0 auto;
|
||||
text-align: right;
|
||||
max-width: 45rem;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-lower .notice {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.akismet-card {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.akismet-card:after, .akismet-card .inside:after, .akismet-masthead__logo-container:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.akismet-card .inside {
|
||||
padding: 1.5rem;
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.akismet-card .akismet-card-actions {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.jetpack_page_akismet-key-config .update-nag, .settings_page_akismet-key-config .update-nag {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.akismet-masthead .akismet-right {
|
||||
line-height: 2.125rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.akismet-box {
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
border: 1px solid rgba(200, 215, 225, 0.5);
|
||||
}
|
||||
|
||||
.akismet-box h2, .akismet-box h3 {
|
||||
padding: 1.5rem 1.5rem .5rem 1.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-box p {
|
||||
padding: 0 1.5rem 1.5rem 1.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-jetpack-email {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.akismet-jetpack-gravatar {
|
||||
padding: 0 1.5rem 0 0;
|
||||
float: right;
|
||||
margin-left: 1rem;
|
||||
width: 54px;
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
.akismet-box p:after {
|
||||
content: ".";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.akismet-box .akismet-right {
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-boxes .akismet-box {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.akismet-boxes .akismet-box:last-child {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-boxes .akismet-box:first-child {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.akismet-box-header {
|
||||
max-width: 700px;
|
||||
margin: 0 auto 40px auto;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.akismet-box-header h2 {
|
||||
margin: 1.5rem 10% 0;
|
||||
font-size: 1.375rem;
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.akismet-box .centered {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.akismet-box .akismet-toggles {
|
||||
margin: 3rem 0;
|
||||
}
|
||||
|
||||
.akismet-box .akismet-ak-connect, .akismet-box .toggle-jp-connect {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.akismet-button, .akismet-button:hover, .akismet-button:visited {
|
||||
background: white;
|
||||
border-color: #c8d7e1;
|
||||
border-style: solid;
|
||||
border-width: 1px 1px 2px;
|
||||
color: #2e4453;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
outline: 0;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
text-overflow: ellipsis;
|
||||
text-decoration: none;
|
||||
vertical-align: top;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
border-radius: 4px;
|
||||
padding: 7px 14px 9px;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.akismet-button:hover {
|
||||
border-color: #a8bece;
|
||||
}
|
||||
|
||||
.akismet-button:active {
|
||||
border-width: 2px 1px 1px;
|
||||
}
|
||||
|
||||
.akismet-is-primary, .akismet-is-primary:hover, .akismet-is-primary:visited {
|
||||
background: #00aadc;
|
||||
border-color: #0087be;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.akismet-is-primary:hover, .akismet-is-primary:focus {
|
||||
border-color: #005082;
|
||||
}
|
||||
|
||||
.akismet-is-primary:hover {
|
||||
border-color: #005082;
|
||||
}
|
||||
|
||||
.akismet-section-header {
|
||||
position: relative;
|
||||
margin: 0 auto 0.625rem auto;
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3;
|
||||
background: #ffffff;
|
||||
width: 100%;
|
||||
padding-top: 0.6875rem;
|
||||
padding-bottom: 0.6875rem;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.akismet-section-header__label {
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
line-height: 1.75rem;
|
||||
position: relative;
|
||||
font-size: 0.875rem;
|
||||
color: #4f748e;
|
||||
}
|
||||
|
||||
.akismet-section-header__actions {
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
|
||||
.akismet-setup-instructions {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.akismet-setup-instructions form {
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
div.error.akismet-usage-limit-alert {
|
||||
padding: 25px 15px 25px 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#akismet-plugin-container .akismet-usage-limit-alert {
|
||||
margin: 0 auto 0.625rem auto;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3;
|
||||
border: none;
|
||||
border-right: 4px solid #d63638;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-logo {
|
||||
width: 38px;
|
||||
min-width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 20px;
|
||||
margin-left: 18px;
|
||||
background: black;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-logo img {
|
||||
position: absolute;
|
||||
width: 22px;
|
||||
right: 8px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-text {
|
||||
flex-grow: 1;
|
||||
margin-left: 18px;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert h3 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-cta {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#akismet-plugin-container .akismet-usage-limit-cta a {
|
||||
color: #d63638;
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
div.error.akismet-usage-limit-alert {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-logo,
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-text {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.akismet-usage-limit-alert .akismet-usage-limit-cta {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
68
wp-content/plugins/akismet/akismet.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Akismet
|
||||
*/
|
||||
/*
|
||||
Plugin Name: Akismet Anti-spam: Spam Protection
|
||||
Plugin URI: https://akismet.com/
|
||||
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
|
||||
Version: 5.3.2
|
||||
Requires at least: 5.8
|
||||
Requires PHP: 5.6.20
|
||||
Author: Automattic - Anti-spam Team
|
||||
Author URI: https://automattic.com/wordpress-plugins/
|
||||
License: GPLv2 or later
|
||||
Text Domain: akismet
|
||||
*/
|
||||
|
||||
/*
|
||||
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.
|
||||
|
||||
Copyright 2005-2023 Automattic, Inc.
|
||||
*/
|
||||
|
||||
// Make sure we don't expose any info if called directly
|
||||
if ( !function_exists( 'add_action' ) ) {
|
||||
echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
|
||||
exit;
|
||||
}
|
||||
|
||||
define( 'AKISMET_VERSION', '5.3.2' );
|
||||
define( 'AKISMET__MINIMUM_WP_VERSION', '5.8' );
|
||||
define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
define( 'AKISMET_DELETE_LIMIT', 10000 );
|
||||
|
||||
register_activation_hook( __FILE__, array( 'Akismet', 'plugin_activation' ) );
|
||||
register_deactivation_hook( __FILE__, array( 'Akismet', 'plugin_deactivation' ) );
|
||||
|
||||
require_once( AKISMET__PLUGIN_DIR . 'class.akismet.php' );
|
||||
require_once( AKISMET__PLUGIN_DIR . 'class.akismet-widget.php' );
|
||||
require_once( AKISMET__PLUGIN_DIR . 'class.akismet-rest-api.php' );
|
||||
|
||||
add_action( 'init', array( 'Akismet', 'init' ) );
|
||||
|
||||
add_action( 'rest_api_init', array( 'Akismet_REST_API', 'init' ) );
|
||||
|
||||
if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
||||
require_once( AKISMET__PLUGIN_DIR . 'class.akismet-admin.php' );
|
||||
add_action( 'init', array( 'Akismet_Admin', 'init' ) );
|
||||
}
|
||||
|
||||
//add wrapper class around deprecated akismet functions that are referenced elsewhere
|
||||
require_once( AKISMET__PLUGIN_DIR . 'wrapper.php' );
|
||||
|
||||
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
||||
require_once( AKISMET__PLUGIN_DIR . 'class.akismet-cli.php' );
|
||||
}
|
||||
509
wp-content/plugins/akismet/changelog.txt
Normal file
@@ -0,0 +1,509 @@
|
||||
=== Akismet Anti-spam ===
|
||||
|
||||
== Archived Changelog Entries ==
|
||||
|
||||
This file contains older changelog entries, so we can keep the size of the standard WordPress readme.txt file reasonable.
|
||||
For the latest changes, please see the "Changelog" section of the [readme.txt file](https://plugins.svn.wordpress.org/akismet/trunk/readme.txt).
|
||||
|
||||
= 4.1.12 =
|
||||
*Release Date - 3 September 2021*
|
||||
|
||||
* Fixed "Use of undefined constant" notice.
|
||||
* Improved styling of alert notices.
|
||||
|
||||
= 4.1.11 =
|
||||
*Release Date - 23 August 2021*
|
||||
|
||||
* Added support for Akismet API usage notifications on Akismet settings and edit-comments admin pages.
|
||||
* Added support for the deleted_comment action when bulk-deleting comments from Spam.
|
||||
|
||||
= 4.1.10 =
|
||||
*Release Date - 6 July 2021*
|
||||
|
||||
* Simplified the code around checking comments in REST API and XML-RPC requests.
|
||||
* Updated Plus plan terminology in notices to match current subscription names.
|
||||
* Added `rel="noopener"` to the widget link to avoid warnings in Google Lighthouse.
|
||||
* Set the Akismet JavaScript as deferred instead of async to improve responsiveness.
|
||||
* Improved the preloading of screenshot popups on the edit comments admin page.
|
||||
|
||||
= 4.1.9 =
|
||||
*Release Date - 2 March 2021*
|
||||
|
||||
* Improved handling of pingbacks in XML-RPC multicalls
|
||||
|
||||
= 4.1.8 =
|
||||
*Release Date - 6 January 2021*
|
||||
|
||||
* Fixed missing fields in submit-spam and submit-ham calls that could lead to reduced accuracy.
|
||||
* Fixed usage of deprecated jQuery function.
|
||||
|
||||
= 4.1.7 =
|
||||
*Release Date - 22 October 2020*
|
||||
|
||||
* Show the "Set up your Akismet account" banner on the comments admin screen, where it's relevant to mention if Akismet hasn't been configured.
|
||||
* Don't use wp_blacklist_check when the new wp_check_comment_disallowed_list function is available.
|
||||
|
||||
= 4.1.6 =
|
||||
*Release Date - 4 June 2020*
|
||||
|
||||
* Disable "Check for Spam" button until the page is loaded to avoid errors with clicking through to queue recheck endpoint directly.
|
||||
* Added filter "akismet_enable_mshots" to allow disabling screenshot popups on the edit comments admin page.
|
||||
|
||||
= 4.1.5 =
|
||||
*Release Date - 29 April 2020*
|
||||
|
||||
* Based on user feedback, we have dropped the in-admin notice explaining the availability of the "privacy notice" option in the AKismet settings screen. The option itself is available, but after displaying the notice for the last 2 years, it is now considered a known fact.
|
||||
* Updated the "Requires at least" to WP 4.6, based on recommendations from https://wp-info.org/tools/checkplugini18n.php?slug=akismet
|
||||
* Moved older changelog entries to a separate file to keep the size of this readme reasonable, also based on recommendations from https://wp-info.org/tools/checkplugini18n.php?slug=akismet
|
||||
|
||||
= 4.1.4 =
|
||||
*Release Date - 17 March 2020*
|
||||
|
||||
* Only redirect to the Akismet setup screen upon plugin activation if the plugin was activated manually from within the plugin-related screens, to help users with non-standard install workflows, like WP-CLI.
|
||||
* Update the layout of the initial setup screen to be more readable on small screens.
|
||||
* If no API key has been entered, don't run code that expects an API key.
|
||||
* Improve the readability of the comment history entries.
|
||||
* Don't modify the comment form HTML if no API key has been set.
|
||||
|
||||
= 4.1.3 =
|
||||
*Release Date - 31 October 2019*
|
||||
|
||||
* Prevented an attacker from being able to cause a user to unknowingly recheck their Pending comments for spam.
|
||||
* Improved compatibility with Jetpack 7.7+.
|
||||
* Updated the plugin activation page to use consistent language and markup.
|
||||
* Redirecting users to the Akismet connnection/settings screen upon plugin activation, in an effort to make it easier for people to get setup.
|
||||
|
||||
= 4.1.2 =
|
||||
*Release Date - 14 May 2019*
|
||||
|
||||
* Fixed a conflict between the Akismet setup banner and other plugin notices.
|
||||
* Reduced the number of API requests made by the plugin when attempting to verify the API key.
|
||||
* Include additional data in the pingback pre-check API request to help make the stats more accurate.
|
||||
* Fixed a bug that was enabling the "Check for Spam" button when no comments were eligible to be checked.
|
||||
* Improved Akismet's AMP compatibility.
|
||||
|
||||
= 4.1.1 =
|
||||
*Release Date - 31 January 2019*
|
||||
|
||||
* Fixed the "Setup Akismet" notice so it resizes responsively.
|
||||
* Only highlight the "Save Changes" button in the Akismet config when changes have been made.
|
||||
* The count of comments in your spam queue shown on the dashboard show now always be up-to-date.
|
||||
|
||||
= 4.1 =
|
||||
*Release Date - 12 November 2018*
|
||||
|
||||
* Added a WP-CLI method for retrieving stats.
|
||||
* Hooked into the new "Personal Data Eraser" functionality from WordPress 4.9.6.
|
||||
* Added functionality to clear outdated alerts from Akismet.com.
|
||||
|
||||
= 4.0.8 =
|
||||
*Release Date - 19 June 2018*
|
||||
|
||||
* Improved the grammar and consistency of the in-admin privacy related notes (notice and config).
|
||||
* Revised in-admin explanation of the comment form privacy notice to make its usage clearer.
|
||||
* Added `rel="nofollow noopener"` to the comment form privacy notice to improve SEO and security.
|
||||
|
||||
= 4.0.7 =
|
||||
*Release Date - 28 May 2018*
|
||||
|
||||
* Based on user feedback, the link on "Learn how your comment data is processed." in the optional privacy notice now has a `target` of `_blank` and opens in a new tab/window.
|
||||
* Updated the in-admin privacy notice to use the term "comment" instead of "contact" in "Akismet can display a notice to your users under your comment forms."
|
||||
* Only show in-admin privacy notice if Akismet has an API Key configured
|
||||
|
||||
= 4.0.6 =
|
||||
*Release Date - 26 May 2018*
|
||||
|
||||
* Moved away from using `empty( get_option() )` to instantiating a variable to be compatible with older versions of PHP (5.3, 5.4, etc).
|
||||
|
||||
= 4.0.5 =
|
||||
*Release Date - 26 May 2018*
|
||||
|
||||
* Corrected version number after tagging. Sorry...
|
||||
|
||||
= 4.0.4 =
|
||||
*Release Date - 26 May 2018*
|
||||
|
||||
* Added a hook to provide Akismet-specific privacy information for a site's privacy policy.
|
||||
* Added tools to control the display of a privacy related notice under comment forms.
|
||||
* Fixed HTML in activation failure message to close META and HEAD tag properly.
|
||||
* Fixed a bug that would sometimes prevent Akismet from being correctly auto-configured.
|
||||
|
||||
= 4.0.3 =
|
||||
*Release Date - 19 February 2018*
|
||||
|
||||
* Added a scheduled task to remove entries in wp_commentmeta that no longer have corresponding comments in wp_comments.
|
||||
* Added a new `akismet_batch_delete_count` action to the batch delete methods for people who'd like to keep track of the numbers of records being processed by those methods.
|
||||
|
||||
= 4.0.2 =
|
||||
*Release Date - 18 December 2017*
|
||||
|
||||
* Fixed a bug that could cause Akismet to recheck a comment that has already been manually approved or marked as spam.
|
||||
* Fixed a bug that could cause Akismet to claim that some comments are still waiting to be checked when no comments are waiting to be checked.
|
||||
|
||||
= 4.0.1 =
|
||||
*Release Date - 6 November 2017*
|
||||
|
||||
* Fixed a bug that could prevent some users from connecting Akismet via their Jetpack connection.
|
||||
* Ensured that any pending Akismet-related events are unscheduled if the plugin is deactivated.
|
||||
* Allow some JavaScript to be run asynchronously to avoid affecting page render speeds.
|
||||
|
||||
= 4.0 =
|
||||
*Release Date - 19 September 2017*
|
||||
|
||||
* Added REST API endpoints for configuring Akismet and retrieving stats.
|
||||
* Increased the minimum supported WordPress version to 4.0.
|
||||
* Added compatibility with comments submitted via the REST API.
|
||||
* Improved the progress indicator on the "Check for Spam" button.
|
||||
|
||||
= 3.3.4 =
|
||||
*Release Date - 3 August 2017*
|
||||
|
||||
* Disabled Akismet's debug log output by default unless AKISMET_DEBUG is defined.
|
||||
* URL previews now begin preloading when the mouse moves near them in the comments section of wp-admin.
|
||||
* When a comment is caught by the Comment Blacklist, Akismet will always allow it to stay in the trash even if it is spam as well.
|
||||
* Fixed a bug that was preventing an error from being shown when a site can't reach Akismet's servers.
|
||||
|
||||
= 3.3.3 =
|
||||
*Release Date - 13 July 2017*
|
||||
|
||||
* Reduced amount of bandwidth used by the URL Preview feature.
|
||||
* Improved the admin UI when the API key is manually pre-defined for the site.
|
||||
* Removed a workaround for WordPress installations older than 3.3 that will improve Akismet's compatibility with other plugins.
|
||||
* The number of spam blocked that is displayed on the WordPress dashboard will now be more accurate and updated more frequently.
|
||||
* Fixed a bug in the Akismet widget that could cause PHP warnings.
|
||||
|
||||
= 3.3.2 =
|
||||
*Release Date - 10 May 2017*
|
||||
|
||||
* Fixed a bug causing JavaScript errors in some browsers.
|
||||
|
||||
= 3.3.1 =
|
||||
*Release Date - 2 May 2017*
|
||||
|
||||
* Improve performance by only requesting the akismet_comment_nonce option when absolutely necessary.
|
||||
* Fixed two bugs that could cause PHP warnings.
|
||||
* Fixed a bug that was preventing the "Remove author URL" feature from working after a comment was edited using "Quick Edit."
|
||||
* Fixed a bug that was preventing the URL preview feature from working after a comment was edited using "Quick Edit."
|
||||
|
||||
= 3.3 =
|
||||
*Release Date - 23 February 2017*
|
||||
|
||||
* Updated the Akismet admin pages with a new clean design.
|
||||
* Fixed bugs preventing the `akismet_add_comment_nonce` and `akismet_update_alert` wrapper functions from working properly.
|
||||
* Fixed bug preventing the loading indicator from appearing when re-checking all comments for spam.
|
||||
* Added a progress indicator to the "Check for Spam" button.
|
||||
* Added a success message after manually rechecking the Pending queue for spam.
|
||||
|
||||
= 3.2 =
|
||||
*Release Date - 6 September 2016*
|
||||
|
||||
* Added a WP-CLI module. You can now check comments and recheck the moderation queue from the command line.
|
||||
* Stopped using the deprecated jQuery function `.live()`.
|
||||
* Fixed a bug in `remove_comment_author_url()` and `add_comment_author_url()` that could generate PHP notices.
|
||||
* Fixed a bug that could cause an infinite loop for sites with very very very large comment IDs.
|
||||
* Fixed a bug that could cause the Akismet widget title to be blank.
|
||||
|
||||
= 3.1.11 =
|
||||
*Release Date - 12 May 2016*
|
||||
|
||||
* Fixed a bug that could cause the "Check for Spam" button to skip some comments.
|
||||
* Fixed a bug that could prevent some spam submissions from being sent to Akismet.
|
||||
* Updated all links to use https:// when possible.
|
||||
* Disabled Akismet debug logging unless WP_DEBUG and WP_DEBUG_LOG are both enabled.
|
||||
|
||||
= 3.1.10 =
|
||||
*Release Date - 1 April 2016*
|
||||
|
||||
* Fixed a bug that could cause comments caught as spam to be placed in the Pending queue.
|
||||
* Fixed a bug that could have resulted in comments that were caught by the core WordPress comment blacklist not to have a corresponding History entry.
|
||||
* Fixed a bug that could have caused avoidable PHP warnings in the error log.
|
||||
|
||||
= 3.1.9 =
|
||||
*Release Date - 28 March 2016*
|
||||
|
||||
* Add compatibility with Jetpack so that Jetpack can automatically configure Akismet settings when appropriate.
|
||||
* Fixed a bug preventing some comment data from being sent to Akismet.
|
||||
|
||||
= 3.1.8 =
|
||||
*Release Date - 4 March 2016*
|
||||
|
||||
* Fixed a bug preventing Akismet from being used with some plugins that rewrite admin URLs.
|
||||
* Reduced the amount of bandwidth used on Akismet API calls
|
||||
* Reduced the amount of space Akismet uses in the database
|
||||
* Fixed a bug that could cause comments caught as spam to be placed in the Pending queue.
|
||||
|
||||
= 3.1.7 =
|
||||
*Release Date - 4 January 2016*
|
||||
|
||||
* Added documentation for the 'akismet_comment_nonce' filter.
|
||||
* The post-install activation button is now accessible to screen readers and keyboard-only users.
|
||||
* Fixed a bug that was preventing the "Remove author URL" feature from working in WordPress 4.4
|
||||
|
||||
= 3.1.6 =
|
||||
*Release Date - 14 December 2015*
|
||||
|
||||
* Improve the notices shown after activating Akismet.
|
||||
* Update some strings to allow for the proper plural forms in all languages.
|
||||
|
||||
= 3.1.5 =
|
||||
*Release Date - 13 October 2015*
|
||||
|
||||
* Closes a potential XSS vulnerability.
|
||||
|
||||
= 3.1.4 =
|
||||
*Release Date - 24 September 2015*
|
||||
|
||||
* Fixed a bug that was preventing some users from automatically connecting using Jetpack if they didn't have a current Akismet subscription.
|
||||
* Fixed a bug that could cause comments caught as spam to be placed in the Pending queue.
|
||||
* Error messages and instructions have been simplified to be more understandable.
|
||||
* Link previews are enabled for all links inside comments, not just the author's website link.
|
||||
|
||||
= 3.1.3 =
|
||||
*Release Date - 6 July 2015*
|
||||
|
||||
* Notify users when their account status changes after previously being successfully set up. This should help any users who are seeing blank Akismet settings screens.
|
||||
|
||||
= 3.1.2 =
|
||||
*Release Date - 7 June 2015*
|
||||
|
||||
* Reduced the amount of space Akismet uses in the commentmeta table.
|
||||
* Fixed a bug where some comments with quotes in the author name weren't getting history entries
|
||||
* Pre-emptive security improvements to ensure that the Akismet plugin can't be used by attackers to compromise a WordPress installation.
|
||||
* Better UI for the key entry field: allow whitespace to be included at the beginning or end of the key and strip it out automatically when the form is submitted.
|
||||
* When deactivating the plugin, notify the Akismet API so the site can be marked as inactive.
|
||||
* Clearer error messages.
|
||||
|
||||
= 3.1.1 =
|
||||
*Release Date - 17th March, 2015*
|
||||
|
||||
* Improvements to the "Remove comment author URL" JavaScript
|
||||
* Include the pingback pre-check from the 2.6 branch.
|
||||
|
||||
= 3.1 =
|
||||
*Release Date - 11th March, 2015*
|
||||
|
||||
* Use HTTPS by default for all requests to Akismet.
|
||||
* Fix for a situation where Akismet might strip HTML from a comment.
|
||||
|
||||
= 3.0.4 =
|
||||
*Release Date - 11th December, 2014*
|
||||
|
||||
* Fix to make .htaccess compatible with Apache 2.4.
|
||||
* Fix to allow removal of https author URLs.
|
||||
* Fix to avoid stripping part of the author URL when removing and re-adding.
|
||||
* Removed the "Check for Spam" button from the "Trash" and "Approved" queues, where it would have no effect.
|
||||
* Allow automatic API key configuration when Jetpack is installed and connected to a WordPress.com account
|
||||
|
||||
= 3.0.3 =
|
||||
*Release Date - 3rd November, 2014*
|
||||
|
||||
* Fix for sending the wrong data to delete_comment action that could have prevented old spam comments from being deleted.
|
||||
* Added a filter to disable logging of Akismet debugging information.
|
||||
* Added a filter for the maximum comment age when deleting old spam comments.
|
||||
* Added a filter for the number per batch when deleting old spam comments.
|
||||
* Removed the "Check for Spam" button from the Spam folder.
|
||||
|
||||
= 3.0.2 =
|
||||
*Release Date - 18th August, 2014*
|
||||
|
||||
* Performance improvements.
|
||||
* Fixed a bug that could truncate the comment data being sent to Akismet for checking.
|
||||
|
||||
= 3.0.1 =
|
||||
*Release Date - 9th July, 2014*
|
||||
|
||||
* Removed dependency on PHP's fsockopen function
|
||||
* Fix spam/ham reports to work when reported outside of the WP dashboard, e.g., from Notifications or the WP app
|
||||
* Remove jQuery dependency for comment form JavaScript
|
||||
* Remove unnecessary data from some Akismet comment meta
|
||||
* Suspended keys will now result in all comments being put in moderation, not spam.
|
||||
|
||||
= 3.0.0 =
|
||||
*Release Date - 15th April, 2014*
|
||||
|
||||
* Move Akismet to Settings menu
|
||||
* Drop Akismet Stats menu
|
||||
* Add stats snapshot to Akismet settings
|
||||
* Add Akismet subscription details and status to Akismet settings
|
||||
* Add contextual help for each page
|
||||
* Improve Akismet setup to use Jetpack to automate plugin setup
|
||||
* Fix "Check for Spam" to use AJAX to avoid page timing out
|
||||
* Fix Akismet settings page to be responsive
|
||||
* Drop legacy code
|
||||
* Tidy up CSS and Javascript
|
||||
* Replace the old discard setting with a new "discard pervasive spam" feature.
|
||||
|
||||
= 2.6.0 =
|
||||
*Release Date - 18th March, 2014*
|
||||
|
||||
* Add ajax paging to the check for spam button to handle large volumes of comments
|
||||
* Optimize javascript and add localization support
|
||||
* Fix bug in link to spam comments from right now dashboard widget
|
||||
* Fix bug with deleting old comments to avoid timeouts dealing with large volumes of comments
|
||||
* Include X-Pingback-Forwarded-For header in outbound WordPress pingback verifications
|
||||
* Add pre-check for pingbacks, to stop spam before an outbound verification request is made
|
||||
|
||||
= 2.5.9 =
|
||||
*Release Date - 1st August, 2013*
|
||||
|
||||
* Update 'Already have a key' link to redirect page rather than depend on javascript
|
||||
* Fix some non-translatable strings to be translatable
|
||||
* Update Activation banner in plugins page to redirect user to Akismet config page
|
||||
|
||||
= 2.5.8 =
|
||||
*Release Date - 20th January, 2013*
|
||||
|
||||
* Simplify the activation process for new users
|
||||
* Remove the reporter_ip parameter
|
||||
* Minor preventative security improvements
|
||||
|
||||
= 2.5.7 =
|
||||
*Release Date - 13th December, 2012*
|
||||
|
||||
* FireFox Stats iframe preview bug
|
||||
* Fix mshots preview when using https
|
||||
* Add .htaccess to block direct access to files
|
||||
* Prevent some PHP notices
|
||||
* Fix Check For Spam return location when referrer is empty
|
||||
* Fix Settings links for network admins
|
||||
* Fix prepare() warnings in WP 3.5
|
||||
|
||||
= 2.5.6 =
|
||||
*Release Date - 26th April, 2012*
|
||||
|
||||
* Prevent retry scheduling problems on sites where wp_cron is misbehaving
|
||||
* Preload mshot previews
|
||||
* Modernize the widget code
|
||||
* Fix a bug where comments were not held for moderation during an error condition
|
||||
* Improve the UX and display when comments are temporarily held due to an error
|
||||
* Make the Check For Spam button force a retry when comments are held due to an error
|
||||
* Handle errors caused by an invalid key
|
||||
* Don't retry comments that are too old
|
||||
* Improve error messages when verifying an API key
|
||||
|
||||
= 2.5.5 =
|
||||
*Release Date - 11th January, 2012*
|
||||
|
||||
* Add nonce check for comment author URL remove action
|
||||
* Fix the settings link
|
||||
|
||||
= 2.5.4 =
|
||||
*Release Date - 5th January, 2012*
|
||||
|
||||
* Limit Akismet CSS and Javascript loading in wp-admin to just the pages that need it
|
||||
* Added author URL quick removal functionality
|
||||
* Added mShot preview on Author URL hover
|
||||
* Added empty index.php to prevent directory listing
|
||||
* Move wp-admin menu items under Jetpack, if it is installed
|
||||
* Purge old Akismet comment meta data, default of 15 days
|
||||
|
||||
= 2.5.3 =
|
||||
*Release Date - 8th Febuary, 2011*
|
||||
|
||||
* Specify the license is GPL v2 or later
|
||||
* Fix a bug that could result in orphaned commentmeta entries
|
||||
* Include hotfix for WordPress 3.0.5 filter issue
|
||||
|
||||
= 2.5.2 =
|
||||
*Release Date - 14th January, 2011*
|
||||
|
||||
* Properly format the comment count for author counts
|
||||
* Look for super admins on multisite installs when looking up user roles
|
||||
* Increase the HTTP request timeout
|
||||
* Removed padding for author approved count
|
||||
* Fix typo in function name
|
||||
* Set Akismet stats iframe height to fixed 2500px. Better to have one tall scroll bar than two side by side.
|
||||
|
||||
= 2.5.1 =
|
||||
*Release Date - 17th December, 2010*
|
||||
|
||||
* Fix a bug that caused the "Auto delete" option to fail to discard comments correctly
|
||||
* Remove the comment nonce form field from the 'Akismet Configuration' page in favor of using a filter, akismet_comment_nonce
|
||||
* Fixed padding bug in "author" column of posts screen
|
||||
* Added margin-top to "cleared by ..." badges on dashboard
|
||||
* Fix possible error when calling akismet_cron_recheck()
|
||||
* Fix more PHP warnings
|
||||
* Clean up XHTML warnings for comment nonce
|
||||
* Fix for possible condition where scheduled comment re-checks could get stuck
|
||||
* Clean up the comment meta details after deleting a comment
|
||||
* Only show the status badge if the comment status has been changed by someone/something other than Akismet
|
||||
* Show a 'History' link in the row-actions
|
||||
* Translation fixes
|
||||
* Reduced font-size on author name
|
||||
* Moved "flagged by..." notification to top right corner of comment container and removed heavy styling
|
||||
* Hid "flagged by..." notification while on dashboard
|
||||
|
||||
= 2.5.0 =
|
||||
*Release Date - 7th December, 2010*
|
||||
|
||||
* Track comment actions under 'Akismet Status' on the edit comment screen
|
||||
* Fix a few remaining deprecated function calls ( props Mike Glendinning )
|
||||
* Use HTTPS for the stats IFRAME when wp-admin is using HTTPS
|
||||
* Use the WordPress HTTP class if available
|
||||
* Move the admin UI code to a separate file, only loaded when needed
|
||||
* Add cron retry feature, to replace the old connectivity check
|
||||
* Display Akismet status badge beside each comment
|
||||
* Record history for each comment, and display it on the edit page
|
||||
* Record the complete comment as originally submitted in comment_meta, to use when reporting spam and ham
|
||||
* Highlight links in comment content
|
||||
* New option, "Show the number of comments you've approved beside each comment author."
|
||||
* New option, "Use a nonce on the comment form."
|
||||
|
||||
= 2.4.0 =
|
||||
*Release Date - 23rd August, 2010*
|
||||
|
||||
* Spell out that the license is GPLv2
|
||||
* Fix PHP warnings
|
||||
* Fix WordPress deprecated function calls
|
||||
* Fire the delete_comment action when deleting comments
|
||||
* Move code specific for older WP versions to legacy.php
|
||||
* General code clean up
|
||||
|
||||
= 2.3.0 =
|
||||
*Release Date - 5th June, 2010*
|
||||
|
||||
* Fix "Are you sure" nonce message on config screen in WPMU
|
||||
* Fix XHTML compliance issue in sidebar widget
|
||||
* Change author link; remove some old references to WordPress.com accounts
|
||||
* Localize the widget title (core ticket #13879)
|
||||
|
||||
= 2.2.9 =
|
||||
*Release Date - 2nd June, 2010*
|
||||
|
||||
* Eliminate a potential conflict with some plugins that may cause spurious reports
|
||||
|
||||
= 2.2.8 =
|
||||
*Release Date - 27th May, 2010*
|
||||
|
||||
* Fix bug in initial comment check for ipv6 addresses
|
||||
* Report comments as ham when they are moved from spam to moderation
|
||||
* Report comments as ham when clicking undo after spam
|
||||
* Use transition_comment_status action when available instead of older actions for spam/ham submissions
|
||||
* Better diagnostic messages when PHP network functions are unavailable
|
||||
* Better handling of comments by logged-in users
|
||||
|
||||
= 2.2.7 =
|
||||
*Release Date - 17th December, 2009*
|
||||
|
||||
* Add a new AKISMET_VERSION constant
|
||||
* Reduce the possibility of over-counting spam when another spam filter plugin is in use
|
||||
* Disable the connectivity check when the API key is hard-coded for WPMU
|
||||
|
||||
= 2.2.6 =
|
||||
*Release Date - 20th July, 2009*
|
||||
|
||||
* Fix a global warning introduced in 2.2.5
|
||||
* Add changelog and additional readme.txt tags
|
||||
* Fix an array conversion warning in some versions of PHP
|
||||
* Support a new WPCOM_API_KEY constant for easier use with WordPress MU
|
||||
|
||||
= 2.2.5 =
|
||||
*Release Date - 13th July, 2009*
|
||||
|
||||
* Include a new Server Connectivity diagnostic check, to detect problems caused by firewalls
|
||||
|
||||
= 2.2.4 =
|
||||
*Release Date - 3rd June, 2009*
|
||||
|
||||
* Fixed a key problem affecting the stats feature in WordPress MU
|
||||
* Provide additional blog information in Akismet API calls
|
||||
1392
wp-content/plugins/akismet/class.akismet-admin.php
Normal file
186
wp-content/plugins/akismet/class.akismet-cli.php
Normal file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
|
||||
WP_CLI::add_command( 'akismet', 'Akismet_CLI' );
|
||||
|
||||
/**
|
||||
* Filter spam comments.
|
||||
*/
|
||||
class Akismet_CLI extends WP_CLI_Command {
|
||||
/**
|
||||
* Checks one or more comments against the Akismet API.
|
||||
*
|
||||
* ## OPTIONS
|
||||
* <comment_id>...
|
||||
* : The ID(s) of the comment(s) to check.
|
||||
*
|
||||
* [--noaction]
|
||||
* : Don't change the status of the comment. Just report what Akismet thinks it is.
|
||||
*
|
||||
* ## EXAMPLES
|
||||
*
|
||||
* wp akismet check 12345
|
||||
*
|
||||
* @alias comment-check
|
||||
*/
|
||||
public function check( $args, $assoc_args ) {
|
||||
foreach ( $args as $comment_id ) {
|
||||
if ( isset( $assoc_args['noaction'] ) ) {
|
||||
// Check the comment, but don't reclassify it.
|
||||
$api_response = Akismet::check_db_comment( $comment_id, 'wp-cli' );
|
||||
}
|
||||
else {
|
||||
$api_response = Akismet::recheck_comment( $comment_id, 'wp-cli' );
|
||||
}
|
||||
|
||||
if ( 'true' === $api_response ) {
|
||||
WP_CLI::line( sprintf( __( "Comment #%d is spam.", 'akismet' ), $comment_id ) );
|
||||
}
|
||||
else if ( 'false' === $api_response ) {
|
||||
WP_CLI::line( sprintf( __( "Comment #%d is not spam.", 'akismet' ), $comment_id ) );
|
||||
}
|
||||
else {
|
||||
if ( false === $api_response ) {
|
||||
WP_CLI::error( __( "Failed to connect to Akismet.", 'akismet' ) );
|
||||
}
|
||||
else if ( is_wp_error( $api_response ) ) {
|
||||
WP_CLI::warning( sprintf( __( "Comment #%d could not be checked.", 'akismet' ), $comment_id ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recheck all comments in the Pending queue.
|
||||
*
|
||||
* ## EXAMPLES
|
||||
*
|
||||
* wp akismet recheck_queue
|
||||
*
|
||||
* @alias recheck-queue
|
||||
*/
|
||||
public function recheck_queue() {
|
||||
$batch_size = 100;
|
||||
$start = 0;
|
||||
|
||||
$total_counts = array();
|
||||
|
||||
do {
|
||||
$result_counts = Akismet_Admin::recheck_queue_portion( $start, $batch_size );
|
||||
|
||||
if ( $result_counts['processed'] > 0 ) {
|
||||
foreach ( $result_counts as $key => $count ) {
|
||||
if ( ! isset( $total_counts[ $key ] ) ) {
|
||||
$total_counts[ $key ] = $count;
|
||||
}
|
||||
else {
|
||||
$total_counts[ $key ] += $count;
|
||||
}
|
||||
}
|
||||
$start += $batch_size;
|
||||
$start -= $result_counts['spam']; // These comments will have been removed from the queue.
|
||||
}
|
||||
} while ( $result_counts['processed'] > 0 );
|
||||
|
||||
WP_CLI::line( sprintf( _n( "Processed %d comment.", "Processed %d comments.", $total_counts['processed'], 'akismet' ), number_format( $total_counts['processed'] ) ) );
|
||||
WP_CLI::line( sprintf( _n( "%d comment moved to Spam.", "%d comments moved to Spam.", $total_counts['spam'], 'akismet' ), number_format( $total_counts['spam'] ) ) );
|
||||
|
||||
if ( $total_counts['error'] ) {
|
||||
WP_CLI::line( sprintf( _n( "%d comment could not be checked.", "%d comments could not be checked.", $total_counts['error'], 'akismet' ), number_format( $total_counts['error'] ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches stats from the Akismet API.
|
||||
*
|
||||
* ## OPTIONS
|
||||
*
|
||||
* [<interval>]
|
||||
* : The time period for which to retrieve stats.
|
||||
* ---
|
||||
* default: all
|
||||
* options:
|
||||
* - days
|
||||
* - months
|
||||
* - all
|
||||
* ---
|
||||
*
|
||||
* [--format=<format>]
|
||||
* : Allows overriding the output of the command when listing connections.
|
||||
* ---
|
||||
* default: table
|
||||
* options:
|
||||
* - table
|
||||
* - json
|
||||
* - csv
|
||||
* - yaml
|
||||
* - count
|
||||
* ---
|
||||
*
|
||||
* [--summary]
|
||||
* : When set, will display a summary of the stats.
|
||||
*
|
||||
* ## EXAMPLES
|
||||
*
|
||||
* wp akismet stats
|
||||
* wp akismet stats all
|
||||
* wp akismet stats days
|
||||
* wp akismet stats months
|
||||
* wp akismet stats all --summary
|
||||
*/
|
||||
public function stats( $args, $assoc_args ) {
|
||||
$api_key = Akismet::get_api_key();
|
||||
|
||||
if ( empty( $api_key ) ) {
|
||||
WP_CLI::error( __( 'API key must be set to fetch stats.', 'akismet' ) );
|
||||
}
|
||||
|
||||
switch ( $args[0] ) {
|
||||
case 'days':
|
||||
$interval = '60-days';
|
||||
break;
|
||||
case 'months':
|
||||
$interval = '6-months';
|
||||
break;
|
||||
default:
|
||||
$interval = 'all';
|
||||
break;
|
||||
}
|
||||
|
||||
$request_args = array(
|
||||
'blog' => get_option( 'home' ),
|
||||
'key' => $api_key,
|
||||
'from' => $interval,
|
||||
);
|
||||
|
||||
$request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' );
|
||||
|
||||
$response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' );
|
||||
|
||||
if ( empty( $response[1] ) ) {
|
||||
WP_CLI::error( __( 'Currently unable to fetch stats. Please try again.', 'akismet' ) );
|
||||
}
|
||||
|
||||
$response_body = json_decode( $response[1], true );
|
||||
|
||||
if ( is_null( $response_body ) ) {
|
||||
WP_CLI::error( __( 'Stats response could not be decoded.', 'akismet' ) );
|
||||
}
|
||||
|
||||
if ( isset( $assoc_args['summary'] ) ) {
|
||||
$keys = array(
|
||||
'spam',
|
||||
'ham',
|
||||
'missed_spam',
|
||||
'false_positives',
|
||||
'accuracy',
|
||||
'time_saved',
|
||||
);
|
||||
|
||||
WP_CLI\Utils\format_items( $assoc_args['format'], array( $response_body ), $keys );
|
||||
}
|
||||
else {
|
||||
$stats = $response_body['breakdown'];
|
||||
WP_CLI\Utils\format_items( $assoc_args['format'], $stats, array_keys( end( $stats ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
552
wp-content/plugins/akismet/class.akismet-rest-api.php
Normal file
@@ -0,0 +1,552 @@
|
||||
<?php
|
||||
|
||||
class Akismet_REST_API {
|
||||
/**
|
||||
* Register the REST API routes.
|
||||
*/
|
||||
public static function init() {
|
||||
if ( ! function_exists( 'register_rest_route' ) ) {
|
||||
// The REST API wasn't integrated into core until 4.4, and we support 4.0+ (for now).
|
||||
return false;
|
||||
}
|
||||
|
||||
register_rest_route( 'akismet/v1', '/key', array(
|
||||
array(
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'get_key' ),
|
||||
), array(
|
||||
'methods' => WP_REST_Server::EDITABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'set_key' ),
|
||||
'args' => array(
|
||||
'key' => array(
|
||||
'required' => true,
|
||||
'type' => 'string',
|
||||
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
|
||||
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
|
||||
),
|
||||
),
|
||||
), array(
|
||||
'methods' => WP_REST_Server::DELETABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'delete_key' ),
|
||||
)
|
||||
) );
|
||||
|
||||
register_rest_route( 'akismet/v1', '/settings/', array(
|
||||
array(
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'get_settings' ),
|
||||
),
|
||||
array(
|
||||
'methods' => WP_REST_Server::EDITABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'set_boolean_settings' ),
|
||||
'args' => array(
|
||||
'akismet_strictness' => array(
|
||||
'required' => false,
|
||||
'type' => 'boolean',
|
||||
'description' => __( 'If true, Akismet will automatically discard the worst spam automatically rather than putting it in the spam folder.', 'akismet' ),
|
||||
),
|
||||
'akismet_show_user_comments_approved' => array(
|
||||
'required' => false,
|
||||
'type' => 'boolean',
|
||||
'description' => __( 'If true, show the number of approved comments beside each comment author in the comments list page.', 'akismet' ),
|
||||
),
|
||||
),
|
||||
)
|
||||
) );
|
||||
|
||||
register_rest_route( 'akismet/v1', '/stats', array(
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'get_stats' ),
|
||||
'args' => array(
|
||||
'interval' => array(
|
||||
'required' => false,
|
||||
'type' => 'string',
|
||||
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_interval' ),
|
||||
'description' => __( 'The time period for which to retrieve stats. Options: 60-days, 6-months, all', 'akismet' ),
|
||||
'default' => 'all',
|
||||
),
|
||||
),
|
||||
) );
|
||||
|
||||
register_rest_route( 'akismet/v1', '/stats/(?P<interval>[\w+])', array(
|
||||
'args' => array(
|
||||
'interval' => array(
|
||||
'description' => __( 'The time period for which to retrieve stats. Options: 60-days, 6-months, all', 'akismet' ),
|
||||
'type' => 'string',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'get_stats' ),
|
||||
)
|
||||
) );
|
||||
|
||||
register_rest_route( 'akismet/v1', '/alert', array(
|
||||
array(
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'get_alert' ),
|
||||
'args' => array(
|
||||
'key' => array(
|
||||
'required' => false,
|
||||
'type' => 'string',
|
||||
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
|
||||
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'methods' => WP_REST_Server::EDITABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'set_alert' ),
|
||||
'args' => array(
|
||||
'key' => array(
|
||||
'required' => false,
|
||||
'type' => 'string',
|
||||
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
|
||||
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'methods' => WP_REST_Server::DELETABLE,
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ),
|
||||
'callback' => array( 'Akismet_REST_API', 'delete_alert' ),
|
||||
'args' => array(
|
||||
'key' => array(
|
||||
'required' => false,
|
||||
'type' => 'string',
|
||||
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
|
||||
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
|
||||
),
|
||||
),
|
||||
)
|
||||
) );
|
||||
|
||||
register_rest_route(
|
||||
'akismet/v1',
|
||||
'/webhook',
|
||||
array(
|
||||
'methods' => WP_REST_Server::CREATABLE,
|
||||
'callback' => array( 'Akismet_REST_API', 'receive_webhook' ),
|
||||
'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current Akismet API key.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function get_key( $request = null ) {
|
||||
return rest_ensure_response( Akismet::get_api_key() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the API key, if possible.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function set_key( $request ) {
|
||||
if ( defined( 'WPCOM_API_KEY' ) ) {
|
||||
return rest_ensure_response( new WP_Error( 'hardcoded_key', __( 'This site\'s API key is hardcoded and cannot be changed via the API.', 'akismet' ), array( 'status'=> 409 ) ) );
|
||||
}
|
||||
|
||||
$new_api_key = $request->get_param( 'key' );
|
||||
|
||||
if ( ! self::key_is_valid( $new_api_key ) ) {
|
||||
return rest_ensure_response( new WP_Error( 'invalid_key', __( 'The value provided is not a valid and registered API key.', 'akismet' ), array( 'status' => 400 ) ) );
|
||||
}
|
||||
|
||||
update_option( 'wordpress_api_key', $new_api_key );
|
||||
|
||||
return self::get_key();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unset the API key, if possible.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function delete_key( $request ) {
|
||||
if ( defined( 'WPCOM_API_KEY' ) ) {
|
||||
return rest_ensure_response( new WP_Error( 'hardcoded_key', __( 'This site\'s API key is hardcoded and cannot be deleted.', 'akismet' ), array( 'status'=> 409 ) ) );
|
||||
}
|
||||
|
||||
delete_option( 'wordpress_api_key' );
|
||||
|
||||
return rest_ensure_response( true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Akismet settings.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function get_settings( $request = null ) {
|
||||
return rest_ensure_response( array(
|
||||
'akismet_strictness' => ( get_option( 'akismet_strictness', '1' ) === '1' ),
|
||||
'akismet_show_user_comments_approved' => ( get_option( 'akismet_show_user_comments_approved', '1' ) === '1' ),
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the Akismet settings.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function set_boolean_settings( $request ) {
|
||||
foreach ( array(
|
||||
'akismet_strictness',
|
||||
'akismet_show_user_comments_approved',
|
||||
) as $setting_key ) {
|
||||
|
||||
$setting_value = $request->get_param( $setting_key );
|
||||
if ( is_null( $setting_value ) ) {
|
||||
// This setting was not specified.
|
||||
continue;
|
||||
}
|
||||
|
||||
// From 4.7+, WP core will ensure that these are always boolean
|
||||
// values because they are registered with 'type' => 'boolean',
|
||||
// but we need to do this ourselves for prior versions.
|
||||
$setting_value = Akismet_REST_API::parse_boolean( $setting_value );
|
||||
|
||||
update_option( $setting_key, $setting_value ? '1' : '0' );
|
||||
}
|
||||
|
||||
return self::get_settings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a numeric or string boolean value into a boolean.
|
||||
*
|
||||
* @param mixed $value The value to convert into a boolean.
|
||||
* @return bool The converted value.
|
||||
*/
|
||||
public static function parse_boolean( $value ) {
|
||||
switch ( $value ) {
|
||||
case true:
|
||||
case 'true':
|
||||
case '1':
|
||||
case 1:
|
||||
return true;
|
||||
|
||||
case false:
|
||||
case 'false':
|
||||
case '0':
|
||||
case 0:
|
||||
return false;
|
||||
|
||||
default:
|
||||
return (bool) $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Akismet stats for a given time period.
|
||||
*
|
||||
* Possible `interval` values:
|
||||
* - all
|
||||
* - 60-days
|
||||
* - 6-months
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function get_stats( $request ) {
|
||||
$api_key = Akismet::get_api_key();
|
||||
|
||||
$interval = $request->get_param( 'interval' );
|
||||
|
||||
$stat_totals = array();
|
||||
|
||||
$request_args = array(
|
||||
'blog' => get_option( 'home' ),
|
||||
'key' => $api_key,
|
||||
'from' => $interval,
|
||||
);
|
||||
|
||||
$request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' );
|
||||
|
||||
$response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' );
|
||||
|
||||
if ( ! empty( $response[1] ) ) {
|
||||
$stat_totals[$interval] = json_decode( $response[1] );
|
||||
}
|
||||
|
||||
return rest_ensure_response( $stat_totals );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current alert code and message. Alert codes are used to notify the site owner
|
||||
* if there's a problem, like a connection issue between their site and the Akismet API,
|
||||
* invalid requests being sent, etc.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function get_alert( $request ) {
|
||||
return rest_ensure_response( array(
|
||||
'code' => get_option( 'akismet_alert_code' ),
|
||||
'message' => get_option( 'akismet_alert_msg' ),
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the current alert code and message by triggering a call to the Akismet server.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function set_alert( $request ) {
|
||||
delete_option( 'akismet_alert_code' );
|
||||
delete_option( 'akismet_alert_msg' );
|
||||
|
||||
// Make a request so the most recent alert code and message are retrieved.
|
||||
Akismet::verify_key( Akismet::get_api_key() );
|
||||
|
||||
return self::get_alert( $request );
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the current alert code and message.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function delete_alert( $request ) {
|
||||
delete_option( 'akismet_alert_code' );
|
||||
delete_option( 'akismet_alert_msg' );
|
||||
|
||||
return self::get_alert( $request );
|
||||
}
|
||||
|
||||
private static function key_is_valid( $key ) {
|
||||
$request_args = array(
|
||||
'key' => $key,
|
||||
'blog' => get_option( 'home' ),
|
||||
);
|
||||
|
||||
$request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-key' );
|
||||
|
||||
$response = Akismet::http_post( Akismet::build_query( $request_args ), 'verify-key' );
|
||||
|
||||
if ( $response[1] == 'valid' ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function privileged_permission_callback() {
|
||||
return current_user_can( 'manage_options' );
|
||||
}
|
||||
|
||||
/**
|
||||
* For calls that Akismet.com makes to the site to clear outdated alert codes, use the API key for authorization.
|
||||
*/
|
||||
public static function remote_call_permission_callback( $request ) {
|
||||
$local_key = Akismet::get_api_key();
|
||||
|
||||
return $local_key && ( strtolower( $request->get_param( 'key' ) ) === strtolower( $local_key ) );
|
||||
}
|
||||
|
||||
public static function sanitize_interval( $interval, $request, $param ) {
|
||||
$interval = trim( $interval );
|
||||
|
||||
$valid_intervals = array( '60-days', '6-months', 'all', );
|
||||
|
||||
if ( ! in_array( $interval, $valid_intervals ) ) {
|
||||
$interval = 'all';
|
||||
}
|
||||
|
||||
return $interval;
|
||||
}
|
||||
|
||||
public static function sanitize_key( $key, $request, $param ) {
|
||||
return trim( $key );
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a webhook request from the Akismet servers.
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_Error|WP_REST_Response
|
||||
*/
|
||||
public static function receive_webhook( $request ) {
|
||||
Akismet::log( array( 'Webhook request received', $request->get_body() ) );
|
||||
|
||||
/**
|
||||
* The request body should look like this:
|
||||
* array(
|
||||
* 'key' => '1234567890abcd',
|
||||
* 'endpoint' => '[comment-check|submit-ham|submit-spam]',
|
||||
* 'comments' => array(
|
||||
* array(
|
||||
* 'guid' => '[...]',
|
||||
* 'result' => '[true|false]',
|
||||
* 'comment_author' => '[...]',
|
||||
* [...]
|
||||
* ),
|
||||
* array(
|
||||
* 'guid' => '[...]',
|
||||
* [...],
|
||||
* ),
|
||||
* [...]
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* Multiple comments can be included in each request, and the only truly required
|
||||
* field for each is the guid, although it would be friendly to include also
|
||||
* comment_post_ID, comment_parent, and comment_author_email, if possible to make
|
||||
* searching easier.
|
||||
*/
|
||||
|
||||
// The response will include statuses for the result of each comment that was supplied.
|
||||
$response = array(
|
||||
'comments' => array(),
|
||||
);
|
||||
|
||||
$endpoint = $request->get_param( 'endpoint' );
|
||||
|
||||
switch ( $endpoint ) {
|
||||
case 'comment-check':
|
||||
$webhook_comments = $request->get_param( 'comments' );
|
||||
|
||||
if ( ! is_array( $webhook_comments ) ) {
|
||||
return rest_ensure_response( new WP_Error( 'malformed_request', __( 'The \'comments\' parameter must be an array.', 'akismet' ), array( 'status' => 400 ) ) );
|
||||
}
|
||||
|
||||
foreach ( $webhook_comments as $webhook_comment ) {
|
||||
$guid = $webhook_comment['guid'];
|
||||
|
||||
if ( ! $guid ) {
|
||||
// Without the GUID, we can't be sure that we're matching the right comment.
|
||||
// We'll make it a rule that any comment without a GUID is ignored intentionally.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Search on the fields that are indexed in the comments table, plus the GUID.
|
||||
// The GUID is the only thing we really need to search on, but comment_meta
|
||||
// is not indexed in a useful way if there are many many comments. This
|
||||
// should help narrow it down first.
|
||||
$queryable_fields = array(
|
||||
'comment_post_ID' => 'post_id',
|
||||
'comment_parent' => 'parent',
|
||||
'comment_author_email' => 'author_email',
|
||||
);
|
||||
|
||||
$query_args = array();
|
||||
$query_args['status'] = 'any';
|
||||
$query_args['meta_key'] = 'akismet_guid';
|
||||
$query_args['meta_value'] = $guid;
|
||||
|
||||
foreach ( $queryable_fields as $queryable_field => $wp_comment_query_field ) {
|
||||
if ( isset( $webhook_comment[ $queryable_field ] ) ) {
|
||||
$query_args[ $wp_comment_query_field ] = $webhook_comment[ $queryable_field ];
|
||||
}
|
||||
}
|
||||
|
||||
$comments_query = new WP_Comment_Query( $query_args );
|
||||
$comments = $comments_query->comments;
|
||||
|
||||
if ( ! $comments ) {
|
||||
// Unexpected, although the comment could have been deleted since being submitted.
|
||||
Akismet::log( 'Webhook failed: no matching comment found.' );
|
||||
|
||||
$response['comments'][ $guid ] = array( 'status' => 'error', 'message' => __( 'Could not find matching comment.', 'akismet' ) );
|
||||
|
||||
continue;
|
||||
} if ( count( $comments ) > 1 ) {
|
||||
// Two comments shouldn't be able to match the same GUID.
|
||||
Akismet::log( 'Webhook failed: multiple matching comments found.', $comments );
|
||||
|
||||
$response['comments'][ $guid ] = array( 'status' => 'error', 'message' => __( 'Multiple comments matched request.', 'akismet' ) );
|
||||
|
||||
continue;
|
||||
} else {
|
||||
// We have one single match, as hoped for.
|
||||
Akismet::log( 'Found matching comment.', $comments );
|
||||
|
||||
$current_status = wp_get_comment_status( $comments[0] );
|
||||
|
||||
$result = $webhook_comment['result'];
|
||||
|
||||
if ( 'true' == $result ) {
|
||||
Akismet::log( 'Comment should be spam' );
|
||||
|
||||
// The comment should be classified as spam.
|
||||
if ( 'spam' != $current_status ) {
|
||||
// The comment is not classified as spam. If Akismet was the one to act on it, move it to spam.
|
||||
if ( Akismet::last_comment_status_change_came_from_akismet( $comments[0]->comment_ID ) ) {
|
||||
Akismet::log( 'Comment is not spam; marking as spam.' );
|
||||
|
||||
wp_spam_comment( $comments[0] );
|
||||
Akismet::update_comment_history( $comments[0]->comment_ID, '', 'webhook-spam' );
|
||||
} else {
|
||||
Akismet::log( 'Comment is not spam, but it has already been manually handled by some other process.' );
|
||||
Akismet::update_comment_history( $comments[0]->comment_ID, '', 'webhook-spam-noaction' );
|
||||
}
|
||||
}
|
||||
} else if ( 'false' == $result ) {
|
||||
Akismet::log( 'Comment should be ham' );
|
||||
|
||||
// The comment should be classified as ham.
|
||||
if ( 'spam' == $current_status ) {
|
||||
Akismet::log( 'Comment is spam.' );
|
||||
|
||||
// The comment is classified as spam. If Akismet was the one to label it as spam, unspam it.
|
||||
if ( Akismet::last_comment_status_change_came_from_akismet( $comments[0]->comment_ID ) ) {
|
||||
Akismet::log( 'Akismet marked it as spam; unspamming.' );
|
||||
|
||||
wp_unspam_comment( $comments[0] );
|
||||
akismet::update_comment_history( $comments[0]->comment_ID, '', 'webhook-ham' );
|
||||
} else {
|
||||
Akismet::log( 'Comment is not spam, but it has already been manually handled by some other process.' );
|
||||
Akismet::update_comment_history( $comments[0]->comment_ID, '', 'webhook-ham-noaction' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$response['comments'][ $guid ] = array( 'status' => 'success' );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 'submit-ham':
|
||||
case 'submit-spam':
|
||||
// Nothing to do for submit-ham or submit-spam.
|
||||
break;
|
||||
default:
|
||||
// Unsupported endpoint.
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow plugins to do things with a successfully processed webhook request, like logging.
|
||||
*
|
||||
* @since 5.3.2
|
||||
*
|
||||
* @param WP_REST_Request $request The REST request object.
|
||||
*/
|
||||
do_action( 'akismet_webhook_received', $request );
|
||||
|
||||
Akismet::log( 'Done processing webhook.' );
|
||||
|
||||
return rest_ensure_response( $response );
|
||||
}
|
||||
}
|
||||
137
wp-content/plugins/akismet/class.akismet-widget.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Akismet
|
||||
*/
|
||||
class Akismet_Widget extends WP_Widget {
|
||||
|
||||
function __construct() {
|
||||
load_plugin_textdomain( 'akismet' );
|
||||
|
||||
parent::__construct(
|
||||
'akismet_widget',
|
||||
__( 'Akismet Widget' , 'akismet'),
|
||||
array( 'description' => __( 'Display the number of spam comments Akismet has caught' , 'akismet') )
|
||||
);
|
||||
|
||||
if ( is_active_widget( false, false, $this->id_base ) ) {
|
||||
add_action( 'wp_head', array( $this, 'css' ) );
|
||||
}
|
||||
}
|
||||
|
||||
function css() {
|
||||
?>
|
||||
|
||||
<style type="text/css">
|
||||
.a-stats {
|
||||
width: auto;
|
||||
}
|
||||
.a-stats a {
|
||||
background: #7CA821;
|
||||
background-image:-moz-linear-gradient(0% 100% 90deg,#5F8E14,#7CA821);
|
||||
background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#7CA821),to(#5F8E14));
|
||||
border: 1px solid #5F8E14;
|
||||
border-radius:3px;
|
||||
color: #CFEA93;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
font-weight: normal;
|
||||
height: 100%;
|
||||
-moz-border-radius:3px;
|
||||
padding: 7px 0 8px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
-webkit-border-radius:3px;
|
||||
width: 100%;
|
||||
}
|
||||
.a-stats a:hover {
|
||||
text-decoration: none;
|
||||
background-image:-moz-linear-gradient(0% 100% 90deg,#6F9C1B,#659417);
|
||||
background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#659417),to(#6F9C1B));
|
||||
}
|
||||
.a-stats .count {
|
||||
color: #FFF;
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
line-height: 16px;
|
||||
padding: 0 13px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
function form( $instance ) {
|
||||
if ( $instance && isset( $instance['title'] ) ) {
|
||||
$title = $instance['title'];
|
||||
}
|
||||
else {
|
||||
$title = __( 'Spam Blocked' , 'akismet' );
|
||||
}
|
||||
?>
|
||||
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' , 'akismet'); ?></label>
|
||||
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
|
||||
</p>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
function update( $new_instance, $old_instance ) {
|
||||
$instance = array();
|
||||
$instance['title'] = strip_tags( $new_instance['title'] );
|
||||
return $instance;
|
||||
}
|
||||
|
||||
function widget( $args, $instance ) {
|
||||
$count = get_option( 'akismet_spam_count' );
|
||||
|
||||
if ( ! isset( $instance['title'] ) ) {
|
||||
$instance['title'] = __( 'Spam Blocked' , 'akismet' );
|
||||
}
|
||||
|
||||
echo $args['before_widget'];
|
||||
if ( ! empty( $instance['title'] ) ) {
|
||||
echo $args['before_title'];
|
||||
echo esc_html( $instance['title'] );
|
||||
echo $args['after_title'];
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="a-stats">
|
||||
<a href="https://akismet.com" target="_blank" rel="noopener" title="">
|
||||
<?php
|
||||
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
/* translators: The placeholder is the number of pieces of spam blocked by Akismet. */
|
||||
_n(
|
||||
'<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>',
|
||||
'<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>',
|
||||
$count,
|
||||
'akismet'
|
||||
),
|
||||
number_format_i18n( $count )
|
||||
),
|
||||
array(
|
||||
'strong' => array(
|
||||
'class' => true,
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo $args['after_widget'];
|
||||
}
|
||||
}
|
||||
|
||||
function akismet_register_widgets() {
|
||||
register_widget( 'Akismet_Widget' );
|
||||
}
|
||||
|
||||
add_action( 'widgets_init', 'akismet_register_widgets' );
|
||||
1935
wp-content/plugins/akismet/class.akismet.php
Normal file
2
wp-content/plugins/akismet/index.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
# Silence is golden.
|
||||
137
wp-content/plugins/akismet/readme.txt
Normal file
@@ -0,0 +1,137 @@
|
||||
=== Akismet Anti-spam: Spam Protection ===
|
||||
Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer, stephdau, kbrownkd, bluefuton, akismetantispam
|
||||
Tags: comments, spam, antispam, anti-spam, contact form, anti spam, comment moderation, comment spam, contact form spam, spam comments
|
||||
Requires at least: 5.8
|
||||
Tested up to: 6.4
|
||||
Stable tag: 5.3.2
|
||||
License: GPLv2 or later
|
||||
|
||||
The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam solution for WordPress and WooCommerce.
|
||||
|
||||
== Description ==
|
||||
|
||||
The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam solution for WordPress and WooCommerce.
|
||||
|
||||
Akismet checks your comments and contact form submissions against our global database of spam to prevent your site from publishing malicious content. You can review the comment spam it catches on your blog's "Comments" admin screen.
|
||||
|
||||
Major features in Akismet include:
|
||||
|
||||
* Automatically checks all comments and filters out the ones that look like spam.
|
||||
* Each comment has a status history, so you can easily see which comments were caught or cleared by Akismet and which were spammed or unspammed by a moderator.
|
||||
* URLs are shown in the comment body to reveal hidden or misleading links.
|
||||
* Moderators can see the number of approved comments for each user.
|
||||
* A discard feature that outright blocks the worst spam, saving you disk space and speeding up your site.
|
||||
|
||||
PS: You'll be prompted to get an Akismet.com API key to use it, once activated. Keys are free for personal blogs; paid subscriptions are available for businesses and commercial sites.
|
||||
|
||||
== Installation ==
|
||||
|
||||
Upload the Akismet plugin to your blog, activate it, and then enter your Akismet.com API key.
|
||||
|
||||
1, 2, 3: You're done!
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 5.3.2 =
|
||||
*Release Date - 21 March 2024*
|
||||
|
||||
* Improve the empty state shown to new users when no spam has been caught yet.
|
||||
* Update the message shown to users without a current subscription.
|
||||
* Add foundations for future webhook support.
|
||||
|
||||
= 5.3.1 =
|
||||
*Release Date - 17 January 2024*
|
||||
|
||||
* Make the plugin more resilient when asset files are missing (as seen in WordPress Playground).
|
||||
* Add a link to the 'Account overview' page on akismet.com.
|
||||
* Fix a minor error that occurs when another plugin removes all comment actions from the dashboard.
|
||||
* Add the akismet_request_args filter to allow request args in Akismet API requests to be filtered.
|
||||
* Fix a bug that causes some contact forms to include unnecessary data in the comment_content parameter.
|
||||
|
||||
= 5.3 =
|
||||
*Release Date - 14 September 2023*
|
||||
|
||||
* Improve display of user notices.
|
||||
* Add stylesheets for RTL languages.
|
||||
* Remove initial disabled state from 'Save changes' button.
|
||||
* Improve accessibility of API key entry form.
|
||||
* Add new filter hooks for Fluent Forms.
|
||||
* Fix issue with PHP 8.1 compatibility.
|
||||
|
||||
= 5.2 =
|
||||
*Release Date - 21 June 2023*
|
||||
|
||||
* Visual refresh of Akismet stats.
|
||||
* Improve PHP 8.1 compatibility.
|
||||
* Improve appearance of plugin to match updated stats.
|
||||
* Change minimum supported PHP version to 5.6 to match WordPress.
|
||||
* Drop IE11 support and update minimum WordPress version to 5.8 (where IE11 support was removed from WP Core).
|
||||
|
||||
= 5.1 =
|
||||
*Release Date - 20 March 2023*
|
||||
|
||||
* Removed unnecessary limit notices from admin page.
|
||||
* Improved spam detection by including post taxonomies in the comment-check call.
|
||||
* Removed API keys from stats iframes to avoid possible inadvertent exposure.
|
||||
|
||||
= 5.0.2 =
|
||||
*Release Date - 1 December 2022*
|
||||
|
||||
* Improved compatibility with themes that hide or show UI elements based on mouse movements.
|
||||
* Increased security of API keys by sending them in request bodies instead of subdomains.
|
||||
|
||||
= 5.0.1 =
|
||||
*Release Date - 28 September 2022*
|
||||
|
||||
* Added an empty state for the Statistics section on the admin page.
|
||||
* Fixed a bug that broke some admin page links when Jetpack plugins are active.
|
||||
* Marked some event listeners as passive to improve performance in newer browsers.
|
||||
* Disabled interaction observation on forms that post to other domains.
|
||||
|
||||
= 5.0 =
|
||||
*Release Date - 26 July 2022*
|
||||
|
||||
* Added a new feature to catch spammers by observing how they interact with the page.
|
||||
|
||||
= 4.2.5 =
|
||||
*Release Date - 11 July 2022*
|
||||
|
||||
* Fixed a bug that added unnecessary comment history entries after comment rechecks.
|
||||
* Added a notice that displays when WP-Cron is disabled and might be affecting comment rechecks.
|
||||
|
||||
= 4.2.4 =
|
||||
*Release Date - 20 May 2022*
|
||||
|
||||
* Improved translator instructions for comment history.
|
||||
* Bumped the "Tested up to" tag to WP 6.0.
|
||||
|
||||
= 4.2.3 =
|
||||
*Release Date - 25 April 2022*
|
||||
|
||||
* Improved compatibility with Fluent Forms
|
||||
* Fixed missing translation domains
|
||||
* Updated stats URL.
|
||||
* Improved accessibility of elements on the config page.
|
||||
|
||||
= 4.2.2 =
|
||||
*Release Date - 24 January 2022*
|
||||
|
||||
* Improved compatibility with Formidable Forms
|
||||
* Fixed a bug that could cause issues when multiple contact forms appear on one page.
|
||||
* Updated delete_comment and deleted_comment actions to pass two arguments to match WordPress core since 4.9.0.
|
||||
* Added a filter that allows comment types to be excluded when counting users' approved comments.
|
||||
|
||||
= 4.2.1 =
|
||||
*Release Date - 1 October 2021*
|
||||
|
||||
* Fixed a bug causing AMP validation to fail on certain pages with forms.
|
||||
|
||||
= 4.2 =
|
||||
*Release Date - 30 September 2021*
|
||||
|
||||
* Added links to additional information on API usage notifications.
|
||||
* Reduced the number of network requests required for a comment page when running Akismet.
|
||||
* Improved compatibility with the most popular contact form plugins.
|
||||
* Improved API usage buttons for clarity on what upgrade is needed.
|
||||
|
||||
For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/akismet/trunk/changelog.txt) delivered with the plugin.
|
||||
8
wp-content/plugins/akismet/views/activate.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="akismet-box">
|
||||
<?php Akismet::view( 'title' ); ?>
|
||||
<?php Akismet::view( 'setup' );?>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="akismet-box">
|
||||
<?php Akismet::view( 'enter' );?>
|
||||
</div>
|
||||
318
wp-content/plugins/akismet/views/config.php
Normal file
@@ -0,0 +1,318 @@
|
||||
<?php
|
||||
|
||||
//phpcs:disable VariableAnalysis
|
||||
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
|
||||
$kses_allow_link_href = array(
|
||||
'a' => array(
|
||||
'href' => true,
|
||||
),
|
||||
);
|
||||
?>
|
||||
<div id="akismet-plugin-container">
|
||||
<div class="akismet-masthead">
|
||||
<div class="akismet-masthead__inside-container">
|
||||
<?php Akismet::view( 'logo' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="akismet-lower">
|
||||
<?php if ( Akismet::get_api_key() ) { ?>
|
||||
<?php Akismet_Admin::display_status(); ?>
|
||||
<?php } ?>
|
||||
<?php if ( ! empty( $notices ) ) { ?>
|
||||
<?php foreach ( $notices as $notice ) { ?>
|
||||
<?php Akismet::view( 'notice', $notice ); ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<div class="akismet-card">
|
||||
<div class="akismet-section-header">
|
||||
<h2 class="akismet-section-header__label">
|
||||
<span><?php esc_html_e( 'Statistics', 'akismet' ); ?></span>
|
||||
</h2>
|
||||
|
||||
<div class="akismet-section-header__actions">
|
||||
<a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>">
|
||||
<?php esc_html_e( 'Detailed stats', 'akismet' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div> <!-- close akismet-section-header -->
|
||||
|
||||
<div class="akismet-new-snapshot">
|
||||
<?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?>
|
||||
<div class="akismet-new-snapshot__chart">
|
||||
<iframe id="stats-iframe" allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/snapshot.php?blog=%s&token=%s&height=200&locale=%s&is_redecorated=1', rawurlencode( get_option( 'home' ) ), rawurlencode( Akismet::get_access_token() ), get_locale() ) ); ?>" name="<?php echo esc_attr( 'snapshot-' . filemtime( __FILE__ ) ); ?>" title="<?php echo esc_attr__( 'Akismet stats' ); ?>"></iframe>
|
||||
</div>
|
||||
<ul class="akismet-new-snapshot__list">
|
||||
<li class="akismet-new-snapshot__item">
|
||||
<h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Past six months', 'akismet' ); ?></h3>
|
||||
<span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['6-months']->spam ); ?></span>
|
||||
<span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?></span>
|
||||
</li>
|
||||
<li class="akismet-new-snapshot__item">
|
||||
<h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'All time', 'akismet' ); ?></h3>
|
||||
<span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['all']->spam ); ?></span>
|
||||
<span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?></span>
|
||||
</li>
|
||||
<li class="akismet-new-snapshot__item">
|
||||
<h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Accuracy', 'akismet' ); ?></h3>
|
||||
<span class="akismet-new-snapshot__number"><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span>
|
||||
<span class="akismet-new-snapshot__text">
|
||||
<?php
|
||||
/* translators: %s: number of spam missed by Akismet */
|
||||
echo esc_html( sprintf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ) ) . ', ';
|
||||
/* translators: %s: number of false positive spam flagged by Akismet */
|
||||
echo esc_html( sprintf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ) );
|
||||
?>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div> <!-- close akismet-new-snapshot -->
|
||||
|
||||
</div> <!-- close akismet-card -->
|
||||
|
||||
<?php if ( $akismet_user ) : ?>
|
||||
<div class="akismet-card">
|
||||
<div class="akismet-section-header">
|
||||
<h2 class="akismet-section-header__label">
|
||||
<span><?php esc_html_e( 'Settings', 'akismet' ); ?></span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="inside">
|
||||
<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" autocomplete="off" method="POST" id="akismet-settings-form">
|
||||
|
||||
<div class="akismet-settings">
|
||||
<?php if ( ! Akismet::predefined_api_key() ) : ?>
|
||||
<div class="akismet-settings__row">
|
||||
<h3 class="akismet-settings__row-title">
|
||||
<label class="akismet-settings__row-label" for="key"><?php esc_html_e( 'API key', 'akismet' ); ?></label>
|
||||
</h3>
|
||||
<div class="akismet-settings__row-input">
|
||||
<span class="api-key"><input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( get_option( 'wordpress_api_key' ) ); ?>" class="<?php echo esc_attr( 'regular-text code ' . $akismet_user->status ); ?>"></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
//phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['ssl_status'] ) ) :
|
||||
?>
|
||||
<div class="akismet-settings__row">
|
||||
<div class="akismet-settings__row-text">
|
||||
<h3 class="akismet-settings__row-title"><?php esc_html_e( 'SSL status', 'akismet' ); ?></h3>
|
||||
<div class="akismet-settings__row-description">
|
||||
<?php if ( ! wp_http_supports( array( 'ssl' ) ) ) : ?>
|
||||
<strong><?php esc_html_e( 'Disabled.', 'akismet' ); ?></strong>
|
||||
<?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?>
|
||||
<?php else : ?>
|
||||
<?php $ssl_disabled = get_option( 'akismet_ssl_disabled' ); ?>
|
||||
|
||||
<?php if ( $ssl_disabled ) : ?>
|
||||
<strong><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></strong>
|
||||
<?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?>
|
||||
<?php else : ?>
|
||||
<strong><?php esc_html_e( 'Enabled.', 'akismet' ); ?></strong>
|
||||
<?php esc_html_e( 'All systems functional.', 'akismet' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="akismet-settings__row">
|
||||
<div class="akismet-settings__row-text">
|
||||
<h3 class="akismet-settings__row-title"><?php esc_html_e( 'Comments', 'akismet' ); ?></h3>
|
||||
</div>
|
||||
<div class="akismet-settings__row-input">
|
||||
<label class="akismet-settings__row-input-label" for="akismet_show_user_comments_approved">
|
||||
<input
|
||||
name="akismet_show_user_comments_approved"
|
||||
id="akismet_show_user_comments_approved"
|
||||
value="1"
|
||||
type="checkbox"
|
||||
<?php
|
||||
// If the option isn't set, or if it's enabled ('1'), or if it was enabled a long time ago ('true'), check the checkbox.
|
||||
checked( true, ( in_array( get_option( 'akismet_show_user_comments_approved' ), array( false, '1', 'true' ), true ) ) );
|
||||
?>
|
||||
/>
|
||||
<span class="akismet-settings__row-label-text">
|
||||
<?php esc_html_e( 'Show the number of approved comments beside each comment author.', 'akismet' ); ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="akismet-settings__row is-radio">
|
||||
<div class="akismet-settings__row-text">
|
||||
<h3 class="akismet-settings__row-title"><?php esc_html_e( 'Spam filtering', 'akismet' ); ?></h3>
|
||||
</div>
|
||||
<div class="akismet-settings__row-input">
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e( 'Akismet Anti-spam strictness', 'akismet' ); ?></span>
|
||||
</legend>
|
||||
<div>
|
||||
<label class="akismet-settings__row-input-label" for="akismet_strictness_1">
|
||||
<input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked( '1', get_option( 'akismet_strictness' ) ); ?> />
|
||||
<span class="akismet-settings__row-label-text">
|
||||
<?php esc_html_e( 'Silently discard the worst and most pervasive spam so I never see it.', 'akismet' ); ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="akismet-settings__row-input-label" for="akismet_strictness_0">
|
||||
<input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked( '0', get_option( 'akismet_strictness' ) ); ?> />
|
||||
<span class="akismet-settings__row-label-text">
|
||||
<?php esc_html_e( 'Always put spam in the Spam folder for review.', 'akismet' ); ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="akismet-settings__row-note">
|
||||
<strong><?php esc_html_e( 'Note:', 'akismet' ); ?></strong>
|
||||
<?php
|
||||
$delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) );
|
||||
|
||||
$spam_folder_link = sprintf(
|
||||
'<a href="%s">%s</a>',
|
||||
esc_url( admin_url( 'edit-comments.php?comment_status=spam' ) ),
|
||||
esc_html__( 'spam folder', 'akismet' )
|
||||
);
|
||||
|
||||
// The _n() needs to be on one line so the i18n tooling can extract the translator comment.
|
||||
/* translators: %1$s: spam folder link, %2$d: delete interval in days */
|
||||
$delete_message = _n( 'Spam in the %1$s older than %2$d day is deleted automatically.', 'Spam in the %1$s older than %2$d days is deleted automatically.', $delete_interval, 'akismet' );
|
||||
|
||||
printf(
|
||||
wp_kses( $delete_message, $kses_allow_link_href ),
|
||||
wp_kses( $spam_folder_link, $kses_allow_link_href ),
|
||||
esc_html( $delete_interval )
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="akismet-settings__row is-radio">
|
||||
<div class="akismet-settings__row-text">
|
||||
<h3 class="akismet-settings__row-title"><?php esc_html_e( 'Privacy', 'akismet' ); ?></h3>
|
||||
</div>
|
||||
<div class="akismet-settings__row-input">
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text">
|
||||
<span><?php esc_html_e( 'Akismet privacy notice', 'akismet' ); ?></span>
|
||||
</legend>
|
||||
<div>
|
||||
<label class="akismet-settings__row-input-label" for="akismet_comment_form_privacy_notice_display">
|
||||
<input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_display" value="display" <?php checked( 'display', get_option( 'akismet_comment_form_privacy_notice' ) ); ?> />
|
||||
<span class="akismet-settings__row-label-text">
|
||||
<?php esc_html_e( 'Display a privacy notice under your comment forms.', 'akismet' ); ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="akismet-settings__row-input-label" for="akismet_comment_form_privacy_notice_hide">
|
||||
<input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_hide" value="hide" <?php echo in_array( get_option( 'akismet_comment_form_privacy_notice' ), array( 'display', 'hide' ), true ) ? checked( 'hide', get_option( 'akismet_comment_form_privacy_notice' ), false ) : 'checked="checked"'; ?> />
|
||||
<span class="akismet-settings__row-label-text">
|
||||
<?php esc_html_e( 'Do not display privacy notice.', 'akismet' ); ?>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="akismet-settings__row-note">
|
||||
<?php esc_html_e( 'To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms.', 'akismet' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="akismet-card-actions">
|
||||
<?php if ( ! Akismet::predefined_api_key() ) : ?>
|
||||
<div id="delete-action" class="akismet-card-actions__secondary-action">
|
||||
<a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e( 'Disconnect this account', 'akismet' ); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php wp_nonce_field( Akismet_Admin::NONCE ); ?>
|
||||
|
||||
<div id="publishing-action">
|
||||
<input type="hidden" name="action" value="enter-key">
|
||||
<input type="submit" name="submit" id="submit" class="akismet-button akismet-could-be-primary" value="<?php esc_attr_e( 'Save changes', 'akismet' ); ?>">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( ! Akismet::predefined_api_key() ) : ?>
|
||||
<div class="akismet-card">
|
||||
<div class="akismet-section-header">
|
||||
<h2 class="akismet-section-header__label">
|
||||
<span><?php esc_html_e( 'Account', 'akismet' ); ?></span>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="inside">
|
||||
<table class="akismet-account">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e( 'Subscription type', 'akismet' ); ?></th>
|
||||
<td>
|
||||
<?php echo esc_html( $akismet_user->account_name ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e( 'Status', 'akismet' ); ?></th>
|
||||
<td>
|
||||
<?php
|
||||
if ( 'cancelled' === $akismet_user->status ) :
|
||||
esc_html_e( 'Cancelled', 'akismet' );
|
||||
elseif ( 'suspended' === $akismet_user->status ) :
|
||||
esc_html_e( 'Suspended', 'akismet' );
|
||||
elseif ( 'missing' === $akismet_user->status ) :
|
||||
esc_html_e( 'Missing', 'akismet' );
|
||||
elseif ( 'no-sub' === $akismet_user->status ) :
|
||||
esc_html_e( 'No subscription found', 'akismet' );
|
||||
else :
|
||||
esc_html_e( 'Active', 'akismet' );
|
||||
endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ( $akismet_user->next_billing_date ) : ?>
|
||||
<tr>
|
||||
<th scope="row"><?php esc_html_e( 'Next billing date', 'akismet' ); ?></th>
|
||||
<td>
|
||||
<?php echo esc_html( gmdate( 'F j, Y', $akismet_user->next_billing_date ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="akismet-card-actions">
|
||||
<?php if ( $akismet_user->status === 'active' ) : ?>
|
||||
<div class="akismet-card-actions__secondary-action">
|
||||
<a href="https://akismet.com/account" target="_blank" rel="noopener noreferrer" aria-label="Account overview on akismet.com (opens in a new window)"><?php esc_html_e( 'Account overview', 'akismet' ); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div id="publishing-action">
|
||||
<?php
|
||||
Akismet::view(
|
||||
'get',
|
||||
array(
|
||||
'text' => ( $akismet_user->account_type === 'free-api-key' && $akismet_user->status === 'active' ? __( 'Upgrade', 'akismet' ) : __( 'Change', 'akismet' ) ),
|
||||
'redirect' => 'upgrade',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
98
wp-content/plugins/akismet/views/connect-jp.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
//phpcs:disable VariableAnalysis
|
||||
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
|
||||
|
||||
?>
|
||||
<div class="akismet-box">
|
||||
<?php Akismet::view( 'title' ); ?>
|
||||
<div class="akismet-jp-connect">
|
||||
<h3><?php esc_html_e( 'Connect with Jetpack', 'akismet' ); ?></h3>
|
||||
<?php if ( in_array( $akismet_user->status, array( 'no-sub', 'missing' ) ) ) { ?>
|
||||
<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
|
||||
<form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="akismet-right" target="_blank">
|
||||
<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
|
||||
<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
|
||||
<input type="hidden" name="auto-connect" value="<?php echo esc_attr( $akismet_user->ID ); ?>"/>
|
||||
<input type="hidden" name="redirect" value="plugin-signup"/>
|
||||
<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
|
||||
</form>
|
||||
<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
|
||||
<p>
|
||||
<?php
|
||||
|
||||
/* translators: %s is the WordPress.com username */
|
||||
echo sprintf( esc_html( __( 'You are connected as %s.', 'akismet' ) ), '<b>' . esc_html( $akismet_user->user_login ) . '</b>' );
|
||||
|
||||
?>
|
||||
<br />
|
||||
<span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
|
||||
</p>
|
||||
<?php } elseif ( $akismet_user->status == 'cancelled' ) { ?>
|
||||
<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
|
||||
<form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="akismet-right" target="_blank">
|
||||
<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
|
||||
<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
|
||||
<input type="hidden" name="user_id" value="<?php echo esc_attr( $akismet_user->ID ); ?>"/>
|
||||
<input type="hidden" name="redirect" value="upgrade"/>
|
||||
<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
|
||||
</form>
|
||||
<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
|
||||
<p>
|
||||
<?php
|
||||
|
||||
/* translators: %s is the WordPress.com email address */
|
||||
echo esc_html( sprintf( __( 'Your subscription for %s is cancelled.', 'akismet' ), $akismet_user->user_email ) );
|
||||
|
||||
?>
|
||||
<br />
|
||||
<span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
|
||||
</p>
|
||||
<?php } elseif ( $akismet_user->status == 'suspended' ) { ?>
|
||||
<div class="akismet-right">
|
||||
<p><a href="https://akismet.com/contact" class="akismet-button akismet-is-primary"><?php esc_html_e( 'Contact Akismet support', 'akismet' ); ?></a></p>
|
||||
</div>
|
||||
<p>
|
||||
<span class="akismet-alert-text">
|
||||
<?php
|
||||
|
||||
/* translators: %s is the WordPress.com email address */
|
||||
echo esc_html( sprintf( __( 'Your subscription for %s is suspended.', 'akismet' ), $akismet_user->user_email ) );
|
||||
|
||||
?>
|
||||
</span>
|
||||
<?php esc_html_e( 'No worries! Get in touch and we’ll sort this out.', 'akismet' ); ?>
|
||||
</p>
|
||||
<?php } else { // ask do they want to use akismet account found using jetpack wpcom connection ?>
|
||||
<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
|
||||
<form name="akismet_use_wpcom_key" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-activate" class="akismet-right">
|
||||
<input type="hidden" name="key" value="<?php echo esc_attr( $akismet_user->api_key ); ?>"/>
|
||||
<input type="hidden" name="action" value="enter-key">
|
||||
<?php wp_nonce_field( Akismet_Admin::NONCE ); ?>
|
||||
<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
|
||||
</form>
|
||||
<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
|
||||
<p>
|
||||
<?php
|
||||
|
||||
/* translators: %s is the WordPress.com username */
|
||||
echo sprintf( esc_html( __( 'You are connected as %s.', 'akismet' ) ), '<b>' . esc_html( $akismet_user->user_login ) . '</b>' );
|
||||
|
||||
?>
|
||||
<br />
|
||||
<span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
|
||||
</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="akismet-ak-connect">
|
||||
<?php Akismet::view( 'setup' ); ?>
|
||||
</div>
|
||||
<div class="centered akismet-toggles">
|
||||
<a href="#" class="toggle-jp-connect"><?php esc_html_e( 'Connect with Jetpack', 'akismet' ); ?></a>
|
||||
<a href="#" class="toggle-ak-connect"><?php esc_html_e( 'Set up a different account', 'akismet' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="akismet-box">
|
||||
<?php Akismet::view( 'enter' ); ?>
|
||||
</div>
|
||||
14
wp-content/plugins/akismet/views/enter.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="akismet-enter-api-key-box centered">
|
||||
<button class="akismet-enter-api-key-box__reveal"><?php esc_html_e( 'Manually enter an API key', 'akismet' ); ?></button>
|
||||
<div class="akismet-enter-api-key-box__form-wrapper">
|
||||
<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post">
|
||||
<?php wp_nonce_field( Akismet_Admin::NONCE ); ?>
|
||||
<input type="hidden" name="action" value="enter-key">
|
||||
<h3 class="akismet-enter-api-key-box__header" id="akismet-enter-api-key-box__header"><?php esc_html_e( 'Enter your API key', 'akismet' ); ?></h3>
|
||||
<div class="akismet-enter-api-key-box__input-wrapper">
|
||||
<input id="key" name="key" type="text" size="15" value="" placeholder="<?php esc_attr_e( 'API key', 'akismet' ); ?>" class="akismet-enter-api-key-box__key-input regular-text code" aria-labelledby="akismet-enter-api-key-box__header">
|
||||
<input type="submit" name="submit" id="submit" class="akismet-button" value="<?php esc_attr_e( 'Connect with API key', 'akismet' ); ?>">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
18
wp-content/plugins/akismet/views/get.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
//phpcs:disable VariableAnalysis
|
||||
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
|
||||
|
||||
$submit_classes_attr = 'akismet-button';
|
||||
|
||||
if ( isset( $classes ) && ( is_countable( $classes ) ? count( $classes ) : 0 ) > 0 ) {
|
||||
$submit_classes_attr = implode( ' ', $classes );
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="akismet_activate" action="https://akismet.com/get/" method="POST" target="_blank">
|
||||
<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
|
||||
<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
|
||||
<input type="hidden" name="redirect" value="<?php echo isset( $redirect ) ? $redirect : 'plugin-signup'; ?>"/>
|
||||
<button type="submit" class="<?php echo esc_attr( $submit_classes_attr ); ?>" value="<?php echo esc_attr( $text ); ?>"><?php echo esc_attr( $text ) . '<span class="screen-reader-text">' . esc_html__( '(opens in a new tab)', 'akismet' ) . '</span>'; ?></button>
|
||||
</form>
|
||||
13
wp-content/plugins/akismet/views/logo.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
//phpcs:disable VariableAnalysis
|
||||
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
|
||||
?>
|
||||
<div class="akismet-masthead__logo-container">
|
||||
<?php if ( isset( $include_logo_link ) && $include_logo_link === true ) : ?>
|
||||
<a href="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" class="akismet-masthead__logo-link">
|
||||
<?php endif; ?>
|
||||
<img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/akismet-refresh-logo@2x.png', __FILE__ ) ); ?>" srcset="<?php echo esc_url( plugins_url( '../_inc/img/akismet-refresh-logo.svg', __FILE__ ) ); ?>" alt="Akismet logo" />
|
||||
<?php if ( isset( $include_logo_link ) && $include_logo_link === true ) : ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
326
wp-content/plugins/akismet/views/notice.php
Normal file
@@ -0,0 +1,326 @@
|
||||
<?php
|
||||
//phpcs:disable VariableAnalysis
|
||||
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
|
||||
$kses_allow_link = array(
|
||||
'a' => array(
|
||||
'href' => true,
|
||||
'target' => true,
|
||||
),
|
||||
);
|
||||
$kses_allow_strong = array( 'strong' => true );
|
||||
|
||||
/*
|
||||
* Some notices (plugin, spam-check, spam-check-cron-disabled, alert and usage-limit) are shown elsewhere in wp-admin,
|
||||
* so look different to the standard notices.
|
||||
*/
|
||||
?>
|
||||
<?php if ( $type === 'plugin' ) : ?>
|
||||
<div class="updated" id="akismet_setup_prompt">
|
||||
<form name="akismet_activate" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST">
|
||||
<div class="akismet_activate">
|
||||
<div class="aa_a">A</div>
|
||||
<div class="aa_button_container">
|
||||
<div class="aa_button_border">
|
||||
<input type="submit" class="aa_button" value="<?php esc_attr_e( 'Set up your Akismet account', 'akismet' ); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="aa_description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
__( '<strong>Almost done</strong> - configure Akismet and say goodbye to spam', 'akismet' ),
|
||||
$kses_allow_strong
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'spam-check' ) : ?>
|
||||
<div class="notice notice-warning">
|
||||
<p><strong><?php esc_html_e( 'Akismet has detected a problem.', 'akismet' ); ?></strong></p>
|
||||
<p><?php esc_html_e( 'Some comments have not yet been checked for spam by Akismet. They have been temporarily held for moderation and will automatically be rechecked later.', 'akismet' ); ?></p>
|
||||
<?php if ( $link_text ) : ?>
|
||||
<p><?php echo wp_kses( $link_text, $kses_allow_link ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'spam-check-cron-disabled' ) : ?>
|
||||
<div class="notice notice-warning">
|
||||
<p><strong><?php esc_html_e( 'Akismet has detected a problem.', 'akismet' ); ?></strong></p>
|
||||
<p><?php esc_html_e( 'WP-Cron has been disabled using the DISABLE_WP_CRON constant. Comment rechecks may not work properly.', 'akismet' ); ?></p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'alert' ) : ?>
|
||||
<div class="error">
|
||||
<?php /* translators: The placeholder is an error code returned by Akismet. */ ?>
|
||||
<p><strong><?php printf( esc_html__( 'Akismet error code: %s', 'akismet' ), esc_html( $code ) ); ?></strong></p>
|
||||
<p><?php echo esc_html( $msg ); ?></p>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: the placeholder is a clickable URL that leads to more information regarding an error code. */
|
||||
printf( esc_html__( 'For more information: %s', 'akismet' ), '<a href="https://akismet.com/errors/' . esc_attr( $code ) . '">https://akismet.com/errors/' . esc_attr( $code ) . '</a>' );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'notice' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php echo wp_kses( $notice_header, Akismet_Admin::get_notice_kses_allowed_elements() ); ?></h3>
|
||||
<p>
|
||||
<?php echo wp_kses( $notice_text, Akismet_Admin::get_notice_kses_allowed_elements() ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'missing-functions' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php esc_html_e( 'Network functions are disabled.', 'akismet' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: The placeholder is a URL. */
|
||||
echo wp_kses( sprintf( __( 'Your web host or server administrator has disabled PHP’s <code>gethostbynamel</code> function. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet’s system requirements</a>.', 'akismet' ), esc_url( 'https://akismet.com/akismet-hosting-faq/' ) ), array_merge( $kses_allow_link, $kses_allow_strong, array( 'code' => true ) ) );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'servers-be-down' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php esc_html_e( 'Your site can’t connect to the Akismet servers.', 'akismet' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: The placeholder is a URL. */
|
||||
echo wp_kses( sprintf( __( 'Your firewall may be blocking Akismet from connecting to its API. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.', 'akismet' ), esc_url( 'https://akismet.com/akismet-hosting-faq/' ) ), $kses_allow_link );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'active-dunning' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php esc_html_e( 'Please update your payment information.', 'akismet' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: The placeholder is a URL. */
|
||||
echo wp_kses( sprintf( __( 'We cannot process your payment. Please <a href="%s" target="_blank">update your payment details</a>.', 'akismet' ), esc_url( 'https://akismet.com/account/' ) ), $kses_allow_link );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'cancelled' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php esc_html_e( 'Your Akismet plan has been cancelled.', 'akismet' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: The placeholder is a URL. */
|
||||
echo wp_kses( sprintf( __( 'Please visit your <a href="%s" target="_blank">Akismet account page</a> to reactivate your subscription.', 'akismet' ), esc_url( 'https://akismet.com/account/' ) ), $kses_allow_link );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'suspended' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php esc_html_e( 'Your Akismet subscription is suspended.', 'akismet' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: The placeholder is a URL. */
|
||||
echo wp_kses( sprintf( __( 'Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.', 'akismet' ), esc_url( 'https://akismet.com/contact/' ) ), $kses_allow_link );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'active-notice' && $time_saved ) : ?>
|
||||
<div class="akismet-alert is-neutral">
|
||||
<h3 class="akismet-alert__heading"><?php echo esc_html( $time_saved ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: the placeholder is a clickable URL to the Akismet account upgrade page. */
|
||||
echo wp_kses( sprintf( __( 'You can help us fight spam and upgrade your account by <a href="%s" target="_blank">contributing a token amount</a>.', 'akismet' ), esc_url( 'https://akismet.com/pricing' ) ), $kses_allow_link );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'missing' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php esc_html_e( 'There is a problem with your API key.', 'akismet' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: The placeholder is a URL to the Akismet contact form. */
|
||||
echo wp_kses( sprintf( __( 'Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.', 'akismet' ), esc_url( 'https://akismet.com/contact/' ) ), $kses_allow_link );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'no-sub' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php esc_html_e( 'You don’t have an Akismet plan.', 'akismet' ); ?></h3>
|
||||
<p><?php echo esc_html__( 'Your API key must have an Akismet plan before it can protect your site from spam.', 'akismet' ); ?></p>
|
||||
<p>
|
||||
<?php
|
||||
/* translators: the placeholder is the URL to the Akismet pricing page. */
|
||||
echo wp_kses( sprintf( __( 'Please <a href="%s" target="_blank">choose a plan</a> to get started with Akismet.', 'akismet' ), esc_url( 'https://akismet.com/pricing' ) ), $kses_allow_link );
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'new-key-valid' ) : ?>
|
||||
<?php
|
||||
global $wpdb;
|
||||
|
||||
$check_pending_link = false;
|
||||
|
||||
$at_least_one_comment_in_moderation = ! ! $wpdb->get_var( "SELECT comment_ID FROM {$wpdb->comments} WHERE comment_approved = '0' LIMIT 1" );
|
||||
|
||||
if ( $at_least_one_comment_in_moderation ) {
|
||||
$check_pending_link = 'edit-comments.php?akismet_recheck=' . wp_create_nonce( 'akismet_recheck' );
|
||||
}
|
||||
?>
|
||||
<div class="akismet-alert is-good">
|
||||
<p><?php esc_html_e( 'Akismet is now protecting your site from spam.', 'akismet' ); ?></p>
|
||||
<?php if ( $check_pending_link ) : ?>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
/* translators: The placeholder is a URL for checking pending comments. */
|
||||
__( 'Would you like to <a href="%s">check pending comments</a>?', 'akismet' ),
|
||||
esc_url( $check_pending_link )
|
||||
),
|
||||
$kses_allow_link
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'new-key-invalid' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<p><?php esc_html_e( 'The key you entered is invalid. Please double-check it.', 'akismet' ); ?></p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'existing-key-invalid' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php echo esc_html( __( 'Your API key is no longer valid.', 'akismet' ) ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
/* translators: The placeholder is a URL to the Akismet contact form. */
|
||||
__( 'Please enter a new key or <a href="%s" target="_blank">contact Akismet support</a>.', 'akismet' ),
|
||||
'https://akismet.com/contact/'
|
||||
),
|
||||
$kses_allow_link
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'new-key-failed' ) : ?>
|
||||
<div class="akismet-alert is-bad">
|
||||
<h3 class="akismet-alert__heading"><?php esc_html_e( 'The API key you entered could not be verified.', 'akismet' ); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
/* translators: The placeholder is a URL. */
|
||||
__( 'The connection to akismet.com could not be established. Please refer to <a href="%s" target="_blank">our guide about firewalls</a> and check your server configuration.', 'akismet' ),
|
||||
'https://blog.akismet.com/akismet-hosting-faq/'
|
||||
),
|
||||
$kses_allow_link
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php elseif ( $type === 'usage-limit' && isset( Akismet::$limit_notices[ $code ] ) ) : ?>
|
||||
<div class="error akismet-usage-limit-alert">
|
||||
<div class="akismet-usage-limit-logo">
|
||||
<img src="<?php echo esc_url( plugins_url( '../_inc/img/logo-a-2x.png', __FILE__ ) ); ?>" alt="Akismet logo" />
|
||||
</div>
|
||||
<div class="akismet-usage-limit-text">
|
||||
<h3>
|
||||
<?php
|
||||
switch ( Akismet::$limit_notices[ $code ] ) {
|
||||
case 'FIRST_MONTH_OVER_LIMIT':
|
||||
case 'SECOND_MONTH_OVER_LIMIT':
|
||||
esc_html_e( 'Your Akismet account usage is over your plan’s limit', 'akismet' );
|
||||
break;
|
||||
case 'THIRD_MONTH_APPROACHING_LIMIT':
|
||||
esc_html_e( 'Your Akismet account usage is approaching your plan’s limit', 'akismet' );
|
||||
break;
|
||||
case 'THIRD_MONTH_OVER_LIMIT':
|
||||
case 'FOUR_PLUS_MONTHS_OVER_LIMIT':
|
||||
esc_html_e( 'Your account has been restricted', 'akismet' );
|
||||
break;
|
||||
default:
|
||||
}
|
||||
?>
|
||||
</h3>
|
||||
<p>
|
||||
<?php
|
||||
switch ( Akismet::$limit_notices[ $code ] ) {
|
||||
case 'FIRST_MONTH_OVER_LIMIT':
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
/* translators: The first placeholder is a date, the second is a (formatted) number, the third is another formatted number. */
|
||||
__( 'Since %1$s, your account made %2$s API calls, compared to your plan’s limit of %3$s.', 'akismet' ),
|
||||
esc_html( gmdate( 'F' ) . ' 1' ),
|
||||
number_format( $api_calls ),
|
||||
number_format( $usage_limit )
|
||||
)
|
||||
);
|
||||
echo ' ';
|
||||
echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">';
|
||||
echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) );
|
||||
echo '</a>';
|
||||
|
||||
break;
|
||||
case 'SECOND_MONTH_OVER_LIMIT':
|
||||
echo esc_html( __( 'Your Akismet usage has been over your plan’s limit for two consecutive months. Next month, we will restrict your account after you reach the limit. Please consider upgrading your plan.', 'akismet' ) );
|
||||
echo ' ';
|
||||
echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">';
|
||||
echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) );
|
||||
echo '</a>';
|
||||
|
||||
break;
|
||||
case 'THIRD_MONTH_APPROACHING_LIMIT':
|
||||
echo esc_html( __( 'Your Akismet usage is nearing your plan’s limit for the third consecutive month. We will restrict your account after you reach the limit. Upgrade your plan so Akismet can continue blocking spam.', 'akismet' ) );
|
||||
echo ' ';
|
||||
echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">';
|
||||
echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) );
|
||||
echo '</a>';
|
||||
|
||||
break;
|
||||
case 'THIRD_MONTH_OVER_LIMIT':
|
||||
case 'FOUR_PLUS_MONTHS_OVER_LIMIT':
|
||||
echo esc_html( __( 'Your Akismet usage has been over your plan’s limit for three consecutive months. We have restricted your account for the rest of the month. Upgrade your plan so Akismet can continue blocking spam.', 'akismet' ) );
|
||||
echo ' ';
|
||||
echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">';
|
||||
echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) );
|
||||
echo '</a>';
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="akismet-usage-limit-cta">
|
||||
<a href="<?php echo esc_attr( $upgrade_url ); ?>" class="button" target="_blank">
|
||||
<?php
|
||||
// If only a qty upgrade is required, show a more generic message.
|
||||
if ( ! empty( $upgrade_type ) && 'qty' === $upgrade_type ) {
|
||||
esc_html_e( 'Upgrade your subscription level', 'akismet' );
|
||||
} else {
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
/* translators: The placeholder is the name of a subscription level, like "Plus" or "Enterprise" . */
|
||||
__( 'Upgrade to %s', 'akismet' ),
|
||||
$upgrade_plan
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
11
wp-content/plugins/akismet/views/predefined.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="akismet-box">
|
||||
<h2><?php esc_html_e( 'Manual Configuration', 'akismet' ); ?></h2>
|
||||
<p>
|
||||
<?php
|
||||
|
||||
/* translators: %s is the wp-config.php file */
|
||||
echo sprintf( esc_html__( 'An Akismet API key has been defined in the %s file for this site.', 'akismet' ), '<code>wp-config.php</code>' );
|
||||
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
4
wp-content/plugins/akismet/views/setup.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="akismet-setup-instructions">
|
||||
<p><?php esc_html_e( 'Set up your Akismet account to enable spam filtering on this site.', 'akismet' ); ?></p>
|
||||
<?php Akismet::view( 'get', array( 'text' => __( 'Set up your Akismet account' , 'akismet' ), 'classes' => array( 'akismet-button', 'akismet-is-primary' ) ) ); ?>
|
||||
</div>
|
||||
29
wp-content/plugins/akismet/views/start.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
//phpcs:disable VariableAnalysis
|
||||
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
|
||||
|
||||
?>
|
||||
<div id="akismet-plugin-container">
|
||||
<div class="akismet-masthead">
|
||||
<div class="akismet-masthead__inside-container">
|
||||
<?php Akismet::view( 'logo' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="akismet-lower">
|
||||
<?php Akismet_Admin::display_status();?>
|
||||
<div class="akismet-boxes">
|
||||
<?php
|
||||
|
||||
if ( Akismet::predefined_api_key() ) {
|
||||
Akismet::view( 'predefined' );
|
||||
} elseif ( $akismet_user && in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub', 'missing', 'cancelled', 'suspended' ) ) ) {
|
||||
Akismet::view( 'connect-jp', compact( 'akismet_user' ) );
|
||||
} else {
|
||||
Akismet::view( 'activate' );
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
12
wp-content/plugins/akismet/views/stats.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<div id="akismet-plugin-container">
|
||||
<div class="akismet-masthead">
|
||||
<div class="akismet-masthead__inside-container">
|
||||
<?php Akismet::view( 'logo', array( 'include_logo_link' => true ) ); ?>
|
||||
<div class="akismet-masthead__back-link-container">
|
||||
<a class="akismet-masthead__back-link" href="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"><?php esc_html_e( 'Back to settings', 'akismet' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?>
|
||||
<iframe id="stats-iframe" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/user-stats.php?blog=%s&token=%s&locale=%s&is_redecorated=1', urlencode( get_option( 'home' ) ), urlencode( Akismet::get_access_token() ), esc_attr( get_locale() ) ) ); ?>" name="<?php echo esc_attr( 'user-stats- ' . filemtime( __FILE__ ) ); ?>" width="100%" height="2500px" frameborder="0" title="<?php echo esc_attr__( 'Akismet detailed stats' ); ?>"></iframe>
|
||||
</div>
|
||||
3
wp-content/plugins/akismet/views/title.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="centered akismet-box-header">
|
||||
<h2><?php esc_html_e( 'Eliminate spam from your site', 'akismet' ); ?></h2>
|
||||
</div>
|
||||
214
wp-content/plugins/akismet/wrapper.php
Normal file
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
|
||||
global $wpcom_api_key, $akismet_api_host, $akismet_api_port;
|
||||
|
||||
$wpcom_api_key = defined( 'WPCOM_API_KEY' ) ? constant( 'WPCOM_API_KEY' ) : '';
|
||||
$akismet_api_host = Akismet::get_api_key() . '.rest.akismet.com';
|
||||
$akismet_api_port = 80;
|
||||
|
||||
function akismet_test_mode() {
|
||||
return Akismet::is_test_mode();
|
||||
}
|
||||
|
||||
function akismet_http_post( $request, $host, $path, $port = 80, $ip = null ) {
|
||||
$path = str_replace( '/1.1/', '', $path );
|
||||
|
||||
return Akismet::http_post( $request, $path, $ip );
|
||||
}
|
||||
|
||||
function akismet_microtime() {
|
||||
return Akismet::_get_microtime();
|
||||
}
|
||||
|
||||
function akismet_delete_old() {
|
||||
return Akismet::delete_old_comments();
|
||||
}
|
||||
|
||||
function akismet_delete_old_metadata() {
|
||||
return Akismet::delete_old_comments_meta();
|
||||
}
|
||||
|
||||
function akismet_check_db_comment( $id, $recheck_reason = 'recheck_queue' ) {
|
||||
return Akismet::check_db_comment( $id, $recheck_reason );
|
||||
}
|
||||
|
||||
function akismet_rightnow() {
|
||||
if ( !class_exists( 'Akismet_Admin' ) )
|
||||
return false;
|
||||
|
||||
return Akismet_Admin::rightnow_stats();
|
||||
}
|
||||
|
||||
function akismet_admin_init() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_version_warning() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_load_js_and_css() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_nonce_field( $action = -1 ) {
|
||||
return wp_nonce_field( $action );
|
||||
}
|
||||
function akismet_plugin_action_links( $links, $file ) {
|
||||
return Akismet_Admin::plugin_action_links( $links, $file );
|
||||
}
|
||||
function akismet_conf() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_stats_display() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_stats() {
|
||||
return Akismet_Admin::dashboard_stats();
|
||||
}
|
||||
function akismet_admin_warnings() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_comment_row_action( $a, $comment ) {
|
||||
return Akismet_Admin::comment_row_actions( $a, $comment );
|
||||
}
|
||||
function akismet_comment_status_meta_box( $comment ) {
|
||||
return Akismet_Admin::comment_status_meta_box( $comment );
|
||||
}
|
||||
function akismet_comments_columns( $columns ) {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
|
||||
return $columns;
|
||||
}
|
||||
function akismet_comment_column_row( $column, $comment_id ) {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_text_add_link_callback( $m ) {
|
||||
return Akismet_Admin::text_add_link_callback( $m );
|
||||
}
|
||||
function akismet_text_add_link_class( $comment_text ) {
|
||||
return Akismet_Admin::text_add_link_class( $comment_text );
|
||||
}
|
||||
function akismet_check_for_spam_button( $comment_status ) {
|
||||
return Akismet_Admin::check_for_spam_button( $comment_status );
|
||||
}
|
||||
function akismet_submit_nonspam_comment( $comment_id ) {
|
||||
return Akismet::submit_nonspam_comment( $comment_id );
|
||||
}
|
||||
function akismet_submit_spam_comment( $comment_id ) {
|
||||
return Akismet::submit_spam_comment( $comment_id );
|
||||
}
|
||||
function akismet_transition_comment_status( $new_status, $old_status, $comment ) {
|
||||
return Akismet::transition_comment_status( $new_status, $old_status, $comment );
|
||||
}
|
||||
function akismet_spam_count( $type = false ) {
|
||||
return Akismet_Admin::get_spam_count( $type );
|
||||
}
|
||||
function akismet_recheck_queue() {
|
||||
return Akismet_Admin::recheck_queue();
|
||||
}
|
||||
function akismet_remove_comment_author_url() {
|
||||
return Akismet_Admin::remove_comment_author_url();
|
||||
}
|
||||
function akismet_add_comment_author_url() {
|
||||
return Akismet_Admin::add_comment_author_url();
|
||||
}
|
||||
function akismet_check_server_connectivity() {
|
||||
return Akismet_Admin::check_server_connectivity();
|
||||
}
|
||||
function akismet_get_server_connectivity( $cache_timeout = 86400 ) {
|
||||
return Akismet_Admin::get_server_connectivity( $cache_timeout );
|
||||
}
|
||||
function akismet_server_connectivity_ok() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
|
||||
return true;
|
||||
}
|
||||
function akismet_admin_menu() {
|
||||
return Akismet_Admin::admin_menu();
|
||||
}
|
||||
function akismet_load_menu() {
|
||||
return Akismet_Admin::load_menu();
|
||||
}
|
||||
function akismet_init() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_get_key() {
|
||||
return Akismet::get_api_key();
|
||||
}
|
||||
function akismet_check_key_status( $key, $ip = null ) {
|
||||
return Akismet::check_key_status( $key, $ip );
|
||||
}
|
||||
function akismet_update_alert( $response ) {
|
||||
return Akismet::update_alert( $response );
|
||||
}
|
||||
function akismet_verify_key( $key, $ip = null ) {
|
||||
return Akismet::verify_key( $key, $ip );
|
||||
}
|
||||
function akismet_get_user_roles( $user_id ) {
|
||||
return Akismet::get_user_roles( $user_id );
|
||||
}
|
||||
function akismet_result_spam( $approved ) {
|
||||
return Akismet::comment_is_spam( $approved );
|
||||
}
|
||||
function akismet_result_hold( $approved ) {
|
||||
return Akismet::comment_needs_moderation( $approved );
|
||||
}
|
||||
function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {
|
||||
return Akismet::get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url );
|
||||
}
|
||||
function akismet_update_comment_history( $comment_id, $message, $event = null ) {
|
||||
return Akismet::update_comment_history( $comment_id, $message, $event );
|
||||
}
|
||||
function akismet_get_comment_history( $comment_id ) {
|
||||
return Akismet::get_comment_history( $comment_id );
|
||||
}
|
||||
function akismet_cmp_time( $a, $b ) {
|
||||
return Akismet::_cmp_time( $a, $b );
|
||||
}
|
||||
function akismet_auto_check_update_meta( $id, $comment ) {
|
||||
return Akismet::auto_check_update_meta( $id, $comment );
|
||||
}
|
||||
function akismet_auto_check_comment( $commentdata ) {
|
||||
return Akismet::auto_check_comment( $commentdata );
|
||||
}
|
||||
function akismet_get_ip_address() {
|
||||
return Akismet::get_ip_address();
|
||||
}
|
||||
function akismet_cron_recheck() {
|
||||
return Akismet::cron_recheck();
|
||||
}
|
||||
function akismet_add_comment_nonce( $post_id ) {
|
||||
return Akismet::add_comment_nonce( $post_id );
|
||||
}
|
||||
function akismet_fix_scheduled_recheck() {
|
||||
return Akismet::fix_scheduled_recheck();
|
||||
}
|
||||
function akismet_spam_comments() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
|
||||
return array();
|
||||
}
|
||||
function akismet_spam_totals() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
|
||||
return array();
|
||||
}
|
||||
function akismet_manage_page() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_caught() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function redirect_old_akismet_urls() {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
}
|
||||
function akismet_kill_proxy_check( $option ) {
|
||||
_deprecated_function( __FUNCTION__, '3.0' );
|
||||
|
||||
return 0;
|
||||
}
|
||||
function akismet_pingback_forwarded_for( $r, $url ) {
|
||||
// This functionality is now in core.
|
||||
return false;
|
||||
}
|
||||
function akismet_pre_check_pingback( $method ) {
|
||||
return Akismet::pre_check_pingback( $method );
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Contact Form 7 Add Password field
|
||||
Plugin URI: https://wordpress.org/plugins/cf7-add-password-field/
|
||||
Description: The plugin is to add a password filed to Contact form 7 plugin.
|
||||
Version: 4.1
|
||||
Author: Kimiya Kitani
|
||||
Author URI: https://profiles.wordpress.org/kimipooh/
|
||||
Text Domain: cf7-add-password-field
|
||||
Domain Path: /languages
|
||||
*/
|
||||
|
||||
require_once( dirname( __FILE__ ) . '/modules/password.php');
|
||||
|
||||
// Check whether the functions in modules/password.php exists or not.
|
||||
if (!function_exists('wpcf7_add_form_tag_k_password') ||
|
||||
!function_exists('wpcf7_k_password_validation_filter')){
|
||||
return;
|
||||
}
|
||||
|
||||
// Set a password field (password, password*) to Contact form 7 handler.
|
||||
add_action( 'wpcf7_init', 'wpcf7_add_form_tag_k_password' );
|
||||
|
||||
// Validate a password field (required or optional).
|
||||
add_filter( 'wpcf7_validate_password', 'wpcf7_k_password_validation_filter', 10, 2 );
|
||||
add_filter( 'wpcf7_validate_password*', 'wpcf7_k_password_validation_filter', 10, 2 );
|
||||
|
||||
function regist_cf7_add_password_field_styles() {
|
||||
$plugin_url = plugin_dir_url( __FILE__ );
|
||||
wp_enqueue_style('cf7_add_password_field_style', $plugin_url . 'css/all.css' );
|
||||
}
|
||||
function regist_cf7_add_password_field_scripts() {
|
||||
$plugin_url = plugin_dir_url( __FILE__ );
|
||||
wp_enqueue_script('cf7_add_password_field_scripts', $plugin_url . 'js/eye.js' );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'regist_cf7_add_password_field_styles' );
|
||||
add_action( 'wp_enqueue_scripts', 'regist_cf7_add_password_field_scripts' );
|
||||
7970
wp-content/plugins/cf7-add-password-field/css/all.css
Normal file
11
wp-content/plugins/cf7-add-password-field/js/eye.js
Normal file
@@ -0,0 +1,11 @@
|
||||
function pushHideButton(id) {
|
||||
var txtPass = document.getElementById(id);
|
||||
var btnEye = document.getElementById("buttonEye-"+id);
|
||||
if (txtPass.type === "text") {
|
||||
txtPass.type = "password";
|
||||
btnEye.className = "fa fa-eye-slash";
|
||||
} else {
|
||||
txtPass.type = "text";
|
||||
btnEye.className = "fa fa-eye";
|
||||
}
|
||||
}
|
||||
320
wp-content/plugins/cf7-add-password-field/modules/password.php
Normal file
@@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/**
|
||||
** A base module for the following types of tags:
|
||||
** [password] and [password*] # Single-line password
|
||||
**/
|
||||
|
||||
// Activate Language Files for WordPress 3.7 or lator
|
||||
load_plugin_textdomain('cf7-add-password-field');
|
||||
|
||||
function wpcf7_add_form_tag_k_password() {
|
||||
$features = array( 'name-attr' => true);
|
||||
$features = apply_filters( 'cf7-add-password-field-features',$features );
|
||||
wpcf7_add_form_tag( array('password','password*'),
|
||||
'wpcf7_k_password_form_tag_handler',$features );
|
||||
}
|
||||
|
||||
function wpcf7_k_password_form_tag_handler( $tag ) {
|
||||
if ( empty( $tag->name ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$validation_error = wpcf7_get_validation_error( $tag->name );
|
||||
|
||||
$class = wpcf7_form_controls_class( $tag->type, 'wpcf7-text' );
|
||||
|
||||
$class .= ' wpcf7-validates-as-password';
|
||||
|
||||
if ( $validation_error ) {
|
||||
$class .= ' wpcf7-not-valid';
|
||||
}
|
||||
|
||||
$atts = array();
|
||||
|
||||
$atts['size'] = $tag->get_size_option( '40' );
|
||||
$atts['maxlength'] = $tag->get_maxlength_option();
|
||||
$atts['minlength'] = $tag->get_minlength_option();
|
||||
|
||||
if ( $atts['maxlength'] && $atts['minlength']
|
||||
&& $atts['maxlength'] < $atts['minlength'] ) {
|
||||
unset( $atts['maxlength'], $atts['minlength'] );
|
||||
}
|
||||
|
||||
$atts['class'] = $tag->get_class_option( $class );
|
||||
$atts['id'] = $tag->get_id_option();
|
||||
$atts['tabindex'] = $tag->get_option( 'tabindex', 'signed_int', true );
|
||||
|
||||
$atts['autocomplete'] = $tag->get_option( 'autocomplete',
|
||||
'[-0-9a-zA-Z]+', true );
|
||||
|
||||
$atts['password_strength'] = (int)$tag->get_option( 'password_strength', 'signed_int', true);
|
||||
$atts['password_check'] = $tag->get_option( 'password_check', '', true);
|
||||
$atts['specific_password_check'] = $tag->get_option( 'specific_password_check', '', true);
|
||||
$atts['hideIcon'] = $tag->has_option( 'hideIcon' );
|
||||
|
||||
if ( $tag->is_required() ) {
|
||||
$atts['aria-required'] = 'true';
|
||||
}
|
||||
|
||||
if ( $validation_error ) {
|
||||
$atts['aria-invalid'] = 'true';
|
||||
$atts['aria-describedby'] = wpcf7_get_validation_error_reference(
|
||||
$tag->name
|
||||
);
|
||||
} else {
|
||||
$atts['aria-invalid'] = 'false';
|
||||
}
|
||||
|
||||
$value = (string) reset( $tag->values );
|
||||
|
||||
// Support placeholder. Reference: modules/date.php in the contact form 7 plugin.
|
||||
if ( $tag->has_option( 'placeholder' )
|
||||
or $tag->has_option( 'watermark' ) ) {
|
||||
$atts['placeholder'] = $value;
|
||||
$value = '';
|
||||
}
|
||||
|
||||
$value = $tag->get_default_option( $value );
|
||||
|
||||
$value = wpcf7_get_hangover( $tag->name, $value );
|
||||
|
||||
$atts['value'] = $value;
|
||||
|
||||
if ( wpcf7_support_html5() ) {
|
||||
$atts['type'] = $tag->basetype;
|
||||
} else {
|
||||
$atts['type'] = 'password';
|
||||
}
|
||||
$atts['name'] = $tag->name;
|
||||
|
||||
$atts = wpcf7_format_atts( $atts );
|
||||
|
||||
$tag_id = $tag->get_id_option();
|
||||
if( empty($tag_id) ) $tag_id = $tag->name; // for the version 5.8 of Contact form 7: Contact form 7 ignores the id attribute if the same ID is already used for another element.
|
||||
|
||||
if( $tag_id === $tag->name && !$tag->has_option( 'hideIcon' ) ){
|
||||
$html = sprintf(
|
||||
'<span class="wpcf7-form-control-wrap" data-name="%1$s"><input %2$s />%3$s<span style="position: relative; margin-left: -30px;" id="buttonEye-'. $tag_id .'" class="fa fa-eye-slash" onclick="pushHideButton(\''. $tag_id .'\')"></span></span>',
|
||||
sanitize_html_class( $tag->name ), $atts, $validation_error );
|
||||
}else{
|
||||
$html = sprintf(
|
||||
'<span class="wpcf7-form-control-wrap" data-name="%1$s"><input %2$s />%3$s</span>',
|
||||
sanitize_html_class( $tag->name ), $atts, $validation_error );
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
function wpcf7_k_password_validation_filter( $result, $tag ) {
|
||||
$name = $tag->name;
|
||||
|
||||
$value = isset( $_POST[$name] )
|
||||
? trim( wp_unslash( strtr( (string) $_POST[$name], "\n", " " ) ) )
|
||||
: '';
|
||||
|
||||
$specific_password_check = $tag->get_option( 'specific_password_check', '', true);
|
||||
if(!empty($specific_password_check)){
|
||||
$value_pass_array = explode("_", str_replace(" ", "", $specific_password_check));
|
||||
$flag = false;
|
||||
foreach($value_pass_array as $each_value_pass){
|
||||
if($value === $each_value_pass ){
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( $flag === false){
|
||||
$result->invalidate($tag, __("Passwords do not match defined!", 'cf7-add-password-field' ));
|
||||
}
|
||||
}
|
||||
|
||||
$password_check = $tag->get_option( 'password_check', '', true);
|
||||
if(!empty($password_check)){
|
||||
if(isset( $_POST[$password_check] )){
|
||||
$value_pass = isset( $_POST[$password_check] )
|
||||
? trim( wp_unslash( strtr( (string) $_POST[$password_check], "\n", " " ) ) )
|
||||
: '';
|
||||
if($value !== $value_pass ){
|
||||
$result->invalidate($tag, __("Passwords do not match!", 'cf7-add-password-field' ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$password_strength = (int)$tag->get_option( 'password_strength','signed_int', true);
|
||||
|
||||
if ($password_strength < 0){
|
||||
$password_strength = 0;
|
||||
}
|
||||
|
||||
$pattern = preg_quote ($tag->get_option( 'pattern' ));
|
||||
|
||||
if ( $tag->is_required() and '' === $value ) {
|
||||
$result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) );
|
||||
}elseif ( '' !== $value ){
|
||||
$maxlength = $tag->get_maxlength_option();
|
||||
$minlength = $tag->get_minlength_option();
|
||||
if ( $maxlength and $minlength and $maxlength < $minlength ) {
|
||||
$maxlength = $minlength = null;
|
||||
}
|
||||
$code_units = wpcf7_count_code_units( $value );
|
||||
if ( false !== $code_units ) {
|
||||
if ( $maxlength and $maxlength < $code_units ) {
|
||||
$result->invalidate( $tag, wpcf7_get_message( 'invalid_too_long' ) );
|
||||
} elseif ( $minlength and $code_units < $minlength ) {
|
||||
$result->invalidate( $tag, wpcf7_get_message( 'invalid_too_short' ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ($password_strength > 0) {
|
||||
if($password_strength === 1){
|
||||
if(!preg_match("/^[0-9]+$/", $value)){
|
||||
$result->invalidate($tag, __("Please use the numbers only", 'cf7-add-password-field' ));
|
||||
}
|
||||
}elseif($password_strength === 2){
|
||||
if(!preg_match("/([0-9].*[a-z,A-Z])|([a-z,A-Z].*[0-9])/", $value) ){
|
||||
$result->invalidate($tag, __("Please include one or more letters and numbers.", 'cf7-add-password-field' ));
|
||||
}
|
||||
}elseif($password_strength === 3){
|
||||
if(!preg_match("/[0-9]/", $value) or
|
||||
!preg_match("/([a-z].*[A-Z])|([A-Z].*[a-z])/", $value)){
|
||||
$result->invalidate($tag, __("Please include one or more upper and lower case letters and numbers.", 'cf7-add-password-field' ));
|
||||
}
|
||||
}elseif($password_strength === 4){
|
||||
if(!preg_match("/[0-9]/", $value) or
|
||||
!preg_match("/([a-z].*[A-Z])|([A-Z].*[a-z])/", $value) or
|
||||
!preg_match("/([!,%,&,@,#,$,^,*,?,_,~])/", $value)){
|
||||
$result->invalidate($tag, __("Please include one or more upper and lower case letters, numbers, and marks.", 'cf7-add-password-field' ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return apply_filters('wpcf7_k_password_validation_filter', $result, $tag);
|
||||
}
|
||||
|
||||
// Add Tag.
|
||||
if ( is_admin() ) {
|
||||
add_action( 'wpcf7_admin_init' , 'wpcf7_k_password_add_tag_generator' , 55 );
|
||||
}
|
||||
|
||||
function wpcf7_k_password_add_tag_generator( $contact_form , $args = '' ){
|
||||
if(!class_exists('WPCF7_TagGenerator')) {
|
||||
return false;
|
||||
}
|
||||
$tag_generator = WPCF7_TagGenerator::get_instance();
|
||||
$tag_generator->add( 'password', __( 'Password', 'cf7-add-password-field' ),
|
||||
'wpcf7_k_password_pane_confirm', array( 'nameless' => 1 ) );
|
||||
}
|
||||
|
||||
function wpcf7_k_password_pane_confirm( $contact_form, $args = '' ) {
|
||||
$args = wp_parse_args( $args, array() );
|
||||
$description = __( "Generate a form-tag for a password button.", 'cf7-add-password-field' );
|
||||
|
||||
?>
|
||||
<div class="control-box">
|
||||
<fieldset>
|
||||
<legend><?php echo esc_html( $description ); ?></legend>
|
||||
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><?php echo esc_html( __( 'Field type', 'contact-form-7' ) ); ?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text"><?php echo esc_html( __( 'Field type', 'contact-form-7' ) ); ?></legend>
|
||||
<label><input type="checkbox" name="required" /> <?php echo esc_html( __( 'Required field', 'contact-form-7' ) ); ?></label>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label
|
||||
for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td><input type="text" name="name" class="oneline"
|
||||
id="<?php echo esc_attr( $args['content'] . '-values' ); ?>"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label
|
||||
for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td><input type="text" name="id" class="idvalue oneline option"
|
||||
id="<?php echo esc_attr( $args['content'] . '-id' ); ?>"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label
|
||||
for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td><input type="text" name="class" class="classvalue oneline option"
|
||||
id="<?php echo esc_attr( $args['content'] . '-class' ); ?>"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Default value', 'contact-form-7' ) ); ?></label></th>
|
||||
<td><input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /><br />
|
||||
<label><input type="checkbox" name="placeholder" class="option" /> <?php echo esc_html( __( 'Use this text as the placeholder of the field', 'contact-form-7' ) ); ?></label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label
|
||||
for="<?php echo esc_attr( $args['content'] . '-minlength' ); ?>"><?php echo esc_html( __( 'Password Length', 'cf7-add-password-field' ) ); ?></label>
|
||||
</th>
|
||||
<td> Min <input type="text" name="minlength" class="classvalue oneline option"
|
||||
id="<?php echo esc_attr( $args['content'] . '-minlength' ); ?>"/><br/>
|
||||
<?php echo esc_html( __( 'Required more than the specified number of characters the input.', 'cf7-add-password-field' ) ); ?><br/>
|
||||
Max <input type="text" name="maxlength" class="classvalue oneline option"
|
||||
id="<?php echo esc_attr( $args['content'] . '-maxlength' ); ?>"/><br/>
|
||||
<?php echo esc_html( __( 'Required less than the specified number of characters the input.', 'cf7-add-password-field' ) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label
|
||||
for="<?php echo esc_attr( $args['content'] . '-password_strength' ); ?>"><?php echo esc_html( __( 'Password Strength', 'cf7-add-password-field' ) ); ?></label>
|
||||
</th>
|
||||
<td><input type="text" name="password_strength" class="classvalue oneline option"
|
||||
id="<?php echo esc_attr( $args['content'] . '-password_strength' ); ?>" /><br/>
|
||||
1 = <?php echo esc_html( __( 'Numbers only', 'cf7-add-password-field' ) ); ?><br/>
|
||||
2 = <?php echo esc_html( __( 'Include letters and numbers', 'cf7-add-password-field' ) ); ?><br/>
|
||||
3 = <?php echo esc_html( __( 'Include upper and lower case letters and numbers', 'cf7-add-password-field' ) ); ?><br/>
|
||||
4 = <?php echo esc_html( __( 'Include upper and lower case letters, numbers, and marks', 'cf7-add-password-field' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label
|
||||
for="<?php echo esc_attr( $args['content'] . '-password_check' ); ?>"><?php echo esc_html( __( 'Password Check', 'cf7-add-password-field' ) ); ?></label>
|
||||
</th>
|
||||
<td><input type="text" name="password_check" class="classvalue oneline option"
|
||||
id="<?php echo esc_attr( $args['content'] . '-password_check' ); ?>" /><br/>
|
||||
<?php echo esc_html( __( 'Enter the value of the “name” on the field if you wish to verify a value of a password field. In case of verifying the password value that you set [password password-100], set [password* password-101 password_check:password-100].', 'cf7-add-password-field' ) ); ?><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label
|
||||
for="<?php echo esc_attr( $args['content'] . '-specific_password_check' ); ?>"><?php echo esc_html( __( 'Specific Password Check', 'cf7-add-password-field' ) ); ?></label>
|
||||
</th>
|
||||
<td><input type="text" name="specific_password_check" class="classvalue oneline option"
|
||||
id="<?php echo esc_attr( $args['content'] . '-specific_password_check' ); ?>". placeholder="password1_password2"/><br/>
|
||||
<?php echo esc_html( __( ' Enter your password separated by underline(Passwords cannot contain underline and marks escaped by preg_quote are not allowed.). Check if it matches the password entered here. If you have set a password strength, the password set here should also follow that rule.', 'cf7-add-password-field' ) ); ?><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php echo esc_html( __( 'Hide Icon', 'contact-form-7' ) ); ?></th>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend class="screen-reader-text"><?php echo esc_html( __( 'Hide Icon', 'contact-form-7' ) ); ?></legend>
|
||||
<label><input type="checkbox" name="hideIcon" class="option" /> <?php echo esc_html( __( 'Hide the icon that shows the password', 'contact-form-7' ) ); ?></label>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="insert-box">
|
||||
<input type="text" name="password" class="tag code" readonly="readonly" onfocus="this.select()"/>
|
||||
|
||||
<div class="submitbox">
|
||||
<input type="button" class="button button-primary insert-tag"
|
||||
value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
120
wp-content/plugins/cf7-add-password-field/readme.txt
Normal file
@@ -0,0 +1,120 @@
|
||||
=== Contact Form 7 Add Password field ===
|
||||
Contributors: Kimiya Kitani
|
||||
Tags: contact form
|
||||
Requires at least: 6.2
|
||||
Requires PHP: 7.4
|
||||
Tested up to: 6.3
|
||||
Stable tag: 4.1
|
||||
|
||||
The plugin is to add a password filed to Contact form 7 plugin.
|
||||
|
||||
== Description ==
|
||||
|
||||
The plugin is to add a password filed to Contact form 7 plugin.
|
||||
ex. [password example] (optional) / [password* example] (required)
|
||||
|
||||
== Installation ==
|
||||
|
||||
It's the simple.
|
||||
Please install this plugin and activate it.
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
= How to use the ability of the password check? =
|
||||
Enter the value of the "name" on the field if you wish to verify a value of a password field.
|
||||
Ex. If you set [password password-100], set [password* password-101 password_check:password-100]. Please pay attention a miss with uppercase and lowercase letters.
|
||||
|
||||
= How the use the ability to display a password? =
|
||||
Set the "id" and the value sets same as "name" value.
|
||||
Ex. If you set [password password-100], change to [password password-100 id:password-100].
|
||||
|
||||
The feature uses the library(Web fonts and CSS) of Font Awesome ( https://fontawesome.com/ ).
|
||||
|
||||
= How the customize the validation check? =
|
||||
Please see the follwoing document.
|
||||
https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/cf7-add-password-field_en
|
||||
|
||||
== Screenshots ==
|
||||
1. Setting of Contact Form 7
|
||||
2. View of Contact Form 7
|
||||
|
||||
== Changelog ==
|
||||
= 4.1 =
|
||||
* Update the css and webfonts powered by fontawesome.com from 5.15.4 to version 6.4.2.
|
||||
* New "hideIcon" option has been added. By setting this, it can hide the icon for displaying passwords.
|
||||
* Tested up WordPress 6.3 with PHP 8.2.
|
||||
|
||||
= 4.0 =
|
||||
* Fxied the issue for the version 5.8 of Contact form 7; Since the version 5.8 of Contact form 7 ignores the id attribute if the same ID is already used for another element.
|
||||
* Changed to require WordPress 6.2+ and PHP 7.4+ according to the specifications required by Contact Form 7 itself.
|
||||
|
||||
= 3.31 =
|
||||
* Fixed some error message.
|
||||
|
||||
= 3.3 =
|
||||
* Added "specific_password_check" option for matching with specific passwords specified in advance.
|
||||
|
||||
= 3.2 =
|
||||
* Fixed the markup changes in form controls, such as error message, since the version 5.6 of Contact Form 7 plugin (https://contactform7.com/2022/05/20/contact-form-7-56-beta/).
|
||||
* Tested up 6.1
|
||||
|
||||
= 3.1 =
|
||||
* Fixed misspelling of id in maxlength on input tag (it was naxlength).
|
||||
|
||||
= 3.0 =
|
||||
* Fixed the password strength check.
|
||||
|
||||
= 2.10 =
|
||||
* Added character count option "minlength" ad "maxlength" implemented in Contact Form 7 plugin.
|
||||
* If both of "password_min" and "minlength" are set, the "minlength" setting takes precedence.
|
||||
|
||||
= 2.92 =
|
||||
* Fixed one of language translation.
|
||||
* Tested up 6.0
|
||||
|
||||
= 2.91 =
|
||||
* The css and webfonts powered by fontawesome.com for the password display icon was involded to the plugin for supporting an offline or CDN.
|
||||
|
||||
= 2.9 =
|
||||
* Added the hook "wpcf7_k_password_validation_filter" for customizing the validation check. Please refer to the FAQ for details.
|
||||
|
||||
= 2.8 =
|
||||
* Added the ability to display a password. Please refer to the FAQ for details.
|
||||
|
||||
= 2.7 =
|
||||
* Fixed some language transtaion.
|
||||
* Added the ability to verify a field value like a password.
|
||||
|
||||
= 2.6 =
|
||||
* Fixed the error message regarding the description on the password generation form.
|
||||
* Tested up 5.7 with PHP 8.0
|
||||
* Tested up 5.8
|
||||
|
||||
= 2.5 =
|
||||
* Added two restrictions; "Number of characters", “Password Strength".
|
||||
* Tested up 5.5.1 with PHP 7.4
|
||||
* Tested up 5.6 with PHP 7.4
|
||||
|
||||
= 2.4 =
|
||||
* Fixed the issue where hook "cf7-add-password-field-features" were not available.
|
||||
* Tested up 5.5 with PHP 7.4
|
||||
|
||||
= 2.3 =
|
||||
* Add the option of placeholder text (https://contactform7.com/en/setting-placeholder-text/).
|
||||
* Tested up 5.3.2 with PHP 7.4
|
||||
|
||||
= 2.2 =
|
||||
* Tested up 5.3.1
|
||||
* Add the hook "cf7-add-password-field-features" for customizing wpcf7_add_form_tag option.
|
||||
|
||||
= 2.1 =
|
||||
* Tested up 5.2.4 with PHP 7.3.
|
||||
* Fixed the arguments of load_plugin_textdomain as WordPress 3.7 or later.
|
||||
|
||||
= 2.0 =
|
||||
* Tested up 5.2.2 with PHP 7.3.
|
||||
* Support "Password" form button.
|
||||
|
||||
= 1.0 =
|
||||
* First release.
|
||||
|
||||
== Upgrade Notice ==
|
||||
3717
wp-content/plugins/cf7-add-password-field/webfonts/fa-brands-400.svg
Normal file
|
After Width: | Height: | Size: 730 KiB |
@@ -0,0 +1,801 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
|
||||
<metadata>
|
||||
Created by FontForge 20201107 at Wed Aug 4 12:25:29 2021
|
||||
By Robert Madole
|
||||
Copyright (c) Font Awesome
|
||||
</metadata>
|
||||
<!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><defs>
|
||||
<font id="FontAwesome5Free-Regular" horiz-adv-x="512" >
|
||||
<font-face
|
||||
font-family="Font Awesome 5 Free Regular"
|
||||
font-weight="400"
|
||||
font-stretch="normal"
|
||||
units-per-em="512"
|
||||
panose-1="2 0 5 3 0 0 0 0 0 0"
|
||||
ascent="448"
|
||||
descent="-64"
|
||||
bbox="-0.0663408 -64.0662 640.004 448.1"
|
||||
underline-thickness="25"
|
||||
underline-position="-50"
|
||||
unicode-range="U+0020-F5C8"
|
||||
/>
|
||||
<missing-glyph />
|
||||
<glyph glyph-name="heart" unicode=""
|
||||
d="M458.4 383.7c75.2998 -63.4004 64.0996 -166.601 10.5996 -221.3l-175.4 -178.7c-10 -10.2002 -23.2998 -15.7998 -37.5996 -15.7998c-14.2002 0 -27.5996 5.69922 -37.5996 15.8994l-175.4 178.7c-53.5996 54.7002 -64.5996 157.9 10.5996 221.2
|
||||
c57.8008 48.7002 147.101 41.2998 202.4 -15c55.2998 56.2998 144.6 63.5996 202.4 15zM434.8 196.2c36.2002 36.8994 43.7998 107.7 -7.2998 150.8c-38.7002 32.5996 -98.7002 27.9004 -136.5 -10.5996l-35 -35.7002l-35 35.7002
|
||||
c-37.5996 38.2998 -97.5996 43.1992 -136.5 10.5c-51.2002 -43.1006 -43.7998 -113.5 -7.2998 -150.7l175.399 -178.7c2.40039 -2.40039 4.40039 -2.40039 6.80078 0z" />
|
||||
<glyph glyph-name="star" unicode="" horiz-adv-x="576"
|
||||
d="M528.1 276.5c26.2002 -3.7998 36.7002 -36.0996 17.7002 -54.5996l-105.7 -103l25 -145.5c4.5 -26.3008 -23.1992 -45.9004 -46.3994 -33.7002l-130.7 68.7002l-130.7 -68.7002c-23.2002 -12.2998 -50.8994 7.39941 -46.3994 33.7002l25 145.5l-105.7 103
|
||||
c-19 18.5 -8.5 50.7998 17.7002 54.5996l146.1 21.2998l65.2998 132.4c11.7998 23.8994 45.7002 23.5996 57.4004 0l65.2998 -132.4zM388.6 135.7l100.601 98l-139 20.2002l-62.2002 126l-62.2002 -126l-139 -20.2002l100.601 -98l-23.7002 -138.4l124.3 65.2998
|
||||
l124.3 -65.2998z" />
|
||||
<glyph glyph-name="user" unicode="" horiz-adv-x="448"
|
||||
d="M313.6 144c74.2002 0 134.4 -60.2002 134.4 -134.4v-25.5996c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v25.5996c0 74.2002 60.2002 134.4 134.4 134.4c28.7998 0 42.5 -16 89.5996 -16s60.9004 16 89.5996 16zM400 -16v25.5996
|
||||
c0 47.6006 -38.7998 86.4004 -86.4004 86.4004c-14.6992 0 -37.8994 -16 -89.5996 -16c-51.2998 0 -75 16 -89.5996 16c-47.6006 0 -86.4004 -38.7998 -86.4004 -86.4004v-25.5996h352zM224 160c-79.5 0 -144 64.5 -144 144s64.5 144 144 144s144 -64.5 144 -144
|
||||
s-64.5 -144 -144 -144zM224 400c-52.9004 0 -96 -43.0996 -96 -96s43.0996 -96 96 -96s96 43.0996 96 96s-43.0996 96 -96 96z" />
|
||||
<glyph glyph-name="clock" unicode=""
|
||||
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM317.8 96.4004l-84.8994 61.6992
|
||||
c-3.10059 2.30078 -4.90039 5.90039 -4.90039 9.7002v164.2c0 6.59961 5.40039 12 12 12h32c6.59961 0 12 -5.40039 12 -12v-141.7l66.7998 -48.5996c5.40039 -3.90039 6.5 -11.4004 2.60059 -16.7998l-18.8008 -25.9004c-3.89941 -5.2998 -11.3994 -6.5 -16.7998 -2.59961z
|
||||
" />
|
||||
<glyph glyph-name="list-alt" unicode=""
|
||||
d="M464 416c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h416zM458 16c3.31152 0 6 2.68848 6 6v340c0 3.31152 -2.68848 6 -6 6h-404c-3.31152 0 -6 -2.68848 -6 -6v-340
|
||||
c0 -3.31152 2.68848 -6 6 -6h404zM416 108v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM416 204v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12
|
||||
v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM416 300v-24c0 -6.62695 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h200c6.62695 0 12 -5.37305 12 -12zM164 288c0 -19.8818 -16.1182 -36 -36 -36
|
||||
s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36zM164 192c0 -19.8818 -16.1182 -36 -36 -36s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36zM164 96c0 -19.8818 -16.1182 -36 -36 -36s-36 16.1182 -36 36s16.1182 36 36 36s36 -16.1182 36 -36z" />
|
||||
<glyph glyph-name="flag" unicode=""
|
||||
d="M336.174 368c35.4668 0 73.0195 12.6914 108.922 28.1797c31.6406 13.6514 66.9043 -9.65723 66.9043 -44.1162v-239.919c0 -16.1953 -8.1543 -31.3057 -21.7129 -40.1631c-26.5762 -17.3643 -70.0693 -39.9814 -128.548 -39.9814c-68.6084 0 -112.781 32 -161.913 32
|
||||
c-56.5674 0 -89.957 -11.2803 -127.826 -28.5566v-83.4434c0 -8.83691 -7.16309 -16 -16 -16h-16c-8.83691 0 -16 7.16309 -16 16v406.438c-14.3428 8.2998 -24 23.7979 -24 41.5615c0 27.5693 23.2422 49.71 51.2012 47.8965
|
||||
c22.9658 -1.49023 41.8662 -19.4717 44.4805 -42.3379c0.213867 -1.83398 0.308594 -3.65918 0.308594 -5.5498c0 -5.30273 -0.860352 -10.4053 -2.4502 -15.1768c22.418 8.68555 49.4199 15.168 80.7207 15.168c68.6084 0 112.781 -32 161.913 -32zM464 112v240
|
||||
c-31.5059 -14.6338 -84.5547 -32 -127.826 -32c-59.9111 0 -101.968 32 -161.913 32c-41.4365 0 -80.4766 -16.5879 -102.261 -32v-232c31.4473 14.5967 84.4648 24 127.826 24c59.9111 0 101.968 -32 161.913 -32c41.4365 0 80.4775 16.5879 102.261 32z" />
|
||||
<glyph glyph-name="bookmark" unicode="" horiz-adv-x="384"
|
||||
d="M336 448c26.5098 0 48 -21.4902 48 -48v-464l-192 112l-192 -112v464c0 26.5098 21.4902 48 48 48h288zM336 19.5703v374.434c0 3.31348 -2.68555 5.99609 -6 5.99609h-276c-3.31152 0 -6 -2.68848 -6 -6v-374.43l144 84z" />
|
||||
<glyph glyph-name="image" unicode=""
|
||||
d="M464 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h416zM458 48c3.31152 0 6 2.68848 6 6v276c0 3.31152 -2.68848 6 -6 6h-404c-3.31152 0 -6 -2.68848 -6 -6v-276
|
||||
c0 -3.31152 2.68848 -6 6 -6h404zM128 296c22.0908 0 40 -17.9092 40 -40s-17.9092 -40 -40 -40s-40 17.9092 -40 40s17.9092 40 40 40zM96 96v48l39.5137 39.5146c4.6875 4.68652 12.2852 4.68652 16.9717 0l39.5146 -39.5146l119.514 119.515
|
||||
c4.6875 4.68652 12.2852 4.68652 16.9717 0l87.5146 -87.5146v-80h-320z" />
|
||||
<glyph glyph-name="edit" unicode="" horiz-adv-x="576"
|
||||
d="M402.3 103.1l32 32c5 5 13.7002 1.5 13.7002 -5.69922v-145.4c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h273.5c7.09961 0 10.7002 -8.59961 5.7002 -13.7002l-32 -32c-1.5 -1.5 -3.5 -2.2998 -5.7002 -2.2998h-241.5v-352h352
|
||||
v113.5c0 2.09961 0.799805 4.09961 2.2998 5.59961zM558.9 304.9l-262.601 -262.601l-90.3994 -10c-26.2002 -2.89941 -48.5 19.2002 -45.6006 45.6006l10 90.3994l262.601 262.601c22.8994 22.8994 59.8994 22.8994 82.6992 0l43.2002 -43.2002
|
||||
c22.9004 -22.9004 22.9004 -60 0.100586 -82.7998zM460.1 274l-58.0996 58.0996l-185.8 -185.899l-7.2998 -65.2998l65.2998 7.2998zM524.9 353.7l-43.2002 43.2002c-4.10059 4.09961 -10.7998 4.09961 -14.7998 0l-30.9004 -30.9004l58.0996 -58.0996l30.9004 30.8994
|
||||
c4 4.2002 4 10.7998 -0.0996094 14.9004z" />
|
||||
<glyph glyph-name="times-circle" unicode=""
|
||||
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM357.8 254.2l-62.2002 -62.2002l62.2002 -62.2002
|
||||
c4.7002 -4.7002 4.7002 -12.2998 0 -17l-22.5996 -22.5996c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-62.2002 62.2002l-62.2002 -62.2002c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-22.5996 22.5996c-4.7002 4.7002 -4.7002 12.2998 0 17l62.2002 62.2002l-62.2002 62.2002
|
||||
c-4.7002 4.7002 -4.7002 12.2998 0 17l22.5996 22.5996c4.7002 4.7002 12.2998 4.7002 17 0l62.2002 -62.2002l62.2002 62.2002c4.7002 4.7002 12.2998 4.7002 17 0l22.5996 -22.5996c4.7002 -4.7002 4.7002 -12.2998 0 -17z" />
|
||||
<glyph glyph-name="check-circle" unicode=""
|
||||
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 392c-110.549 0 -200 -89.4678 -200 -200c0 -110.549 89.4678 -200 200 -200c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200z
|
||||
M396.204 261.733c4.66699 -4.70508 4.63672 -12.3037 -0.0673828 -16.9717l-172.589 -171.204c-4.70508 -4.66797 -12.3027 -4.63672 -16.9697 0.0683594l-90.7812 91.5156c-4.66797 4.70605 -4.63672 12.3047 0.0683594 16.9717l22.7188 22.5361
|
||||
c4.70508 4.66699 12.3027 4.63574 16.9697 -0.0693359l59.792 -60.2773l141.353 140.216c4.70508 4.66797 12.3027 4.6377 16.9697 -0.0673828z" />
|
||||
<glyph glyph-name="question-circle" unicode=""
|
||||
d="M256 440c136.957 0 248 -111.083 248 -248c0 -136.997 -111.043 -248 -248 -248s-248 111.003 -248 248c0 136.917 111.043 248 248 248zM256 -8c110.569 0 200 89.4697 200 200c0 110.529 -89.5088 200 -200 200c-110.528 0 -200 -89.5049 -200 -200
|
||||
c0 -110.569 89.4678 -200 200 -200zM363.244 247.2c0 -67.0518 -72.4209 -68.084 -72.4209 -92.8633v-6.33691c0 -6.62695 -5.37305 -12 -12 -12h-45.6475c-6.62695 0 -12 5.37305 -12 12v8.65918c0 35.7451 27.1006 50.0342 47.5791 61.5156
|
||||
c17.5615 9.84473 28.3242 16.541 28.3242 29.5791c0 17.2461 -21.999 28.6934 -39.7842 28.6934c-23.1885 0 -33.8936 -10.9775 -48.9424 -29.9697c-4.05664 -5.11914 -11.46 -6.07031 -16.666 -2.12402l-27.8232 21.0986
|
||||
c-5.10742 3.87207 -6.25098 11.0654 -2.64453 16.3633c23.627 34.6934 53.7217 54.1846 100.575 54.1846c49.0713 0 101.45 -38.3037 101.45 -88.7998zM298 80c0 -23.1592 -18.8408 -42 -42 -42s-42 18.8408 -42 42s18.8408 42 42 42s42 -18.8408 42 -42z" />
|
||||
<glyph glyph-name="eye" unicode="" horiz-adv-x="576"
|
||||
d="M288 304c0.114258 0 0.240234 -0.0175781 0.354492 -0.0175781c61.6543 0 111.71 -50.0557 111.71 -111.71s-50.0557 -111.71 -111.71 -111.71s-111.71 50.0557 -111.71 111.71c0 10.7422 1.51953 21.1328 4.35547 30.9678
|
||||
c7.95898 -4.52637 17.2129 -7.17188 27 -7.24023c30.9072 0 56 25.0928 56 56c-0.0683594 9.78711 -2.71387 19.041 -7.24023 27c9.88379 3.07617 20.3896 4.83008 31.2402 5zM572.52 206.6c2.21387 -4.37793 3.46094 -9.38965 3.46094 -14.626
|
||||
c0 -5.2373 -1.24707 -10.1855 -3.46094 -14.5635c-54.1992 -105.771 -161.59 -177.41 -284.52 -177.41s-230.29 71.5898 -284.52 177.4c-2.21387 4.37793 -3.46094 9.38965 -3.46094 14.626c0 5.2373 1.24707 10.1855 3.46094 14.5635
|
||||
c54.1992 105.771 161.59 177.41 284.52 177.41s230.29 -71.5898 284.52 -177.4zM288 48c98.6602 0 189.1 55 237.93 144c-48.8398 89 -139.27 144 -237.93 144s-189.09 -55 -237.93 -144c48.8398 -89 139.279 -144 237.93 -144z" />
|
||||
<glyph glyph-name="eye-slash" unicode="" horiz-adv-x="640"
|
||||
d="M634 -23c3.66895 -2.93262 6.00391 -7.45117 6.00391 -12.5088c0 -3.7832 -1.31543 -7.26074 -3.51367 -10.001l-10 -12.4902c-2.93359 -3.66309 -7.44824 -5.99414 -12.502 -5.99414c-3.77637 0 -7.25 1.31152 -9.98828 3.50391l-598 467.49
|
||||
c-3.66895 2.93262 -6.00391 7.45117 -6.00391 12.5088c0 3.7832 1.31543 7.26074 3.51367 10.001l10 12.4902c2.93359 3.66309 7.44824 5.99414 12.502 5.99414c3.77637 0 7.25 -1.31152 9.98828 -3.50391zM296.79 301.53c7.51172 1.60254 15.2266 2.45508 23.21 2.46973
|
||||
c60.4805 0 109.36 -47.9102 111.58 -107.85zM343.21 82.46c-7.51367 -1.59375 -15.2285 -2.44336 -23.21 -2.45996c-60.4697 0 -109.35 47.9102 -111.58 107.84zM320 336c-19.8799 0 -39.2803 -2.7998 -58.2197 -7.09961l-46.4102 36.29
|
||||
c32.9199 11.8096 67.9297 18.8096 104.63 18.8096c122.93 0 230.29 -71.5898 284.57 -177.4c2.21289 -4.37793 3.45996 -9.38965 3.45996 -14.626c0 -5.2373 -1.24707 -10.1855 -3.45996 -14.5635c-14.1924 -27.5625 -31.9229 -52.6689 -52.9004 -75.1104l-37.7402 29.5
|
||||
c17.2305 18.0527 31.9385 38.1318 44 60.2002c-48.8398 89 -139.279 144 -237.93 144zM320 48c19.8896 0 39.2803 2.7998 58.2197 7.08984l46.4102 -36.2803c-32.9199 -11.7598 -67.9297 -18.8096 -104.63 -18.8096c-122.92 0 -230.28 71.5898 -284.51 177.4
|
||||
c-2.21387 4.37793 -3.46094 9.38965 -3.46094 14.626c0 5.2373 1.24707 10.1855 3.46094 14.5635c14.1885 27.5586 31.916 52.6621 52.8896 75.1006l37.7402 -29.5c-17.249 -18.0469 -31.9727 -38.1221 -44.0498 -60.1904c48.8496 -89 139.279 -144 237.93 -144z" />
|
||||
<glyph glyph-name="calendar-alt" unicode="" horiz-adv-x="448"
|
||||
d="M148 160h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12zM256 172c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40
|
||||
c6.59961 0 12 -5.40039 12 -12v-40zM352 172c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM256 76c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40
|
||||
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM160 76c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM352 76c0 -6.59961 -5.40039 -12 -12 -12h-40
|
||||
c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40
|
||||
c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="comment" unicode=""
|
||||
d="M256 416c141.4 0 256 -93.0996 256 -208s-114.6 -208 -256 -208c-32.7998 0 -64 5.2002 -92.9004 14.2998c-29.0996 -20.5996 -77.5996 -46.2998 -139.1 -46.2998c-9.59961 0 -18.2998 5.7002 -22.0996 14.5c-3.80078 8.7998 -2 19 4.59961 26
|
||||
c0.5 0.400391 31.5 33.7998 46.4004 73.2002c-33 35.0996 -52.9004 78.7002 -52.9004 126.3c0 114.9 114.6 208 256 208zM256 48c114.7 0 208 71.7998 208 160s-93.2998 160 -208 160s-208 -71.7998 -208 -160c0 -42.2002 21.7002 -74.0996 39.7998 -93.4004
|
||||
l20.6006 -21.7998l-10.6006 -28.0996c-5.5 -14.5 -12.5996 -28.1006 -19.8994 -40.2002c23.5996 7.59961 43.1992 18.9004 57.5 29l19.5 13.7998l22.6992 -7.2002c25.3008 -8 51.7002 -12.0996 78.4004 -12.0996z" />
|
||||
<glyph glyph-name="folder" unicode=""
|
||||
d="M464 320c26.5098 0 48 -21.4902 48 -48v-224c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h146.74c8.49023 0 16.6299 -3.37012 22.6299 -9.37012l54.6299 -54.6299h192zM464 48v224h-198.62
|
||||
c-8.49023 0 -16.6299 3.37012 -22.6299 9.37012l-54.6299 54.6299h-140.12v-288h416z" />
|
||||
<glyph glyph-name="folder-open" unicode="" horiz-adv-x="576"
|
||||
d="M527.9 224c37.6992 0 60.6992 -41.5 40.6992 -73.4004l-79.8994 -128c-8.7998 -14.0996 -24.2002 -22.5996 -40.7002 -22.5996h-400c-26.5 0 -48 21.5 -48 48v288c0 26.5 21.5 48 48 48h160l64 -64h160c26.5 0 48 -21.5 48 -48v-48h47.9004zM48 330v-233.4l62.9004 104.2
|
||||
c8.69922 14.4004 24.2998 23.2002 41.0996 23.2002h280v42c0 3.2998 -2.7002 6 -6 6h-173.9l-64 64h-134.1c-3.2998 0 -6 -2.7002 -6 -6zM448 48l80 128h-378.8l-77.2002 -128h376z" />
|
||||
<glyph glyph-name="chart-bar" unicode=""
|
||||
d="M396.8 96c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v230.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-230.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM204.8 96
|
||||
c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v198.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-198.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM300.8 96
|
||||
c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v134.4c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-134.4c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004zM496 48c8.83984 0 16 -7.16016 16 -16v-16
|
||||
c0 -8.83984 -7.16016 -16 -16 -16h-464c-17.6699 0 -32 14.3301 -32 32v336c0 8.83984 7.16016 16 16 16h16c8.83984 0 16 -7.16016 16 -16v-320h448zM108.8 96c-6.39941 0 -12.7998 6.40039 -12.7998 12.7998v70.4004c0 6.39941 6.40039 12.7998 12.7998 12.7998h22.4004
|
||||
c6.39941 0 12.7998 -6.40039 12.7998 -12.7998v-70.4004c0 -6.39941 -6.40039 -12.7998 -12.7998 -12.7998h-22.4004z" />
|
||||
<glyph glyph-name="comments" unicode="" horiz-adv-x="576"
|
||||
d="M532 61.7998c15.2998 -30.7002 37.4004 -54.5 37.7998 -54.7998c6.2998 -6.7002 8 -16.5 4.40039 -25c-3.7002 -8.5 -12 -14 -21.2002 -14c-53.5996 0 -96.7002 20.2998 -125.2 38.7998c-19 -4.39941 -39 -6.7998 -59.7998 -6.7998
|
||||
c-86.2002 0 -159.9 40.4004 -191.3 97.7998c-9.7002 1.2002 -19.2002 2.7998 -28.4004 4.90039c-28.5 -18.6006 -71.7002 -38.7998 -125.2 -38.7998c-9.19922 0 -17.5996 5.5 -21.1992 14c-3.7002 8.5 -1.90039 18.2998 4.39941 25
|
||||
c0.400391 0.399414 22.4004 24.1992 37.7002 54.8994c-27.5 27.2002 -44 61.2002 -44 98.2002c0 88.4004 93.0996 160 208 160c86.2998 0 160.3 -40.5 191.8 -98.0996c99.7002 -11.8008 176.2 -77.9004 176.2 -157.9c0 -37.0996 -16.5 -71.0996 -44 -98.2002zM139.2 154.1
|
||||
l19.7998 -4.5c16 -3.69922 32.5 -5.59961 49 -5.59961c86.7002 0 160 51.2998 160 112s-73.2998 112 -160 112s-160 -51.2998 -160 -112c0 -28.7002 16.2002 -50.5996 29.7002 -64l24.7998 -24.5l-15.5 -31.0996c-2.59961 -5.10059 -5.2998 -10.1006 -8 -14.8008
|
||||
c14.5996 5.10059 29 12.3008 43.0996 21.4004zM498.3 96c13.5 13.4004 29.7002 35.2998 29.7002 64c0 49.2002 -48.2998 91.5 -112.7 106c0.299805 -3.2998 0.700195 -6.59961 0.700195 -10c0 -80.9004 -78 -147.5 -179.3 -158.3
|
||||
c29.0996 -29.6006 77.2998 -49.7002 131.3 -49.7002c16.5 0 33 1.90039 49 5.59961l19.9004 4.60059l17.0996 -11.1006c14.0996 -9.09961 28.5 -16.2998 43.0996 -21.3994c-2.69922 4.7002 -5.39941 9.7002 -8 14.7998l-15.5 31.0996z" />
|
||||
<glyph glyph-name="star-half" unicode="" horiz-adv-x="576"
|
||||
d="M288 62.7002v-54.2998l-130.7 -68.6006c-23.3994 -12.2998 -50.8994 7.60059 -46.3994 33.7002l25 145.5l-105.7 103c-19 18.5 -8.5 50.7998 17.7002 54.5996l146.1 21.2002l65.2998 132.4c5.90039 11.8994 17.2998 17.7998 28.7002 17.7998v-68.0996l-62.2002 -126
|
||||
l-139 -20.2002l100.601 -98l-23.7002 -138.4z" />
|
||||
<glyph glyph-name="lemon" unicode=""
|
||||
d="M484.112 420.111c28.1221 -28.123 35.9434 -68.0039 19.0215 -97.0547c-23.0576 -39.584 50.1436 -163.384 -82.3311 -295.86c-132.301 -132.298 -256.435 -59.3594 -295.857 -82.3291c-29.0459 -16.917 -68.9219 -9.11426 -97.0576 19.0205
|
||||
c-28.1221 28.1221 -35.9434 68.0029 -19.0215 97.0547c23.0566 39.5859 -50.1436 163.386 82.3301 295.86c132.308 132.309 256.407 59.3496 295.862 82.332c29.0498 16.9219 68.9307 9.09863 97.0537 -19.0234zM461.707 347.217
|
||||
c13.5166 23.2031 -27.7578 63.7314 -50.4883 50.4912c-66.6025 -38.7939 -165.646 45.5898 -286.081 -74.8457c-120.444 -120.445 -36.0449 -219.472 -74.8447 -286.08c-13.542 -23.2471 27.8145 -63.6953 50.4932 -50.4883
|
||||
c66.6006 38.7949 165.636 -45.5996 286.076 74.8428c120.444 120.445 36.0449 219.472 74.8447 286.08zM291.846 338.481c1.37012 -10.96 -6.40332 -20.957 -17.3643 -22.3271c-54.8467 -6.85547 -135.779 -87.7871 -142.636 -142.636
|
||||
c-1.37305 -10.9883 -11.3984 -18.7334 -22.3262 -17.3643c-10.9609 1.37012 -18.7344 11.3652 -17.3643 22.3262c9.16211 73.2852 104.167 168.215 177.364 177.364c10.9531 1.36816 20.9561 -6.40234 22.3262 -17.3633z" />
|
||||
<glyph glyph-name="credit-card" unicode="" horiz-adv-x="576"
|
||||
d="M527.9 416c26.5996 0 48.0996 -21.5 48.0996 -48v-352c0 -26.5 -21.5 -48 -48.0996 -48h-479.801c-26.5996 0 -48.0996 21.5 -48.0996 48v352c0 26.5 21.5 48 48.0996 48h479.801zM54.0996 368c-3.2998 0 -6 -2.7002 -6 -6v-42h479.801v42c0 3.2998 -2.7002 6 -6 6
|
||||
h-467.801zM521.9 16c3.2998 0 6 2.7002 6 6v170h-479.801v-170c0 -3.2998 2.7002 -6 6 -6h467.801zM192 116v-40c0 -6.59961 -5.40039 -12 -12 -12h-72c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h72c6.59961 0 12 -5.40039 12 -12zM384 116v-40
|
||||
c0 -6.59961 -5.40039 -12 -12 -12h-136c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h136c6.59961 0 12 -5.40039 12 -12z" />
|
||||
<glyph glyph-name="hdd" unicode="" horiz-adv-x="576"
|
||||
d="M567.403 212.358c5.59668 -8.04688 8.59668 -17.6113 8.59668 -27.4121v-136.946c0 -26.5098 -21.4902 -48 -48 -48h-480c-26.5098 0 -48 21.4902 -48 48v136.946c0 10.167 3.19531 19.6465 8.59668 27.4121l105.08 151.053
|
||||
c8.67383 12.4678 23.0791 20.5889 39.4043 20.5889h269.838c16.3252 0 30.7305 -8.12109 39.4043 -20.5889zM153.081 336l-77.9131 -112h425.664l-77.9131 112h-269.838zM528 48v128h-480v-128h480zM496 112c0 -17.6729 -14.3271 -32 -32 -32s-32 14.3271 -32 32
|
||||
s14.3271 32 32 32s32 -14.3271 32 -32zM400 112c0 -17.6729 -14.3271 -32 -32 -32s-32 14.3271 -32 32s14.3271 32 32 32s32 -14.3271 32 -32z" />
|
||||
<glyph glyph-name="hand-point-right" unicode=""
|
||||
d="M428.8 310.4c45.0996 0 83.2002 -38.1016 83.2002 -83.2002c0 -45.6162 -37.7646 -83.2002 -83.2002 -83.2002h-35.6475c-1.71387 -7.70605 -4.43555 -15.2051 -7.92969 -22.0645c2.50586 -22.0059 -3.50293 -44.9775 -15.9844 -62.791
|
||||
c-1.14062 -52.4863 -37.3984 -91.1445 -99.9404 -91.1445h-21.2988c-60.0635 0 -98.5117 40 -127.2 40h-2.67871c-5.74707 -4.95215 -13.5361 -8 -22.1201 -8h-64c-17.6729 0 -32 12.8936 -32 28.7998v230.4c0 15.9062 14.3271 28.7998 32 28.7998h64.001
|
||||
c8.58398 0 16.373 -3.04785 22.1201 -8h2.67871c6.96387 0 14.8623 6.19336 30.1816 23.6689l0.128906 0.148438l0.130859 0.145508c8.85645 9.93652 18.1162 20.8398 25.8506 33.2529c18.7051 30.2471 30.3936 78.7842 75.707 78.7842c56.9277 0 92 -35.2861 92 -83.2002
|
||||
c0 -0.0283203 0 0.0361328 0 0.0078125c0 -7.66602 -0.748047 -15.1582 -2.17578 -22.4072h86.1768zM428.8 192c18.9756 0 35.2002 16.2246 35.2002 35.2002c0 18.7002 -16.7754 35.2002 -35.2002 35.2002h-158.399c0 17.3242 26.3994 35.1992 26.3994 70.3994
|
||||
c0 26.4004 -20.625 35.2002 -44 35.2002c-8.79395 0 -20.4443 -32.7119 -34.9258 -56.0996c-9.07422 -14.5752 -19.5244 -27.2256 -30.7988 -39.875c-16.1094 -18.374 -33.8359 -36.6328 -59.0752 -39.5967v-176.753c42.79 -3.7627 74.5088 -39.6758 120 -39.6758h21.2988
|
||||
c40.5244 0 57.124 22.1973 50.6006 61.3252c14.6113 8.00098 24.1514 33.9785 12.9248 53.625c19.3652 18.2246 17.7871 46.3809 4.9502 61.0498h91.0254zM88 64c0 13.2549 -10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24z" />
|
||||
<glyph glyph-name="hand-point-left" unicode=""
|
||||
d="M0 227.2c0 45.0986 38.1006 83.2002 83.2002 83.2002h86.1758c-1.3623 6.91016 -2.17578 14.374 -2.17578 22.3994c0 47.9141 35.0723 83.2002 92 83.2002c45.3135 0 57.002 -48.5371 75.7061 -78.7852c7.73438 -12.4121 16.9951 -23.3154 25.8506 -33.2529
|
||||
l0.130859 -0.145508l0.128906 -0.148438c15.3213 -17.4746 23.2197 -23.668 30.1836 -23.668h2.67871c5.74707 4.95215 13.5361 8 22.1201 8h64c17.6729 0 32 -12.8936 32 -28.7998v-230.4c0 -15.9062 -14.3271 -28.7998 -32 -28.7998h-64
|
||||
c-8.58398 0 -16.373 3.04785 -22.1201 8h-2.67871c-28.6885 0 -67.1367 -40 -127.2 -40h-21.2988c-62.542 0 -98.8008 38.6582 -99.9404 91.1445c-12.4814 17.8135 -18.4922 40.7852 -15.9844 62.791c-3.49414 6.85938 -6.21582 14.3584 -7.92969 22.0645h-35.6465
|
||||
c-45.4355 0 -83.2002 37.584 -83.2002 83.2002zM48 227.2c0 -18.9756 16.2246 -35.2002 35.2002 -35.2002h91.0244c-12.8369 -14.6689 -14.415 -42.8252 4.9502 -61.0498c-11.2256 -19.6465 -1.68652 -45.624 12.9248 -53.625
|
||||
c-6.52246 -39.1279 10.0771 -61.3252 50.6016 -61.3252h21.2988c45.4912 0 77.21 35.9131 120 39.6768v176.752c-25.2393 2.96289 -42.9658 21.2227 -59.0752 39.5967c-11.2744 12.6494 -21.7246 25.2998 -30.7988 39.875
|
||||
c-14.4814 23.3877 -26.1318 56.0996 -34.9258 56.0996c-23.375 0 -44 -8.7998 -44 -35.2002c0 -35.2002 26.3994 -53.0752 26.3994 -70.3994h-158.399c-18.4248 0 -35.2002 -16.5 -35.2002 -35.2002zM448 88c-13.2549 0 -24 -10.7451 -24 -24s10.7451 -24 24 -24
|
||||
s24 10.7451 24 24s-10.7451 24 -24 24z" />
|
||||
<glyph glyph-name="hand-point-up" unicode="" horiz-adv-x="448"
|
||||
d="M105.6 364.8c0 45.0996 38.1016 83.2002 83.2002 83.2002c45.6162 0 83.2002 -37.7646 83.2002 -83.2002v-35.6465c7.70605 -1.71387 15.2051 -4.43555 22.0645 -7.92969c22.0059 2.50684 44.9775 -3.50293 62.791 -15.9844
|
||||
c52.4863 -1.14062 91.1445 -37.3984 91.1445 -99.9404v-21.2988c0 -60.0635 -40 -98.5117 -40 -127.2v-2.67871c4.95215 -5.74707 8 -13.5361 8 -22.1201v-64c0 -17.6729 -12.8936 -32 -28.7998 -32h-230.4c-15.9062 0 -28.7998 14.3271 -28.7998 32v64
|
||||
c0 8.58398 3.04785 16.373 8 22.1201v2.67871c0 6.96387 -6.19336 14.8623 -23.6689 30.1816l-0.148438 0.128906l-0.145508 0.130859c-9.93652 8.85645 -20.8398 18.1162 -33.2529 25.8506c-30.2471 18.7051 -78.7842 30.3936 -78.7842 75.707
|
||||
c0 56.9277 35.2861 92 83.2002 92c0.0283203 0 -0.0361328 0 -0.0078125 0c7.66602 0 15.1582 -0.748047 22.4072 -2.17578v86.1768zM224 364.8c0 18.9756 -16.2246 35.2002 -35.2002 35.2002c-18.7002 0 -35.2002 -16.7754 -35.2002 -35.2002v-158.399
|
||||
c-17.3242 0 -35.1992 26.3994 -70.3994 26.3994c-26.4004 0 -35.2002 -20.625 -35.2002 -44c0 -8.79395 32.7119 -20.4443 56.0996 -34.9258c14.5752 -9.07422 27.2256 -19.5244 39.875 -30.7988c18.374 -16.1094 36.6328 -33.8359 39.5967 -59.0752h176.753
|
||||
c3.7627 42.79 39.6758 74.5088 39.6758 120v21.2988c0 40.5244 -22.1973 57.124 -61.3252 50.6006c-8.00098 14.6113 -33.9785 24.1514 -53.625 12.9248c-18.2246 19.3652 -46.3809 17.7871 -61.0498 4.9502v91.0254zM352 24c-13.2549 0 -24 -10.7451 -24 -24
|
||||
s10.7451 -24 24 -24s24 10.7451 24 24s-10.7451 24 -24 24z" />
|
||||
<glyph glyph-name="hand-point-down" unicode="" horiz-adv-x="448"
|
||||
d="M188.8 -64c-45.0986 0 -83.2002 38.1006 -83.2002 83.2002v86.1758c-6.91016 -1.3623 -14.374 -2.17578 -22.3994 -2.17578c-47.9141 0 -83.2002 35.0723 -83.2002 92c0 45.3135 48.5371 57.002 78.7852 75.707c12.4121 7.73438 23.3154 16.9951 33.2529 25.8506
|
||||
l0.145508 0.130859l0.148438 0.128906c17.4746 15.3213 23.668 23.2197 23.668 30.1836v2.67871c-4.95215 5.74707 -8 13.5361 -8 22.1201v64c0 17.6729 12.8936 32 28.7998 32h230.4c15.9062 0 28.7998 -14.3271 28.7998 -32v-64.001
|
||||
c0 -8.58398 -3.04785 -16.373 -8 -22.1201v-2.67871c0 -28.6885 40 -67.1367 40 -127.2v-21.2988c0 -62.542 -38.6582 -98.8008 -91.1445 -99.9404c-17.8135 -12.4814 -40.7852 -18.4922 -62.791 -15.9844c-6.85938 -3.49414 -14.3584 -6.21582 -22.0645 -7.92969v-35.6465
|
||||
c0 -45.4355 -37.584 -83.2002 -83.2002 -83.2002zM188.8 -16c18.9756 0 35.2002 16.2246 35.2002 35.2002v91.0244c14.6689 -12.8369 42.8252 -14.415 61.0498 4.9502c19.6465 -11.2256 45.624 -1.68652 53.625 12.9248c39.1279 -6.52246 61.3252 10.0771 61.3252 50.6016
|
||||
v21.2988c0 45.4912 -35.9131 77.21 -39.6768 120h-176.752c-2.96289 -25.2393 -21.2227 -42.9658 -39.5967 -59.0752c-12.6494 -11.2744 -25.2998 -21.7246 -39.875 -30.7988c-23.3877 -14.4814 -56.0996 -26.1318 -56.0996 -34.9258c0 -23.375 8.7998 -44 35.2002 -44
|
||||
c35.2002 0 53.0752 26.3994 70.3994 26.3994v-158.399c0 -18.4248 16.5 -35.2002 35.2002 -35.2002zM328 384c0 -13.2549 10.7451 -24 24 -24s24 10.7451 24 24s-10.7451 24 -24 24s-24 -10.7451 -24 -24z" />
|
||||
<glyph glyph-name="copy" unicode="" horiz-adv-x="448"
|
||||
d="M433.941 382.059c8.68848 -8.68848 14.0586 -20.6943 14.0586 -33.9404v-268.118c0 -26.5098 -21.4902 -48 -48 -48h-80v-48c0 -26.5098 -21.4902 -48 -48 -48h-224c-26.5098 0 -48 21.4902 -48 48v320c0 26.5098 21.4902 48 48 48h80v48c0 26.5098 21.4902 48 48 48
|
||||
h172.118c13.2461 0 25.252 -5.37012 33.9404 -14.0586zM266 -16c3.31152 0 6 2.68848 6 6v42h-96c-26.5098 0 -48 21.4902 -48 48v224h-74c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h212zM394 80c3.31152 0 6 2.68848 6 6v202h-88
|
||||
c-13.2549 0 -24 10.7451 -24 24v88h-106c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h212zM400 336v9.63184c0 1.65527 -0.670898 3.15723 -1.75684 4.24316l-48.3682 48.3682c-1.12598 1.125 -2.65234 1.75684 -4.24316 1.75684h-9.63184v-64h64z" />
|
||||
<glyph glyph-name="save" unicode="" horiz-adv-x="448"
|
||||
d="M433.941 318.059c8.68848 -8.68848 14.0586 -20.6943 14.0586 -33.9404v-268.118c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h268.118c13.2461 0 25.252 -5.37012 33.9404 -14.0586zM272 368h-128v-80h128v80z
|
||||
M394 16c3.31152 0 6 2.68848 6 6v259.632c0 1.65527 -0.670898 3.15723 -1.75684 4.24316l-78.2432 78.2432v-100.118c0 -13.2549 -10.7451 -24 -24 -24h-176c-13.2549 0 -24 10.7451 -24 24v104h-42c-3.31152 0 -6 -2.68848 -6 -6v-340c0 -3.31152 2.68848 -6 6 -6h340z
|
||||
M224 216c48.5234 0 88 -39.4766 88 -88s-39.4766 -88 -88 -88s-88 39.4766 -88 88s39.4766 88 88 88zM224 88c22.0557 0 40 17.9443 40 40s-17.9443 40 -40 40s-40 -17.9443 -40 -40s17.9443 -40 40 -40z" />
|
||||
<glyph glyph-name="square" unicode="" horiz-adv-x="448"
|
||||
d="M400 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352zM394 16c3.2998 0 6 2.7002 6 6v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340z" />
|
||||
<glyph glyph-name="envelope" unicode=""
|
||||
d="M464 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h416zM464 336h-416v-40.8047c22.4248 -18.2627 58.1797 -46.6602 134.587 -106.49
|
||||
c16.834 -13.2422 50.2051 -45.0762 73.4131 -44.7012c23.2119 -0.371094 56.5723 31.4541 73.4131 44.7012c76.4189 59.8389 112.165 88.2305 134.587 106.49v40.8047zM48 48h416v185.601c-22.915 -18.252 -55.4189 -43.8691 -104.947 -82.6523
|
||||
c-22.5439 -17.748 -60.3359 -55.1787 -103.053 -54.9473c-42.9277 -0.231445 -81.2051 37.75 -103.062 54.9551c-49.5293 38.7842 -82.0244 64.3945 -104.938 82.6455v-185.602z" />
|
||||
<glyph glyph-name="lightbulb" unicode="" horiz-adv-x="352"
|
||||
d="M176 368c8.83984 0 16 -7.16016 16 -16s-7.16016 -16 -16 -16c-35.2803 0 -64 -28.7002 -64 -64c0 -8.83984 -7.16016 -16 -16 -16s-16 7.16016 -16 16c0 52.9404 43.0596 96 96 96zM96.0596 -11.1699l-0.0400391 43.1797h159.961l-0.0507812 -43.1797
|
||||
c-0.00976562 -3.13965 -0.939453 -6.21973 -2.67969 -8.83984l-24.5098 -36.8398c-2.95996 -4.45996 -7.95996 -7.14062 -13.3203 -7.14062h-78.8496c-5.35059 0 -10.3506 2.68066 -13.3203 7.14062l-24.5098 36.8398c-1.75 2.62012 -2.68066 5.68945 -2.68066 8.83984z
|
||||
M176 448c97.2002 0 176 -78.7998 176 -176c0 -44.3701 -16.4502 -84.8496 -43.5498 -115.79c-16.6406 -18.9795 -42.7402 -58.79 -52.4199 -92.1602v-0.0498047h-48v0.0996094c0.00488281 4.98145 0.790039 9.78809 2.21973 14.3008
|
||||
c5.67969 17.9893 22.9902 64.8496 62.0996 109.46c20.4102 23.29 31.6504 53.1699 31.6504 84.1396c0 70.5801 -57.4199 128 -128 128c-68.2803 0 -128.15 -54.3604 -127.95 -128c0.0898438 -30.9902 11.0703 -60.71 31.6104 -84.1396
|
||||
c39.3496 -44.9004 56.5801 -91.8604 62.1699 -109.67c1.42969 -4.56055 2.13965 -9.30078 2.15039 -14.0703v-0.120117h-48v0.0595703c-9.68066 33.3604 -35.7803 73.1709 -52.4209 92.1602c-27.1094 30.9307 -43.5596 71.4102 -43.5596 115.78
|
||||
c0 93.0303 73.7197 176 176 176z" />
|
||||
<glyph glyph-name="bell" unicode="" horiz-adv-x="448"
|
||||
d="M439.39 85.71c6 -6.44043 8.66016 -14.1602 8.61035 -21.71c-0.0996094 -16.4004 -12.9805 -32 -32.0996 -32h-383.801c-19.1191 0 -31.9893 15.5996 -32.0996 32c-0.0498047 7.5498 2.61035 15.2598 8.61035 21.71c19.3193 20.7598 55.4697 51.9902 55.4697 154.29
|
||||
c0 77.7002 54.4795 139.9 127.939 155.16v20.8398c0 17.6699 14.3203 32 31.9805 32s31.9805 -14.3301 31.9805 -32v-20.8398c73.46 -15.2598 127.939 -77.46 127.939 -155.16c0 -102.3 36.1504 -133.53 55.4697 -154.29zM67.5303 80h312.939
|
||||
c-21.2197 27.96 -44.4199 74.3203 -44.5293 159.42c0 0.200195 0.0595703 0.379883 0.0595703 0.580078c0 61.8604 -50.1396 112 -112 112s-112 -50.1396 -112 -112c0 -0.200195 0.0595703 -0.379883 0.0595703 -0.580078
|
||||
c-0.109375 -85.0898 -23.3096 -131.45 -44.5293 -159.42zM224 -64c-35.3203 0 -63.9697 28.6504 -63.9697 64h127.939c0 -35.3496 -28.6494 -64 -63.9697 -64z" />
|
||||
<glyph glyph-name="hospital" unicode="" horiz-adv-x="448"
|
||||
d="M128 204v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40c0 -6.62695 -5.37305 -12 -12 -12h-40c-6.62695 0 -12 5.37305 -12 12zM268 192c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40
|
||||
c0 -6.62695 -5.37305 -12 -12 -12h-40zM192 108c0 -6.62695 -5.37305 -12 -12 -12h-40c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-40zM268 96c-6.62695 0 -12 5.37305 -12 12v40c0 6.62695 5.37305 12 12 12h40
|
||||
c6.62695 0 12 -5.37305 12 -12v-40c0 -6.62695 -5.37305 -12 -12 -12h-40zM448 -28v-36h-448v36c0 6.62695 5.37305 12 12 12h19.5v378.965c0 11.6172 10.7451 21.0352 24 21.0352h88.5v40c0 13.2549 10.7451 24 24 24h112c13.2549 0 24 -10.7451 24 -24v-40h88.5
|
||||
c13.2549 0 24 -9.41797 24 -21.0352v-378.965h19.5c6.62695 0 12 -5.37305 12 -12zM79.5 -15h112.5v67c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-67h112.5v351h-64.5v-24c0 -13.2549 -10.7451 -24 -24 -24h-112c-13.2549 0 -24 10.7451 -24 24v24
|
||||
h-64.5v-351zM266 384h-26v26c0 3.31152 -2.68848 6 -6 6h-20c-3.31152 0 -6 -2.68848 -6 -6v-26h-26c-3.31152 0 -6 -2.68848 -6 -6v-20c0 -3.31152 2.68848 -6 6 -6h26v-26c0 -3.31152 2.68848 -6 6 -6h20c3.31152 0 6 2.68848 6 6v26h26c3.31152 0 6 2.68848 6 6v20
|
||||
c0 3.31152 -2.68848 6 -6 6z" />
|
||||
<glyph glyph-name="plus-square" unicode="" horiz-adv-x="448"
|
||||
d="M352 208v-32c0 -6.59961 -5.40039 -12 -12 -12h-88v-88c0 -6.59961 -5.40039 -12 -12 -12h-32c-6.59961 0 -12 5.40039 -12 12v88h-88c-6.59961 0 -12 5.40039 -12 12v32c0 6.59961 5.40039 12 12 12h88v88c0 6.59961 5.40039 12 12 12h32c6.59961 0 12 -5.40039 12 -12
|
||||
v-88h88c6.59961 0 12 -5.40039 12 -12zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340
|
||||
c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="circle" unicode=""
|
||||
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200z" />
|
||||
<glyph glyph-name="smile" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
|
||||
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM332 135.4c8.5 10.1992 23.7002 11.5 33.7998 3.09961c10.2002 -8.5 11.6006 -23.5996 3.10059 -33.7998
|
||||
c-30 -36 -74.1006 -56.6006 -120.9 -56.6006s-90.9004 20.6006 -120.9 56.6006c-8.39941 10.2002 -7.09961 25.2998 3.10059 33.7998c10.0996 8.40039 25.2998 7.09961 33.7998 -3.09961c20.7998 -25.1006 51.5 -39.4004 84 -39.4004s63.2002 14.4004 84 39.4004z" />
|
||||
<glyph glyph-name="frown" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
|
||||
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM248 144c40.2002 0 78 -17.7002 103.8 -48.5996c8.40039 -10.2002 7.10059 -25.3008 -3.09961 -33.8008
|
||||
c-10.7002 -8.7998 -25.7002 -6.59961 -33.7998 3.10059c-16.6006 20 -41 31.3994 -66.9004 31.3994s-50.2998 -11.5 -66.9004 -31.3994c-8.5 -10.2002 -23.5996 -11.5 -33.7998 -3.10059c-10.2002 8.5 -11.5996 23.6006 -3.09961 33.8008
|
||||
c25.7998 30.8994 63.5996 48.5996 103.8 48.5996z" />
|
||||
<glyph glyph-name="meh" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
|
||||
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM336 128c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-176c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h176z
|
||||
" />
|
||||
<glyph glyph-name="keyboard" unicode="" horiz-adv-x="576"
|
||||
d="M528 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-480c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h480zM536 48v288c0 4.41113 -3.58887 8 -8 8h-480c-4.41113 0 -8 -3.58887 -8 -8v-288c0 -4.41113 3.58887 -8 8 -8
|
||||
h480c4.41113 0 8 3.58887 8 8zM170 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM266 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28
|
||||
c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM362 178c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM458 178c0 -6.62695 -5.37305 -12 -12 -12h-28
|
||||
c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM122 96c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM506 96
|
||||
c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM122 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28
|
||||
c6.62695 0 12 -5.37305 12 -12v-28zM218 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM314 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28
|
||||
c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM410 260c0 -6.62695 -5.37305 -12 -12 -12h-28c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM506 260c0 -6.62695 -5.37305 -12 -12 -12h-28
|
||||
c-6.62695 0 -12 5.37305 -12 12v28c0 6.62695 5.37305 12 12 12h28c6.62695 0 12 -5.37305 12 -12v-28zM408 102c0 -6.62695 -5.37305 -12 -12 -12h-216c-6.62695 0 -12 5.37305 -12 12v16c0 6.62695 5.37305 12 12 12h216c6.62695 0 12 -5.37305 12 -12v-16z" />
|
||||
<glyph glyph-name="calendar" unicode="" horiz-adv-x="448"
|
||||
d="M400 384c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12
|
||||
v-52h48zM394 -16c3.2998 0 6 2.7002 6 6v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340z" />
|
||||
<glyph glyph-name="play-circle" unicode=""
|
||||
d="M371.7 210c16.3994 -9.2002 16.3994 -32.9004 0 -42l-176 -101c-15.9004 -8.7998 -35.7002 2.59961 -35.7002 21v208c0 18.5 19.9004 29.7998 35.7002 21zM504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192
|
||||
c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200z" />
|
||||
<glyph glyph-name="minus-square" unicode="" horiz-adv-x="448"
|
||||
d="M108 164c-6.59961 0 -12 5.40039 -12 12v32c0 6.59961 5.40039 12 12 12h232c6.59961 0 12 -5.40039 12 -12v-32c0 -6.59961 -5.40039 -12 -12 -12h-232zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h352
|
||||
c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="check-square" unicode="" horiz-adv-x="448"
|
||||
d="M400 416c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h352zM400 16v352h-352v-352h352zM364.136 257.724l-172.589 -171.204
|
||||
c-4.70508 -4.66699 -12.3027 -4.63672 -16.9697 0.0683594l-90.7812 91.5156c-4.66699 4.70508 -4.63672 12.3037 0.0693359 16.9717l22.7188 22.5361c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0693359l59.792 -60.2773l141.353 140.217
|
||||
c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0683594l22.5361 -22.7178c4.66699 -4.70605 4.63672 -12.3047 -0.0683594 -16.9717z" />
|
||||
<glyph glyph-name="share-square" unicode="" horiz-adv-x="576"
|
||||
d="M561.938 289.94c18.75 -18.7402 18.75 -49.1406 0 -67.8809l-143.998 -144c-29.9727 -29.9727 -81.9404 -9.05273 -81.9404 33.9404v53.7998c-101.266 -7.83691 -99.625 -31.6406 -84.1104 -78.7598c14.2285 -43.0889 -33.4736 -79.248 -71.0195 -55.7402
|
||||
c-51.6924 32.3057 -84.8701 83.0635 -84.8701 144.76c0 39.3408 12.2197 72.7402 36.3301 99.3008c19.8398 21.8398 47.7402 38.4697 82.9102 49.4199c36.7295 11.4395 78.3096 16.1094 120.76 17.9893v57.1982c0 42.9355 51.9258 63.9541 81.9404 33.9404zM384 112l144 144
|
||||
l-144 144v-104.09c-110.86 -0.90332 -240 -10.5166 -240 -119.851c0 -52.1396 32.79 -85.6094 62.3096 -104.06c-39.8174 120.65 48.999 141.918 177.69 143.84v-103.84zM408.74 27.5068c7.4375 2.125 14.5508 5.30566 20.9736 9.30273
|
||||
c7.97656 4.95215 18.2861 -0.825195 18.2861 -10.2139v-42.5957c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h132c6.62695 0 12 -5.37305 12 -12v-4.48633c0 -4.91699 -2.9873 -9.36914 -7.56934 -11.1514
|
||||
c-13.7021 -5.33105 -26.3955 -11.5371 -38.0498 -18.585c-1.82715 -1.11523 -3.98633 -1.76953 -6.28027 -1.77734h-86.1006c-3.31152 0 -6 -2.68848 -6 -6v-340c0 -3.31152 2.68848 -6 6 -6h340c3.31152 0 6 2.68848 6 6v25.9658c0 5.37012 3.5791 10.0596 8.74023 11.541z
|
||||
" />
|
||||
<glyph glyph-name="compass" unicode="" horiz-adv-x="496"
|
||||
d="M347.94 318.14c16.6592 7.61035 33.8096 -9.54004 26.1992 -26.1992l-65.9697 -144.341c-3.19238 -6.9834 -8.78613 -12.5771 -15.7695 -15.7695l-144.341 -65.9697c-16.6592 -7.61035 -33.8096 9.5498 -26.1992 26.1992l65.9697 144.341
|
||||
c3.19238 6.9834 8.78613 12.5771 15.7695 15.7695zM270.58 169.42c12.4697 12.4697 12.4697 32.6904 0 45.1602s-32.6904 12.4697 -45.1602 0s-12.4697 -32.6904 0 -45.1602s32.6904 -12.4697 45.1602 0zM248 440c136.97 0 248 -111.03 248 -248s-111.03 -248 -248 -248
|
||||
s-248 111.03 -248 248s111.03 248 248 248zM248 -8c110.28 0 200 89.7197 200 200s-89.7197 200 -200 200s-200 -89.7197 -200 -200s89.7197 -200 200 -200z" />
|
||||
<glyph glyph-name="caret-square-down" unicode="" horiz-adv-x="448"
|
||||
d="M125.1 240h197.801c10.6992 0 16.0996 -13 8.5 -20.5l-98.9004 -98.2998c-4.7002 -4.7002 -12.2002 -4.7002 -16.9004 0l-98.8994 98.2998c-7.7002 7.5 -2.2998 20.5 8.39941 20.5zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
|
||||
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="caret-square-up" unicode="" horiz-adv-x="448"
|
||||
d="M322.9 144h-197.801c-10.6992 0 -16.0996 13 -8.5 20.5l98.9004 98.2998c4.7002 4.7002 12.2002 4.7002 16.9004 0l98.8994 -98.2998c7.7002 -7.5 2.2998 -20.5 -8.39941 -20.5zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
|
||||
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="caret-square-right" unicode="" horiz-adv-x="448"
|
||||
d="M176 93.0996v197.801c0 10.6992 13 16.0996 20.5 8.5l98.2998 -98.9004c4.7002 -4.7002 4.7002 -12.2002 0 -16.9004l-98.2998 -98.8994c-7.5 -7.7002 -20.5 -2.2998 -20.5 8.39941zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
|
||||
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="file" unicode="" horiz-adv-x="384"
|
||||
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
|
||||
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416z" />
|
||||
<glyph glyph-name="file-alt" unicode="" horiz-adv-x="384"
|
||||
d="M288 200v-28c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12v28c0 6.59961 5.40039 12 12 12h168c6.59961 0 12 -5.40039 12 -12zM276 128c6.59961 0 12 -5.40039 12 -12v-28c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12
|
||||
v28c0 6.59961 5.40039 12 12 12h168zM384 316.1v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996l83.9004 -83.9004c9 -8.90039 14.0996 -21.2002 14.0996 -33.9004z
|
||||
M256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416h288z" />
|
||||
<glyph glyph-name="thumbs-up" unicode=""
|
||||
d="M466.27 161.31c4.6748 -22.6465 0.864258 -44.5371 -8.98926 -62.9893c2.95898 -23.8682 -4.02148 -48.5654 -17.3398 -66.9902c-0.954102 -55.9072 -35.8232 -95.3301 -112.94 -95.3301c-7 0 -15 0.00976562 -22.2197 0.00976562
|
||||
c-102.742 0 -133.293 38.9395 -177.803 39.9404c-3.56934 -13.7764 -16.085 -23.9502 -30.9775 -23.9502h-64c-17.6729 0 -32 14.3271 -32 32v240c0 17.6729 14.3271 32 32 32h98.7598c19.1455 16.9531 46.0137 60.6533 68.7598 83.4004
|
||||
c13.667 13.667 10.1533 108.6 71.7607 108.6c57.5801 0 95.2695 -31.9355 95.2695 -104.73c0 -18.4092 -3.92969 -33.7295 -8.84961 -46.5391h36.4795c48.6025 0 85.8203 -41.5654 85.8203 -85.5801c0 -19.1504 -4.95996 -34.9902 -13.7305 -49.8408zM404.52 107.48
|
||||
c21.5811 20.3838 18.6992 51.0645 5.21094 65.6191c9.44922 0 22.3594 18.9102 22.2695 37.8105c-0.0898438 18.9102 -16.71 37.8203 -37.8203 37.8203h-103.989c0 37.8193 28.3594 55.3691 28.3594 94.5391c0 23.75 0 56.7305 -47.2695 56.7305
|
||||
c-18.9102 -18.9102 -9.45996 -66.1797 -37.8203 -94.54c-26.5596 -26.5703 -66.1797 -97.46 -94.54 -97.46h-10.9199v-186.17c53.6113 0 100.001 -37.8203 171.64 -37.8203h37.8203c35.5117 0 60.8203 17.1201 53.1201 65.9004
|
||||
c15.2002 8.16016 26.5 36.4395 13.9395 57.5703zM88 16c0 13.2549 -10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24z" />
|
||||
<glyph glyph-name="thumbs-down" unicode=""
|
||||
d="M466.27 222.69c8.77051 -14.8506 13.7305 -30.6904 13.7305 -49.8408c0 -44.0146 -37.2178 -85.5801 -85.8203 -85.5801h-36.4795c4.91992 -12.8096 8.84961 -28.1299 8.84961 -46.5391c0 -72.7949 -37.6895 -104.73 -95.2695 -104.73
|
||||
c-61.6074 0 -58.0938 94.9326 -71.7607 108.6c-22.7461 22.7471 -49.6133 66.4473 -68.7598 83.4004h-7.05176c-5.5332 -9.56152 -15.8662 -16 -27.708 -16h-64c-17.6729 0 -32 14.3271 -32 32v240c0 17.6729 14.3271 32 32 32h64c8.11328 0 15.5146 -3.02539 21.1553 -8
|
||||
h10.8447c40.9971 0 73.1953 39.9902 176.78 39.9902c7.21973 0 15.2197 0.00976562 22.2197 0.00976562c77.1172 0 111.986 -39.4229 112.94 -95.3301c13.3184 -18.4248 20.2979 -43.1221 17.3398 -66.9902c9.85352 -18.4521 13.6641 -40.3428 8.98926 -62.9893zM64 152
|
||||
c13.2549 0 24 10.7451 24 24s-10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24zM394.18 135.27c21.1104 0 37.7305 18.9102 37.8203 37.8203c0.0898438 18.9004 -12.8203 37.8105 -22.2695 37.8105c13.4883 14.5547 16.3701 45.2354 -5.21094 65.6191
|
||||
c12.5605 21.1309 1.26074 49.4102 -13.9395 57.5703c7.7002 48.7803 -17.6084 65.9004 -53.1201 65.9004h-37.8203c-71.6387 0 -118.028 -37.8203 -171.64 -37.8203v-186.17h10.9199c28.3604 0 67.9805 -70.8896 94.54 -97.46
|
||||
c28.3604 -28.3604 18.9102 -75.6299 37.8203 -94.54c47.2695 0 47.2695 32.9805 47.2695 56.7305c0 39.1699 -28.3594 56.7197 -28.3594 94.5391h103.989z" />
|
||||
<glyph glyph-name="sun" unicode=""
|
||||
d="M494.2 226.1c11.2002 -7.59961 17.7998 -20.0996 17.8994 -33.6992c0 -13.4004 -6.69922 -26 -17.7998 -33.5l-59.7998 -40.5l13.7002 -71c2.5 -13.2002 -1.60059 -26.8008 -11.1006 -36.3008s-22.8994 -13.7998 -36.2998 -11.0996l-70.8994 13.7002l-40.4004 -59.9004
|
||||
c-7.5 -11.0996 -20.0996 -17.7998 -33.5 -17.7998s-26 6.7002 -33.5 17.9004l-40.4004 59.8994l-70.7998 -13.7002c-13.3994 -2.59961 -26.7998 1.60059 -36.2998 11.1006s-13.7002 23.0996 -11.0996 36.2998l13.6992 71l-59.7998 40.5
|
||||
c-11.0996 7.5 -17.7998 20 -17.7998 33.5s6.59961 26 17.7998 33.5996l59.7998 40.5l-13.6992 71c-2.60059 13.2002 1.59961 26.7002 11.0996 36.3008c9.5 9.59961 23 13.6992 36.2998 11.1992l70.7998 -13.6992l40.4004 59.8994c15.0996 22.2998 51.9004 22.2998 67 0
|
||||
l40.4004 -59.8994l70.8994 13.6992c13 2.60059 26.6006 -1.59961 36.2002 -11.0996c9.5 -9.59961 13.7002 -23.2002 11.0996 -36.4004l-13.6992 -71zM381.3 140.5l76.7998 52.0996l-76.7998 52l17.6006 91.1006l-91 -17.6006l-51.9004 76.9004l-51.7998 -76.7998
|
||||
l-91 17.5996l17.5996 -91.2002l-76.7998 -52l76.7998 -52l-17.5996 -91.1992l90.8994 17.5996l51.9004 -77l51.9004 76.9004l91 -17.6006zM256 296c57.2998 0 104 -46.7002 104 -104s-46.7002 -104 -104 -104s-104 46.7002 -104 104s46.7002 104 104 104zM256 136
|
||||
c30.9004 0 56 25.0996 56 56s-25.0996 56 -56 56s-56 -25.0996 -56 -56s25.0996 -56 56 -56z" />
|
||||
<glyph glyph-name="moon" unicode=""
|
||||
d="M279.135 -64c-141.424 0 -256 114.64 -256 256c0 141.425 114.641 256 256 256c16.0342 -0.00292969 31.5078 -1.46875 46.7354 -4.27734c44.0205 -8.13086 53.7666 -66.8691 15.0215 -88.9189c-41.374 -23.5439 -67.4336 -67.4121 -67.4336 -115.836
|
||||
c0 -83.5234 75.9238 -146.475 158.272 -130.792c43.6904 8.32129 74.5186 -42.5693 46.248 -77.4004c-47.8613 -58.9717 -120.088 -94.7754 -198.844 -94.7754zM279.135 400c-114.875 0 -208 -93.125 -208 -208s93.125 -208 208 -208
|
||||
c65.2314 0 123.439 30.0361 161.575 77.0244c-111.611 -21.2568 -215.252 64.0957 -215.252 177.943c0 67.5127 36.9326 126.392 91.6934 157.555c-12.3271 2.27637 -25.0312 3.47754 -38.0166 3.47754z" />
|
||||
<glyph glyph-name="caret-square-left" unicode="" horiz-adv-x="448"
|
||||
d="M272 290.9v-197.801c0 -10.6992 -13 -16.0996 -20.5 -8.5l-98.2998 98.9004c-4.7002 4.7002 -4.7002 12.2002 0 16.9004l98.2998 98.8994c7.5 7.7002 20.5 2.2998 20.5 -8.39941zM448 368v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352
|
||||
c0 26.5 21.5 48 48 48h352c26.5 0 48 -21.5 48 -48zM400 22v340c0 3.2998 -2.7002 6 -6 6h-340c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="dot-circle" unicode=""
|
||||
d="M256 392c-110.549 0 -200 -89.4678 -200 -200c0 -110.549 89.4678 -200 200 -200c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200zM256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248z
|
||||
M256 272c44.1826 0 80 -35.8174 80 -80s-35.8174 -80 -80 -80s-80 35.8174 -80 80s35.8174 80 80 80z" />
|
||||
<glyph glyph-name="building" unicode="" horiz-adv-x="448"
|
||||
d="M128 300v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12zM268 288c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40
|
||||
c0 -6.59961 -5.40039 -12 -12 -12h-40zM140 192c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM268 192c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40
|
||||
c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM192 108c0 -6.59961 -5.40039 -12 -12 -12h-40c-6.59961 0 -12 5.40039 -12 12v40c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40zM268 96c-6.59961 0 -12 5.40039 -12 12v40
|
||||
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-40zM448 -28v-36h-448v36c0 6.59961 5.40039 12 12 12h19.5v440c0 13.2998 10.7002 24 24 24h337c13.2998 0 24 -10.7002 24 -24v-440h19.5
|
||||
c6.59961 0 12 -5.40039 12 -12zM79.5 -15h112.5v67c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-67h112.5v414l-288.5 1z" />
|
||||
<glyph glyph-name="file-pdf" unicode="" horiz-adv-x="384"
|
||||
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
|
||||
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM298.2 127.7c10.5 -10.5 8 -38.7002 -17.5 -38.7002c-14.7998 0 -36.9004 6.7998 -55.7998 17c-21.6006 -3.59961 -46 -12.7002 -68.4004 -20.0996c-50.0996 -86.4004 -79.4004 -47 -76.0996 -31.2002
|
||||
c4 20 31 35.8994 51 46.2002c10.5 18.3994 25.3994 50.5 35.3994 74.3994c-7.39941 28.6006 -11.3994 51 -7 67.1006c4.7998 17.6992 38.4004 20.2998 42.6006 -5.90039c4.69922 -15.4004 -1.5 -39.9004 -5.40039 -56c8.09961 -21.2998 19.5996 -35.7998 36.7998 -46.2998
|
||||
c17.4004 2.2002 52.2002 5.5 64.4004 -6.5zM100.1 49.9004c0 -0.700195 11.4004 4.69922 30.4004 35c-5.90039 -5.5 -25.2998 -21.3008 -30.4004 -35zM181.7 240.5c-2.5 0 -2.60059 -26.9004 1.7998 -40.7998c4.90039 8.7002 5.59961 40.7998 -1.7998 40.7998zM157.3 103.9
|
||||
c15.9004 6.09961 34 14.8994 54.7998 19.1992c-11.1992 8.30078 -21.7998 20.4004 -30.0996 35.5c-6.7002 -17.6992 -15 -37.7998 -24.7002 -54.6992zM288.9 108.9c3.59961 2.39941 -2.2002 10.3994 -37.3008 7.7998c32.3008 -13.7998 37.3008 -7.7998 37.3008 -7.7998z" />
|
||||
<glyph glyph-name="file-word" unicode="" horiz-adv-x="384"
|
||||
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
|
||||
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM268.1 192v0.200195h15.8008c7.7998 0 13.5 -7.2998 11.5996 -14.9004c-4.2998 -17 -13.7002 -54.0996 -34.5 -136c-1.2998 -5.39941 -6.09961 -9.09961 -11.5996 -9.09961h-24.7002
|
||||
c-5.5 0 -10.2998 3.7998 -11.6006 9.09961c-5.2998 20.9004 -17.7998 71 -17.8994 71.4004l-2.90039 17.2998c-0.5 -5.2998 -1.5 -11.0996 -3 -17.2998l-17.8994 -71.4004c-1.30078 -5.39941 -6.10059 -9.09961 -11.6006 -9.09961h-25.2002
|
||||
c-5.59961 0 -10.3994 3.7002 -11.6992 9.09961c-6.5 26.5 -25.2002 103.4 -33.2002 136c-1.7998 7.5 3.89941 14.7998 11.7002 14.7998h16.7998c5.7998 0 10.7002 -4.09961 11.7998 -9.69922c5 -25.7002 18.4004 -93.8008 19.0996 -99
|
||||
c0.300781 -1.7002 0.400391 -3.10059 0.5 -4.2002c0.800781 7.5 0.400391 4.7002 24.8008 103.7c1.39941 5.2998 6.19922 9.09961 11.6992 9.09961h13.3008c5.59961 0 10.3994 -3.7998 11.6992 -9.2002c23.9004 -99.7002 22.8008 -94.3994 23.6006 -99.5
|
||||
c0.299805 -1.7002 0.5 -3.09961 0.700195 -4.2998c0.599609 8.09961 0.399414 5.7998 21 103.5c1.09961 5.5 6 9.5 11.6992 9.5z" />
|
||||
<glyph glyph-name="file-excel" unicode="" horiz-adv-x="384"
|
||||
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
|
||||
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM260 224c9.2002 0 15 -10 10.2998 -18c-16 -27.5 -45.5996 -76.9004 -46.2998 -78l46.4004 -78c4.59961 -8 -1.10059 -18 -10.4004 -18h-28.7998c-4.40039 0 -8.5 2.40039 -10.6006 6.2998
|
||||
c-22.6992 41.7998 -13.6992 27.5 -28.5996 57.7002c-5.59961 -12.7002 -6.90039 -17.7002 -28.5996 -57.7002c-2.10059 -3.89941 -6.10059 -6.2998 -10.5 -6.2998h-28.9004c-9.2998 0 -15.0996 10 -10.4004 18l46.3008 78l-46.3008 78c-4.59961 8 1.10059 18 10.4004 18
|
||||
h28.9004c4.39941 0 8.5 -2.40039 10.5996 -6.2998c21.7002 -40.4004 14.7002 -28.6006 28.5996 -57.7002c6.40039 15.2998 10.6006 24.5996 28.6006 57.7002c2.09961 3.89941 6.09961 6.2998 10.5 6.2998h28.7998z" />
|
||||
<glyph glyph-name="file-powerpoint" unicode="" horiz-adv-x="384"
|
||||
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
|
||||
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM120 44v168c0 6.59961 5.40039 12 12 12h69.2002c36.7002 0 62.7998 -27 62.7998 -66.2998c0 -74.2998 -68.7002 -66.5 -95.5 -66.5v-47.2002c0 -6.59961 -5.40039 -12 -12 -12h-24.5c-6.59961 0 -12 5.40039 -12 12z
|
||||
M168.5 131.4h23c7.90039 0 13.9004 2.39941 18.0996 7.19922c8.5 9.80078 8.40039 28.5 0.100586 37.8008c-4.10059 4.59961 -9.90039 7 -17.4004 7h-23.8994v-52h0.0996094z" />
|
||||
<glyph glyph-name="file-image" unicode="" horiz-adv-x="384"
|
||||
d="M369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM332.1 320l-76.0996 76.0996v-76.0996h76.0996zM48 -16h288v288
|
||||
h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416zM80 32v64l39.5 39.5c4.7002 4.7002 12.2998 4.7002 17 0l39.5 -39.5l87.5 87.5c4.7002 4.7002 12.2998 4.7002 17 0l23.5 -23.5v-128h-224zM128 272c26.5 0 48 -21.5 48 -48s-21.5 -48 -48 -48s-48 21.5 -48 48
|
||||
s21.5 48 48 48z" />
|
||||
<glyph glyph-name="file-archive" unicode="" horiz-adv-x="384"
|
||||
d="M128.3 288h32v-32h-32v32zM192.3 384v-32h-32v32h32zM128.3 352h32v-32h-32v32zM192.3 320v-32h-32v32h32zM369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1
|
||||
c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-48.2998v-16h-32v16h-79.7002v-416h288zM194.2 182.3l17.2998 -87.7002c6.40039 -32.3994 -18.4004 -62.5996 -51.5 -62.5996
|
||||
c-33.2002 0 -58 30.4004 -51.4004 62.9004l19.7002 97.0996v32h32v-32h22.1006c5.7998 0 10.6992 -4.09961 11.7998 -9.7002zM160.3 57.9004c17.9004 0 32.4004 12.0996 32.4004 27c0 14.8994 -14.5 27 -32.4004 27c-17.8994 0 -32.3994 -12.1006 -32.3994 -27
|
||||
c0 -14.9004 14.5 -27 32.3994 -27zM192.3 256v-32h-32v32h32z" />
|
||||
<glyph glyph-name="file-audio" unicode="" horiz-adv-x="384"
|
||||
d="M369.941 350.059c8.68848 -8.68848 14.0586 -20.6943 14.0586 -33.9404v-332.118c0 -26.5098 -21.4902 -48 -48 -48h-288c-26.5098 0 -48 21.4902 -48 48v416c0 26.5098 21.4902 48 48 48h204.118c13.2461 0 25.252 -5.37012 33.9404 -14.0586zM332.118 320
|
||||
l-76.1182 76.1182v-76.1182h76.1182zM48 -16h288v288h-104c-13.2549 0 -24 10.7451 -24 24v104h-160v-416zM192 60.0244c0 -10.6914 -12.9258 -16.0459 -20.4854 -8.48535l-35.5146 35.9746h-28c-6.62695 0 -12 5.37305 -12 12v56c0 6.62695 5.37305 12 12 12h28
|
||||
l35.5146 36.9473c7.56055 7.56055 20.4854 2.20605 20.4854 -8.48535v-135.951zM233.201 107.154c9.05078 9.29688 9.05957 24.1328 0.000976562 33.4385c-22.1494 22.752 12.2344 56.2461 34.3945 33.4814c27.1982 -27.9404 27.2119 -72.4443 0.000976562 -100.401
|
||||
c-21.793 -22.3857 -56.9463 10.3154 -34.3965 33.4814z" />
|
||||
<glyph glyph-name="file-video" unicode="" horiz-adv-x="384"
|
||||
d="M369.941 350.059c8.68848 -8.68848 14.0586 -20.6943 14.0586 -33.9404v-332.118c0 -26.5098 -21.4902 -48 -48 -48h-288c-26.5098 0 -48 21.4902 -48 48v416c0 26.5098 21.4902 48 48 48h204.118c13.2461 0 25.252 -5.37012 33.9404 -14.0586zM332.118 320
|
||||
l-76.1182 76.1182v-76.1182h76.1182zM48 -16h288v288h-104c-13.2549 0 -24 10.7451 -24 24v104h-160v-416zM276.687 195.303c10.0049 10.0049 27.3135 2.99707 27.3135 -11.3135v-111.976c0 -14.2939 -17.2959 -21.332 -27.3135 -11.3135l-52.6865 52.6738v-37.374
|
||||
c0 -11.0459 -8.9541 -20 -20 -20h-104c-11.0459 0 -20 8.9541 -20 20v104c0 11.0459 8.9541 20 20 20h104c11.0459 0 20 -8.9541 20 -20v-37.374z" />
|
||||
<glyph glyph-name="file-code" unicode="" horiz-adv-x="384"
|
||||
d="M149.9 98.9004c3.5 -3.30078 3.69922 -8.90039 0.399414 -12.4004l-17.3994 -18.5996c-1.60059 -1.80078 -4 -2.80078 -6.40039 -2.80078c-2.2002 0 -4.40039 0.900391 -6 2.40039l-57.7002 54.0996c-3.7002 3.40039 -3.7002 9.30078 0 12.8008l57.7002 54.0996
|
||||
c3.40039 3.2998 9 3.2002 12.4004 -0.400391l17.3994 -18.5996l0.200195 -0.200195c3.2002 -3.59961 2.7998 -9.2002 -0.799805 -12.3994l-32.7998 -28.9004l32.7998 -28.9004zM369.9 350.1c9 -9 14.0996 -21.2998 14.0996 -34v-332.1c0 -26.5 -21.5 -48 -48 -48h-288
|
||||
c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48.0996h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996zM256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416h288zM209.6 234l24.4004 -7
|
||||
c4.7002 -1.2998 7.40039 -6.2002 6 -10.9004l-54.7002 -188.199c-1.2998 -4.60059 -6.2002 -7.40039 -10.8994 -6l-24.4004 7.09961c-4.7002 1.2998 -7.40039 6.2002 -6 10.9004l54.7002 188.1c1.39941 4.7002 6.2002 7.40039 10.8994 6zM234.1 157.1
|
||||
c-3.5 3.30078 -3.69922 8.90039 -0.399414 12.4004l17.3994 18.5996c3.30078 3.60059 8.90039 3.7002 12.4004 0.400391l57.7002 -54.0996c3.7002 -3.40039 3.7002 -9.30078 0 -12.8008l-57.7002 -54.0996c-3.5 -3.2998 -9.09961 -3.09961 -12.4004 0.400391
|
||||
l-17.3994 18.5996l-0.200195 0.200195c-3.2002 3.59961 -2.7998 9.2002 0.799805 12.3994l32.7998 28.9004l-32.7998 28.9004z" />
|
||||
<glyph glyph-name="life-ring" unicode=""
|
||||
d="M256 -56c-136.967 0 -248 111.033 -248 248s111.033 248 248 248s248 -111.033 248 -248s-111.033 -248 -248 -248zM152.602 20.7197c63.2178 -38.3184 143.579 -38.3184 206.797 0l-53.4111 53.4111c-31.8467 -13.5215 -68.168 -13.5059 -99.9746 0zM336 192
|
||||
c0 44.1123 -35.8877 80 -80 80s-80 -35.8877 -80 -80s35.8877 -80 80 -80s80 35.8877 80 80zM427.28 88.6016c38.3184 63.2178 38.3184 143.579 0 206.797l-53.4111 -53.4111c13.5215 -31.8467 13.5049 -68.168 0 -99.9746zM359.397 363.28
|
||||
c-63.2168 38.3184 -143.578 38.3184 -206.796 0l53.4111 -53.4111c31.8457 13.5215 68.167 13.5049 99.9736 0zM84.7197 295.398c-38.3184 -63.2178 -38.3184 -143.579 0 -206.797l53.4111 53.4111c-13.5215 31.8467 -13.5059 68.168 0 99.9746z" />
|
||||
<glyph glyph-name="paper-plane" unicode=""
|
||||
d="M440 441.5c34.5996 19.9004 77.5996 -8.7998 71.5 -48.9004l-59.4004 -387.199c-2.2998 -14.5 -11.0996 -27.3008 -23.8994 -34.5c-7.2998 -4.10059 -15.4004 -6.2002 -23.6006 -6.2002c-6.19922 0 -12.3994 1.2002 -18.2998 3.59961l-111.899 46.2002l-43.8008 -59.0996
|
||||
c-27.3994 -36.9004 -86.5996 -17.8008 -86.5996 28.5996v84.4004l-114.3 47.2998c-36.7998 15.0996 -40.1006 66 -5.7002 85.8994zM192 -16l36.5996 49.5l-36.5996 15.0996v-64.5996zM404.6 12.7002l59.4004 387.3l-416 -240l107.8 -44.5996l211.5 184.3
|
||||
c14.2002 12.2998 34.4004 -5.7002 23.7002 -21.2002l-140.2 -202.3z" />
|
||||
<glyph glyph-name="futbol" unicode="" horiz-adv-x="496"
|
||||
d="M483.8 268.6c42.2998 -130.199 -29 -270.1 -159.2 -312.399c-25.5 -8.2998 -51.2998 -12.2002 -76.6992 -12.2002c-104.5 0 -201.7 66.5996 -235.7 171.4c-42.2998 130.199 29 270.1 159.2 312.399c25.5 8.2998 51.2998 12.2002 76.6992 12.2002
|
||||
c104.5 0 201.7 -66.5996 235.7 -171.4zM409.3 74.9004c6.10059 8.39941 12.1006 16.8994 16.7998 26.1992c14.3008 28.1006 21.5 58.5 21.7002 89.2002l-38.8994 36.4004l-71.1006 -22.1006l-24.3994 -75.1992l43.6992 -60.9004zM409.3 310.3
|
||||
c-24.5 33.4004 -58.7002 58.4004 -97.8994 71.4004l-47.4004 -26.2002v-73.7998l64.2002 -46.5l70.7002 22zM184.9 381.6c-39.9004 -13.2998 -73.5 -38.5 -97.8008 -71.8994l10.1006 -52.5l70.5996 -22l64.2002 46.5v73.7998zM139 68.5l43.5 61.7002l-24.2998 74.2998
|
||||
l-71.1006 22.2002l-39 -36.4004c0.5 -55.7002 23.4004 -95.2002 37.8008 -115.3zM187.2 1.5c64.0996 -20.4004 115.5 -1.7998 121.7 0l22.3994 48.0996l-44.2998 61.7002h-78.5996l-43.6006 -61.7002z" />
|
||||
<glyph glyph-name="newspaper" unicode="" horiz-adv-x="576"
|
||||
d="M552 384c13.2549 0 24 -10.7451 24 -24v-336c0 -13.2549 -10.7451 -24 -24 -24h-496c-30.9277 0 -56 25.0723 -56 56v272c0 13.2549 10.7451 24 24 24h42.752c6.60547 18.623 24.3896 32 45.248 32h440zM48 56c0 -4.41113 3.58887 -8 8 -8s8 3.58887 8 8v248h-16v-248z
|
||||
M528 48v288h-416v-280c0 -2.7168 -0.204102 -5.38574 -0.578125 -8h416.578zM172 168c-6.62695 0 -12 5.37305 -12 12v96c0 6.62695 5.37305 12 12 12h136c6.62695 0 12 -5.37305 12 -12v-96c0 -6.62695 -5.37305 -12 -12 -12h-136zM200 248v-40h80v40h-80zM160 108v24
|
||||
c0 6.62695 5.37305 12 12 12h136c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-136c-6.62695 0 -12 5.37305 -12 12zM352 108v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-104
|
||||
c-6.62695 0 -12 5.37305 -12 12zM352 252v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-104c-6.62695 0 -12 5.37305 -12 12zM352 180v24c0 6.62695 5.37305 12 12 12h104c6.62695 0 12 -5.37305 12 -12v-24
|
||||
c0 -6.62695 -5.37305 -12 -12 -12h-104c-6.62695 0 -12 5.37305 -12 12z" />
|
||||
<glyph glyph-name="bell-slash" unicode="" horiz-adv-x="640"
|
||||
d="M633.99 -23.0195c6.91016 -5.52051 8.01953 -15.5908 2.5 -22.4902l-10 -12.4902c-5.53027 -6.88965 -15.5898 -8.00977 -22.4902 -2.49023l-598 467.51c-6.90039 5.52051 -8.01953 15.5908 -2.49023 22.4902l10 12.4902
|
||||
c5.52051 6.90039 15.5898 8.00977 22.4902 2.49023zM163.53 80h182.84l61.3994 -48h-279.659c-19.1201 0 -31.9902 15.5996 -32.1006 32c-0.0498047 7.5498 2.61035 15.2598 8.61035 21.71c18.3701 19.7402 51.5703 49.6904 54.8398 140.42l45.4697 -35.5498
|
||||
c-6.91992 -54.7803 -24.6895 -88.5498 -41.3994 -110.58zM320 352c-23.3496 0 -45 -7.17969 -62.9404 -19.4004l-38.1699 29.8408c19.6807 15.7793 43.1104 27.3096 69.1299 32.7197v20.8398c0 17.6699 14.3203 32 31.9805 32s31.9805 -14.3301 31.9805 -32v-20.8398
|
||||
c73.46 -15.2598 127.939 -77.46 127.939 -155.16c0 -41.3604 6.03027 -70.7197 14.3398 -92.8496l-59.5293 46.54c-1.63086 13.96 -2.77051 28.8896 -2.79004 45.7295c0 0.200195 0.0595703 0.379883 0.0595703 0.580078c0 61.8604 -50.1396 112 -112 112zM320 -64
|
||||
c-35.3203 0 -63.9697 28.6504 -63.9697 64h127.939c0 -35.3496 -28.6494 -64 -63.9697 -64z" />
|
||||
<glyph glyph-name="copyright" unicode=""
|
||||
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 -8c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200c-110.549 0 -200 -89.4688 -200 -200c0 -110.549 89.4678 -200 200 -200z
|
||||
M363.351 93.0645c-9.61328 -9.71289 -45.5293 -41.3965 -104.064 -41.3965c-82.4297 0 -140.484 61.4248 -140.484 141.567c0 79.1514 60.2754 139.4 139.763 139.4c55.5303 0 88.7373 -26.6201 97.5928 -34.7783c2.37793 -2.1875 3.86914 -5.3252 3.86914 -8.80762
|
||||
c0 -2.39746 -0.717773 -4.64258 -1.93359 -6.51465l-18.1543 -28.1133c-3.8418 -5.9502 -11.9668 -7.28223 -17.499 -2.9209c-8.5957 6.77637 -31.8145 22.5381 -61.708 22.5381c-48.3037 0 -77.916 -35.3301 -77.916 -80.082c0 -41.5889 26.8877 -83.6924 78.2764 -83.6924
|
||||
c32.6572 0 56.8428 19.0391 65.7266 27.2256c5.26953 4.85645 13.5957 4.03906 17.8193 -1.73828l19.8652 -27.1699c1.45996 -1.98145 2.32422 -4.42969 2.32422 -7.07715c0 -3.28809 -1.32422 -6.2793 -3.47656 -8.44043z" />
|
||||
<glyph glyph-name="closed-captioning" unicode=""
|
||||
d="M464 384c26.5 0 48 -21.5 48 -48v-288c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v288c0 26.5 21.5 48 48 48h416zM458 48c3.2998 0 6 2.7002 6 6v276c0 3.2998 -2.7002 6 -6 6h-404c-3.2998 0 -6 -2.7002 -6 -6v-276c0 -3.2998 2.7002 -6 6 -6h404z
|
||||
M246.9 133.7c1.69922 -2.40039 1.5 -5.60059 -0.5 -7.7002c-53.6006 -56.7998 -172.801 -32.0996 -172.801 67.9004c0 97.2998 121.7 119.5 172.5 70.0996c2.10059 -2 2.5 -3.2002 1 -5.7002l-17.5 -30.5c-1.89941 -3.09961 -6.19922 -4 -9.09961 -1.7002
|
||||
c-40.7998 32 -94.5996 14.9004 -94.5996 -31.1992c0 -48 51 -70.5 92.1992 -32.6006c2.80078 2.5 7.10059 2.10059 9.2002 -0.899414zM437.3 133.7c1.7002 -2.40039 1.5 -5.60059 -0.5 -7.7002c-53.5996 -56.9004 -172.8 -32.0996 -172.8 67.9004
|
||||
c0 97.2998 121.7 119.5 172.5 70.0996c2.09961 -2 2.5 -3.2002 1 -5.7002l-17.5 -30.5c-1.90039 -3.09961 -6.2002 -4 -9.09961 -1.7002c-40.8008 32 -94.6006 14.9004 -94.6006 -31.1992c0 -48 51 -70.5 92.2002 -32.6006c2.7998 2.5 7.09961 2.10059 9.2002 -0.899414z
|
||||
" />
|
||||
<glyph glyph-name="object-group" unicode=""
|
||||
d="M500 320h-12v-256h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-320v-12c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v256h-12
|
||||
c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-12h320v12c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12zM448 384v-32h32v32h-32zM32 384v-32h32v32h-32zM64 0v32
|
||||
h-32v-32h32zM480 0v32h-32v-32h32zM440 64v256h-12c-6.62695 0 -12 5.37305 -12 12v12h-320v-12c0 -6.62695 -5.37305 -12 -12 -12h-12v-256h12c6.62695 0 12 -5.37305 12 -12v-12h320v12c0 6.62695 5.37305 12 12 12h12zM404 256c6.62695 0 12 -5.37207 12 -12v-168
|
||||
c0 -6.62793 -5.37305 -12 -12 -12h-200c-6.62695 0 -12 5.37207 -12 12v52h-84c-6.62695 0 -12 5.37207 -12 12v168c0 6.62793 5.37305 12 12 12h200c6.62695 0 12 -5.37207 12 -12v-52h84zM136 280v-112h144v112h-144zM376 104v112h-56v-76
|
||||
c0 -6.62793 -5.37305 -12 -12 -12h-76v-24h144z" />
|
||||
<glyph glyph-name="object-ungroup" unicode="" horiz-adv-x="576"
|
||||
d="M564 224h-12v-160h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-224v-12c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v24h-88v-12
|
||||
c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h12v160h-12c-6.62695 0 -12 5.37305 -12 12v72c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-12h224v12c0 6.62695 5.37305 12 12 12h72
|
||||
c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-12v-24h88v12c0 6.62695 5.37305 12 12 12h72c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12zM352 384v-32h32v32h-32zM352 128v-32h32v32h-32zM64 96v32h-32v-32h32zM64 352v32
|
||||
h-32v-32h32zM96 136h224v12c0 6.62695 5.37305 12 12 12h12v160h-12c-6.62695 0 -12 5.37305 -12 12v12h-224v-12c0 -6.62695 -5.37305 -12 -12 -12h-12v-160h12c6.62695 0 12 -5.37305 12 -12v-12zM224 0v32h-32v-32h32zM504 64v160h-12c-6.62695 0 -12 5.37305 -12 12v12
|
||||
h-88v-88h12c6.62695 0 12 -5.37305 12 -12v-72c0 -6.62695 -5.37305 -12 -12 -12h-72c-6.62695 0 -12 5.37305 -12 12v12h-88v-24h12c6.62695 0 12 -5.37305 12 -12v-12h224v12c0 6.62695 5.37305 12 12 12h12zM544 0v32h-32v-32h32zM544 256v32h-32v-32h32z" />
|
||||
<glyph glyph-name="sticky-note" unicode="" horiz-adv-x="448"
|
||||
d="M448 99.8936c0 -13.2451 -5.37012 -25.252 -14.0586 -33.9404l-83.8828 -83.8818c-8.68848 -8.68848 -20.6943 -14.0596 -33.9404 -14.0596h-268.118c-26.5098 0 -48 21.4902 -48 48v351.988c0 26.5098 21.4902 48 48 48h352c26.5098 0 48 -21.4902 48 -48v-268.106z
|
||||
M320 19.8936l76.1182 76.1182h-76.1182v-76.1182zM400 368h-352v-351.988h224v104c0 13.2549 10.7451 24 24 24h104v223.988z" />
|
||||
<glyph glyph-name="clone" unicode=""
|
||||
d="M464 448c26.5098 0 48 -21.4902 48 -48v-320c0 -26.5098 -21.4902 -48 -48 -48h-48v-48c0 -26.5098 -21.4902 -48 -48 -48h-320c-26.5098 0 -48 21.4902 -48 48v320c0 26.5098 21.4902 48 48 48h48v48c0 26.5098 21.4902 48 48 48h320zM362 -16c3.31152 0 6 2.68848 6 6
|
||||
v42h-224c-26.5098 0 -48 21.4902 -48 48v224h-42c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h308zM458 80c3.31152 0 6 2.68848 6 6v308c0 3.31152 -2.68848 6 -6 6h-308c-3.31152 0 -6 -2.68848 -6 -6v-308c0 -3.31152 2.68848 -6 6 -6h308z" />
|
||||
<glyph glyph-name="hourglass" unicode="" horiz-adv-x="384"
|
||||
d="M368 400c0 -80.0996 -31.8984 -165.619 -97.1797 -208c64.9912 -42.1934 97.1797 -127.436 97.1797 -208h4c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-360c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h4
|
||||
c0 80.0996 31.8994 165.619 97.1797 208c-64.9912 42.1934 -97.1797 127.436 -97.1797 208h-4c-6.62695 0 -12 5.37305 -12 12v24c0 6.62695 5.37305 12 12 12h360c6.62695 0 12 -5.37305 12 -12v-24c0 -6.62695 -5.37305 -12 -12 -12h-4zM64 400
|
||||
c0 -101.621 57.3066 -184 128 -184s128 82.3799 128 184h-256zM320 -16c0 101.62 -57.3076 184 -128 184s-128 -82.3799 -128 -184h256z" />
|
||||
<glyph glyph-name="hand-rock" unicode=""
|
||||
d="M408.864 368.948c48.8213 20.751 103.136 -15.0723 103.136 -67.9111v-114.443c0 -15.3955 -3.08887 -30.3906 -9.18262 -44.5674l-42.835 -99.6562c-4.99707 -11.625 -3.98242 -18.8574 -3.98242 -42.3701c0 -17.6729 -14.3271 -32 -32 -32h-252
|
||||
c-17.6729 0 -32 14.3271 -32 32c0 27.3301 1.1416 29.2012 -3.11035 32.9033l-97.71 85.0811c-24.8994 21.6797 -39.1797 52.8926 -39.1797 85.6338v56.9531c0 47.4277 44.8457 82.0215 91.0459 71.1807c1.96094 55.751 63.5107 87.8262 110.671 60.8057
|
||||
c29.1895 31.0713 78.8604 31.4473 108.334 -0.0214844c32.7051 18.6846 76.4121 10.3096 98.8135 -23.5879zM464 186.594v114.445c0 34.29 -52 33.8232 -52 0.676758c0 -8.83594 -7.16309 -16 -16 -16h-7c-8.83691 0 -16 7.16406 -16 16v26.751
|
||||
c0 34.457 -52 33.707 -52 0.676758v-27.4287c0 -8.83594 -7.16309 -16 -16 -16h-7c-8.83691 0 -16 7.16406 -16 16v40.4658c0 34.3525 -52 33.8115 -52 0.677734v-41.1436c0 -8.83594 -7.16406 -16 -16 -16h-7c-8.83594 0 -16 7.16406 -16 16v26.751
|
||||
c0 34.4023 -52 33.7744 -52 0.676758v-116.571c0 -8.83105 -7.17773 -15.9961 -16.0078 -15.9961c-4.0166 0 -7.68848 1.48242 -10.499 3.92969l-7 6.09473c-3.37012 2.93457 -5.49316 7.25293 -5.49316 12.0674v41.2275c0 34.2148 -52 33.8857 -52 0.677734v-56.9531
|
||||
c0 -18.8555 8.27441 -36.874 22.7002 -49.4365l97.71 -85.0801c12.4502 -10.8398 19.5898 -26.4463 19.5898 -42.8164v-10.2861h220v7.07617c0 13.21 2.65332 26.0791 7.88281 38.25l42.835 99.6553c3.37891 7.82715 5.28223 16.501 5.28223 25.5625v0.0498047z" />
|
||||
<glyph glyph-name="hand-paper" unicode="" horiz-adv-x="448"
|
||||
d="M372.57 335.359c39.9062 5.63281 75.4297 -25.7393 75.4297 -66.3594v-131.564c-0.00292969 -15.7393 -1.80566 -30.9482 -5.19531 -45.666l-30.1836 -130.958c-3.34668 -14.5234 -16.2783 -24.8125 -31.1816 -24.8125h-222.897
|
||||
c-10.7539 0 -20.2588 5.28613 -26.0615 13.4316l-119.97 168.415c-21.2441 29.8203 -14.8047 71.3574 14.5498 93.1533c18.7754 13.9395 42.1309 16.2979 62.083 8.87109v126.13c0 44.0547 41.125 75.5439 82.4053 64.9834c23.8926 48.1963 92.3535 50.2471 117.982 0.74707
|
||||
c42.5186 11.1445 83.0391 -21.9346 83.0391 -65.5469v-10.8242zM399.997 137.437l-0.00195312 131.563c0 24.9492 -36.5703 25.5508 -36.5703 -0.691406v-76.3086c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v154.184
|
||||
c0 25.501 -36.5703 26.3633 -36.5703 0.691406v-154.875c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v188.309c0 25.501 -36.5703 26.3545 -36.5703 0.691406v-189c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16
|
||||
v153.309c0 25.501 -36.5713 26.3359 -36.5713 0.691406v-206.494c0 -15.5703 -20.0352 -21.9092 -29.0303 -9.2832l-27.1279 38.0791c-14.3711 20.1709 -43.833 -2.33496 -29.3945 -22.6045l115.196 -161.697h201.92l27.3252 118.551
|
||||
c2.63086 11.417 3.96484 23.1553 3.96484 34.8857z" />
|
||||
<glyph glyph-name="hand-scissors" unicode=""
|
||||
d="M256 -32c-44.9561 0 -77.3428 43.2627 -64.0244 85.8535c-21.6484 13.71 -34.0156 38.7617 -30.3408 65.0068h-87.6348c-40.8037 0 -74 32.8105 -74 73.1406c0 40.3291 33.1963 73.1396 74 73.1396l94 -9.14062l-78.8496 18.6787
|
||||
c-38.3076 14.7422 -57.04 57.4707 -41.9424 95.1123c15.0303 37.4736 57.7549 55.7803 95.6416 41.2012l144.929 -55.7568c24.9551 30.5566 57.8086 43.9932 92.2178 24.7324l97.999 -54.8525c20.9746 -11.7393 34.0049 -33.8457 34.0049 -57.6904v-205.702
|
||||
c0 -30.7422 -21.4404 -57.5576 -51.7979 -64.5537l-118.999 -27.4268c-4.97168 -1.14648 -10.0889 -1.72949 -15.2031 -1.72949zM256 16.0127l70 -0.000976562c1.52441 0 2.99707 0.174805 4.42285 0.501953l119.001 27.4277
|
||||
c8.58203 1.97754 14.5762 9.29102 14.5762 17.7812v205.701c0 6.4873 -3.62109 12.542 -9.44922 15.8047l-98 54.8545c-8.13965 4.55566 -18.668 2.61914 -24.4873 -4.50781l-21.7646 -26.6475c-2.93457 -3.59375 -7.40332 -5.87305 -12.4004 -5.87305
|
||||
c-2.02246 0 -3.95703 0.375977 -5.73828 1.06152l-166.549 64.0908c-32.6543 12.5664 -50.7744 -34.5771 -19.2227 -46.7168l155.357 -59.7852c6 -2.30859 10.2539 -8.12402 10.2539 -14.9326v-11.6328c0 -8.83691 -7.16309 -16 -16 -16h-182
|
||||
c-34.375 0 -34.4297 -50.2803 0 -50.2803h182c8.83691 0 16 -7.16309 16 -16v-6.85645c0 -8.83691 -7.16309 -16 -16 -16h-28c-25.1221 0 -25.1592 -36.5674 0 -36.5674h28c8.83691 0 16 -7.16211 16 -16v-6.85547c0 -8.83691 -7.16309 -16 -16 -16
|
||||
c-25.1201 0 -25.1602 -36.5674 0 -36.5674z" />
|
||||
<glyph glyph-name="hand-lizard" unicode="" horiz-adv-x="576"
|
||||
d="M556.686 157.458c12.6357 -19.4863 19.3145 -42.0615 19.3145 -65.2871v-124.171h-224v71.582l-99.751 38.7871c-2.7832 1.08203 -5.70996 1.63086 -8.69727 1.63086h-131.552c-30.8789 0 -56 25.1211 -56 56c0 48.5234 39.4766 88 88 88h113.709l18.333 48h-196.042
|
||||
c-44.1123 0 -80 35.8877 -80 80v8c0 30.8779 25.1211 56 56 56h293.917c24.5 0 47.084 -12.2725 60.4111 -32.8291zM528 16v76.1709c0 0.0166016 -0.0439453 0.106445 -0.0439453 0.12207c0 14.3945 -4.24219 27.8057 -11.5439 39.0498l-146.358 225.715
|
||||
c-4.44336 6.85254 -11.9707 10.9424 -20.1367 10.9424h-293.917c-4.41113 0 -8 -3.58887 -8 -8v-8c0 -17.6445 14.3555 -32 32 -32h213.471c25.2021 0 42.626 -25.293 33.6299 -48.8457l-24.5518 -64.2812c-7.05371 -18.4658 -25.0732 -30.873 -44.8398 -30.873h-113.709
|
||||
c-22.0557 0 -40 -17.9443 -40 -40c0 -4.41113 3.58887 -8 8 -8h131.552c0.0175781 0 0.0712891 -0.0273438 0.0888672 -0.0273438c9.16992 0 17.9404 -1.72461 26.0039 -4.86621l99.752 -38.7881c18.5898 -7.22852 30.6035 -24.7881 30.6035 -44.7363v-23.582h128z" />
|
||||
<glyph glyph-name="hand-spock" unicode=""
|
||||
d="M501.03 331.824c6.92773 -11.1826 10.9697 -24.4053 10.9697 -38.5146c0 -5.92676 -0.706055 -11.6885 -2.03809 -17.208l-57.623 -241.963c-13.2236 -56.1904 -63.707 -98.1387 -123.908 -98.1387h-0.352539h-107.455
|
||||
c-0.0761719 0 -0.193359 0.00195312 -0.270508 0.00195312c-40.9248 0 -78.1475 15.9814 -105.761 42.0391l-91.3652 85.9766c-14.3076 13.4434 -23.2246 32.5547 -23.2246 53.7168c0 19.5254 7.61035 37.2861 20.0254 50.4766
|
||||
c5.31836 5.66406 29.875 29.3926 68.1152 21.8477l-24.3594 82.1973c-1.97363 6.64844 -2.97656 13.6836 -2.97656 20.9688c0 38.6953 29.8926 70.4639 67.8262 73.4531c-0.246094 2.45117 -0.34082 4.85547 -0.34082 7.37207c0 34.4199 23.585 63.376 55.4619 71.5752
|
||||
c43.248 10.9785 80.5645 -17.7012 89.6602 -53.0723l13.6836 -53.207l4.64648 22.6602c6.99023 33.5186 36.6826 58.8037 72.2373 58.916c8.73438 0 56.625 -3.26953 70.7383 -54.0801c15.0664 0.710938 46.9199 -3.50977 66.3105 -35.0176zM463.271 287.219
|
||||
c7.86914 32.9844 -42.1211 45.2695 -50.0859 11.9219l-24.8008 -104.146c-4.38867 -18.4141 -31.7783 -11.8926 -28.0557 6.2168l28.5479 139.166c7.39844 36.0703 -43.3076 45.0703 -50.1182 11.9629l-31.791 -154.971
|
||||
c-3.54883 -17.3086 -28.2832 -18.0469 -32.7109 -0.804688l-47.3262 184.035c-8.43359 32.8105 -58.3691 20.2676 -49.8652 -12.8359l42.4414 -165.039c4.81641 -18.7207 -23.3711 -26.9121 -28.9648 -8.00781l-31.3438 105.779
|
||||
c-9.6875 32.6465 -59.1191 18.2578 -49.3867 -14.625l36.0137 -121.539c6.59375 -22.2441 10.1777 -45.7803 10.1777 -70.1523c0 -6.54297 -8.05664 -10.9355 -13.4824 -5.82617l-51.123 48.1074c-24.7852 23.4082 -60.0527 -14.1875 -35.2793 -37.4902l91.3691 -85.9805
|
||||
c19.0469 -17.9736 44.75 -28.998 72.9795 -28.998h0.157227h107.455c0.0732422 0 0.138672 0.0429688 0.212891 0.0429688c37.5791 0 69.1016 26.1416 77.3564 61.2168z" />
|
||||
<glyph glyph-name="hand-pointer" unicode="" horiz-adv-x="448"
|
||||
d="M358.182 268.639c43.1934 16.6348 89.8184 -15.7949 89.8184 -62.6387v-84c-0.000976562 -5.24023 -0.600586 -10.3037 -1.72754 -15.2041l-27.4297 -118.999c-6.98242 -30.2969 -33.7549 -51.7969 -64.5566 -51.7969h-178.286
|
||||
c-21.2588 0 -41.3682 10.4102 -53.791 27.8457l-109.699 154.001c-21.2432 29.8193 -14.8047 71.3574 14.5498 93.1523c18.8115 13.9658 42.1748 16.2822 62.083 8.87207v161.129c0 36.9443 29.7363 67 66.2861 67s66.2861 -30.0557 66.2861 -67v-73.6338
|
||||
c20.4131 2.85742 41.4678 -3.94238 56.5947 -19.6289c27.1934 12.8467 60.3799 5.66992 79.8721 -19.0986zM80.9854 168.303c-14.4004 20.2119 -43.8008 -2.38281 -29.3945 -22.6055l109.712 -154c3.43457 -4.81934 8.92871 -7.69727 14.6973 -7.69727h178.285
|
||||
c8.49219 0 15.8037 5.99414 17.7822 14.5762l27.4297 119.001c0.333008 1.44629 0.501953 2.93457 0.501953 4.42285v84c0 25.1602 -36.5713 25.1211 -36.5713 0c0 -8.83594 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16406 -16 16v21
|
||||
c0 25.1602 -36.5713 25.1201 -36.5713 0v-21c0 -8.83594 -7.16309 -16 -16 -16h-6.85938c-8.83691 0 -16 7.16406 -16 16v35c0 25.1602 -36.5703 25.1201 -36.5703 0v-35c0 -8.83594 -7.16309 -16 -16 -16h-6.85742c-8.83691 0 -16 7.16406 -16 16v175
|
||||
c0 25.1602 -36.5713 25.1201 -36.5713 0v-241.493c0 -15.5703 -20.0352 -21.9092 -29.0303 -9.2832zM176.143 48v96c0 8.83691 6.26855 16 14 16h6c7.73242 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26758 -16 -14 -16h-6c-7.73242 0 -14 7.16309 -14 16zM251.571 48v96
|
||||
c0 8.83691 6.26758 16 14 16h6c7.73145 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26855 -16 -14 -16h-6c-7.73242 0 -14 7.16309 -14 16zM327 48v96c0 8.83691 6.26758 16 14 16h6c7.73242 0 14 -7.16309 14 -16v-96c0 -8.83691 -6.26758 -16 -14 -16h-6
|
||||
c-7.73242 0 -14 7.16309 -14 16z" />
|
||||
<glyph glyph-name="hand-peace" unicode="" horiz-adv-x="448"
|
||||
d="M362.146 256.024c42.5908 13.3184 85.8535 -19.0684 85.8535 -64.0244l-0.0117188 -70.001c-0.000976562 -5.24023 -0.600586 -10.3027 -1.72949 -15.2031l-27.4268 -118.999c-6.99707 -30.3564 -33.8105 -51.7969 -64.5547 -51.7969h-205.702
|
||||
c-23.8447 0 -45.9502 13.0303 -57.6904 34.0059l-54.8525 97.999c-19.2607 34.4092 -5.82422 67.2617 24.7324 92.2178l-55.7568 144.928c-14.5791 37.8867 3.72754 80.6113 41.2012 95.6416c37.6406 15.0977 80.3691 -3.63477 95.1123 -41.9424l18.6787 -78.8496
|
||||
l-9.14062 94c0 40.8037 32.8096 74 73.1396 74s73.1406 -33.1963 73.1406 -74v-87.6348c26.2451 3.6748 51.2959 -8.69238 65.0068 -30.3408zM399.987 122l-0.000976562 70c0 25.1602 -36.5674 25.1201 -36.5674 0c0 -8.83691 -7.16309 -16 -16 -16h-6.85547
|
||||
c-8.83789 0 -16 7.16309 -16 16v28c0 25.1592 -36.5674 25.1221 -36.5674 0v-28c0 -8.83691 -7.16309 -16 -16 -16h-6.85645c-8.83691 0 -16 7.16309 -16 16v182c0 34.4297 -50.2803 34.375 -50.2803 0v-182c0 -8.83691 -7.16309 -16 -16 -16h-11.6328
|
||||
c-6.80859 0 -12.624 4.25391 -14.9326 10.2539l-59.7842 155.357c-12.1396 31.5518 -59.2842 13.4326 -46.7168 -19.2227l64.0898 -166.549c0.685547 -1.78125 1.07812 -3.71875 1.07812 -5.74121c0 -4.99707 -2.2959 -9.46289 -5.88965 -12.3975l-26.6475 -21.7646
|
||||
c-7.12695 -5.81934 -9.06445 -16.3467 -4.50781 -24.4873l54.8535 -98c3.26367 -5.82812 9.31934 -9.44922 15.8057 -9.44922h205.701c8.49121 0 15.8037 5.99414 17.7812 14.5762l27.4277 119.001c0.333008 1.44629 0.501953 2.93457 0.501953 4.42285z" />
|
||||
<glyph glyph-name="registered" unicode=""
|
||||
d="M256 440c136.967 0 248 -111.033 248 -248s-111.033 -248 -248 -248s-248 111.033 -248 248s111.033 248 248 248zM256 -8c110.549 0 200 89.4678 200 200c0 110.549 -89.4678 200 -200 200c-110.549 0 -200 -89.4688 -200 -200c0 -110.549 89.4678 -200 200 -200z
|
||||
M366.442 73.791c4.40332 -7.99219 -1.37012 -17.791 -10.5107 -17.791h-42.8096c-0.00488281 0 -0.000976562 -0.0126953 -0.00585938 -0.0126953c-4.58594 0 -8.57422 2.58301 -10.5869 6.37305l-47.5156 89.3027h-31.958v-83.6631c0 -6.61719 -5.38281 -12 -12 -12
|
||||
h-38.5674c-6.61719 0 -12 5.38281 -12 12v248.304c0 6.61719 5.38281 12 12 12h78.667c71.251 0 101.498 -32.749 101.498 -85.252c0 -31.6123 -15.2148 -59.2969 -39.4824 -73.1758c3.02148 -4.61719 0.225586 0.199219 53.2715 -96.085zM256.933 208.094
|
||||
c20.9131 0 32.4307 11.5186 32.4316 32.4316c0 19.5752 -6.5127 31.709 -38.9297 31.709h-27.377v-64.1406h33.875z" />
|
||||
<glyph glyph-name="calendar-plus" unicode="" horiz-adv-x="448"
|
||||
d="M336 156v-24c0 -6.59961 -5.40039 -12 -12 -12h-76v-76c0 -6.59961 -5.40039 -12 -12 -12h-24c-6.59961 0 -12 5.40039 -12 12v76h-76c-6.59961 0 -12 5.40039 -12 12v24c0 6.59961 5.40039 12 12 12h76v76c0 6.59961 5.40039 12 12 12h24c6.59961 0 12 -5.40039 12 -12
|
||||
v-76h76c6.59961 0 12 -5.40039 12 -12zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40
|
||||
c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="calendar-minus" unicode="" horiz-adv-x="448"
|
||||
d="M124 120c-6.59961 0 -12 5.40039 -12 12v24c0 6.59961 5.40039 12 12 12h200c6.59961 0 12 -5.40039 12 -12v-24c0 -6.59961 -5.40039 -12 -12 -12h-200zM448 336v-352c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52
|
||||
c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="calendar-times" unicode="" horiz-adv-x="448"
|
||||
d="M311.7 73.2998l-17 -17c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-53.7002 53.7998l-53.7002 -53.6992c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-17 17c-4.7002 4.69922 -4.7002 12.2998 0 17l53.7002 53.6992l-53.7002 53.7002c-4.7002 4.7002 -4.7002 12.2998 0 17
|
||||
l17 17c4.7002 4.7002 12.2998 4.7002 17 0l53.7002 -53.7002l53.7002 53.7002c4.7002 4.7002 12.2998 4.7002 17 0l17 -17c4.7002 -4.7002 4.7002 -12.2998 0 -17l-53.7998 -53.7998l53.6992 -53.7002c4.80078 -4.7002 4.80078 -12.2998 0.100586 -17zM448 336v-352
|
||||
c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h48v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h128v52c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-52h48c26.5 0 48 -21.5 48 -48zM400 -10
|
||||
v298h-352v-298c0 -3.2998 2.7002 -6 6 -6h340c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="calendar-check" unicode="" horiz-adv-x="448"
|
||||
d="M400 384c26.5098 0 48 -21.4902 48 -48v-352c0 -26.5098 -21.4902 -48 -48 -48h-352c-26.5098 0 -48 21.4902 -48 48v352c0 26.5098 21.4902 48 48 48h48v52c0 6.62695 5.37305 12 12 12h40c6.62695 0 12 -5.37305 12 -12v-52h128v52c0 6.62695 5.37305 12 12 12h40
|
||||
c6.62695 0 12 -5.37305 12 -12v-52h48zM394 -16c3.31152 0 6 2.68848 6 6v298h-352v-298c0 -3.31152 2.68848 -6 6 -6h340zM341.151 184.65l-142.31 -141.169c-4.70508 -4.66699 -12.3027 -4.6377 -16.9707 0.0673828l-75.0908 75.6992
|
||||
c-4.66699 4.70508 -4.6377 12.3027 0.0673828 16.9707l22.7197 22.5361c4.70508 4.66699 12.3027 4.63672 16.9697 -0.0693359l44.1035 -44.4609l111.072 110.182c4.70508 4.66699 12.3027 4.63672 16.9707 -0.0683594l22.5361 -22.7178
|
||||
c4.66699 -4.70508 4.63672 -12.3027 -0.0683594 -16.9697z" />
|
||||
<glyph glyph-name="map" unicode="" horiz-adv-x="576"
|
||||
d="M560.02 416c8.4502 0 15.9805 -6.83008 15.9805 -16.0195v-346.32c0 -13.4707 -8.32422 -24.9951 -20.1201 -29.71l-151.83 -52.8105c-6.23242 -2.02832 -12.9023 -3.12305 -19.8076 -3.12305c-7.07324 0 -13.8799 1.15039 -20.2422 3.27344l-172 60.71l-170.05 -62.8398
|
||||
c-1.99023 -0.790039 -4 -1.16016 -5.95996 -1.16016c-8.45996 0 -15.9902 6.83008 -15.9902 16.0195v346.32c0.00292969 13.4697 8.32617 24.9932 20.1201 29.71l151.83 52.8105c6.43945 2.08984 13.1201 3.13965 19.8096 3.13965
|
||||
c7.06641 -0.00292969 13.8789 -1.16602 20.2402 -3.28027l172 -60.7197h0.00976562l170.05 62.8398c1.98047 0.790039 4 1.16016 5.95996 1.16016zM224 357.58v-285.97l128 -45.1904v285.97zM48 29.9502l127.36 47.0801l0.639648 0.229492v286.2l-128 -44.5303v-288.979z
|
||||
M528 65.0801v288.97l-127.36 -47.0693l-0.639648 -0.240234v-286.19z" />
|
||||
<glyph glyph-name="comment-alt" unicode=""
|
||||
d="M448 448c35.2998 0 64 -28.7002 64 -64v-288c0 -35.2998 -28.7002 -64 -64 -64h-144l-124.9 -93.5996c-2.19922 -1.7002 -4.69922 -2.40039 -7.09961 -2.40039c-6.2002 0 -12 4.90039 -12 12v84h-96c-35.2998 0 -64 28.7002 -64 64v288c0 35.2998 28.7002 64 64 64h384z
|
||||
M464 96v288c0 8.7998 -7.2002 16 -16 16h-384c-8.7998 0 -16 -7.2002 -16 -16v-288c0 -8.7998 7.2002 -16 16 -16h144v-60l67.2002 50.4004l12.7998 9.59961h160c8.7998 0 16 7.2002 16 16z" />
|
||||
<glyph glyph-name="pause-circle" unicode=""
|
||||
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM352 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-48
|
||||
c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h48c8.7998 0 16 -7.2002 16 -16zM240 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-48c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h48c8.7998 0 16 -7.2002 16 -16z" />
|
||||
<glyph glyph-name="stop-circle" unicode=""
|
||||
d="M504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200zM352 272v-160c0 -8.7998 -7.2002 -16 -16 -16h-160
|
||||
c-8.7998 0 -16 7.2002 -16 16v160c0 8.7998 7.2002 16 16 16h160c8.7998 0 16 -7.2002 16 -16z" />
|
||||
<glyph glyph-name="handshake" unicode="" horiz-adv-x="640"
|
||||
d="M519.2 320.1h120.8v-255.699h-64c-17.5 0 -31.7998 14.1992 -31.9004 31.6992h-57.8994c-1.7998 -8.19922 -5.2998 -16.0996 -10.9004 -23l-26.2002 -32.2998c-15.7998 -19.3994 -41.8994 -25.5 -64 -16.7998c-13.5 -16.5996 -30.5996 -24 -48.7998 -24
|
||||
c-15.0996 0 -28.5996 5.09961 -41.0996 15.9004c-31.7998 -21.9004 -74.7002 -21.3008 -105.601 3.7998l-84.5996 76.3994h-9.09961c-0.100586 -17.5 -14.3008 -31.6992 -31.9004 -31.6992h-64v255.699h118l47.5996 47.6006c10.5 10.3994 24.8008 16.2998 39.6006 16.2998
|
||||
h226.8c15.4326 0 29.4326 -6.22168 39.5996 -16.2998zM48 96.4004c8.7998 0 16 7.09961 16 16c0 8.7998 -7.2002 16 -16 16s-16 -7.2002 -16 -16c0 -8.80078 7.2002 -16 16 -16zM438 103.3c2.7002 3.40039 2.2002 8.5 -1.2002 11.2998l-108.2 87.8008l-8.19922 -7.5
|
||||
c-40.3008 -36.8008 -86.7002 -11.8008 -101.5 4.39941c-26.7002 29 -25 74.4004 4.39941 101.3l38.7002 35.5h-56.7002c-2 -0.799805 -3.7002 -1.5 -5.7002 -2.2998l-61.6992 -61.5996h-41.9004v-128.101h27.7002l97.2998 -88
|
||||
c16.0996 -13.0996 41.4004 -10.5 55.2998 6.60059l15.6006 19.2002l36.7998 -31.5c3 -2.40039 12 -4.90039 18 2.39941l30 36.5l23.8994 -19.3994c3.5 -2.80078 8.5 -2.2002 11.3008 1.19922zM544 144.1v128h-44.7002l-61.7002 61.6006
|
||||
c-1.39941 1.5 -3.39941 2.2998 -5.5 2.2998l-83.6992 -0.200195c-10 0 -19.6006 -3.7002 -27 -10.5l-65.6006 -60.0996c-9.7002 -8.7998 -10.5 -24 -1.2002 -33.9004c8.90039 -9.39941 25.1006 -8.7002 34.6006 0l55.2002 50.6006c6.5 5.89941 16.5996 5.5 22.5996 -1
|
||||
l10.9004 -11.7002c6 -6.5 5.5 -16.6006 -1 -22.6006l-12.5 -11.3994l102.699 -83.4004c2.80078 -2.2998 5.40039 -4.89941 7.7002 -7.7002h69.2002zM592 96.4004c8.7998 0 16 7.09961 16 16c0 8.7998 -7.2002 16 -16 16s-16 -7.2002 -16 -16c0 -8.80078 7.2002 -16 16 -16z
|
||||
" />
|
||||
<glyph glyph-name="envelope-open" unicode=""
|
||||
d="M494.586 283.484c10.6523 -8.80762 17.4141 -22.1064 17.4141 -36.9932v-262.491c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v262.515c0 14.9355 6.80469 28.2705 17.5146 37.0771c4.08008 3.35449 110.688 89.0996 135.15 108.549
|
||||
c22.6992 18.1426 60.1299 55.8594 103.335 55.8594c43.4365 0 81.2314 -38.1914 103.335 -55.8594c23.5283 -18.707 130.554 -104.773 135.251 -108.656zM464 -10v253.632c0 0.00195312 0.00390625 0.000976562 0.00390625 0.00292969
|
||||
c0 1.88184 -0.869141 3.56152 -2.22754 4.66016c-15.8633 12.8232 -108.793 87.5752 -132.366 106.316c-17.5527 14.0195 -49.7168 45.3887 -73.4102 45.3887c-23.6016 0 -55.2451 -30.8799 -73.4102 -45.3887c-23.5713 -18.7393 -116.494 -93.4795 -132.364 -106.293
|
||||
c-1.40918 -1.13965 -2.22559 -2.85254 -2.22559 -4.66504v-253.653c0 -3.31152 2.68848 -6 6 -6h404c3.31152 0 6 2.68848 6 6zM432.009 177.704c4.24902 -5.15918 3.46484 -12.7949 -1.74512 -16.9814c-28.9746 -23.2822 -59.2734 -47.5967 -70.9287 -56.8623
|
||||
c-22.6992 -18.1436 -60.1299 -55.8604 -103.335 -55.8604c-43.4521 0 -81.2871 38.2373 -103.335 55.8604c-11.2793 8.9668 -41.7441 33.4131 -70.9268 56.8643c-5.20996 4.1875 -5.99316 11.8223 -1.74512 16.9814l15.2578 18.5283
|
||||
c4.17773 5.07227 11.6572 5.84277 16.7793 1.72559c28.6182 -23.001 58.5654 -47.0352 70.5596 -56.5713c17.5527 -14.0195 49.7168 -45.3887 73.4102 -45.3887c23.6016 0 55.2461 30.8799 73.4102 45.3887c11.9941 9.53516 41.9434 33.5703 70.5625 56.5684
|
||||
c5.12207 4.11621 12.6016 3.3457 16.7783 -1.72656z" />
|
||||
<glyph glyph-name="address-book" unicode="" horiz-adv-x="448"
|
||||
d="M436 288h-20v-64h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-20v-64h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12h-20v-48c0 -26.5 -21.5 -48 -48 -48h-320c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48
|
||||
h320c26.5 0 48 -21.5 48 -48v-48h20c6.59961 0 12 -5.40039 12 -12v-40c0 -6.59961 -5.40039 -12 -12 -12zM368 -16v416h-320v-416h320zM208 192c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64zM118.4 64
|
||||
c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002c0 -10.6006 -10 -19.2002 -22.4004 -19.2002
|
||||
h-179.199z" />
|
||||
<glyph glyph-name="address-card" unicode="" horiz-adv-x="576"
|
||||
d="M528 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-480c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h480zM528 16v352h-480v-352h480zM208 192c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64z
|
||||
M118.4 64c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002
|
||||
c0 -10.6006 -10 -19.2002 -22.4004 -19.2002h-179.199zM360 128c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 192c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112
|
||||
c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 256c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112z" />
|
||||
<glyph glyph-name="user-circle" unicode="" horiz-adv-x="496"
|
||||
d="M248 344c53 0 96 -43 96 -96s-43 -96 -96 -96s-96 43 -96 96s43 96 96 96zM248 200c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8
|
||||
c49.7002 0 95.0996 18.2998 130.1 48.4004c-14.8994 23 -40.3994 38.5 -69.5996 39.5c-20.7998 -6.5 -40.5996 -9.60059 -60.5 -9.60059s-39.7002 3.2002 -60.5 9.60059c-29.2002 -0.900391 -54.7002 -16.5 -69.5996 -39.5c35 -30.1006 80.3994 -48.4004 130.1 -48.4004z
|
||||
M410.7 76.0996c23.3994 32.7002 37.2998 72.7002 37.2998 115.9c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -43.2002 13.9004 -83.2002 37.2998 -115.9c24.5 31.4004 62.2002 51.9004 105.101 51.9004c10.1992 0 26.0996 -9.59961 57.5996 -9.59961
|
||||
c31.5996 0 47.4004 9.59961 57.5996 9.59961c43 0 80.7002 -20.5 105.101 -51.9004z" />
|
||||
<glyph glyph-name="id-badge" unicode="" horiz-adv-x="384"
|
||||
d="M336 448c26.5 0 48 -21.5 48 -48v-416c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48h288zM336 -16v416h-288v-416h288zM144 336c-8.7998 0 -16 7.2002 -16 16s7.2002 16 16 16h96c8.7998 0 16 -7.2002 16 -16s-7.2002 -16 -16 -16
|
||||
h-96zM192 160c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64zM102.4 32c-12.4004 0 -22.4004 8.59961 -22.4004 19.2002v19.2002c0 31.7998 30.0996 57.5996 67.2002 57.5996c11.3994 0 17.8994 -8 44.7998 -8
|
||||
c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996v-19.2002c0 -10.6006 -10 -19.2002 -22.4004 -19.2002h-179.199z" />
|
||||
<glyph glyph-name="id-card" unicode="" horiz-adv-x="576"
|
||||
d="M528 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-480c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h480zM528 16v288h-480v-288h32.7998c-1 4.5 -0.799805 -3.59961 -0.799805 22.4004c0 31.7998 30.0996 57.5996 67.2002 57.5996
|
||||
c11.3994 0 17.8994 -8 44.7998 -8c26.0996 0 34 8 44.7998 8c37.1006 0 67.2002 -25.7998 67.2002 -57.5996c0 -26 0.0996094 -17.9004 -0.799805 -22.4004h224.8zM360 96c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16
|
||||
c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 160c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM360 224c-4.40039 0 -8 3.59961 -8 8v16c0 4.40039 3.59961 8 8 8h112
|
||||
c4.40039 0 8 -3.59961 8 -8v-16c0 -4.40039 -3.59961 -8 -8 -8h-112zM192 128c-35.2998 0 -64 28.7002 -64 64s28.7002 64 64 64s64 -28.7002 64 -64s-28.7002 -64 -64 -64z" />
|
||||
<glyph glyph-name="window-maximize" unicode=""
|
||||
d="M464 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h416zM464 22v234h-416v-234c0 -3.2998 2.7002 -6 6 -6h404c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="window-minimize" unicode=""
|
||||
d="M480 -32h-448c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32h448c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32z" />
|
||||
<glyph glyph-name="window-restore" unicode=""
|
||||
d="M464 448c26.5 0 48 -21.5 48 -48v-320c0 -26.5 -21.5 -48 -48 -48h-48v-48c0 -26.5 -21.5 -48 -48 -48h-320c-26.5 0 -48 21.5 -48 48v320c0 26.5 21.5 48 48 48h48v48c0 26.5 21.5 48 48 48h320zM368 -16v208h-320v-208h320zM464 80v320h-320v-48h224
|
||||
c26.5 0 48 -21.5 48 -48v-224h48z" />
|
||||
<glyph glyph-name="snowflake" unicode="" horiz-adv-x="448"
|
||||
d="M440.1 92.7998c7.60059 -4.39941 10.1006 -14.2002 5.5 -21.7002l-7.89941 -13.8994c-4.40039 -7.7002 -14 -10.2998 -21.5 -5.90039l-39.2002 23l9.09961 -34.7002c2.30078 -8.5 -2.69922 -17.2998 -11.0996 -19.5996l-15.2002 -4.09961
|
||||
c-8.39941 -2.30078 -17.0996 2.7998 -19.2998 11.2998l-21.2998 81l-71.9004 42.2002v-84.5l58.2998 -59.3008c6.10059 -6.19922 6.10059 -16.3994 0 -22.5996l-11.0996 -11.2998c-6.09961 -6.2002 -16.0996 -6.2002 -22.2002 0l-24.8994 25.3994v-46.0996
|
||||
c0 -8.7998 -7 -16 -15.7002 -16h-15.7002c-8.7002 0 -15.7002 7.2002 -15.7002 16v45.9004l-24.8994 -25.4004c-6.10059 -6.2002 -16.1006 -6.2002 -22.2002 0l-11.1006 11.2998c-6.09961 6.2002 -6.09961 16.4004 0 22.6006l58.3008 59.2998v84.5l-71.9004 -42.2002
|
||||
l-21.2998 -81c-2.2998 -8.5 -10.9004 -13.5996 -19.2998 -11.2998l-15.2002 4.09961c-8.40039 2.2998 -13.2998 11.1006 -11.1006 19.6006l9.10059 34.6992l-39.2002 -23c-7.5 -4.39941 -17.2002 -1.7998 -21.5 5.90039l-7.90039 13.9004
|
||||
c-4.2998 7.69922 -1.69922 17.5 5.80078 21.8994l39.1992 23l-34.0996 9.2998c-8.40039 2.30078 -13.2998 11.1006 -11.0996 19.6006l4.09961 15.5c2.2998 8.5 10.9004 13.5996 19.2998 11.2998l79.7002 -21.7002l71.9004 42.2002l-71.9004 42.2002l-79.7002 -21.7002
|
||||
c-8.39941 -2.2998 -17.0996 2.7998 -19.2998 11.2998l-4.09961 15.5c-2.30078 8.5 2.69922 17.2998 11.0996 19.6006l34.0996 9.09961l-39.1992 23c-7.60059 4.5 -10.1006 14.2002 -5.80078 21.9004l7.90039 13.8994c4.40039 7.7002 14 10.2998 21.5 5.90039l39.2002 -23
|
||||
l-9.10059 34.7002c-2.2998 8.5 2.7002 17.2998 11.1006 19.5996l15.2002 4.09961c8.39941 2.30078 17.0996 -2.7998 19.2998 -11.2998l21.2998 -81l71.9004 -42.2002v84.5l-58.3008 59.3008c-6.09961 6.19922 -6.09961 16.3994 0 22.5996l11.5 11.2998
|
||||
c6.10059 6.2002 16.1006 6.2002 22.2002 0l24.9004 -25.3994v46.0996c0 8.7998 7 16 15.7002 16h15.6992c8.7002 0 15.7002 -7.2002 15.7002 -16v-45.9004l24.9004 25.4004c6.09961 6.2002 16.0996 6.2002 22.2002 0l11.0996 -11.2998
|
||||
c6.09961 -6.2002 6.09961 -16.4004 0 -22.6006l-58.2998 -59.2998v-84.5l71.8994 42.2002l21.3008 81c2.2998 8.5 10.8994 13.5996 19.2998 11.2998l15.2002 -4.09961c8.39941 -2.2998 13.2998 -11.1006 11.0996 -19.6006l-9.09961 -34.6992l39.1992 23
|
||||
c7.5 4.39941 17.2002 1.7998 21.5 -5.90039l7.90039 -13.9004c4.2998 -7.69922 1.7002 -17.5 -5.7998 -21.8994l-39.2002 -23l34.0996 -9.2998c8.40039 -2.30078 13.3008 -11.1006 11.1006 -19.6006l-4.10059 -15.5c-2.2998 -8.5 -10.8994 -13.5996 -19.2998 -11.2998
|
||||
l-79.7002 21.7002l-71.8994 -42.2002l71.7998 -42.2002l79.7002 21.7002c8.39941 2.2998 17.0996 -2.7998 19.2998 -11.2998l4.09961 -15.5c2.30078 -8.5 -2.69922 -17.2998 -11.0996 -19.6006l-34.0996 -9.2998z" />
|
||||
<glyph glyph-name="trash-alt" unicode="" horiz-adv-x="448"
|
||||
d="M268 32c-6.62305 0 -12 5.37695 -12 12v216c0 6.62305 5.37695 12 12 12h24c6.62305 0 12 -5.37695 12 -12v-216c0 -6.62305 -5.37695 -12 -12 -12h-24zM432 368c8.83105 0 16 -7.16895 16 -16v-16c0 -8.83105 -7.16895 -16 -16 -16h-16v-336
|
||||
c0 -26.4922 -21.5078 -48 -48 -48h-288c-26.4922 0 -48 21.5078 -48 48v336h-16c-8.83105 0 -16 7.16895 -16 16v16c0 8.83105 7.16895 16 16 16h82.4102l34.0195 56.7002c8.39258 13.9844 23.6777 23.2998 41.1602 23.2998h100.82
|
||||
c0.0078125 0 -0.015625 0.0517578 -0.0078125 0.0517578c17.4824 0 32.7949 -9.36719 41.1875 -23.3516l34 -56.7002h82.4102zM171.84 397.09l-17.4502 -29.0898h139.221l-17.46 29.0898c-1.0498 1.74707 -2.95898 2.91016 -5.14355 2.91016h-0.00683594h-94
|
||||
c-0.00585938 0 -0.00683594 0.00683594 -0.0126953 0.00683594c-2.18457 0 -4.09766 -1.16992 -5.14746 -2.91699zM368 -16v336h-288v-336h288zM156 32c-6.62305 0 -12 5.37695 -12 12v216c0 6.62305 5.37695 12 12 12h24c6.62305 0 12 -5.37695 12 -12v-216
|
||||
c0 -6.62305 -5.37695 -12 -12 -12h-24z" />
|
||||
<glyph glyph-name="images" unicode="" horiz-adv-x="576"
|
||||
d="M480 32v-16c0 -26.5098 -21.4902 -48 -48 -48h-384c-26.5098 0 -48 21.4902 -48 48v256c0 26.5098 21.4902 48 48 48h16v-48h-10c-3.31152 0 -6 -2.68848 -6 -6v-244c0 -3.31152 2.68848 -6 6 -6h372c3.31152 0 6 2.68848 6 6v10h48zM522 368h-372
|
||||
c-3.31152 0 -6 -2.68848 -6 -6v-244c0 -3.31152 2.68848 -6 6 -6h372c3.31152 0 6 2.68848 6 6v244c0 3.31152 -2.68848 6 -6 6zM528 416c26.5098 0 48 -21.4902 48 -48v-256c0 -26.5098 -21.4902 -48 -48 -48h-384c-26.5098 0 -48 21.4902 -48 48v256
|
||||
c0 26.5098 21.4902 48 48 48h384zM264 304c0 -22.0908 -17.9092 -40 -40 -40s-40 17.9092 -40 40s17.9092 40 40 40s40 -17.9092 40 -40zM192 208l39.5146 39.5146c4.68652 4.68652 12.2842 4.68652 16.9717 0l39.5137 -39.5146l103.515 103.515
|
||||
c4.68652 4.68652 12.2842 4.68652 16.9717 0l71.5137 -71.5146v-80h-288v48z" />
|
||||
<glyph glyph-name="clipboard" unicode="" horiz-adv-x="384"
|
||||
d="M336 384c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h80c0 35.2998 28.7002 64 64 64s64 -28.7002 64 -64h80zM192 408c-13.2998 0 -24 -10.7002 -24 -24s10.7002 -24 24 -24s24 10.7002 24 24
|
||||
s-10.7002 24 -24 24zM336 -10v340c0 3.2998 -2.7002 6 -6 6h-42v-36c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12v36h-42c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h276c3.2998 0 6 2.7002 6 6z" />
|
||||
<glyph glyph-name="arrow-alt-circle-down" unicode=""
|
||||
d="M256 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM256 -8c110.5 0 200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200zM224 308c0 6.59961 5.40039 12 12 12h40c6.59961 0 12 -5.40039 12 -12v-116
|
||||
h67c10.7002 0 16.0996 -12.9004 8.5 -20.5l-99 -99c-4.7002 -4.7002 -12.2998 -4.7002 -17 0l-99 99c-7.5 7.59961 -2.2002 20.5 8.5 20.5h67v116z" />
|
||||
<glyph glyph-name="arrow-alt-circle-left" unicode=""
|
||||
d="M8 192c0 137 111 248 248 248s248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248zM456 192c0 110.5 -89.5 200 -200 200s-200 -89.5 -200 -200s89.5 -200 200 -200s200 89.5 200 200zM384 212v-40c0 -6.59961 -5.40039 -12 -12 -12h-116v-67
|
||||
c0 -10.7002 -12.9004 -16 -20.5 -8.5l-99 99c-4.7002 4.7002 -4.7002 12.2998 0 17l99 99c7.59961 7.59961 20.5 2.2002 20.5 -8.5v-67h116c6.59961 0 12 -5.40039 12 -12z" />
|
||||
<glyph glyph-name="arrow-alt-circle-right" unicode=""
|
||||
d="M504 192c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248s248 -111 248 -248zM56 192c0 -110.5 89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200s-200 -89.5 -200 -200zM128 172v40c0 6.59961 5.40039 12 12 12h116v67
|
||||
c0 10.7002 12.9004 16 20.5 8.5l99 -99c4.7002 -4.7002 4.7002 -12.2998 0 -17l-99 -99c-7.59961 -7.59961 -20.5 -2.2002 -20.5 8.5v67h-116c-6.59961 0 -12 5.40039 -12 12z" />
|
||||
<glyph glyph-name="arrow-alt-circle-up" unicode=""
|
||||
d="M256 -56c-137 0 -248 111 -248 248s111 248 248 248s248 -111 248 -248s-111 -248 -248 -248zM256 392c-110.5 0 -200 -89.5 -200 -200s89.5 -200 200 -200s200 89.5 200 200s-89.5 200 -200 200zM276 64h-40c-6.59961 0 -12 5.40039 -12 12v116h-67
|
||||
c-10.7002 0 -16 12.9004 -8.5 20.5l99 99c4.7002 4.7002 12.2998 4.7002 17 0l99 -99c7.59961 -7.59961 2.2002 -20.5 -8.5 -20.5h-67v-116c0 -6.59961 -5.40039 -12 -12 -12z" />
|
||||
<glyph glyph-name="gem" unicode="" horiz-adv-x="576"
|
||||
d="M464 448c4.09961 0 7.7998 -2 10.0996 -5.40039l99.9004 -147.199c2.90039 -4.40039 2.59961 -10.1006 -0.700195 -14.2002l-276 -340.8c-4.7998 -5.90039 -13.7998 -5.90039 -18.5996 0l-276 340.8c-3.2998 4 -3.60059 9.7998 -0.700195 14.2002l100 147.199
|
||||
c2.2002 3.40039 6 5.40039 10 5.40039h352zM444.7 400h-56.7998l51.6992 -96h68.4004zM242.6 400l-51.5996 -96h194l-51.7002 96h-90.7002zM131.3 400l-63.2998 -96h68.4004l51.6992 96h-56.7998zM88.2998 256l119.7 -160l-68.2998 160h-51.4004zM191.2 256l96.7998 -243.3
|
||||
l96.7998 243.3h-193.6zM368 96l119.6 160h-51.3994z" />
|
||||
<glyph glyph-name="money-bill-alt" unicode="" horiz-adv-x="640"
|
||||
d="M320 304c53.0195 0 96 -50.1396 96 -112c0 -61.8701 -43 -112 -96 -112c-53.0195 0 -96 50.1504 -96 112c0 61.8604 42.9805 112 96 112zM360 136v16c0 4.41992 -3.58008 8 -8 8h-16v88c0 4.41992 -3.58008 8 -8 8h-13.5801
|
||||
c-4.91113 0 -9.50586 -1.49316 -13.3096 -4.03027l-15.3301 -10.2197c-2.15332 -1.43262 -3.55957 -3.88379 -3.55957 -6.66113c0 -1.6377 0.493164 -3.16113 1.33887 -4.42871l8.88086 -13.3105c1.43164 -2.15234 3.88379 -3.55957 6.66113 -3.55957
|
||||
c1.6377 0 3.16016 0.494141 4.42871 1.33984l0.469727 0.310547v-55.4404h-16c-4.41992 0 -8 -3.58008 -8 -8v-16c0 -4.41992 3.58008 -8 8 -8h64c4.41992 0 8 3.58008 8 8zM608 384c17.6699 0 32 -14.3301 32 -32v-320c0 -17.6699 -14.3301 -32 -32 -32h-576
|
||||
c-17.6699 0 -32 14.3301 -32 32v320c0 17.6699 14.3301 32 32 32h576zM592 112v160c-35.3496 0 -64 28.6504 -64 64h-416c0 -35.3496 -28.6504 -64 -64 -64v-160c35.3496 0 64 -28.6504 64 -64h416c0 35.3496 28.6504 64 64 64z" />
|
||||
<glyph glyph-name="window-close" unicode=""
|
||||
d="M464 416c26.5 0 48 -21.5 48 -48v-352c0 -26.5 -21.5 -48 -48 -48h-416c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h416zM464 22v340c0 3.2998 -2.7002 6 -6 6h-404c-3.2998 0 -6 -2.7002 -6 -6v-340c0 -3.2998 2.7002 -6 6 -6h404c3.2998 0 6 2.7002 6 6z
|
||||
M356.5 253.4l-61.4004 -61.4004l61.4004 -61.4004c4.59961 -4.59961 4.59961 -12.0996 0 -16.7998l-22.2998 -22.2998c-4.60059 -4.59961 -12.1006 -4.59961 -16.7998 0l-61.4004 61.4004l-61.4004 -61.4004c-4.59961 -4.59961 -12.0996 -4.59961 -16.7998 0
|
||||
l-22.2998 22.2998c-4.59961 4.60059 -4.59961 12.1006 0 16.7998l61.4004 61.4004l-61.4004 61.4004c-4.59961 4.59961 -4.59961 12.0996 0 16.7998l22.2998 22.2998c4.60059 4.59961 12.1006 4.59961 16.7998 0l61.4004 -61.4004l61.4004 61.4004
|
||||
c4.59961 4.59961 12.0996 4.59961 16.7998 0l22.2998 -22.2998c4.7002 -4.60059 4.7002 -12.1006 0 -16.7998z" />
|
||||
<glyph glyph-name="comment-dots" unicode=""
|
||||
d="M144 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM256 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM368 240c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32
|
||||
s-32 14.2998 -32 32s14.2998 32 32 32zM256 416c141.4 0 256 -93.0996 256 -208s-114.6 -208 -256 -208c-32.7998 0 -64 5.2002 -92.9004 14.2998c-29.0996 -20.5996 -77.5996 -46.2998 -139.1 -46.2998c-9.59961 0 -18.2998 5.7002 -22.0996 14.5
|
||||
c-3.80078 8.7998 -2 19 4.59961 26c0.5 0.400391 31.5 33.7998 46.4004 73.2002c-33 35.0996 -52.9004 78.7002 -52.9004 126.3c0 114.9 114.6 208 256 208zM256 48c114.7 0 208 71.7998 208 160s-93.2998 160 -208 160s-208 -71.7998 -208 -160
|
||||
c0 -42.2002 21.7002 -74.0996 39.7998 -93.4004l20.6006 -21.7998l-10.6006 -28.0996c-5.5 -14.5 -12.5996 -28.1006 -19.8994 -40.2002c23.5996 7.59961 43.1992 18.9004 57.5 29l19.5 13.7998l22.6992 -7.2002c25.3008 -8 51.7002 -12.0996 78.4004 -12.0996z" />
|
||||
<glyph glyph-name="smile-wink" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM365.8 138.4c10.2002 -8.5 11.6006 -23.6006 3.10059 -33.8008
|
||||
c-30 -36 -74.1006 -56.5996 -120.9 -56.5996s-90.9004 20.5996 -120.9 56.5996c-8.39941 10.2002 -7.09961 25.3008 3.10059 33.8008c10.0996 8.39941 25.2998 7.09961 33.7998 -3.10059c20.7998 -25.0996 51.5 -39.3994 84 -39.3994s63.2002 14.3994 84 39.3994
|
||||
c8.5 10.2002 23.5996 11.6006 33.7998 3.10059zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 268c25.7002 0 55.9004 -16.9004 59.7002 -42.0996c1.7998 -11.1006 -11.2998 -18.2002 -19.7998 -10.8008l-9.5 8.5
|
||||
c-14.8008 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-8.30078 -7.39941 -21.5 -0.399414 -19.8008 10.8008c4 25.1992 34.2002 42.0996 59.9004 42.0996z" />
|
||||
<glyph glyph-name="angry" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM248 136c33.5996 0 65.2002 -14.7998 86.7998 -40.5996
|
||||
c8.40039 -10.2002 7.10059 -25.3008 -3.09961 -33.8008c-10.6006 -8.89941 -25.7002 -6.69922 -33.7998 3c-24.8008 29.7002 -75 29.7002 -99.8008 0c-8.5 -10.1992 -23.5996 -11.5 -33.7998 -3s-11.5996 23.6006 -3.09961 33.8008
|
||||
c21.5996 25.7998 53.2002 40.5996 86.7998 40.5996zM200 208c0 -17.7002 -14.2998 -32.0996 -32 -32.0996s-32 14.2998 -32 32c0 6.19922 2.2002 11.6992 5.2998 16.5996l-28.2002 8.5c-12.6992 3.7998 -19.8994 17.2002 -16.0996 29.9004
|
||||
c3.7998 12.6992 17.0996 20 29.9004 16.0996l80 -24c12.6992 -3.7998 19.8994 -17.2002 16.0996 -29.9004c-3.09961 -10.3994 -12.7002 -17.0996 -23 -17.0996zM399 262.9c3.7998 -12.7002 -3.40039 -26.1006 -16.0996 -29.8008l-28.2002 -8.5
|
||||
c3.09961 -4.89941 5.2998 -10.3994 5.2998 -16.5996c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32c-10.2998 0 -19.9004 6.7002 -23 17.0996c-3.7998 12.7002 3.40039 26.1006 16.0996 29.9004l80 24c12.8008 3.7998 26.1006 -3.40039 29.9004 -16.0996z" />
|
||||
<glyph glyph-name="dizzy" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM214.2 209.9
|
||||
c-7.90039 -7.90039 -20.5 -7.90039 -28.4004 -0.200195l-17.7998 17.7998l-17.7998 -17.7998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0c-7.80078 7.7998 -7.80078 20.5 0 28.2998l17.8994 17.9004l-17.8994 17.8994c-7.80078 7.7998 -7.80078 20.5 0 28.2998
|
||||
c7.7998 7.80078 20.5 7.80078 28.2998 0l17.7998 -17.7998l17.9004 17.9004c7.7998 7.7998 20.5 7.7998 28.2998 0s7.7998 -20.5 0 -28.2998l-17.9004 -17.9004l17.9004 -17.7998c7.7998 -7.7998 7.7998 -20.5 0 -28.2998zM374.2 302.1
|
||||
c7.7002 -7.7998 7.7002 -20.3994 0 -28.1992l-17.9004 -17.9004l17.7998 -18c7.80078 -7.7998 7.80078 -20.5 0 -28.2998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0l-17.7998 17.7998l-17.7998 -17.7998c-7.7998 -7.7998 -20.5 -7.7998 -28.2998 0
|
||||
c-7.80078 7.7998 -7.80078 20.5 0 28.2998l17.8994 17.9004l-17.8994 17.8994c-7.80078 7.7998 -7.80078 20.5 0 28.2998c7.7998 7.80078 20.5 7.80078 28.2998 0l17.7998 -17.7998l17.9004 17.7998c7.7998 7.80078 20.5 7.80078 28.2998 0zM248 176
|
||||
c35.2998 0 64 -28.7002 64 -64s-28.7002 -64 -64 -64s-64 28.7002 -64 64s28.7002 64 64 64z" />
|
||||
<glyph glyph-name="flushed" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM344 304c44.2002 0 80 -35.7998 80 -80s-35.7998 -80 -80 -80
|
||||
s-80 35.7998 -80 80s35.7998 80 80 80zM344 176c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM344 248c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM232 224c0 -44.2002 -35.7998 -80 -80 -80
|
||||
s-80 35.7998 -80 80s35.7998 80 80 80s80 -35.7998 80 -80zM152 176c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM152 248c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM312 104
|
||||
c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-128c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h128z" />
|
||||
<glyph glyph-name="frown-open" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM200 240c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32
|
||||
s14.2998 32 32 32s32 -14.2998 32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM248 160c35.5996 0 88.7998 -21.2998 95.7998 -61.2002c2 -11.7998 -9.09961 -21.5996 -20.5 -18.0996
|
||||
c-31.2002 9.59961 -59.3994 15.2998 -75.2998 15.2998s-44.0996 -5.7002 -75.2998 -15.2998c-11.5 -3.40039 -22.5 6.2998 -20.5 18.0996c7 39.9004 60.2002 61.2002 95.7998 61.2002z" />
|
||||
<glyph glyph-name="grimace" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
|
||||
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM344 192c26.5 0 48 -21.5 48 -48v-32c0 -26.5 -21.5 -48 -48 -48h-192c-26.5 0 -48 21.5 -48 48v32c0 26.5 21.5 48 48 48
|
||||
h192zM176 96v24h-40v-8c0 -8.7998 7.2002 -16 16 -16h24zM176 136v24h-24c-8.7998 0 -16 -7.2002 -16 -16v-8h40zM240 96v24h-48v-24h48zM240 136v24h-48v-24h48zM304 96v24h-48v-24h48zM304 136v24h-48v-24h48zM360 112v8h-40v-24h24c8.7998 0 16 7.2002 16 16zM360 136v8
|
||||
c0 8.7998 -7.2002 16 -16 16h-24v-24h40z" />
|
||||
<glyph glyph-name="grin" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
|
||||
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 9.90039 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
|
||||
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32z" />
|
||||
<glyph glyph-name="grin-alt" unicode="" horiz-adv-x="496"
|
||||
d="M200.3 200c-7.5 -11.4004 -24.5996 -12 -32.7002 0c-12.3994 18.7002 -15.1992 37.2998 -15.6992 56c0.599609 18.7002 3.2998 37.2998 15.6992 56c7.60059 11.4004 24.7002 12 32.7002 0c12.4004 -18.7002 15.2002 -37.2998 15.7002 -56
|
||||
c-0.599609 -18.7002 -3.2998 -37.2998 -15.7002 -56zM328.3 200c-7.5 -11.4004 -24.5996 -12 -32.7002 0c-12.3994 18.7002 -15.1992 37.2998 -15.6992 56c0.599609 18.7002 3.2998 37.2998 15.6992 56c7.60059 11.4004 24.7002 12 32.7002 0
|
||||
c12.4004 -18.7002 15.2002 -37.2998 15.7002 -56c-0.599609 -18.7002 -3.2998 -37.2998 -15.7002 -56zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200
|
||||
s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006
|
||||
s79.7002 4.7998 105.6 13.1006z" />
|
||||
<glyph glyph-name="grin-beam" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
|
||||
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM117.7 216.3c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
|
||||
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996
|
||||
l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002zM277.7 216.3c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998
|
||||
c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002z" />
|
||||
<glyph glyph-name="grin-beam-sweat" unicode="" horiz-adv-x="496"
|
||||
d="M440 288c-29.5 0 -53.2998 26.2998 -53.2998 58.7002c0 25 31.7002 75.5 46.2002 97.2998c3.5 5.2998 10.5996 5.2998 14.1992 0c14.5 -21.7998 46.2002 -72.2998 46.2002 -97.2998c0 -32.4004 -23.7998 -58.7002 -53.2998 -58.7002zM248 48
|
||||
c-51.9004 0 -115.3 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-8 -47.0996 -71.3994 -80 -123.3 -80zM378.3 216.3
|
||||
c-3.09961 -0.899414 -7.2002 0.100586 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
|
||||
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998zM483.6 269.2c8 -24.2998 12.4004 -50.2002 12.4004 -77.2002c0 -137 -111 -248 -248 -248s-248 111 -248 248s111 248 248 248
|
||||
c45.7002 0 88.4004 -12.5996 125.2 -34.2002c-10.9004 -21.5996 -15.5 -36.2002 -17.2002 -45.7002c-31.2002 20.1006 -68.2002 31.9004 -108 31.9004c-110.3 0 -200 -89.7002 -200 -200s89.7002 -200 200 -200s200 89.7002 200 200
|
||||
c0 22.5 -3.90039 44.0996 -10.7998 64.2998c0.399414 0 21.7998 -2.7998 46.3994 12.9004zM168 258.6c-12.2998 0 -23.7998 -7.7998 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998
|
||||
c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996z" />
|
||||
<glyph glyph-name="grin-hearts" unicode="" horiz-adv-x="496"
|
||||
d="M353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM200.8 192.3
|
||||
l-70.2002 18.1006c-20.3994 5.2998 -31.8994 27 -24.1992 47.1992c6.69922 17.7002 26.6992 26.7002 44.8994 22l7.10059 -1.89941l2 7.09961c5.09961 18.1006 22.8994 30.9004 41.5 27.9004c21.3994 -3.40039 34.3994 -24.2002 28.7998 -44.5l-19.4004 -69.9004
|
||||
c-1.2998 -4.5 -6 -7.2002 -10.5 -6zM389.6 257.6c7.7002 -20.1992 -3.7998 -41.7998 -24.1992 -47.0996l-70.2002 -18.2002c-4.60059 -1.2002 -9.2998 1.5 -10.5 6l-19.4004 69.9004c-5.59961 20.2998 7.40039 41.0996 28.7998 44.5c18.7002 3 36.5 -9.7998 41.5 -27.9004
|
||||
l2 -7.09961l7.10059 1.89941c18.2002 4.7002 38.2002 -4.39941 44.8994 -22zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200
|
||||
s89.7002 -200 200 -200z" />
|
||||
<glyph glyph-name="grin-squint" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
|
||||
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.9004 -123.3 80c-1.7002 9.90039 7.7998 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM118.9 184.2c-3.80078 4.39941 -3.90039 11 -0.100586 15.5l33.6006 40.2998
|
||||
l-33.6006 40.2998c-3.7002 4.5 -3.7002 11 0.100586 15.5c3.89941 4.40039 10.1992 5.5 15.2998 2.5l80 -48c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998s-2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7002 -1.7002 -15.2998 2.5zM361.8 181.7
|
||||
l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5.10059 2.90039 11.5 1.90039 15.2998 -2.5c3.80078 -4.5 3.90039 -11 0.100586 -15.5l-33.6006 -40.2998l33.6006 -40.2998c3.7002 -4.5 3.7002 -11 -0.100586 -15.5
|
||||
c-3.59961 -4.2002 -9.89941 -5.7002 -15.2998 -2.5z" />
|
||||
<glyph glyph-name="grin-squint-tears" unicode=""
|
||||
d="M117.1 63.9004c6.30078 0.899414 11.7002 -4.5 10.9004 -10.9004c-3.7002 -25.7998 -13.7002 -84 -30.5996 -100.9c-22 -21.8994 -57.9004 -21.5 -80.3008 0.900391c-22.3994 22.4004 -22.7998 58.4004 -0.899414 80.2998
|
||||
c16.8994 16.9004 75.0996 26.9004 100.899 30.6006zM75.9004 105.6c-19.6006 -3.89941 -35.1006 -8.09961 -47.3008 -12.1992c-39.2998 90.5996 -22.0996 199.899 52 274c48.5 48.3994 111.9 72.5996 175.4 72.5996c38.9004 0 77.7998 -9.2002 113.2 -27.4004
|
||||
c-4 -12.1992 -8.2002 -28 -12 -48.2998c-30.4004 17.9004 -65 27.7002 -101.2 27.7002c-53.4004 0 -103.6 -20.7998 -141.4 -58.5996c-61.5996 -61.5 -74.2998 -153.4 -38.6992 -227.801zM428.2 293.2c20.2998 3.89941 36.2002 8 48.5 12
|
||||
c47.8994 -93.2002 32.8994 -210.5 -45.2002 -288.601c-48.5 -48.3994 -111.9 -72.5996 -175.4 -72.5996c-33.6992 0 -67.2998 7 -98.6992 20.5996c4.19922 12.2002 8.2998 27.7002 12.1992 47.2002c26.6006 -12.7998 55.9004 -19.7998 86.4004 -19.7998
|
||||
c53.4004 0 103.6 20.7998 141.4 58.5996c65.6992 65.7002 75.7998 166 30.7998 242.601zM394.9 320.1c-6.30078 -0.899414 -11.7002 4.5 -10.9004 10.9004c3.7002 25.7998 13.7002 84 30.5996 100.9c22 21.8994 57.9004 21.5 80.3008 -0.900391
|
||||
c22.3994 -22.4004 22.7998 -58.4004 0.899414 -80.2998c-16.8994 -16.9004 -75.0996 -26.9004 -100.899 -30.6006zM207.9 211.8c3 -3 4.19922 -7.2998 3.19922 -11.5l-22.5996 -90.5c-1.40039 -5.39941 -6.2002 -9.09961 -11.7002 -9.09961h-0.899414
|
||||
c-5.80078 0.5 -10.5 5.09961 -11 10.8994l-4.80078 52.3008l-52.2998 4.7998c-5.7998 0.5 -10.3994 5.2002 -10.8994 11c-0.400391 5.89941 3.39941 11.2002 9.09961 12.5996l90.5 22.7002c4.2002 1 8.40039 -0.200195 11.4004 -3.2002zM247.6 236.9
|
||||
c-0.0996094 0 -6.39941 -1.80078 -11.3994 3.19922c-3 3 -4.2002 7.30078 -3.2002 11.4004l22.5996 90.5c1.40039 5.7002 7 9.2002 12.6006 9.09961c5.7998 -0.5 10.5 -5.09961 11 -10.8994l4.7998 -52.2998l52.2998 -4.80078c5.7998 -0.5 10.4004 -5.19922 10.9004 -11
|
||||
c0.399414 -5.89941 -3.40039 -11.1992 -9.10059 -12.5996zM299.6 148.4c29.1006 29.0996 53 59.5996 65.3008 83.7998c4.89941 9.2998 17.5996 9.89941 23.3994 1.7002c27.7002 -38.9004 6.10059 -106.9 -30.5996 -143.7s-104.8 -58.2998 -143.7 -30.6006
|
||||
c-8.2998 5.90039 -7.5 18.6006 1.7002 23.4004c24.2002 12.5 54.7998 36.2998 83.8994 65.4004z" />
|
||||
<glyph glyph-name="grin-stars" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM353.6 143.4c10 3.09961 19.3008 -5.5 17.7002 -15.3008
|
||||
c-8 -47.0996 -71.2998 -80 -123.3 -80s-115.4 32.8008 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.3008c26 -8.30078 64.3994 -13.1006 105.6 -13.1006s79.7002 4.7998 105.6 13.1006zM125.7 200.9l6.09961 34.8994l-25.3994 24.6006
|
||||
c-4.60059 4.59961 -1.90039 12.2998 4.2998 13.1992l34.8994 5l15.5 31.6006c2.90039 5.7998 11 5.7998 13.9004 0l15.5 -31.6006l34.9004 -5c6.19922 -1 8.7998 -8.69922 4.2998 -13.1992l-25.4004 -24.6006l6 -34.8994c1 -6.2002 -5.39941 -11 -11 -7.90039
|
||||
l-31.2998 16.2998l-31.2998 -16.2998c-5.60059 -3.09961 -12 1.7002 -11 7.90039zM385.4 273.6c6.19922 -1 8.89941 -8.59961 4.39941 -13.1992l-25.3994 -24.6006l6 -34.8994c1 -6.2002 -5.40039 -11 -11 -7.90039l-31.3008 16.2998l-31.2998 -16.2998
|
||||
c-5.59961 -3.09961 -12 1.7002 -11 7.90039l6 34.8994l-25.3994 24.6006c-4.60059 4.59961 -1.90039 12.2998 4.2998 13.1992l34.8994 5l15.5 31.6006c2.90039 5.7998 11 5.7998 13.9004 0l15.5 -31.6006z" />
|
||||
<glyph glyph-name="grin-tears" unicode="" horiz-adv-x="640"
|
||||
d="M117.1 191.9c6.30078 0.899414 11.7002 -4.5 10.9004 -10.9004c-3.7002 -25.7998 -13.7002 -84 -30.5996 -100.9c-22 -21.8994 -57.9004 -21.5 -80.3008 0.900391c-22.3994 22.4004 -22.7998 58.4004 -0.899414 80.2998c16.8994 16.9004 75.0996 26.9004 100.899 30.6006
|
||||
zM623.8 161.3c21.9004 -21.8994 21.5 -57.8994 -0.799805 -80.2002c-22.4004 -22.3994 -58.4004 -22.7998 -80.2998 -0.899414c-16.9004 16.8994 -26.9004 75.0996 -30.6006 100.899c-0.899414 6.30078 4.5 11.7002 10.8008 10.8008
|
||||
c25.7998 -3.7002 84 -13.7002 100.899 -30.6006zM497.2 99.5996c12.3994 -37.2998 25.0996 -43.7998 28.2998 -46.5c-44.5996 -65.7998 -120 -109.1 -205.5 -109.1s-160.9 43.2998 -205.5 109.1c3.09961 2.60059 15.7998 9.10059 28.2998 46.5
|
||||
c33.4004 -63.8994 100.3 -107.6 177.2 -107.6s143.8 43.7002 177.2 107.6zM122.7 223.5c-2.40039 0.299805 -5 2.5 -49.5 -6.90039c12.3994 125.4 118.1 223.4 246.8 223.4s234.4 -98 246.8 -223.5c-44.2998 9.40039 -47.3994 7.2002 -49.5 7
|
||||
c-15.2002 95.2998 -97.7998 168.5 -197.3 168.5s-182.1 -73.2002 -197.3 -168.5zM320 48c-51.9004 0 -115.3 32.9004 -123.3 80c-1.7002 10 7.89941 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996
|
||||
c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-8 -47.0996 -71.3994 -80 -123.3 -80zM450.3 216.3c-3.09961 -0.899414 -7.2002 0.100586 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17
|
||||
c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998zM240 258.6
|
||||
c-12.2998 0 -23.7998 -7.7998 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004
|
||||
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996z" />
|
||||
<glyph glyph-name="grin-tongue" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0
|
||||
l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200
|
||||
s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996
|
||||
s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998zM168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32
|
||||
s14.2998 32 32 32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
|
||||
<glyph glyph-name="grin-tongue-squint" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0
|
||||
l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200
|
||||
s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996
|
||||
s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998zM377.1 295.8c3.80078 -4.39941 3.90039 -11 0.100586 -15.5l-33.6006 -40.2998
|
||||
l33.6006 -40.2998c3.7002 -4.5 3.7002 -11 -0.100586 -15.5c-3.59961 -4.2002 -9.89941 -5.7002 -15.2998 -2.5l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5 3 11.5 1.90039 15.2998 -2.5zM214.2 250.3
|
||||
c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998s-2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7002 -1.7002 -15.2998 2.5c-3.80078 4.5 -3.90039 11 -0.100586 15.5l33.6006 40.2998l-33.6006 40.2998c-3.7002 4.5 -3.7002 11 0.100586 15.5
|
||||
c3.89941 4.5 10.2998 5.5 15.2998 2.5z" />
|
||||
<glyph glyph-name="grin-tongue-wink" unicode="" horiz-adv-x="496"
|
||||
d="M152 268c25.7002 0 55.9004 -16.9004 59.7998 -42.0996c0.799805 -5 -1.7002 -10 -6.09961 -12.4004c-5.7002 -3.09961 -11.2002 -0.599609 -13.7002 1.59961l-9.5 8.5c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5
|
||||
c-3.7998 -3.39941 -9.2998 -4 -13.7002 -1.59961c-4.39941 2.40039 -6.89941 7.40039 -6.09961 12.4004c3.89941 25.1992 34.0996 42.0996 59.7998 42.0996zM328 320c44.2002 0 80 -35.7998 80 -80s-35.7998 -80 -80 -80s-80 35.7998 -80 80s35.7998 80 80 80zM328 192
|
||||
c26.5 0 48 21.5 48 48s-21.5 48 -48 48s-48 -21.5 -48 -48s21.5 -48 48 -48zM328 264c13.2998 0 24 -10.7002 24 -24s-10.7002 -24 -24 -24s-24 10.7002 -24 24s10.7002 24 24 24zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248z
|
||||
M312 40h0.0996094v43.7998l-17.6992 8.7998c-15.1006 7.60059 -31.5 -1.69922 -34.9004 -16.5l-2.7998 -12.0996c-2.10059 -9.2002 -15.2002 -9.2002 -17.2998 0l-2.80078 12.0996c-3.39941 14.8008 -19.8994 24 -34.8994 16.5l-17.7002 -8.7998v-42.7998
|
||||
c0 -35.2002 28 -64.5 63.0996 -65c35.8008 -0.5 64.9004 28.4004 64.9004 64zM340.2 14.7002c64 33.3994 107.8 100.3 107.8 177.3c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -77 43.7998 -143.9 107.8 -177.3
|
||||
c-2.2002 8.09961 -3.7998 16.5 -3.7998 25.2998v43.5c-14.2002 12.4004 -24.4004 27.5 -27.2998 44.5c-1.7002 10 7.7998 18.4004 17.7002 15.2998c26 -8.2998 64.3994 -13.0996 105.6 -13.0996s79.7002 4.7998 105.6 13.0996c10 3.2002 19.4004 -5.39941 17.7002 -15.2998
|
||||
c-2.89941 -17 -13.0996 -32.0996 -27.2998 -44.5v-43.5c0 -8.7998 -1.59961 -17.2002 -3.7998 -25.2998z" />
|
||||
<glyph glyph-name="grin-wink" unicode="" horiz-adv-x="496"
|
||||
d="M328 268c25.6904 0 55.8799 -16.9199 59.8701 -42.1201c1.72949 -11.0898 -11.3506 -18.2695 -19.8301 -10.8398l-9.5498 8.47949c-14.8105 13.1904 -46.1602 13.1904 -60.9707 0l-9.5498 -8.47949c-8.33008 -7.40039 -21.5801 -0.379883 -19.8301 10.8398
|
||||
c3.98047 25.2002 34.1699 42.1201 59.8604 42.1201zM168 208c-17.6699 0 -32 14.3301 -32 32s14.3301 32 32 32s32 -14.3301 32 -32s-14.3301 -32 -32 -32zM353.55 143.36c10.04 3.13965 19.3906 -5.4502 17.71 -15.3408
|
||||
c-7.92969 -47.1494 -71.3193 -80.0195 -123.26 -80.0195s-115.33 32.8701 -123.26 80.0195c-1.69043 9.9707 7.76953 18.4707 17.71 15.3408c25.9297 -8.31055 64.3994 -13.0605 105.55 -13.0605s79.6201 4.75977 105.55 13.0605zM248 440c136.97 0 248 -111.03 248 -248
|
||||
s-111.03 -248 -248 -248s-248 111.03 -248 248s111.03 248 248 248zM248 -8c110.28 0 200 89.7197 200 200s-89.7197 200 -200 200s-200 -89.7197 -200 -200s89.7197 -200 200 -200z" />
|
||||
<glyph glyph-name="kiss" unicode="" horiz-adv-x="496"
|
||||
d="M168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM304 140c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5
|
||||
c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002
|
||||
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM248 440c137 0 248 -111 248 -248
|
||||
s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z
|
||||
" />
|
||||
<glyph glyph-name="kiss-beam" unicode="" horiz-adv-x="496"
|
||||
d="M168 296c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.299805 -3.7998 -2 -7.19922 -5.59961 -8.2998c-3.10059 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996c-12.3008 0 -23.8008 -7.89941 -31.5 -21.5996l-9.5 -17
|
||||
c-1.80078 -3.2002 -5.80078 -4.7002 -9.30078 -3.7002c-3.59961 1.10059 -5.89941 4.60059 -5.59961 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004zM248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8
|
||||
c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM304 140c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5
|
||||
c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002
|
||||
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM328 296
|
||||
c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.299805 -3.7998 -2 -7.19922 -5.59961 -8.2998c-3.10059 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996c-12.3008 0 -23.8008 -7.89941 -31.5 -21.5996l-9.5 -17
|
||||
c-1.80078 -3.2002 -5.80078 -4.7002 -9.30078 -3.7002c-3.59961 1.10059 -5.89941 4.60059 -5.59961 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004z" />
|
||||
<glyph glyph-name="kiss-wink-heart" unicode="" horiz-adv-x="504"
|
||||
d="M304 139.5c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002
|
||||
c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002
|
||||
c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM374.5 223c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-2.5 -2.2998 -7.90039 -4.7002 -13.7002 -1.59961c-4.39941 2.39941 -6.89941 7.39941 -6.09961 12.3994
|
||||
c3.89941 25.2002 34.2002 42.1006 59.7998 42.1006s55.7998 -16.9004 59.7998 -42.1006c0.799805 -5 -1.7002 -10 -6.09961 -12.3994c-4.40039 -2.40039 -9.90039 -1.7002 -13.7002 1.59961zM136 239.5c0 17.7002 14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32
|
||||
s-32 14.2998 -32 32zM501.1 45.5c9.2002 -23.9004 -4.39941 -49.4004 -28.5 -55.7002l-83 -21.5c-5.39941 -1.39941 -10.8994 1.7998 -12.3994 7.10059l-22.9004 82.5996c-6.59961 24 8.7998 48.5996 34 52.5996c22 3.5 43.1006 -11.5996 49 -33l2.2998 -8.39941
|
||||
l8.40039 2.2002c21.5996 5.59961 45.0996 -5.10059 53.0996 -25.9004zM334 11.7002c17.7002 -64 10.9004 -39.5 13.4004 -46.7998c-30.5 -13.4004 -64 -20.9004 -99.4004 -20.9004c-137 0 -248 111 -248 248s111 248 248 248s248 -111 247.9 -248
|
||||
c0 -31.7998 -6.2002 -62.0996 -17.1006 -90c-6 1.5 -12.2002 2.7998 -18.5996 2.90039c-5.60059 9.69922 -13.6006 17.5 -22.6006 23.8994c6.7002 19.9004 10.4004 41.1006 10.4004 63.2002c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200
|
||||
c30.7998 0 59.9004 7.2002 86 19.7002z" />
|
||||
<glyph glyph-name="laugh" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
|
||||
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 224c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM168 224
|
||||
c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
|
||||
<glyph glyph-name="laugh-beam" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
|
||||
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 296c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.700195 -8.5 -10.7998 -11.8994 -14.8994 -4.5
|
||||
l-9.5 17c-7.7002 13.7002 -19.2002 21.6006 -31.5 21.6006c-12.3008 0 -23.8008 -7.90039 -31.5 -21.6006l-9.5 -17c-4.10059 -7.39941 -15.6006 -4.09961 -14.9004 4.5c3.2998 42.1006 32.2002 71.4004 56 71.4004zM127 220.1c-4.2002 -7.39941 -15.7002 -4 -15.0996 4.5
|
||||
c3.2998 42.1006 32.1992 71.4004 56 71.4004c23.7998 0 52.6992 -29.2998 56 -71.4004c0.699219 -8.5 -10.8008 -11.8994 -14.9004 -4.5l-9.5 17c-7.7002 13.7002 -19.2002 21.6006 -31.5 21.6006s-23.7998 -7.90039 -31.5 -21.6006zM362.4 160c8.19922 0 14.5 -7 13.5 -15
|
||||
c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
|
||||
<glyph glyph-name="laugh-squint" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
|
||||
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM343.6 252l33.6006 -40.2998c8.59961 -10.4004 -3.90039 -24.7998 -15.4004 -18l-80 48
|
||||
c-7.7998 4.7002 -7.7998 15.8994 0 20.5996l80 48c11.6006 6.7998 24 -7.7002 15.4004 -18zM134.2 193.7c-11.6006 -6.7998 -24.1006 7.59961 -15.4004 18l33.6006 40.2998l-33.6006 40.2998c-8.59961 10.2998 3.7998 24.9004 15.4004 18l80 -48
|
||||
c7.7998 -4.7002 7.7998 -15.8994 0 -20.5996zM362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
|
||||
<glyph glyph-name="laugh-wink" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM389.4 50.5996c37.7998 37.8008 58.5996 88 58.5996 141.4s-20.7998 103.6 -58.5996 141.4c-37.8008 37.7998 -88 58.5996 -141.4 58.5996s-103.6 -20.7998 -141.4 -58.5996
|
||||
c-37.7998 -37.8008 -58.5996 -88 -58.5996 -141.4s20.7998 -103.6 58.5996 -141.4c37.8008 -37.7998 88 -58.5996 141.4 -58.5996s103.6 20.7998 141.4 58.5996zM328 284c25.7002 0 55.9004 -16.9004 59.7002 -42.0996c1.7998 -11.1006 -11.2998 -18.2002 -19.7998 -10.8008
|
||||
l-9.5 8.5c-14.8008 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-8.30078 -7.39941 -21.5 -0.399414 -19.8008 10.8008c4 25.1992 34.2002 42.0996 59.9004 42.0996zM168 224c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32s-14.2998 -32 -32 -32z
|
||||
M362.4 160c8.19922 0 14.5 -7 13.5 -15c-7.5 -59.2002 -58.9004 -105 -121.101 -105h-13.5996c-62.2002 0 -113.601 45.7998 -121.101 105c-1 8 5.30078 15 13.5 15h228.801z" />
|
||||
<glyph glyph-name="meh-blank" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM168 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32
|
||||
s-32 14.2998 -32 32s14.2998 32 32 32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
|
||||
<glyph glyph-name="meh-rolling-eyes" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM336 296c39.7998 0 72 -32.2002 72 -72s-32.2002 -72 -72 -72
|
||||
s-72 32.2002 -72 72s32.2002 72 72 72zM336 184c22.0996 0 40 17.9004 40 40c0 13.5996 -7.2998 25.0996 -17.7002 32.2998c1 -2.59961 1.7002 -5.39941 1.7002 -8.2998c0 -13.2998 -10.7002 -24 -24 -24s-24 10.7002 -24 24c0 3 0.700195 5.7002 1.7002 8.2998
|
||||
c-10.4004 -7.2002 -17.7002 -18.7002 -17.7002 -32.2998c0 -22.0996 17.9004 -40 40 -40zM232 224c0 -39.7998 -32.2002 -72 -72 -72s-72 32.2002 -72 72s32.2002 72 72 72s72 -32.2002 72 -72zM120 224c0 -22.0996 17.9004 -40 40 -40s40 17.9004 40 40
|
||||
c0 13.5996 -7.2998 25.0996 -17.7002 32.2998c1 -2.59961 1.7002 -5.39941 1.7002 -8.2998c0 -13.2998 -10.7002 -24 -24 -24s-24 10.7002 -24 24c0 3 0.700195 5.7002 1.7002 8.2998c-10.4004 -7.2002 -17.7002 -18.7002 -17.7002 -32.2998zM312 96
|
||||
c13.2002 0 24 -10.7998 24 -24s-10.7998 -24 -24 -24h-128c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24h128z" />
|
||||
<glyph glyph-name="sad-cry" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM392 53.5996c34.5996 35.9004 56 84.7002 56 138.4c0 110.3 -89.7002 200 -200 200s-200 -89.7002 -200 -200c0 -53.7002 21.4004 -102.4 56 -138.4v114.4
|
||||
c0 13.2002 10.7998 24 24 24s24 -10.7998 24 -24v-151.4c28.5 -15.5996 61.2002 -24.5996 96 -24.5996s67.5 9 96 24.5996v151.4c0 13.2002 10.7998 24 24 24s24 -10.7998 24 -24v-114.4zM205.8 213.5c-5.7998 -3.2002 -11.2002 -0.700195 -13.7002 1.59961l-9.5 8.5
|
||||
c-14.7998 13.2002 -46.1992 13.2002 -61 0l-9.5 -8.5c-3.7998 -3.39941 -9.2998 -4 -13.6992 -1.59961c-4.40039 2.40039 -6.90039 7.40039 -6.10059 12.4004c3.90039 25.1992 34.2002 42.0996 59.7998 42.0996c25.6006 0 55.8008 -16.9004 59.8008 -42.0996
|
||||
c0.799805 -5 -1.7002 -10 -6.10059 -12.4004zM344 268c25.7002 0 55.9004 -16.9004 59.7998 -42.0996c0.799805 -5 -1.7002 -10 -6.09961 -12.4004c-5.7002 -3.09961 -11.2002 -0.599609 -13.7002 1.59961l-9.5 8.5c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5
|
||||
c-3.7998 -3.39941 -9.2002 -4 -13.7002 -1.59961c-4.39941 2.40039 -6.89941 7.40039 -6.09961 12.4004c3.89941 25.1992 34.0996 42.0996 59.7998 42.0996zM248 176c30.9004 0 56 -28.7002 56 -64s-25.0996 -64 -56 -64s-56 28.7002 -56 64s25.0996 64 56 64z" />
|
||||
<glyph glyph-name="sad-tear" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM256 144c38.0996 0 74 -16.7998 98.5 -46.0996
|
||||
c8.5 -10.2002 7.09961 -25.3008 -3.09961 -33.8008c-10.6006 -8.7998 -25.7002 -6.69922 -33.8008 3.10059c-15.2998 18.2998 -37.7998 28.7998 -61.5996 28.7998c-13.2002 0 -24 10.7998 -24 24s10.7998 24 24 24zM168 208c-17.7002 0 -32 14.2998 -32 32s14.2998 32 32 32
|
||||
s32 -14.2998 32 -32s-14.2998 -32 -32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32zM162.4 173.2c2.7998 3.7002 8.39941 3.7002 11.1992 0c11.4004 -15.2998 36.4004 -50.6006 36.4004 -68.1006
|
||||
c0 -22.6992 -18.7998 -41.0996 -42 -41.0996s-42 18.4004 -42 41.0996c0 17.5 25 52.8008 36.4004 68.1006z" />
|
||||
<glyph glyph-name="smile-beam" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM332 135.4c8.5 10.1992 23.5996 11.5 33.7998 3.09961
|
||||
c10.2002 -8.5 11.6006 -23.5996 3.10059 -33.7998c-30 -36 -74.1006 -56.6006 -120.9 -56.6006s-90.9004 20.6006 -120.9 56.6006c-8.39941 10.2002 -7.09961 25.2998 3.10059 33.7998c10.2002 8.40039 25.2998 7.09961 33.7998 -3.09961
|
||||
c20.7998 -25.1006 51.5 -39.4004 84 -39.4004s63.2002 14.4004 84 39.4004zM136.5 237l-9.5 -17c-1.90039 -3.2002 -5.90039 -4.7998 -9.2998 -3.7002c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004s52.7002 -29.2998 56 -71.4004
|
||||
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996zM328 296c23.7998 0 52.7002 -29.2998 56 -71.4004
|
||||
c0.299805 -3.7998 -2.09961 -7.19922 -5.7002 -8.2998c-3.09961 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996s-23.7998 -7.89941 -31.5 -21.5996l-9.5 -17c-1.90039 -3.2002 -5.7998 -4.7998 -9.2998 -3.7002
|
||||
c-3.60059 1.10059 -6 4.60059 -5.7002 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004z" />
|
||||
<glyph glyph-name="surprise" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM248 168c35.2998 0 64 -28.7002 64 -64s-28.7002 -64 -64 -64
|
||||
s-64 28.7002 -64 64s28.7002 64 64 64zM200 240c0 -17.7002 -14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32s32 -14.2998 32 -32zM328 272c17.7002 0 32 -14.2998 32 -32s-14.2998 -32 -32 -32s-32 14.2998 -32 32s14.2998 32 32 32z" />
|
||||
<glyph glyph-name="tired" unicode="" horiz-adv-x="496"
|
||||
d="M248 440c137 0 248 -111 248 -248s-111 -248 -248 -248s-248 111 -248 248s111 248 248 248zM248 -8c110.3 0 200 89.7002 200 200s-89.7002 200 -200 200s-200 -89.7002 -200 -200s89.7002 -200 200 -200zM377.1 295.8c3.80078 -4.39941 3.90039 -11 0.100586 -15.5
|
||||
l-33.6006 -40.2998l33.6006 -40.2998c3.7998 -4.5 3.7002 -11 -0.100586 -15.5c-3.5 -4.10059 -9.89941 -5.7002 -15.2998 -2.5l-80 48c-3.59961 2.2002 -5.7998 6.09961 -5.7998 10.2998s2.2002 8.09961 5.7998 10.2998l80 48c5 2.90039 11.5 1.90039 15.2998 -2.5z
|
||||
M220 240c0 -4.2002 -2.2002 -8.09961 -5.7998 -10.2998l-80 -48c-5.40039 -3.2002 -11.7998 -1.60059 -15.2998 2.5c-3.80078 4.5 -3.90039 11 -0.100586 15.5l33.6006 40.2998l-33.6006 40.2998c-3.7998 4.5 -3.7002 11 0.100586 15.5
|
||||
c3.7998 4.40039 10.2998 5.5 15.2998 2.5l80 -48c3.59961 -2.2002 5.7998 -6.09961 5.7998 -10.2998zM248 176c45.4004 0 100.9 -38.2998 107.8 -93.2998c1.5 -11.9004 -7 -21.6006 -15.5 -17.9004c-22.7002 9.7002 -56.2998 15.2002 -92.2998 15.2002
|
||||
s-69.5996 -5.5 -92.2998 -15.2002c-8.60059 -3.7002 -17 6.10059 -15.5 17.9004c6.89941 55 62.3994 93.2998 107.8 93.2998z" />
|
||||
</font>
|
||||
</defs></svg>
|
||||
|
After Width: | Height: | Size: 141 KiB |
5034
wp-content/plugins/cf7-add-password-field/webfonts/fa-solid-900.svg
Normal file
|
After Width: | Height: | Size: 898 KiB |
84
wp-content/plugins/cf7-to-api/cf7_curl.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: CF7 to API
|
||||
Plugin URI:
|
||||
Description: Curl submission data to an external API. (Edit plugin code to configure)
|
||||
Author: Chris Page
|
||||
Version: 1.0
|
||||
Author URI:
|
||||
*/
|
||||
|
||||
add_action('wpcf7_before_send_mail', 'curl_to_api');
|
||||
|
||||
function curl_to_api($contactForm)
|
||||
{
|
||||
// Our curl url and define any needed custom headers
|
||||
$curl_url = 'https://webadmin.klikasset.id/api/v1/companies/register';
|
||||
$curl_headers = array(
|
||||
"authorization: ",
|
||||
"content-type: application/json",
|
||||
"cache-control: no-cache"
|
||||
);
|
||||
|
||||
// Should we write to a log file
|
||||
$debug = true;
|
||||
|
||||
|
||||
if (!isset($contactForm->posted_data) && class_exists('WPCF7_Submission')) {
|
||||
// If we got this far lets start building a log
|
||||
$log .= "\n" . date('M,d,Y h:i:s A') . "\nPosted data set and class exists!\n";
|
||||
|
||||
// Grab the summission class
|
||||
$submission = WPCF7_Submission::get_instance();
|
||||
|
||||
if ($submission) {
|
||||
// If the submission exists lets log that it does
|
||||
$log .= "Submission exists!\n";
|
||||
|
||||
// Now lets prepare our data
|
||||
$formData = prepData($submission->get_posted_data());
|
||||
// Append the prepped data to our log
|
||||
$log .= print_r($formData, true) . "\n";
|
||||
|
||||
// Grab your brooms lets do some curling
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, $curl_url);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $formData);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $curl_headers);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
// Execute post
|
||||
$server_response = curl_exec($ch);
|
||||
|
||||
// Close connection
|
||||
curl_close($ch);
|
||||
|
||||
// Add the response to our log
|
||||
$log .= $server_response;
|
||||
}
|
||||
}
|
||||
|
||||
// Now if debugging is turned on, lets write to the log file
|
||||
if ($debug) {
|
||||
$file = fopen(plugin_dir_path(__FILE__) . 'log.txt', "a+");
|
||||
fwrite($file, $log);
|
||||
fclose($file);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function prepData($data)
|
||||
{
|
||||
// This function can be customized to work with your needs
|
||||
// I am simply mapping and encoding JSON
|
||||
$arr = array(
|
||||
'user_fullname' => $data['user_fullname'],
|
||||
'company_name' => $data['company_name'],
|
||||
'company_phone' => $data['company_phone'],
|
||||
'user_email' => $data['user_email'],
|
||||
'user_password' => $data['user_password']
|
||||
);
|
||||
return (json_encode($arr));
|
||||
}
|
||||
46
wp-content/plugins/cf7-to-api/log.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
Nov,20,2023 05:38:45 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"Nadia Omara","company_name":"PT Sentosa Jaya","company_phone":"081219263349","user_email":"nowelno234@gmail.com","user_password":"12Qwaszx"}
|
||||
{"status":"success","messages":"Perusahaan telah berhasil dibuat.","payload":{"id":992,"name":"PT Sentosa Jaya","phone":"081219263349","fax":null,"image":null,"created_at":{"datetime":"2023-11-20 05:38:46","formatted":"Mon Nov 20, 2023 5:38AM"},"updated_at":{"datetime":"2023-11-20 05:38:46","formatted":"Mon Nov 20, 2023 5:38AM"},"assets_count":0,"licenses_count":0,"accessories_count":0,"consumables_count":0,"components_count":0,"users_count":0,"status":"PENDING","last_order":{"id":10,"company_id":992,"user_id":null,"code":null,"feature_id":null,"license":null,"status":"PENDING","notes":null,"start_date":null,"end_date":null,"price":null,"discount":null,"is_active":1,"created_at":"2023-11-20T05:38:46.000000Z","updated_at":"2023-11-20T05:38:46.000000Z","deleted_at":null},"available_actions":{"update":false,"delete":false}}}
|
||||
Apr,18,2024 02:30:21 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"Allbest Solusi Sistem","company_name":"PT Allbest Solusi Sistem","company_phone":"085860174800","user_email":"appshematsolution@gmail.com","user_password":"allbest2024"}
|
||||
{"status":"success","messages":"Perusahaan telah berhasil dibuat.","payload":{"id":993,"name":"PT Allbest Solusi Sistem","phone":"085860174800","fax":null,"image":null,"created_at":{"datetime":"2024-04-18 02:30:24","formatted":"Thu Apr 18, 2024 2:30AM"},"updated_at":{"datetime":"2024-04-18 02:30:24","formatted":"Thu Apr 18, 2024 2:30AM"},"assets_count":0,"licenses_count":0,"accessories_count":0,"consumables_count":0,"components_count":0,"users_count":0,"status":"PENDING","last_order":{"id":12,"company_id":993,"user_id":null,"code":null,"feature_id":null,"license":null,"status":"PENDING","notes":null,"start_date":null,"end_date":null,"price":null,"discount":null,"is_active":1,"created_at":"2024-04-18T02:30:24.000000Z","updated_at":"2024-04-18T02:30:24.000000Z","deleted_at":null},"available_actions":{"update":false,"delete":false}}}
|
||||
Apr,18,2024 02:47:24 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"PT Allbest Solusi Sistem","company_name":"PT Allbest Solusi Sistem","company_phone":"089998888888","user_email":"adisa@allbestsistem.com","user_password":"admin123"}
|
||||
{"status":"error","messages":{"name":["name sudah digunakan."]},"payload":null}
|
||||
Apr,18,2024 02:52:00 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"PT Allbest Solusi Sistem","company_name":"PT Allbest Solusi Sistem","company_phone":"0899000000","user_email":"anarzkyh@gmail.com","user_password":"admin01"}
|
||||
{"status":"error","messages":{"name":["name sudah digunakan."]},"payload":null}
|
||||
Apr,18,2024 02:57:15 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"PT Allbest Solusi Sistem","company_name":"PT Allbest Solusi Sistem","company_phone":"089999999999","user_email":"anarzkyh@gmail.com","user_password":"admin1"}
|
||||
{"status":"error","messages":{"name":["name sudah digunakan."]},"payload":null}
|
||||
Apr,18,2024 03:12:09 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"allbest","company_name":"PT Allbest","company_phone":"085860174800","user_email":"appshematsolution@gmail.com","user_password":"allbest2024"}
|
||||
{"status":"error","messages":"Email sudah digunakan.","payload":null}
|
||||
Apr,19,2024 09:28:03 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"rahmat","company_name":"PT Allbest Solusi sistem","company_phone":"08111122212","user_email":"rahmat.kesawa@allbestsistem.com","user_password":"1234qwer"}
|
||||
{"status":"error","messages":{"name":["name sudah digunakan."]},"payload":null}
|
||||
Apr,22,2024 08:14:11 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"rahmat01","company_name":"PT Allbest Solusi sistem 01","company_phone":"081282103010","user_email":"rahmat.kesawa@gmail.com","user_password":"Kl1kasset"}
|
||||
{"status":"success","messages":"Perusahaan telah berhasil dibuat.","payload":{"id":995,"name":"PT Allbest Solusi sistem 01","phone":"081282103010","fax":null,"image":null,"created_at":{"datetime":"2024-04-22 08:14:15","formatted":"Mon Apr 22, 2024 8:14AM"},"updated_at":{"datetime":"2024-04-22 08:14:15","formatted":"Mon Apr 22, 2024 8:14AM"},"assets_count":0,"licenses_count":0,"accessories_count":0,"consumables_count":0,"components_count":0,"users_count":0,"status":"PENDING","last_order":{"id":16,"company_id":995,"user_id":null,"code":null,"feature_id":null,"license":null,"status":"PENDING","notes":null,"start_date":null,"end_date":null,"price":null,"discount":null,"is_active":1,"created_at":"2024-04-22T08:14:15.000000Z","updated_at":"2024-04-22T08:14:15.000000Z","deleted_at":null},"available_actions":{"update":false,"delete":false}}}
|
||||
Apr,24,2024 06:46:14 AM
|
||||
Posted data set and class exists!
|
||||
Submission exists!
|
||||
{"user_fullname":"Data Dari Landing Page","company_name":"PT RYAN ARIANA","company_phone":"089604539668","user_email":"ryanariana6@gmail.com","user_password":"ryanariana6"}
|
||||
{"status":"success","messages":"Perusahaan telah berhasil dibuat.","payload":{"id":996,"name":"PT RYAN ARIANA","phone":"089604539668","fax":null,"image":null,"created_at":{"datetime":"2024-04-24 06:46:15","formatted":"Wed Apr 24, 2024 6:46AM"},"updated_at":{"datetime":"2024-04-24 06:46:15","formatted":"Wed Apr 24, 2024 6:46AM"},"assets_count":0,"licenses_count":0,"accessories_count":0,"consumables_count":0,"components_count":0,"users_count":0,"status":"PENDING","last_order":{"id":17,"company_id":996,"user_id":null,"code":null,"feature_id":null,"license":null,"status":"PENDING","notes":null,"start_date":null,"end_date":null,"price":null,"discount":null,"is_active":1,"created_at":"2024-04-24T06:46:15.000000Z","updated_at":"2024-04-24T06:46:15.000000Z","deleted_at":null},"available_actions":{"update":false,"delete":false}}}
|
||||
699
wp-content/plugins/contact-form-7/admin/admin.php
Normal file
@@ -0,0 +1,699 @@
|
||||
<?php
|
||||
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/includes/admin-functions.php';
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/includes/help-tabs.php';
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/includes/tag-generator.php';
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/includes/welcome-panel.php';
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/includes/config-validator.php';
|
||||
|
||||
|
||||
add_action(
|
||||
'admin_init',
|
||||
static function () {
|
||||
do_action( 'wpcf7_admin_init' );
|
||||
},
|
||||
10, 0
|
||||
);
|
||||
|
||||
|
||||
add_action(
|
||||
'admin_menu',
|
||||
'wpcf7_admin_menu',
|
||||
9, 0
|
||||
);
|
||||
|
||||
function wpcf7_admin_menu() {
|
||||
do_action( 'wpcf7_admin_menu' );
|
||||
|
||||
add_menu_page(
|
||||
__( 'Contact Form 7', 'contact-form-7' ),
|
||||
__( 'Contact', 'contact-form-7' )
|
||||
. wpcf7_admin_menu_change_notice(),
|
||||
'wpcf7_read_contact_forms',
|
||||
'wpcf7',
|
||||
'wpcf7_admin_management_page',
|
||||
'dashicons-email',
|
||||
30
|
||||
);
|
||||
|
||||
$edit = add_submenu_page( 'wpcf7',
|
||||
__( 'Edit Contact Form', 'contact-form-7' ),
|
||||
__( 'Contact Forms', 'contact-form-7' )
|
||||
. wpcf7_admin_menu_change_notice( 'wpcf7' ),
|
||||
'wpcf7_read_contact_forms',
|
||||
'wpcf7',
|
||||
'wpcf7_admin_management_page'
|
||||
);
|
||||
|
||||
add_action( 'load-' . $edit, 'wpcf7_load_contact_form_admin', 10, 0 );
|
||||
|
||||
$addnew = add_submenu_page( 'wpcf7',
|
||||
__( 'Add New Contact Form', 'contact-form-7' ),
|
||||
__( 'Add New', 'contact-form-7' )
|
||||
. wpcf7_admin_menu_change_notice( 'wpcf7-new' ),
|
||||
'wpcf7_edit_contact_forms',
|
||||
'wpcf7-new',
|
||||
'wpcf7_admin_add_new_page'
|
||||
);
|
||||
|
||||
add_action( 'load-' . $addnew, 'wpcf7_load_contact_form_admin', 10, 0 );
|
||||
|
||||
$integration = WPCF7_Integration::get_instance();
|
||||
|
||||
if ( $integration->service_exists() ) {
|
||||
$integration = add_submenu_page( 'wpcf7',
|
||||
__( 'Integration with External API', 'contact-form-7' ),
|
||||
__( 'Integration', 'contact-form-7' )
|
||||
. wpcf7_admin_menu_change_notice( 'wpcf7-integration' ),
|
||||
'wpcf7_manage_integration',
|
||||
'wpcf7-integration',
|
||||
'wpcf7_admin_integration_page'
|
||||
);
|
||||
|
||||
add_action( 'load-' . $integration, 'wpcf7_load_integration_page', 10, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function wpcf7_admin_menu_change_notice( $menu_slug = '' ) {
|
||||
$counts = apply_filters( 'wpcf7_admin_menu_change_notice',
|
||||
array(
|
||||
'wpcf7' => 0,
|
||||
'wpcf7-new' => 0,
|
||||
'wpcf7-integration' => 0,
|
||||
)
|
||||
);
|
||||
|
||||
if ( empty( $menu_slug ) ) {
|
||||
$count = absint( array_sum( $counts ) );
|
||||
} elseif ( isset( $counts[$menu_slug] ) ) {
|
||||
$count = absint( $counts[$menu_slug] );
|
||||
} else {
|
||||
$count = 0;
|
||||
}
|
||||
|
||||
if ( $count ) {
|
||||
return sprintf(
|
||||
' <span class="update-plugins %1$d"><span class="plugin-count">%2$s</span></span>',
|
||||
$count,
|
||||
esc_html( number_format_i18n( $count ) )
|
||||
);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
add_action(
|
||||
'admin_enqueue_scripts',
|
||||
'wpcf7_admin_enqueue_scripts',
|
||||
10, 1
|
||||
);
|
||||
|
||||
function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
|
||||
if ( false === strpos( $hook_suffix, 'wpcf7' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_style( 'contact-form-7-admin',
|
||||
wpcf7_plugin_url( 'admin/css/styles.css' ),
|
||||
array(), WPCF7_VERSION, 'all'
|
||||
);
|
||||
|
||||
if ( wpcf7_is_rtl() ) {
|
||||
wp_enqueue_style( 'contact-form-7-admin-rtl',
|
||||
wpcf7_plugin_url( 'admin/css/styles-rtl.css' ),
|
||||
array(), WPCF7_VERSION, 'all'
|
||||
);
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'wpcf7-admin',
|
||||
wpcf7_plugin_url( 'admin/js/scripts.js' ),
|
||||
array( 'jquery', 'jquery-ui-tabs' ),
|
||||
WPCF7_VERSION,
|
||||
array( 'in_footer' => true )
|
||||
);
|
||||
|
||||
$args = array(
|
||||
'apiSettings' => array(
|
||||
'root' => sanitize_url( rest_url( 'contact-form-7/v1' ) ),
|
||||
'namespace' => 'contact-form-7/v1',
|
||||
'nonce' => ( wp_installing() && ! is_multisite() )
|
||||
? '' : wp_create_nonce( 'wp_rest' ),
|
||||
),
|
||||
'pluginUrl' => wpcf7_plugin_url(),
|
||||
'saveAlert' => __(
|
||||
"The changes you made will be lost if you navigate away from this page.",
|
||||
'contact-form-7' ),
|
||||
'activeTab' => (int) ( $_GET['active-tab'] ?? 0 ),
|
||||
'configValidator' => array(
|
||||
'errors' => array(),
|
||||
'howToCorrect' => __( "How to resolve?", 'contact-form-7' ),
|
||||
'oneError' => __( '1 configuration error detected', 'contact-form-7' ),
|
||||
'manyErrors' => __( '%d configuration errors detected', 'contact-form-7' ),
|
||||
'oneErrorInTab' => __( '1 configuration error detected in this tab panel', 'contact-form-7' ),
|
||||
'manyErrorsInTab' => __( '%d configuration errors detected in this tab panel', 'contact-form-7' ),
|
||||
'docUrl' => WPCF7_ConfigValidator::get_doc_link(),
|
||||
/* translators: screen reader text */
|
||||
'iconAlt' => __( '(configuration error)', 'contact-form-7' ),
|
||||
),
|
||||
);
|
||||
|
||||
if ( $post = wpcf7_get_current_contact_form()
|
||||
and current_user_can( 'wpcf7_edit_contact_form', $post->id() )
|
||||
and wpcf7_validate_configuration() ) {
|
||||
$config_validator = new WPCF7_ConfigValidator( $post );
|
||||
$config_validator->restore();
|
||||
$args['configValidator']['errors'] =
|
||||
$config_validator->collect_error_messages();
|
||||
}
|
||||
|
||||
wp_localize_script( 'wpcf7-admin', 'wpcf7', $args );
|
||||
|
||||
add_thickbox();
|
||||
|
||||
wp_enqueue_script( 'wpcf7-admin-taggenerator',
|
||||
wpcf7_plugin_url( 'admin/js/tag-generator.js' ),
|
||||
array( 'jquery', 'thickbox', 'wpcf7-admin' ),
|
||||
WPCF7_VERSION,
|
||||
array( 'in_footer' => true )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
add_filter(
|
||||
'set_screen_option_wpcf7_contact_forms_per_page',
|
||||
static function ( $result, $option, $value ) {
|
||||
$wpcf7_screens = array(
|
||||
'wpcf7_contact_forms_per_page',
|
||||
);
|
||||
|
||||
if ( in_array( $option, $wpcf7_screens ) ) {
|
||||
$result = $value;
|
||||
}
|
||||
|
||||
return $result;
|
||||
},
|
||||
10, 3
|
||||
);
|
||||
|
||||
|
||||
function wpcf7_load_contact_form_admin() {
|
||||
global $plugin_page;
|
||||
|
||||
$action = wpcf7_current_action();
|
||||
|
||||
do_action( 'wpcf7_admin_load',
|
||||
trim( $_GET['page'] ?? '' ),
|
||||
$action
|
||||
);
|
||||
|
||||
if ( 'save' === $action ) {
|
||||
$id = $_POST['post_ID'] ?? '-1';
|
||||
|
||||
check_admin_referer( 'wpcf7-save-contact-form_' . $id );
|
||||
|
||||
if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
|
||||
wp_die(
|
||||
__( "You are not allowed to edit this item.", 'contact-form-7' )
|
||||
);
|
||||
}
|
||||
|
||||
$contact_form = wpcf7_save_contact_form(
|
||||
array_merge(
|
||||
$_REQUEST,
|
||||
array(
|
||||
'id' => $id,
|
||||
'title' => $_POST['post_title'] ?? null,
|
||||
'locale' => $_POST['wpcf7-locale'] ?? null,
|
||||
'form' => $_POST['wpcf7-form'] ?? '',
|
||||
'mail' => $_POST['wpcf7-mail'] ?? array(),
|
||||
'mail_2' => $_POST['wpcf7-mail-2'] ?? array(),
|
||||
'messages' => $_POST['wpcf7-messages'] ?? array(),
|
||||
'additional_settings' => $_POST['wpcf7-additional-settings'] ?? '',
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ( $contact_form and wpcf7_validate_configuration() ) {
|
||||
$config_validator = new WPCF7_ConfigValidator( $contact_form );
|
||||
$config_validator->validate();
|
||||
$config_validator->save();
|
||||
}
|
||||
|
||||
$query = array(
|
||||
'post' => $contact_form ? $contact_form->id() : 0,
|
||||
'active-tab' => (int) ( $_POST['active-tab'] ?? 0 ),
|
||||
);
|
||||
|
||||
if ( ! $contact_form ) {
|
||||
$query['message'] = 'failed';
|
||||
} elseif ( -1 == $id ) {
|
||||
$query['message'] = 'created';
|
||||
} else {
|
||||
$query['message'] = 'saved';
|
||||
}
|
||||
|
||||
$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
|
||||
wp_safe_redirect( $redirect_to );
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( 'copy' === $action ) {
|
||||
$id = absint( $_POST['post_ID'] ?? $_REQUEST['post'] ?? '' );
|
||||
|
||||
check_admin_referer( 'wpcf7-copy-contact-form_' . $id );
|
||||
|
||||
if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
|
||||
wp_die(
|
||||
__( "You are not allowed to edit this item.", 'contact-form-7' )
|
||||
);
|
||||
}
|
||||
|
||||
$query = array();
|
||||
|
||||
if ( $contact_form = wpcf7_contact_form( $id ) ) {
|
||||
$new_contact_form = $contact_form->copy();
|
||||
$new_contact_form->save();
|
||||
|
||||
$query['post'] = $new_contact_form->id();
|
||||
$query['message'] = 'created';
|
||||
}
|
||||
|
||||
$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
|
||||
|
||||
wp_safe_redirect( $redirect_to );
|
||||
exit();
|
||||
}
|
||||
|
||||
if ( 'delete' === $action ) {
|
||||
if ( ! empty( $_POST['post_ID'] ) ) {
|
||||
check_admin_referer( 'wpcf7-delete-contact-form_' . $_POST['post_ID'] );
|
||||
} elseif ( ! is_array( $_REQUEST['post'] ) ) {
|
||||
check_admin_referer( 'wpcf7-delete-contact-form_' . $_REQUEST['post'] );
|
||||
} else {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
}
|
||||
|
||||
$posts = (array) ( $_POST['post_ID'] ?? $_REQUEST['post'] ?? array() );
|
||||
|
||||
$deleted = 0;
|
||||
|
||||
foreach ( $posts as $post ) {
|
||||
$post = WPCF7_ContactForm::get_instance( $post );
|
||||
|
||||
if ( empty( $post ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'wpcf7_delete_contact_form', $post->id() ) ) {
|
||||
wp_die(
|
||||
__( "You are not allowed to delete this item.", 'contact-form-7' )
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! $post->delete() ) {
|
||||
wp_die( __( "Error in deleting.", 'contact-form-7' ) );
|
||||
}
|
||||
|
||||
$deleted += 1;
|
||||
}
|
||||
|
||||
$query = array();
|
||||
|
||||
if ( ! empty( $deleted ) ) {
|
||||
$query['message'] = 'deleted';
|
||||
}
|
||||
|
||||
$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
|
||||
|
||||
wp_safe_redirect( $redirect_to );
|
||||
exit();
|
||||
}
|
||||
|
||||
$post = null;
|
||||
|
||||
if ( 'wpcf7-new' === $plugin_page ) {
|
||||
$post = WPCF7_ContactForm::get_template( array(
|
||||
'locale' => $_GET['locale'] ?? null,
|
||||
) );
|
||||
} elseif ( ! empty( $_GET['post'] ) ) {
|
||||
$post = WPCF7_ContactForm::get_instance( $_GET['post'] );
|
||||
}
|
||||
|
||||
$current_screen = get_current_screen();
|
||||
|
||||
$help_tabs = new WPCF7_Help_Tabs( $current_screen );
|
||||
|
||||
if ( $post
|
||||
and current_user_can( 'wpcf7_edit_contact_form', $post->id() ) ) {
|
||||
$help_tabs->set_help_tabs( 'edit' );
|
||||
} else {
|
||||
$help_tabs->set_help_tabs( 'list' );
|
||||
|
||||
if ( ! class_exists( 'WPCF7_Contact_Form_List_Table' ) ) {
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/includes/class-contact-forms-list-table.php';
|
||||
}
|
||||
|
||||
add_filter(
|
||||
'manage_' . $current_screen->id . '_columns',
|
||||
array( 'WPCF7_Contact_Form_List_Table', 'define_columns' ),
|
||||
10, 0
|
||||
);
|
||||
|
||||
add_screen_option( 'per_page', array(
|
||||
'default' => 20,
|
||||
'option' => 'wpcf7_contact_forms_per_page',
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function wpcf7_admin_management_page() {
|
||||
if ( $post = wpcf7_get_current_contact_form() ) {
|
||||
$post_id = $post->initial() ? -1 : $post->id();
|
||||
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php';
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'validate' == wpcf7_current_action()
|
||||
and wpcf7_validate_configuration()
|
||||
and current_user_can( 'wpcf7_edit_contact_forms' ) ) {
|
||||
wpcf7_admin_bulk_validate_page();
|
||||
return;
|
||||
}
|
||||
|
||||
$list_table = new WPCF7_Contact_Form_List_Table();
|
||||
$list_table->prepare_items();
|
||||
|
||||
?>
|
||||
<div class="wrap" id="wpcf7-contact-form-list-table">
|
||||
|
||||
<h1 class="wp-heading-inline"><?php
|
||||
echo esc_html( __( 'Contact Forms', 'contact-form-7' ) );
|
||||
?></h1>
|
||||
|
||||
<?php
|
||||
if ( current_user_can( 'wpcf7_edit_contact_forms' ) ) {
|
||||
echo wpcf7_link(
|
||||
menu_page_url( 'wpcf7-new', false ),
|
||||
__( 'Add New', 'contact-form-7' ),
|
||||
array( 'class' => 'page-title-action' )
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! empty( $_REQUEST['s'] ) ) {
|
||||
echo sprintf(
|
||||
'<span class="subtitle">'
|
||||
/* translators: %s: search keywords */
|
||||
. __( 'Search results for “%s”', 'contact-form-7' )
|
||||
. '</span>',
|
||||
esc_html( $_REQUEST['s'] )
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<hr class="wp-header-end">
|
||||
|
||||
<?php
|
||||
do_action( 'wpcf7_admin_warnings',
|
||||
'wpcf7', wpcf7_current_action(), null
|
||||
);
|
||||
|
||||
wpcf7_welcome_panel();
|
||||
|
||||
do_action( 'wpcf7_admin_notices',
|
||||
'wpcf7', wpcf7_current_action(), null
|
||||
);
|
||||
?>
|
||||
|
||||
<form method="get" action="">
|
||||
<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />
|
||||
<?php $list_table->search_box( __( 'Search Contact Forms', 'contact-form-7' ), 'wpcf7-contact' ); ?>
|
||||
<?php $list_table->display(); ?>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
function wpcf7_admin_add_new_page() {
|
||||
$post = wpcf7_get_current_contact_form();
|
||||
|
||||
if ( ! $post ) {
|
||||
$post = WPCF7_ContactForm::get_template();
|
||||
}
|
||||
|
||||
$post_id = -1;
|
||||
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php';
|
||||
require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
|
||||
}
|
||||
|
||||
|
||||
function wpcf7_load_integration_page() {
|
||||
do_action( 'wpcf7_admin_load',
|
||||
trim( $_GET['page'] ?? '' ),
|
||||
wpcf7_current_action()
|
||||
);
|
||||
|
||||
$integration = WPCF7_Integration::get_instance();
|
||||
|
||||
if ( isset( $_REQUEST['service'] )
|
||||
and $integration->service_exists( $_REQUEST['service'] ) ) {
|
||||
$service = $integration->get_service( $_REQUEST['service'] );
|
||||
$service->load( wpcf7_current_action() );
|
||||
}
|
||||
|
||||
$help_tabs = new WPCF7_Help_Tabs( get_current_screen() );
|
||||
$help_tabs->set_help_tabs( 'integration' );
|
||||
}
|
||||
|
||||
|
||||
function wpcf7_admin_integration_page() {
|
||||
$integration = WPCF7_Integration::get_instance();
|
||||
|
||||
$service = isset( $_REQUEST['service'] )
|
||||
? $integration->get_service( $_REQUEST['service'] )
|
||||
: null;
|
||||
|
||||
?>
|
||||
<div class="wrap" id="wpcf7-integration">
|
||||
|
||||
<h1><?php echo esc_html( __( 'Integration with External API', 'contact-form-7' ) ); ?></h1>
|
||||
|
||||
<p><?php
|
||||
echo sprintf(
|
||||
/* translators: %s: link labeled 'Integration with external APIs' */
|
||||
esc_html( __( "You can expand the possibilities of your contact forms by integrating them with external services. For details, see %s.", 'contact-form-7' ) ),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/integration-with-external-apis/', 'contact-form-7' ),
|
||||
__( 'Integration with external APIs', 'contact-form-7' )
|
||||
)
|
||||
);
|
||||
?></p>
|
||||
|
||||
<?php
|
||||
do_action( 'wpcf7_admin_warnings',
|
||||
'wpcf7-integration', wpcf7_current_action(), $service
|
||||
);
|
||||
|
||||
do_action( 'wpcf7_admin_notices',
|
||||
'wpcf7-integration', wpcf7_current_action(), $service
|
||||
);
|
||||
|
||||
if ( $service ) {
|
||||
$message = $_REQUEST['message'] ?? '';
|
||||
$service->admin_notice( $message );
|
||||
|
||||
$integration->list_services( array(
|
||||
'include' => $_REQUEST['service'],
|
||||
) );
|
||||
} else {
|
||||
$integration->list_services();
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
add_action( 'wpcf7_admin_notices', 'wpcf7_admin_updated_message', 10, 3 );
|
||||
|
||||
function wpcf7_admin_updated_message( $page, $action, $object ) {
|
||||
if ( ! in_array( $page, array( 'wpcf7', 'wpcf7-new' ) ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( empty( $_REQUEST['message'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'created' === $_REQUEST['message'] ) {
|
||||
$updated_message = __( "Contact form created.", 'contact-form-7' );
|
||||
} elseif ( 'saved' === $_REQUEST['message'] ) {
|
||||
$updated_message = __( "Contact form saved.", 'contact-form-7' );
|
||||
} elseif ( 'deleted' === $_REQUEST['message'] ) {
|
||||
$updated_message = __( "Contact form deleted.", 'contact-form-7' );
|
||||
}
|
||||
|
||||
if ( ! empty( $updated_message ) ) {
|
||||
echo sprintf(
|
||||
'<div id="message" class="notice notice-success"><p>%s</p></div>',
|
||||
esc_html( $updated_message )
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'failed' === $_REQUEST['message'] ) {
|
||||
$updated_message =
|
||||
__( "There was an error saving the contact form.", 'contact-form-7' );
|
||||
|
||||
echo sprintf(
|
||||
'<div id="message" class="notice notice-error"><p>%s</p></div>',
|
||||
esc_html( $updated_message )
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'validated' === $_REQUEST['message'] ) {
|
||||
$bulk_validate = WPCF7::get_option( 'bulk_validate', array() );
|
||||
$count_invalid = isset( $bulk_validate['count_invalid'] )
|
||||
? absint( $bulk_validate['count_invalid'] ) : 0;
|
||||
|
||||
if ( $count_invalid ) {
|
||||
$updated_message = sprintf(
|
||||
_n(
|
||||
/* translators: %s: number of contact forms */
|
||||
"Configuration validation completed. %s invalid contact form was found.",
|
||||
"Configuration validation completed. %s invalid contact forms were found.",
|
||||
$count_invalid, 'contact-form-7'
|
||||
),
|
||||
number_format_i18n( $count_invalid )
|
||||
);
|
||||
|
||||
echo sprintf(
|
||||
'<div id="message" class="notice notice-warning"><p>%s</p></div>',
|
||||
esc_html( $updated_message )
|
||||
);
|
||||
} else {
|
||||
$updated_message = __( "Configuration validation completed. No invalid contact form was found.", 'contact-form-7' );
|
||||
|
||||
echo sprintf(
|
||||
'<div id="message" class="notice notice-success"><p>%s</p></div>',
|
||||
esc_html( $updated_message )
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_filter( 'plugin_action_links', 'wpcf7_plugin_action_links', 10, 2 );
|
||||
|
||||
function wpcf7_plugin_action_links( $links, $file ) {
|
||||
if ( $file != WPCF7_PLUGIN_BASENAME ) {
|
||||
return $links;
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'wpcf7_read_contact_forms' ) ) {
|
||||
return $links;
|
||||
}
|
||||
|
||||
$settings_link = wpcf7_link(
|
||||
menu_page_url( 'wpcf7', false ),
|
||||
__( 'Settings', 'contact-form-7' )
|
||||
);
|
||||
|
||||
array_unshift( $links, $settings_link );
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
|
||||
add_action( 'wpcf7_admin_warnings', 'wpcf7_old_wp_version_error', 10, 3 );
|
||||
|
||||
function wpcf7_old_wp_version_error( $page, $action, $object ) {
|
||||
$wp_version = get_bloginfo( 'version' );
|
||||
|
||||
if ( ! version_compare( $wp_version, WPCF7_REQUIRED_WP_VERSION, '<' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="notice notice-warning">
|
||||
<p><?php
|
||||
echo sprintf(
|
||||
/* translators: 1: version of Contact Form 7, 2: version of WordPress, 3: URL */
|
||||
__( '<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href="%3$s">update WordPress</a> first.', 'contact-form-7' ),
|
||||
WPCF7_VERSION,
|
||||
WPCF7_REQUIRED_WP_VERSION,
|
||||
admin_url( 'update-core.php' )
|
||||
);
|
||||
?></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
add_action( 'wpcf7_admin_warnings', 'wpcf7_not_allowed_to_edit', 10, 3 );
|
||||
|
||||
function wpcf7_not_allowed_to_edit( $page, $action, $object ) {
|
||||
if ( $object instanceof WPCF7_ContactForm ) {
|
||||
$contact_form = $object;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( current_user_can( 'wpcf7_edit_contact_form', $contact_form->id() ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message = __( "You are not allowed to edit this contact form.", 'contact-form-7' );
|
||||
|
||||
echo sprintf(
|
||||
'<div class="notice notice-warning"><p>%s</p></div>',
|
||||
esc_html( $message )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
add_action( 'wpcf7_admin_warnings', 'wpcf7_outdated_php_warning', 10, 3 );
|
||||
|
||||
function wpcf7_outdated_php_warning( $page, $action, $object ) {
|
||||
if ( ! version_compare( PHP_VERSION, '7.4', '<' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message = __( "The next major release of Contact Form 7 will discontinue support for outdated PHP versions. If you don't upgrade PHP, you will not be able to upgrade the plugin.", 'contact-form-7' );
|
||||
|
||||
echo sprintf(
|
||||
'<div class="notice notice-warning"><p>%s</p></div>',
|
||||
esc_html( $message )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
add_action( 'wpcf7_admin_warnings', 'wpcf7_ctct_deprecated_warning', 10, 3 );
|
||||
|
||||
function wpcf7_ctct_deprecated_warning( $page, $action, $object ) {
|
||||
$service = WPCF7_ConstantContact::get_instance();
|
||||
|
||||
if ( ! $service->is_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message = __( "The Constant Contact integration is deprecated. It is not recommended to continue using the feature.", 'contact-form-7' );
|
||||
|
||||
echo sprintf(
|
||||
'<div class="notice notice-warning"><p>%s</p></div>',
|
||||
esc_html( $message )
|
||||
);
|
||||
}
|
||||
77
wp-content/plugins/contact-form-7/admin/css/styles-rtl.css
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Tabs
|
||||
*/
|
||||
#contact-form-editor-tabs {
|
||||
padding: 9px 10px 0 15px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Form Tab
|
||||
*/
|
||||
.tag-generator-panel {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box > fieldset > legend {
|
||||
border: 1px solid #dfdfdf;
|
||||
border-right: 4px solid #00a0d2;
|
||||
}
|
||||
|
||||
.tag-generator-panel .insert-box input.tag {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.tag-generator-panel .insert-box .submitbox input[type="button"] {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mail Tab
|
||||
*/
|
||||
.contact-form-editor-box-mail span.mailtag {
|
||||
margin: 0 4px 0 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Welcome Panel
|
||||
*/
|
||||
.wpcf7-welcome-panel .welcome-panel-close {
|
||||
left: 10px;
|
||||
right: auto;
|
||||
padding: 10px 21px 10px 15px;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-close::before {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-content {
|
||||
margin-right: 13px;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-column {
|
||||
float: right;
|
||||
padding: 0 0 0 2%;
|
||||
}
|
||||
|
||||
/*
|
||||
* Integration
|
||||
*/
|
||||
.card {
|
||||
border-left: 1px solid #e5e5e5;
|
||||
border-right: 4px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.card img.icon {
|
||||
float: right;
|
||||
margin: 8px -8px 8px 8px;
|
||||
}
|
||||
|
||||
.card h2.title {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.card .infobox {
|
||||
float: left;
|
||||
}
|
||||
512
wp-content/plugins/contact-form-7/admin/css/styles.css
Normal file
@@ -0,0 +1,512 @@
|
||||
#titlediv .inside p.description {
|
||||
margin: 8px 2px 0;
|
||||
}
|
||||
|
||||
#titlediv .inside p.description label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
span.shortcode {
|
||||
display: block;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
span.shortcode.old {
|
||||
background: #777;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
span.shortcode input {
|
||||
font-size: 12px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#wpcf7-contact-form-list-table span.shortcode input,
|
||||
#wpcf7-contact-form-editor span.shortcode input {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#wpcf7-contact-form-list-table span.shortcode input {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
#wpcf7-contact-form-editor span.shortcode input {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#submitpost input.copy {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#submitpost input.delete {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
background: inherit;
|
||||
color: #a00;
|
||||
}
|
||||
|
||||
#submitpost input.delete:hover {
|
||||
color: #dc3232; /* Red */
|
||||
}
|
||||
|
||||
#submitpost input.delete:focus {
|
||||
outline: thin dotted;
|
||||
}
|
||||
|
||||
.postbox-container .postbox h3 {
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
.keyboard-interaction {
|
||||
visibility: hidden;
|
||||
color: #23282d; /* Dark Gray 800 */
|
||||
}
|
||||
|
||||
div.config-error, span.config-error, ul.config-error {
|
||||
color: #444;
|
||||
font-style: normal;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
ul.config-error {
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
ul.config-error li {
|
||||
list-style: none;
|
||||
padding: 2px 2px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
[data-config-field][aria-invalid="true"] {
|
||||
border-color: #dc3232;
|
||||
}
|
||||
|
||||
#contact-form-editor-tabs li a .icon-in-circle,
|
||||
#contact-form-editor .config-error .icon-in-circle,
|
||||
.wp-list-table .config-error .icon-in-circle,
|
||||
.icon-in-circle {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
margin: 1px 6px 0;
|
||||
padding: 0 5px;
|
||||
min-width: 7px;
|
||||
height: 17px;
|
||||
border-radius: 11px;
|
||||
background-color: #ca4a1f;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 17px;
|
||||
text-align: center;
|
||||
z-index: 26;
|
||||
}
|
||||
|
||||
/*
|
||||
* Tabs
|
||||
*/
|
||||
#contact-form-editor-tabs {
|
||||
border-bottom: 1px solid #aaa;
|
||||
padding: 9px 15px 0 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#contact-form-editor-tabs li {
|
||||
display: inline-block;
|
||||
list-style: none;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom: 1px solid #aaa;
|
||||
padding: 0;
|
||||
margin: 0 4px -1px;
|
||||
background-color: #e4e4e4;
|
||||
}
|
||||
|
||||
#contact-form-editor-tabs li:hover {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#contact-form-editor-tabs li.ui-tabs-active,
|
||||
#contact-form-editor-tabs li.ui-tabs-active:hover {
|
||||
border-top: 1px solid #aaa;
|
||||
border-right: 1px solid #aaa;
|
||||
border-left: 1px solid #aaa;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
#contact-form-editor-tabs li a {
|
||||
padding: 6px 10px;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
line-height: 30px;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#contact-form-editor-tabs li.ui-tabs-active a {
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#contact-form-editor-tabs li a:hover {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#contact-form-editor .contact-form-editor-panel > div.config-error {
|
||||
margin-bottom: 1.4em;
|
||||
}
|
||||
|
||||
#contact-form-editor-tabs li.ui-tabs-active a .icon-in-circle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#contact-form-editor .contact-form-editor-panel h2 {
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
margin: 8px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#contact-form-editor .contact-form-editor-panel {
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #aaa;
|
||||
border-top: none;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
#contact-form-editor .form-table th {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#contact-form-editor .contact-form-editor-panel fieldset legend {
|
||||
line-height: 1.5;
|
||||
margin: .6em 0 .4em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Form Tab
|
||||
*/
|
||||
#tag-generator-list a.button {
|
||||
font-size: 12px;
|
||||
height: 26px;
|
||||
line-height: 24px;
|
||||
margin: 2px;
|
||||
padding: 0 8px 1px;
|
||||
}
|
||||
|
||||
.tag-generator-panel {
|
||||
height: 495px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box > fieldset > legend {
|
||||
border: 1px solid #dfdfdf;
|
||||
border-left: 4px solid #00a0d2;
|
||||
background: #f7fcfe;
|
||||
padding: 4px 12px;
|
||||
margin: 4px 0;
|
||||
line-height: 1.4em;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tag-generator-panel table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tag-generator-panel table.form-table th {
|
||||
width: 120px;
|
||||
padding: 4px 10px 4px 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.tag-generator-panel table.form-table td {
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box input.oneline {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box input.large-text {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box textarea.values {
|
||||
width: 200px;
|
||||
height: 6em;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box input[type="number"],
|
||||
.tag-generator-panel .control-box input[type="date"] {
|
||||
width: 88px;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box table caption {
|
||||
text-align: left;
|
||||
font-size: 110%;
|
||||
font-weight: bold;
|
||||
color: #777;
|
||||
margin: 10px 0 5px;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box table.form-table td label {
|
||||
line-height: 1.1em;
|
||||
}
|
||||
|
||||
.tag-generator-panel .control-box table.form-table td label .description {
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
.tag-generator-panel .insert-box {
|
||||
margin: 0 -15px -15px;
|
||||
padding: 8px 16px;
|
||||
background-color: #fcfcfc;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.tag-generator-panel .insert-box input.tag {
|
||||
width: 510px;
|
||||
float: left;
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.tag-generator-panel .insert-box .submitbox {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tag-generator-panel .insert-box .submitbox input[type="button"] {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.tag-generator-panel .insert-box .description label {
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
/*
|
||||
* Mail Tab
|
||||
*/
|
||||
.contact-form-editor-box-mail span.mailtag {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 4px;
|
||||
padding: 1px 2px;
|
||||
cursor: pointer;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.contact-form-editor-box-mail span.mailtag.used {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.contact-form-editor-box-mail span.mailtag.unused {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*
|
||||
* Messages Tab
|
||||
*/
|
||||
#messages-panel p.description {
|
||||
margin: 5px 0 10px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Tabs for integration modules
|
||||
*/
|
||||
#ctct-panel table tr.inactive ~ tr,
|
||||
#sendinblue-panel table tr.inactive ~ tr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#ctct-panel .dashicons,
|
||||
#sendinblue-panel .dashicons {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#ctct-panel td p,
|
||||
#sendinblue-panel td p {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
/*
|
||||
* List Table
|
||||
*/
|
||||
.fixed .column-title {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
.fixed .column-shortcode {
|
||||
width: 38%;
|
||||
}
|
||||
|
||||
/*
|
||||
* Welcome Panel
|
||||
*/
|
||||
.wpcf7-welcome-panel {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
margin: 16px 0;
|
||||
padding: 23px 10px 0;
|
||||
border: 1px solid #c3c4c7;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
||||
background: #fff;
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
line-height: 2.1em;
|
||||
margin: 1em 0 1.2em;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel h3 .dashicons {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
color: #575757;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel p {
|
||||
color: #646970;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel p a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-close {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
padding: 10px 15px 10px 21px;
|
||||
font-size: 13px;
|
||||
line-height: 1.23076923; /* Chrome rounding, needs to be 16px equivalent */
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-close::before {
|
||||
background: 0 0;
|
||||
color: #787c82;
|
||||
content: "\f153";
|
||||
display: block;
|
||||
font: normal 16px/20px dashicons;
|
||||
speak: never;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 0;
|
||||
transition: all .1s ease-in-out;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-content {
|
||||
display: block;
|
||||
margin-left: 13px;
|
||||
max-width: 1500px;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-column-container {
|
||||
clear: both;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-column {
|
||||
display: block;
|
||||
width: 48%;
|
||||
min-width: 200px;
|
||||
float: left;
|
||||
padding: 0 2% 0 0;
|
||||
margin: 0 0 1em 0;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 870px) {
|
||||
.wpcf7-welcome-panel .welcome-panel-column {
|
||||
display: block;
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.wpcf7-welcome-panel .welcome-panel-column p {
|
||||
margin-top: 7px;
|
||||
color: #3c434a;
|
||||
}
|
||||
|
||||
/*
|
||||
* Integration
|
||||
*/
|
||||
.card {
|
||||
background: #fff none repeat scroll 0 0;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-left: 4px solid #e5e5e5;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
||||
margin-top: 20px;
|
||||
max-width: 520px;
|
||||
min-width: 255px;
|
||||
padding: 0.7em 2em 1em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card.active {
|
||||
border-color: #00a0d2;
|
||||
}
|
||||
|
||||
.card img.icon {
|
||||
float: left;
|
||||
margin: 8px 8px 8px -8px;
|
||||
}
|
||||
|
||||
.card h2.title {
|
||||
float: left;
|
||||
max-width: 240px;
|
||||
font-size: 1.3em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.card .infobox {
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
margin: 1em;
|
||||
line-height: 1.5;
|
||||
max-width: 240px;
|
||||
}
|
||||
|
||||
.card .inside .form-table th {
|
||||
padding: 15px 10px 15px 0;
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.card .inside .form-table td {
|
||||
padding: 10px 10px;
|
||||
}
|
||||
|
||||
.card .checkboxes li {
|
||||
margin: 0;
|
||||
}
|
||||
301
wp-content/plugins/contact-form-7/admin/edit-contact-form.php
Normal file
@@ -0,0 +1,301 @@
|
||||
<?php
|
||||
|
||||
// don't load directly
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
function wpcf7_admin_save_button( $post_id ) {
|
||||
static $button = '';
|
||||
|
||||
if ( ! empty( $button ) ) {
|
||||
echo $button;
|
||||
return;
|
||||
}
|
||||
|
||||
$nonce = wp_create_nonce( 'wpcf7-save-contact-form_' . $post_id );
|
||||
|
||||
$onclick = sprintf(
|
||||
"this.form._wpnonce.value = '%s';"
|
||||
. " this.form.action.value = 'save';"
|
||||
. " return true;",
|
||||
$nonce );
|
||||
|
||||
$button = sprintf(
|
||||
'<input type="submit" class="button-primary" name="wpcf7-save" value="%1$s" onclick="%2$s" />',
|
||||
esc_attr( __( 'Save', 'contact-form-7' ) ),
|
||||
$onclick );
|
||||
|
||||
echo $button;
|
||||
}
|
||||
|
||||
?><div class="wrap" id="wpcf7-contact-form-editor">
|
||||
|
||||
<h1 class="wp-heading-inline"><?php
|
||||
if ( $post->initial() ) {
|
||||
echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) );
|
||||
} else {
|
||||
echo esc_html( __( 'Edit Contact Form', 'contact-form-7' ) );
|
||||
}
|
||||
?></h1>
|
||||
|
||||
<?php
|
||||
if ( ! $post->initial()
|
||||
and current_user_can( 'wpcf7_edit_contact_forms' ) ) {
|
||||
echo wpcf7_link(
|
||||
menu_page_url( 'wpcf7-new', false ),
|
||||
__( 'Add New', 'contact-form-7' ),
|
||||
array( 'class' => 'page-title-action' )
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<hr class="wp-header-end">
|
||||
|
||||
<?php
|
||||
do_action( 'wpcf7_admin_warnings',
|
||||
$post->initial() ? 'wpcf7-new' : 'wpcf7',
|
||||
wpcf7_current_action(),
|
||||
$post
|
||||
);
|
||||
|
||||
do_action( 'wpcf7_admin_notices',
|
||||
$post->initial() ? 'wpcf7-new' : 'wpcf7',
|
||||
wpcf7_current_action(),
|
||||
$post
|
||||
);
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( $post ) :
|
||||
|
||||
if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
|
||||
$disabled = '';
|
||||
} else {
|
||||
$disabled = ' disabled="disabled"';
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="post" action="<?php echo esc_url( add_query_arg( array( 'post' => $post_id ), menu_page_url( 'wpcf7', false ) ) ); ?>" id="wpcf7-admin-form-element"<?php do_action( 'wpcf7_post_edit_form_tag' ); ?>>
|
||||
<?php
|
||||
if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
|
||||
wp_nonce_field( 'wpcf7-save-contact-form_' . $post_id );
|
||||
}
|
||||
?>
|
||||
<input type="hidden" id="post_ID" name="post_ID" value="<?php echo (int) $post_id; ?>" />
|
||||
<input type="hidden" id="wpcf7-locale" name="wpcf7-locale" value="<?php echo esc_attr( $post->locale() ); ?>" />
|
||||
<input type="hidden" id="hiddenaction" name="action" value="save" />
|
||||
<input type="hidden" id="active-tab" name="active-tab" value="<?php echo (int) ( $_GET['active-tab'] ?? '0' ); ?>" />
|
||||
|
||||
<div id="poststuff">
|
||||
<div id="post-body" class="metabox-holder columns-2">
|
||||
<div id="post-body-content">
|
||||
<div id="titlediv">
|
||||
<div id="titlewrap">
|
||||
<label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo esc_html( __( 'Enter title here', 'contact-form-7' ) ); ?></label>
|
||||
<?php
|
||||
$posttitle_atts = array(
|
||||
'type' => 'text',
|
||||
'name' => 'post_title',
|
||||
'size' => 30,
|
||||
'value' => $post->initial() ? '' : $post->title(),
|
||||
'id' => 'title',
|
||||
'spellcheck' => 'true',
|
||||
'autocomplete' => 'off',
|
||||
'disabled' => ! current_user_can( 'wpcf7_edit_contact_form', $post_id ),
|
||||
);
|
||||
|
||||
echo sprintf( '<input %s />', wpcf7_format_atts( $posttitle_atts ) );
|
||||
?>
|
||||
</div><!-- #titlewrap -->
|
||||
|
||||
<div class="inside">
|
||||
<?php
|
||||
if ( ! $post->initial() ) :
|
||||
?>
|
||||
<p class="description">
|
||||
<label for="wpcf7-shortcode"><?php echo esc_html( __( "Copy this shortcode and paste it into your post, page, or text widget content:", 'contact-form-7' ) ); ?></label>
|
||||
<span class="shortcode wp-ui-highlight"><input type="text" id="wpcf7-shortcode" onfocus="this.select();" readonly="readonly" class="large-text code" value="<?php echo esc_attr( $post->shortcode() ); ?>" /></span>
|
||||
</p>
|
||||
<?php
|
||||
if ( $old_shortcode = $post->shortcode( array( 'use_old_format' => true ) ) ) :
|
||||
?>
|
||||
<p class="description">
|
||||
<label for="wpcf7-shortcode-old"><?php echo esc_html( __( "You can also use this old-style shortcode:", 'contact-form-7' ) ); ?></label>
|
||||
<span class="shortcode old"><input type="text" id="wpcf7-shortcode-old" onfocus="this.select();" readonly="readonly" class="large-text code" value="<?php echo esc_attr( $old_shortcode ); ?>" /></span>
|
||||
</p>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div><!-- #titlediv -->
|
||||
</div><!-- #post-body-content -->
|
||||
|
||||
<div id="postbox-container-1" class="postbox-container">
|
||||
<?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) : ?>
|
||||
<div id="submitdiv" class="postbox">
|
||||
<h3><?php echo esc_html( __( 'Status', 'contact-form-7' ) ); ?></h3>
|
||||
<div class="inside">
|
||||
<div class="submitbox" id="submitpost">
|
||||
|
||||
<div id="minor-publishing-actions">
|
||||
|
||||
<div class="hidden">
|
||||
<input type="submit" class="button-primary" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'contact-form-7' ) ); ?>" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( ! $post->initial() ) :
|
||||
$copy_nonce = wp_create_nonce( 'wpcf7-copy-contact-form_' . $post_id );
|
||||
?>
|
||||
<input type="submit" name="wpcf7-copy" class="copy button" value="<?php echo esc_attr( __( 'Duplicate', 'contact-form-7' ) ); ?>" <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; this.form.action.value = 'copy'; return true;\""; ?> />
|
||||
<?php endif; ?>
|
||||
</div><!-- #minor-publishing-actions -->
|
||||
|
||||
<div id="misc-publishing-actions">
|
||||
<?php do_action( 'wpcf7_admin_misc_pub_section', $post_id ); ?>
|
||||
</div><!-- #misc-publishing-actions -->
|
||||
|
||||
<div id="major-publishing-actions">
|
||||
|
||||
<?php
|
||||
if ( ! $post->initial() ) :
|
||||
$delete_nonce = wp_create_nonce( 'wpcf7-delete-contact-form_' . $post_id );
|
||||
?>
|
||||
<div id="delete-action">
|
||||
<input type="submit" name="wpcf7-delete" class="delete submitdelete" value="<?php echo esc_attr( __( 'Delete', 'contact-form-7' ) ); ?>" <?php echo "onclick=\"if (confirm('" . esc_js( __( "You are about to delete this contact form.\n 'Cancel' to stop, 'OK' to delete.", 'contact-form-7' ) ) . "')) {this.form._wpnonce.value = '$delete_nonce'; this.form.action.value = 'delete'; return true;} return false;\""; ?> />
|
||||
</div><!-- #delete-action -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="publishing-action">
|
||||
<span class="spinner"></span>
|
||||
<?php wpcf7_admin_save_button( $post_id ); ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div><!-- #major-publishing-actions -->
|
||||
</div><!-- #submitpost -->
|
||||
</div>
|
||||
</div><!-- #submitdiv -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="informationdiv" class="postbox">
|
||||
<h3><?php echo esc_html( __( "Do you need help?", 'contact-form-7' ) ); ?></h3>
|
||||
<div class="inside">
|
||||
<p><?php echo esc_html( __( "Here are some available options to help solve your problems.", 'contact-form-7' ) ); ?></p>
|
||||
<ol>
|
||||
<li><?php echo sprintf(
|
||||
/* translators: 1: FAQ, 2: Docs ("FAQ & Docs") */
|
||||
__( '%1$s and %2$s', 'contact-form-7' ),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/faq/', 'contact-form-7' ),
|
||||
__( 'FAQ', 'contact-form-7' )
|
||||
),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/docs/', 'contact-form-7' ),
|
||||
__( 'docs', 'contact-form-7' )
|
||||
)
|
||||
); ?></li>
|
||||
<li><?php echo wpcf7_link(
|
||||
__( 'https://wordpress.org/support/plugin/contact-form-7/', 'contact-form-7' ),
|
||||
__( 'Support forums', 'contact-form-7' )
|
||||
); ?></li>
|
||||
<li><?php echo wpcf7_link(
|
||||
__( 'https://contactform7.com/custom-development/', 'contact-form-7' ),
|
||||
__( 'Professional services', 'contact-form-7' )
|
||||
); ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
</div><!-- #informationdiv -->
|
||||
|
||||
</div><!-- #postbox-container-1 -->
|
||||
|
||||
<div id="postbox-container-2" class="postbox-container">
|
||||
<div id="contact-form-editor">
|
||||
<div class="keyboard-interaction"><?php
|
||||
echo sprintf(
|
||||
/* translators: 1: ◀ ▶ dashicon, 2: screen reader text for the dashicon */
|
||||
esc_html( __( '%1$s %2$s keys switch panels', 'contact-form-7' ) ),
|
||||
'<span class="dashicons dashicons-leftright" aria-hidden="true"></span>',
|
||||
sprintf(
|
||||
'<span class="screen-reader-text">%s</span>',
|
||||
/* translators: screen reader text */
|
||||
esc_html( __( '(left and right arrow)', 'contact-form-7' ) )
|
||||
)
|
||||
);
|
||||
?></div>
|
||||
|
||||
<?php
|
||||
|
||||
$editor = new WPCF7_Editor( $post );
|
||||
$panels = array();
|
||||
|
||||
if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
|
||||
$panels = array(
|
||||
'form-panel' => array(
|
||||
'title' => __( 'Form', 'contact-form-7' ),
|
||||
'callback' => 'wpcf7_editor_panel_form',
|
||||
),
|
||||
'mail-panel' => array(
|
||||
'title' => __( 'Mail', 'contact-form-7' ),
|
||||
'callback' => 'wpcf7_editor_panel_mail',
|
||||
),
|
||||
'messages-panel' => array(
|
||||
'title' => __( 'Messages', 'contact-form-7' ),
|
||||
'callback' => 'wpcf7_editor_panel_messages',
|
||||
),
|
||||
);
|
||||
|
||||
$additional_settings = $post->prop( 'additional_settings' );
|
||||
|
||||
if ( ! is_scalar( $additional_settings ) ) {
|
||||
$additional_settings = '';
|
||||
}
|
||||
|
||||
$additional_settings = trim( $additional_settings );
|
||||
$additional_settings = explode( "\n", $additional_settings );
|
||||
$additional_settings = array_filter( $additional_settings );
|
||||
$additional_settings = count( $additional_settings );
|
||||
|
||||
$panels['additional-settings-panel'] = array(
|
||||
'title' => $additional_settings
|
||||
? sprintf(
|
||||
/* translators: %d: number of additional settings */
|
||||
__( 'Additional Settings (%d)', 'contact-form-7' ),
|
||||
$additional_settings )
|
||||
: __( 'Additional Settings', 'contact-form-7' ),
|
||||
'callback' => 'wpcf7_editor_panel_additional_settings',
|
||||
);
|
||||
}
|
||||
|
||||
$panels = apply_filters( 'wpcf7_editor_panels', $panels );
|
||||
|
||||
foreach ( $panels as $id => $panel ) {
|
||||
$editor->add_panel( $id, $panel['title'], $panel['callback'] );
|
||||
}
|
||||
|
||||
$editor->display();
|
||||
?>
|
||||
</div><!-- #contact-form-editor -->
|
||||
|
||||
<?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) : ?>
|
||||
<p class="submit"><?php wpcf7_admin_save_button( $post_id ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- #postbox-container-2 -->
|
||||
|
||||
</div><!-- #post-body -->
|
||||
<br class="clear" />
|
||||
</div><!-- #poststuff -->
|
||||
</form>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- .wrap -->
|
||||
|
||||
<?php
|
||||
|
||||
$tag_generator = WPCF7_TagGenerator::get_instance();
|
||||
$tag_generator->print_panels( $post );
|
||||
|
||||
do_action( 'wpcf7_admin_footer', $post );
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
function wpcf7_current_action() {
|
||||
if ( isset( $_REQUEST['action'] ) and -1 != $_REQUEST['action'] ) {
|
||||
return $_REQUEST['action'];
|
||||
}
|
||||
|
||||
if ( isset( $_REQUEST['action2'] ) and -1 != $_REQUEST['action2'] ) {
|
||||
return $_REQUEST['action2'];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function wpcf7_admin_has_edit_cap() {
|
||||
return current_user_can( 'wpcf7_edit_contact_forms' );
|
||||
}
|
||||
|
||||
function wpcf7_add_tag_generator( $name, $title, $elm_id, $callback, $options = array() ) {
|
||||
$tag_generator = WPCF7_TagGenerator::get_instance();
|
||||
return $tag_generator->add( $name, $title, $callback, $options );
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
<?php
|
||||
|
||||
if ( ! class_exists( 'WP_List_Table' ) ) {
|
||||
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
||||
}
|
||||
|
||||
class WPCF7_Contact_Form_List_Table extends WP_List_Table {
|
||||
|
||||
public static function define_columns() {
|
||||
$columns = array(
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title' => __( 'Title', 'contact-form-7' ),
|
||||
'shortcode' => __( 'Shortcode', 'contact-form-7' ),
|
||||
'author' => __( 'Author', 'contact-form-7' ),
|
||||
'date' => __( 'Date', 'contact-form-7' ),
|
||||
);
|
||||
|
||||
return $columns;
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct( array(
|
||||
'singular' => 'post',
|
||||
'plural' => 'posts',
|
||||
'ajax' => false,
|
||||
) );
|
||||
}
|
||||
|
||||
public function prepare_items() {
|
||||
$current_screen = get_current_screen();
|
||||
$per_page = $this->get_items_per_page( 'wpcf7_contact_forms_per_page' );
|
||||
|
||||
$args = array(
|
||||
'posts_per_page' => $per_page,
|
||||
'orderby' => 'title',
|
||||
'order' => 'ASC',
|
||||
'offset' => ( $this->get_pagenum() - 1 ) * $per_page,
|
||||
);
|
||||
|
||||
if ( ! empty( $_REQUEST['s'] ) ) {
|
||||
$args['s'] = $_REQUEST['s'];
|
||||
}
|
||||
|
||||
if ( ! empty( $_REQUEST['orderby'] ) ) {
|
||||
if ( 'title' == $_REQUEST['orderby'] ) {
|
||||
$args['orderby'] = 'title';
|
||||
} elseif ( 'author' == $_REQUEST['orderby'] ) {
|
||||
$args['orderby'] = 'author';
|
||||
} elseif ( 'date' == $_REQUEST['orderby'] ) {
|
||||
$args['orderby'] = 'date';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $_REQUEST['order'] ) ) {
|
||||
if ( 'asc' == strtolower( $_REQUEST['order'] ) ) {
|
||||
$args['order'] = 'ASC';
|
||||
} elseif ( 'desc' == strtolower( $_REQUEST['order'] ) ) {
|
||||
$args['order'] = 'DESC';
|
||||
}
|
||||
}
|
||||
|
||||
$this->items = WPCF7_ContactForm::find( $args );
|
||||
|
||||
$total_items = WPCF7_ContactForm::count();
|
||||
$total_pages = ceil( $total_items / $per_page );
|
||||
|
||||
$this->set_pagination_args( array(
|
||||
'total_items' => $total_items,
|
||||
'total_pages' => $total_pages,
|
||||
'per_page' => $per_page,
|
||||
) );
|
||||
}
|
||||
|
||||
public function get_columns() {
|
||||
return get_column_headers( get_current_screen() );
|
||||
}
|
||||
|
||||
protected function get_sortable_columns() {
|
||||
$columns = array(
|
||||
'title' => array( 'title', true ),
|
||||
'author' => array( 'author', false ),
|
||||
'date' => array( 'date', false ),
|
||||
);
|
||||
|
||||
return $columns;
|
||||
}
|
||||
|
||||
protected function get_bulk_actions() {
|
||||
$actions = array(
|
||||
'delete' => __( 'Delete', 'contact-form-7' ),
|
||||
);
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
protected function column_default( $item, $column_name ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function column_cb( $item ) {
|
||||
return sprintf(
|
||||
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
|
||||
$this->_args['singular'],
|
||||
$item->id()
|
||||
);
|
||||
}
|
||||
|
||||
public function column_title( $item ) {
|
||||
$edit_link = add_query_arg(
|
||||
array(
|
||||
'post' => absint( $item->id() ),
|
||||
'action' => 'edit',
|
||||
),
|
||||
menu_page_url( 'wpcf7', false )
|
||||
);
|
||||
|
||||
$output = sprintf(
|
||||
'<a class="row-title" href="%1$s" aria-label="%2$s">%3$s</a>',
|
||||
esc_url( $edit_link ),
|
||||
esc_attr( sprintf(
|
||||
/* translators: %s: title of contact form */
|
||||
__( 'Edit “%s”', 'contact-form-7' ),
|
||||
$item->title()
|
||||
) ),
|
||||
esc_html( $item->title() )
|
||||
);
|
||||
|
||||
$output = sprintf( '<strong>%s</strong>', $output );
|
||||
|
||||
if ( wpcf7_validate_configuration()
|
||||
and current_user_can( 'wpcf7_edit_contact_form', $item->id() ) ) {
|
||||
$config_validator = new WPCF7_ConfigValidator( $item );
|
||||
$config_validator->restore();
|
||||
|
||||
if ( $count_errors = $config_validator->count_errors() ) {
|
||||
$error_notice = sprintf(
|
||||
_n(
|
||||
/* translators: %s: number of errors detected */
|
||||
'%s configuration error detected',
|
||||
'%s configuration errors detected',
|
||||
$count_errors, 'contact-form-7' ),
|
||||
number_format_i18n( $count_errors )
|
||||
);
|
||||
|
||||
$output .= sprintf(
|
||||
'<div class="config-error"><span class="icon-in-circle" aria-hidden="true">!</span> %s</div>',
|
||||
$error_notice
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
protected function handle_row_actions( $item, $column_name, $primary ) {
|
||||
if ( $column_name !== $primary ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$edit_link = add_query_arg(
|
||||
array(
|
||||
'post' => absint( $item->id() ),
|
||||
'action' => 'edit',
|
||||
),
|
||||
menu_page_url( 'wpcf7', false )
|
||||
);
|
||||
|
||||
$actions = array(
|
||||
'edit' => wpcf7_link( $edit_link, __( 'Edit', 'contact-form-7' ) ),
|
||||
);
|
||||
|
||||
if ( current_user_can( 'wpcf7_edit_contact_form', $item->id() ) ) {
|
||||
$copy_link = add_query_arg(
|
||||
array(
|
||||
'post' => absint( $item->id() ),
|
||||
'action' => 'copy',
|
||||
),
|
||||
menu_page_url( 'wpcf7', false )
|
||||
);
|
||||
|
||||
$copy_link = wp_nonce_url(
|
||||
$copy_link,
|
||||
'wpcf7-copy-contact-form_' . absint( $item->id() )
|
||||
);
|
||||
|
||||
$actions = array_merge( $actions, array(
|
||||
'copy' => wpcf7_link( $copy_link, __( 'Duplicate', 'contact-form-7' ) ),
|
||||
) );
|
||||
}
|
||||
|
||||
return $this->row_actions( $actions );
|
||||
}
|
||||
|
||||
public function column_author( $item ) {
|
||||
$post = get_post( $item->id() );
|
||||
|
||||
if ( ! $post ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$author = get_userdata( $post->post_author );
|
||||
|
||||
if ( false === $author ) {
|
||||
return;
|
||||
}
|
||||
|
||||
return esc_html( $author->display_name );
|
||||
}
|
||||
|
||||
public function column_shortcode( $item ) {
|
||||
$shortcodes = array( $item->shortcode() );
|
||||
|
||||
$output = '';
|
||||
|
||||
foreach ( $shortcodes as $shortcode ) {
|
||||
$output .= "\n" . '<span class="shortcode"><input type="text"'
|
||||
. ' onfocus="this.select();" readonly="readonly"'
|
||||
. ' value="' . esc_attr( $shortcode ) . '"'
|
||||
. ' class="large-text code" /></span>';
|
||||
}
|
||||
|
||||
return trim( $output );
|
||||
}
|
||||
|
||||
public function column_date( $item ) {
|
||||
$datetime = get_post_datetime( $item->id() );
|
||||
|
||||
if ( false === $datetime ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$t_time = sprintf(
|
||||
/* translators: 1: date, 2: time */
|
||||
__( '%1$s at %2$s', 'contact-form-7' ),
|
||||
/* translators: date format, see https://www.php.net/date */
|
||||
$datetime->format( __( 'Y/m/d', 'contact-form-7' ) ),
|
||||
/* translators: time format, see https://www.php.net/date */
|
||||
$datetime->format( __( 'g:i a', 'contact-form-7' ) )
|
||||
);
|
||||
|
||||
return $t_time;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
|
||||
add_action( 'wpcf7_admin_menu', 'wpcf7_admin_init_bulk_cv', 10, 0 );
|
||||
|
||||
function wpcf7_admin_init_bulk_cv() {
|
||||
if ( ! wpcf7_validate_configuration()
|
||||
or ! current_user_can( 'wpcf7_edit_contact_forms' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$result = WPCF7::get_option( 'bulk_validate' );
|
||||
$last_important_update = WPCF7_ConfigValidator::last_important_update;
|
||||
|
||||
if ( ! empty( $result['version'] )
|
||||
and version_compare( $last_important_update, $result['version'], '<=' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_filter( 'wpcf7_admin_menu_change_notice',
|
||||
'wpcf7_admin_menu_change_notice_bulk_cv',
|
||||
10, 1
|
||||
);
|
||||
|
||||
add_action( 'wpcf7_admin_warnings',
|
||||
'wpcf7_admin_warnings_bulk_cv',
|
||||
5, 3
|
||||
);
|
||||
}
|
||||
|
||||
function wpcf7_admin_menu_change_notice_bulk_cv( $counts ) {
|
||||
$counts['wpcf7'] += 1;
|
||||
return $counts;
|
||||
}
|
||||
|
||||
function wpcf7_admin_warnings_bulk_cv( $page, $action, $object ) {
|
||||
if ( 'wpcf7' === $page and 'validate' === $action ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$link = wpcf7_link(
|
||||
add_query_arg(
|
||||
array( 'action' => 'validate' ),
|
||||
menu_page_url( 'wpcf7', false )
|
||||
),
|
||||
__( 'Validate Contact Form 7 Configuration', 'contact-form-7' )
|
||||
);
|
||||
|
||||
$message = __( "Misconfiguration leads to mail delivery failure or other troubles. Validate your contact forms now.", 'contact-form-7' );
|
||||
|
||||
echo sprintf(
|
||||
'<div class="notice notice-warning"><p>%1$s » %2$s</p></div>',
|
||||
esc_html( $message ),
|
||||
$link
|
||||
);
|
||||
}
|
||||
|
||||
add_action( 'wpcf7_admin_load', 'wpcf7_load_bulk_validate_page', 10, 2 );
|
||||
|
||||
function wpcf7_load_bulk_validate_page( $page, $action ) {
|
||||
if ( 'wpcf7' != $page
|
||||
or 'validate' != $action
|
||||
or ! wpcf7_validate_configuration()
|
||||
or 'POST' != $_SERVER['REQUEST_METHOD'] ) {
|
||||
return;
|
||||
}
|
||||
|
||||
check_admin_referer( 'wpcf7-bulk-validate' );
|
||||
|
||||
if ( ! current_user_can( 'wpcf7_edit_contact_forms' ) ) {
|
||||
wp_die( __( "You are not allowed to validate configuration.", 'contact-form-7' ) );
|
||||
}
|
||||
|
||||
$contact_forms = WPCF7_ContactForm::find();
|
||||
|
||||
$result = array(
|
||||
'timestamp' => time(),
|
||||
'version' => WPCF7_VERSION,
|
||||
'count_valid' => 0,
|
||||
'count_invalid' => 0,
|
||||
);
|
||||
|
||||
foreach ( $contact_forms as $contact_form ) {
|
||||
$config_validator = new WPCF7_ConfigValidator( $contact_form );
|
||||
$config_validator->validate();
|
||||
$config_validator->save();
|
||||
|
||||
if ( $config_validator->is_valid() ) {
|
||||
$result['count_valid'] += 1;
|
||||
} else {
|
||||
$result['count_invalid'] += 1;
|
||||
}
|
||||
}
|
||||
|
||||
WPCF7::update_option( 'bulk_validate', $result );
|
||||
|
||||
$redirect_to = add_query_arg(
|
||||
array(
|
||||
'message' => 'validated',
|
||||
),
|
||||
menu_page_url( 'wpcf7', false )
|
||||
);
|
||||
|
||||
wp_safe_redirect( $redirect_to );
|
||||
exit();
|
||||
}
|
||||
|
||||
function wpcf7_admin_bulk_validate_page() {
|
||||
$contact_forms = WPCF7_ContactForm::find();
|
||||
$count = WPCF7_ContactForm::count();
|
||||
|
||||
$submit_text = sprintf(
|
||||
_n(
|
||||
/* translators: %s: number of contact forms */
|
||||
"Validate %s contact form now",
|
||||
"Validate %s contact forms now",
|
||||
$count, 'contact-form-7'
|
||||
),
|
||||
number_format_i18n( $count )
|
||||
);
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
|
||||
<h1><?php echo esc_html( __( 'Validate Configuration', 'contact-form-7' ) ); ?></h1>
|
||||
|
||||
<form method="post" action="">
|
||||
<input type="hidden" name="action" value="validate" />
|
||||
<?php wp_nonce_field( 'wpcf7-bulk-validate' ); ?>
|
||||
<p><input type="submit" class="button" value="<?php echo esc_attr( $submit_text ); ?>" /></p>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
echo wpcf7_link(
|
||||
__( 'https://contactform7.com/configuration-validator-faq/', 'contact-form-7' ),
|
||||
__( 'FAQ about Configuration Validator', 'contact-form-7' )
|
||||
);
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
263
wp-content/plugins/contact-form-7/admin/includes/editor.php
Normal file
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
|
||||
class WPCF7_Editor {
|
||||
|
||||
private $contact_form;
|
||||
private $panels = array();
|
||||
|
||||
public function __construct( WPCF7_ContactForm $contact_form ) {
|
||||
$this->contact_form = $contact_form;
|
||||
}
|
||||
|
||||
public function add_panel( $panel_id, $title, $callback ) {
|
||||
if ( wpcf7_is_name( $panel_id ) ) {
|
||||
$this->panels[$panel_id] = array(
|
||||
'title' => $title,
|
||||
'callback' => $callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function display() {
|
||||
if ( empty( $this->panels ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo '<ul id="contact-form-editor-tabs">';
|
||||
|
||||
foreach ( $this->panels as $panel_id => $panel ) {
|
||||
echo sprintf(
|
||||
'<li id="%1$s-tab"><a href="#%1$s">%2$s</a></li>',
|
||||
esc_attr( $panel_id ),
|
||||
esc_html( $panel['title'] )
|
||||
);
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
|
||||
foreach ( $this->panels as $panel_id => $panel ) {
|
||||
echo sprintf(
|
||||
'<div class="contact-form-editor-panel" id="%1$s">',
|
||||
esc_attr( $panel_id )
|
||||
);
|
||||
|
||||
if ( is_callable( $panel['callback'] ) ) {
|
||||
$this->notice( $panel_id, $panel );
|
||||
call_user_func( $panel['callback'], $this->contact_form );
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
public function notice( $panel_id, $panel ) {
|
||||
echo '<div class="config-error"></div>';
|
||||
}
|
||||
}
|
||||
|
||||
function wpcf7_editor_panel_form( $post ) {
|
||||
$desc_link = wpcf7_link(
|
||||
__( 'https://contactform7.com/editing-form-template/', 'contact-form-7' ),
|
||||
__( 'Editing form template', 'contact-form-7' ) );
|
||||
$description = __( "You can edit the form template here. For details, see %s.", 'contact-form-7' );
|
||||
$description = sprintf( esc_html( $description ), $desc_link );
|
||||
?>
|
||||
|
||||
<h2><?php echo esc_html( __( 'Form', 'contact-form-7' ) ); ?></h2>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php echo $description; ?></legend>
|
||||
|
||||
<?php
|
||||
$tag_generator = WPCF7_TagGenerator::get_instance();
|
||||
$tag_generator->print_buttons();
|
||||
?>
|
||||
|
||||
<textarea id="wpcf7-form" name="wpcf7-form" cols="100" rows="24" class="large-text code" data-config-field="form.body"><?php echo esc_textarea( $post->prop( 'form' ) ); ?></textarea>
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
|
||||
function wpcf7_editor_panel_mail( $post ) {
|
||||
wpcf7_editor_box_mail( $post );
|
||||
|
||||
echo '<br class="clear" />';
|
||||
|
||||
wpcf7_editor_box_mail( $post, array(
|
||||
'id' => 'wpcf7-mail-2',
|
||||
'name' => 'mail_2',
|
||||
'title' => __( 'Mail (2)', 'contact-form-7' ),
|
||||
'use' => __( 'Use Mail (2)', 'contact-form-7' ),
|
||||
) );
|
||||
}
|
||||
|
||||
function wpcf7_editor_box_mail( $post, $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'id' => 'wpcf7-mail',
|
||||
'name' => 'mail',
|
||||
'title' => __( 'Mail', 'contact-form-7' ),
|
||||
'use' => null,
|
||||
) );
|
||||
|
||||
$id = esc_attr( $args['id'] );
|
||||
|
||||
$mail = wp_parse_args( $post->prop( $args['name'] ), array(
|
||||
'active' => false,
|
||||
'recipient' => '',
|
||||
'sender' => '',
|
||||
'subject' => '',
|
||||
'body' => '',
|
||||
'additional_headers' => '',
|
||||
'attachments' => '',
|
||||
'use_html' => false,
|
||||
'exclude_blank' => false,
|
||||
) );
|
||||
|
||||
?>
|
||||
<div class="contact-form-editor-box-mail" id="<?php echo $id; ?>">
|
||||
<h2><?php echo esc_html( $args['title'] ); ?></h2>
|
||||
|
||||
<?php
|
||||
if ( ! empty( $args['use'] ) ) :
|
||||
?>
|
||||
<label for="<?php echo $id; ?>-active"><input type="checkbox" id="<?php echo $id; ?>-active" name="<?php echo $id; ?>[active]" data-config-field="" class="toggle-form-table" value="1"<?php echo ( $mail['active'] ) ? ' checked="checked"' : ''; ?> /> <?php echo esc_html( $args['use'] ); ?></label>
|
||||
<p class="description"><?php echo esc_html( __( "Mail (2) is an additional mail template often used as an autoresponder.", 'contact-form-7' ) ); ?></p>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
<?php
|
||||
$desc_link = wpcf7_link(
|
||||
__( 'https://contactform7.com/setting-up-mail/', 'contact-form-7' ),
|
||||
__( 'Setting up mail', 'contact-form-7' ) );
|
||||
$description = __( "You can edit the mail template here. For details, see %s.", 'contact-form-7' );
|
||||
$description = sprintf( esc_html( $description ), $desc_link );
|
||||
echo $description;
|
||||
echo '<br />';
|
||||
|
||||
echo esc_html( __( "In the following fields, you can use these mail-tags:",
|
||||
'contact-form-7' ) );
|
||||
echo '<br />';
|
||||
$post->suggest_mail_tags( $args['name'] );
|
||||
?>
|
||||
</legend>
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id; ?>-recipient"><?php echo esc_html( __( 'To', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="<?php echo $id; ?>-recipient" name="<?php echo $id; ?>[recipient]" class="large-text code" size="70" value="<?php echo esc_attr( $mail['recipient'] ); ?>" data-config-field="<?php echo sprintf( '%s.recipient', esc_attr( $args['name'] ) ); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id; ?>-sender"><?php echo esc_html( __( 'From', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="<?php echo $id; ?>-sender" name="<?php echo $id; ?>[sender]" class="large-text code" size="70" value="<?php echo esc_attr( $mail['sender'] ); ?>" data-config-field="<?php echo sprintf( '%s.sender', esc_attr( $args['name'] ) ); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id; ?>-subject"><?php echo esc_html( __( 'Subject', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="text" id="<?php echo $id; ?>-subject" name="<?php echo $id; ?>[subject]" class="large-text code" size="70" value="<?php echo esc_attr( $mail['subject'] ); ?>" data-config-field="<?php echo sprintf( '%s.subject', esc_attr( $args['name'] ) ); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id; ?>-additional-headers"><?php echo esc_html( __( 'Additional headers', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<textarea id="<?php echo $id; ?>-additional-headers" name="<?php echo $id; ?>[additional_headers]" cols="100" rows="4" class="large-text code" data-config-field="<?php echo sprintf( '%s.additional_headers', esc_attr( $args['name'] ) ); ?>"><?php echo esc_textarea( $mail['additional_headers'] ); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id; ?>-body"><?php echo esc_html( __( 'Message body', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<textarea id="<?php echo $id; ?>-body" name="<?php echo $id; ?>[body]" cols="100" rows="18" class="large-text code" data-config-field="<?php echo sprintf( '%s.body', esc_attr( $args['name'] ) ); ?>"><?php echo esc_textarea( $mail['body'] ); ?></textarea>
|
||||
|
||||
<p><label for="<?php echo $id; ?>-exclude-blank"><input type="checkbox" id="<?php echo $id; ?>-exclude-blank" name="<?php echo $id; ?>[exclude_blank]" value="1"<?php echo ( ! empty( $mail['exclude_blank'] ) ) ? ' checked="checked"' : ''; ?> /> <?php echo esc_html( __( 'Exclude lines with blank mail-tags from output', 'contact-form-7' ) ); ?></label></p>
|
||||
|
||||
<p><label for="<?php echo $id; ?>-use-html"><input type="checkbox" id="<?php echo $id; ?>-use-html" name="<?php echo $id; ?>[use_html]" value="1"<?php echo ( $mail['use_html'] ) ? ' checked="checked"' : ''; ?> /> <?php echo esc_html( __( 'Use HTML content type', 'contact-form-7' ) ); ?></label></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<label for="<?php echo $id; ?>-attachments"><?php echo esc_html( __( 'File attachments', 'contact-form-7' ) ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<textarea id="<?php echo $id; ?>-attachments" name="<?php echo $id; ?>[attachments]" cols="100" rows="4" class="large-text code" data-config-field="<?php echo sprintf( '%s.attachments', esc_attr( $args['name'] ) ); ?>"><?php echo esc_textarea( $mail['attachments'] ); ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function wpcf7_editor_panel_messages( $post ) {
|
||||
$desc_link = wpcf7_link(
|
||||
__( 'https://contactform7.com/editing-messages/', 'contact-form-7' ),
|
||||
__( 'Editing messages', 'contact-form-7' ) );
|
||||
$description = __( "You can edit messages used in various situations here. For details, see %s.", 'contact-form-7' );
|
||||
$description = sprintf( esc_html( $description ), $desc_link );
|
||||
|
||||
$messages = wpcf7_messages();
|
||||
|
||||
if ( isset( $messages['captcha_not_match'] )
|
||||
and ! wpcf7_use_really_simple_captcha() ) {
|
||||
unset( $messages['captcha_not_match'] );
|
||||
}
|
||||
|
||||
?>
|
||||
<h2><?php echo esc_html( __( 'Messages', 'contact-form-7' ) ); ?></h2>
|
||||
<fieldset>
|
||||
<legend><?php echo $description; ?></legend>
|
||||
<?php
|
||||
|
||||
foreach ( $messages as $key => $arr ) {
|
||||
$field_id = sprintf( 'wpcf7-message-%s', strtr( $key, '_', '-' ) );
|
||||
$field_name = sprintf( 'wpcf7-messages[%s]', $key );
|
||||
|
||||
?>
|
||||
<p class="description">
|
||||
<label for="<?php echo $field_id; ?>"><?php echo esc_html( $arr['description'] ); ?><br />
|
||||
<input type="text" id="<?php echo $field_id; ?>" name="<?php echo $field_name; ?>" class="large-text" size="70" value="<?php echo esc_attr( $post->message( $key, false ) ); ?>" data-config-field="<?php echo sprintf( 'messages.%s', esc_attr( $key ) ); ?>" />
|
||||
</label>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
|
||||
function wpcf7_editor_panel_additional_settings( $post ) {
|
||||
$desc_link = wpcf7_link(
|
||||
__( 'https://contactform7.com/additional-settings/', 'contact-form-7' ),
|
||||
__( 'Additional settings', 'contact-form-7' ) );
|
||||
$description = __( "You can add customization code snippets here. For details, see %s.", 'contact-form-7' );
|
||||
$description = sprintf( esc_html( $description ), $desc_link );
|
||||
|
||||
?>
|
||||
<h2><?php echo esc_html( __( 'Additional Settings', 'contact-form-7' ) ); ?></h2>
|
||||
<fieldset>
|
||||
<legend><?php echo $description; ?></legend>
|
||||
<textarea id="wpcf7-additional-settings" name="wpcf7-additional-settings" cols="100" rows="8" class="large-text" data-config-field="additional_settings.body"><?php echo esc_textarea( $post->prop( 'additional_settings' ) ); ?></textarea>
|
||||
</fieldset>
|
||||
<?php
|
||||
}
|
||||
104
wp-content/plugins/contact-form-7/admin/includes/help-tabs.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
class WPCF7_Help_Tabs {
|
||||
|
||||
private $screen;
|
||||
|
||||
public function __construct( WP_Screen $screen ) {
|
||||
$this->screen = $screen;
|
||||
}
|
||||
|
||||
public function set_help_tabs( $screen_type ) {
|
||||
switch ( $screen_type ) {
|
||||
case 'list':
|
||||
$this->screen->add_help_tab( array(
|
||||
'id' => 'list_overview',
|
||||
'title' => __( 'Overview', 'contact-form-7' ),
|
||||
'content' => $this->content( 'list_overview' ),
|
||||
) );
|
||||
|
||||
$this->screen->add_help_tab( array(
|
||||
'id' => 'list_available_actions',
|
||||
'title' => __( 'Available Actions', 'contact-form-7' ),
|
||||
'content' => $this->content( 'list_available_actions' ),
|
||||
) );
|
||||
|
||||
$this->sidebar();
|
||||
|
||||
return;
|
||||
case 'edit':
|
||||
$this->screen->add_help_tab( array(
|
||||
'id' => 'edit_overview',
|
||||
'title' => __( 'Overview', 'contact-form-7' ),
|
||||
'content' => $this->content( 'edit_overview' ),
|
||||
) );
|
||||
|
||||
$this->screen->add_help_tab( array(
|
||||
'id' => 'edit_form_tags',
|
||||
'title' => __( 'Form-tags', 'contact-form-7' ),
|
||||
'content' => $this->content( 'edit_form_tags' ),
|
||||
) );
|
||||
|
||||
$this->screen->add_help_tab( array(
|
||||
'id' => 'edit_mail_tags',
|
||||
'title' => __( 'Mail-tags', 'contact-form-7' ),
|
||||
'content' => $this->content( 'edit_mail_tags' ),
|
||||
) );
|
||||
|
||||
$this->sidebar();
|
||||
|
||||
return;
|
||||
case 'integration':
|
||||
$this->screen->add_help_tab( array(
|
||||
'id' => 'integration_overview',
|
||||
'title' => __( 'Overview', 'contact-form-7' ),
|
||||
'content' => $this->content( 'integration_overview' ),
|
||||
) );
|
||||
|
||||
$this->sidebar();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private function content( $name ) {
|
||||
$content = array();
|
||||
|
||||
$content['list_overview'] = '<p>' . __( "On this screen, you can manage contact forms provided by Contact Form 7. You can manage an unlimited number of contact forms. Each contact form has a unique ID and Contact Form 7 shortcode ([contact-form-7 ...]). To insert a contact form into a post or a text widget, insert the shortcode into the target.", 'contact-form-7' ) . '</p>';
|
||||
|
||||
$content['list_available_actions'] = '<p>' . __( "Hovering over a row in the contact forms list will display action links that allow you to manage your contact form. You can perform the following actions:", 'contact-form-7' ) . '</p>';
|
||||
$content['list_available_actions'] .= '<p>' . __( "<strong>Edit</strong> - Navigates to the editing screen for that contact form. You can also reach that screen by clicking on the contact form title.", 'contact-form-7' ) . '</p>';
|
||||
$content['list_available_actions'] .= '<p>' . __( "<strong>Duplicate</strong> - Clones that contact form. A cloned contact form inherits all content from the original, but has a different ID.", 'contact-form-7' ) . '</p>';
|
||||
|
||||
$content['edit_overview'] = '<p>' . __( "On this screen, you can edit a contact form. A contact form is comprised of the following components:", 'contact-form-7' ) . '</p>';
|
||||
$content['edit_overview'] .= '<p>' . __( "<strong>Title</strong> is the title of a contact form. This title is only used for labeling a contact form, and can be edited.", 'contact-form-7' ) . '</p>';
|
||||
$content['edit_overview'] .= '<p>' . __( "<strong>Form</strong> is a content of HTML form. You can use arbitrary HTML, which is allowed inside a form element. You can also use Contact Form 7’s form-tags here.", 'contact-form-7' ) . '</p>';
|
||||
$content['edit_overview'] .= '<p>' . __( "<strong>Mail</strong> manages a mail template (headers and message body) that this contact form will send when users submit it. You can use Contact Form 7’s mail-tags here.", 'contact-form-7' ) . '</p>';
|
||||
$content['edit_overview'] .= '<p>' . __( "<strong>Mail (2)</strong> is an additional mail template that works similar to Mail. Mail (2) is different in that it is sent only when Mail has been sent successfully.", 'contact-form-7' ) . '</p>';
|
||||
$content['edit_overview'] .= '<p>' . __( "In <strong>Messages</strong>, you can edit various types of messages used for this contact form. These messages are relatively short messages, like a validation error message you see when you leave a required field blank.", 'contact-form-7' ) . '</p>';
|
||||
$content['edit_overview'] .= '<p>' . __( "<strong>Additional Settings</strong> provides a place where you can customize the behavior of this contact form by adding code snippets.", 'contact-form-7' ) . '</p>';
|
||||
|
||||
$content['edit_form_tags'] = '<p>' . __( "A form-tag is a short code enclosed in square brackets used in a form content. A form-tag generally represents an input field, and its components can be separated into four parts: type, name, options, and values. Contact Form 7 supports several types of form-tags including text fields, number fields, date fields, checkboxes, radio buttons, menus, file-uploading fields, CAPTCHAs, and quiz fields.", 'contact-form-7' ) . '</p>';
|
||||
$content['edit_form_tags'] .= '<p>' . __( "While form-tags have a comparatively complex syntax, you do not need to know the syntax to add form-tags because you can use the straightforward tag generator (<strong>Generate Tag</strong> button on this screen).", 'contact-form-7' ) . '</p>';
|
||||
|
||||
$content['edit_mail_tags'] = '<p>' . __( "A mail-tag is also a short code enclosed in square brackets that you can use in every Mail and Mail (2) field. A mail-tag represents a user input value through an input field of a corresponding form-tag.", 'contact-form-7' ) . '</p>';
|
||||
$content['edit_mail_tags'] .= '<p>' . __( "There are also special mail-tags that have specific names, but do not have corresponding form-tags. They are used to represent meta information of form submissions like the submitter’s IP address or the URL of the page.", 'contact-form-7' ) . '</p>';
|
||||
|
||||
$content['integration_overview'] = '<p>' . __( "On this screen, you can manage services that are available through Contact Form 7. Using API will allow you to collaborate with any services that are available.", 'contact-form-7' ) . '</p>';
|
||||
$content['integration_overview'] .= '<p>' . __( "You may need to first sign up for an account with the service that you plan to use. When you do so, you would need to authorize Contact Form 7 to access the service with your account.", 'contact-form-7' ) . '</p>';
|
||||
$content['integration_overview'] .= '<p>' . __( "Any information you provide will not be shared with service providers without your authorization.", 'contact-form-7' ) . '</p>';
|
||||
|
||||
if ( ! empty( $content[$name] ) ) {
|
||||
return $content[$name];
|
||||
}
|
||||
}
|
||||
|
||||
public function sidebar() {
|
||||
$content = '<p><strong>' . __( 'For more information:', 'contact-form-7' ) . '</strong></p>';
|
||||
$content .= '<p>' . wpcf7_link( __( 'https://contactform7.com/docs/', 'contact-form-7' ), __( 'Docs', 'contact-form-7' ) ) . '</p>';
|
||||
$content .= '<p>' . wpcf7_link( __( 'https://contactform7.com/faq/', 'contact-form-7' ), __( 'FAQ', 'contact-form-7' ) ) . '</p>';
|
||||
$content .= '<p>' . wpcf7_link( __( 'https://contactform7.com/support/', 'contact-form-7' ), __( 'Support', 'contact-form-7' ) ) . '</p>';
|
||||
|
||||
$this->screen->set_help_sidebar( $content );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
class WPCF7_TagGenerator {
|
||||
|
||||
private static $instance;
|
||||
|
||||
private $panels = array();
|
||||
|
||||
private function __construct() {}
|
||||
|
||||
public static function get_instance() {
|
||||
if ( empty( self::$instance ) ) {
|
||||
self::$instance = new self;
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
public function add( $id, $title, $callback, $options = array() ) {
|
||||
$id = trim( $id );
|
||||
|
||||
if ( '' === $id
|
||||
or ! wpcf7_is_name( $id ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->panels[$id] = array(
|
||||
'title' => $title,
|
||||
'content' => 'tag-generator-panel-' . $id,
|
||||
'options' => $options,
|
||||
'callback' => $callback,
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function print_buttons() {
|
||||
echo '<span id="tag-generator-list">';
|
||||
|
||||
foreach ( (array) $this->panels as $panel ) {
|
||||
echo sprintf(
|
||||
'<a href="#TB_inline?width=900&height=500&inlineId=%1$s" class="thickbox button" title="%2$s">%3$s</a>',
|
||||
esc_attr( $panel['content'] ),
|
||||
esc_attr( sprintf(
|
||||
/* translators: %s: title of form-tag like 'email' or 'checkboxes' */
|
||||
__( 'Form-tag Generator: %s', 'contact-form-7' ),
|
||||
$panel['title'] ) ),
|
||||
esc_html( $panel['title'] )
|
||||
);
|
||||
}
|
||||
|
||||
echo '</span>';
|
||||
}
|
||||
|
||||
public function print_panels( WPCF7_ContactForm $contact_form ) {
|
||||
foreach ( (array) $this->panels as $id => $panel ) {
|
||||
$callback = $panel['callback'];
|
||||
|
||||
$options = wp_parse_args( $panel['options'], array() );
|
||||
$options = array_merge( $options, array(
|
||||
'id' => $id,
|
||||
'title' => $panel['title'],
|
||||
'content' => $panel['content'],
|
||||
) );
|
||||
|
||||
if ( is_callable( $callback ) ) {
|
||||
echo sprintf( '<div id="%s" class="hidden">',
|
||||
esc_attr( $options['content'] ) );
|
||||
echo sprintf(
|
||||
'<form action="" class="tag-generator-panel" data-id="%s">',
|
||||
$options['id'] );
|
||||
|
||||
call_user_func( $callback, $contact_form, $options );
|
||||
|
||||
echo '</form></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,303 @@
|
||||
<?php
|
||||
|
||||
abstract class WPCF7_WelcomePanelColumn {
|
||||
|
||||
abstract protected function icon();
|
||||
abstract protected function title();
|
||||
abstract protected function content();
|
||||
|
||||
public function print_content() {
|
||||
$icon = sprintf(
|
||||
'<span class="dashicons dashicons-%s" aria-hidden="true"></span>',
|
||||
esc_attr( $this->icon() )
|
||||
);
|
||||
|
||||
$title = sprintf(
|
||||
'<h3>%1$s %2$s</h3>',
|
||||
$icon,
|
||||
$this->title()
|
||||
);
|
||||
|
||||
$content = $this->content();
|
||||
|
||||
if ( is_array( $content ) ) {
|
||||
$content = implode( "\n\n", $content );
|
||||
}
|
||||
|
||||
$content = wp_kses_post( $content );
|
||||
$content = wptexturize( $content );
|
||||
$content = convert_chars( $content );
|
||||
$content = wpautop( $content );
|
||||
|
||||
echo "\n";
|
||||
echo '<div class="welcome-panel-column">';
|
||||
echo $title;
|
||||
echo $content;
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class WPCF7_WelcomePanelColumn_AntiSpam extends WPCF7_WelcomePanelColumn {
|
||||
|
||||
protected function icon() {
|
||||
return 'shield';
|
||||
}
|
||||
|
||||
protected function title() {
|
||||
return esc_html(
|
||||
__( "Getting spammed? You have protection.", 'contact-form-7' )
|
||||
);
|
||||
}
|
||||
|
||||
protected function content() {
|
||||
return array(
|
||||
esc_html( __( "Spammers target everything; your contact forms are not an exception. Before you get spammed, protect your contact forms with the powerful anti-spam features Contact Form 7 provides.", 'contact-form-7' ) ),
|
||||
sprintf(
|
||||
/* translators: links labeled 1: 'Akismet', 2: 'reCAPTCHA', 3: 'disallowed list' */
|
||||
esc_html( __( 'Contact Form 7 supports spam-filtering with %1$s. Intelligent %2$s blocks annoying spambots. Plus, using %3$s, you can block messages containing specified keywords or those sent from specified IP addresses.', 'contact-form-7' ) ),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/spam-filtering-with-akismet/', 'contact-form-7' ),
|
||||
__( 'Akismet', 'contact-form-7' )
|
||||
),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/recaptcha/', 'contact-form-7' ),
|
||||
__( 'reCAPTCHA', 'contact-form-7' )
|
||||
),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/comment-blacklist/', 'contact-form-7' ),
|
||||
__( 'disallowed list', 'contact-form-7' )
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class WPCF7_WelcomePanelColumn_Donation extends WPCF7_WelcomePanelColumn {
|
||||
|
||||
protected function icon() {
|
||||
return 'megaphone';
|
||||
}
|
||||
|
||||
protected function title() {
|
||||
return esc_html(
|
||||
__( "Contact Form 7 needs your support.", 'contact-form-7' )
|
||||
);
|
||||
}
|
||||
|
||||
protected function content() {
|
||||
return array(
|
||||
esc_html( __( "It is hard to continue development and support for this plugin without contributions from users like you.", 'contact-form-7' ) ),
|
||||
sprintf(
|
||||
/* translators: %s: link labeled 'making a donation' */
|
||||
esc_html( __( 'If you enjoy using Contact Form 7 and find it useful, please consider %s.', 'contact-form-7' ) ),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/donate/', 'contact-form-7' ),
|
||||
__( 'making a donation', 'contact-form-7' )
|
||||
)
|
||||
),
|
||||
esc_html( __( "Your donation will help encourage and support the plugin’s continued development and better user support.", 'contact-form-7' ) ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class WPCF7_WelcomePanelColumn_Flamingo extends WPCF7_WelcomePanelColumn {
|
||||
|
||||
protected function icon() {
|
||||
return 'editor-help';
|
||||
}
|
||||
|
||||
protected function title() {
|
||||
return esc_html(
|
||||
__( "Before you cry over spilt mail…", 'contact-form-7' )
|
||||
);
|
||||
}
|
||||
|
||||
protected function content() {
|
||||
return array(
|
||||
esc_html( __( "Contact Form 7 does not store submitted messages anywhere. Therefore, you may lose important messages forever if your mail server has issues or you make a mistake in mail configuration.", 'contact-form-7' ) ),
|
||||
sprintf(
|
||||
/* translators: %s: link labeled 'Flamingo' */
|
||||
esc_html( __( 'Install a message storage plugin before this happens to you. %s saves all messages through contact forms into the database. Flamingo is a free WordPress plugin created by the same author as Contact Form 7.', 'contact-form-7' ) ),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/save-submitted-messages-with-flamingo/', 'contact-form-7' ),
|
||||
__( 'Flamingo', 'contact-form-7' )
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class WPCF7_WelcomePanelColumn_Integration extends WPCF7_WelcomePanelColumn {
|
||||
|
||||
protected function icon() {
|
||||
return 'superhero-alt';
|
||||
}
|
||||
|
||||
protected function title() {
|
||||
return esc_html(
|
||||
__( "You have strong allies to back you up.", 'contact-form-7' )
|
||||
);
|
||||
}
|
||||
|
||||
protected function content() {
|
||||
return array(
|
||||
sprintf(
|
||||
/* translators: 1: link labeled 'Brevo' */
|
||||
esc_html( __( 'Your contact forms will become more powerful and versatile by integrating them with external APIs. With CRM and email marketing services, you can build your own contact lists (%1$s).', 'contact-form-7' ) ),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/sendinblue-integration/', 'contact-form-7' ),
|
||||
__( 'Brevo', 'contact-form-7' )
|
||||
)
|
||||
),
|
||||
sprintf(
|
||||
/* translators: 1: link labeled 'reCAPTCHA', 2: link labeled 'Stripe' */
|
||||
esc_html( __( 'With help from cloud-based machine learning, anti-spam services will protect your forms (%1$s). Even payment services are natively supported (%2$s).', 'contact-form-7' ) ),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/recaptcha/', 'contact-form-7' ),
|
||||
__( 'reCAPTCHA', 'contact-form-7' )
|
||||
),
|
||||
wpcf7_link(
|
||||
__( 'https://contactform7.com/stripe-integration/', 'contact-form-7' ),
|
||||
__( 'Stripe', 'contact-form-7' )
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function wpcf7_welcome_panel() {
|
||||
$columns = array();
|
||||
|
||||
$flamingo_is_active = defined( 'FLAMINGO_VERSION' );
|
||||
|
||||
$sendinblue_is_active = false;
|
||||
|
||||
if ( class_exists( 'WPCF7_Sendinblue' )
|
||||
and $sendinblue = WPCF7_Sendinblue::get_instance() ) {
|
||||
$sendinblue_is_active = $sendinblue->is_active();
|
||||
}
|
||||
|
||||
if ( $flamingo_is_active and $sendinblue_is_active ) {
|
||||
$columns[] = new WPCF7_WelcomePanelColumn_AntiSpam();
|
||||
$columns[] = new WPCF7_WelcomePanelColumn_Donation();
|
||||
} elseif ( $flamingo_is_active ) {
|
||||
$columns[] = new WPCF7_WelcomePanelColumn_Integration();
|
||||
$columns[] = new WPCF7_WelcomePanelColumn_AntiSpam();
|
||||
} elseif ( $sendinblue_is_active ) {
|
||||
$columns[] = new WPCF7_WelcomePanelColumn_Flamingo();
|
||||
$columns[] = new WPCF7_WelcomePanelColumn_AntiSpam();
|
||||
} else {
|
||||
$columns[] = new WPCF7_WelcomePanelColumn_Flamingo();
|
||||
$columns[] = new WPCF7_WelcomePanelColumn_Integration();
|
||||
}
|
||||
|
||||
$classes = 'wpcf7-welcome-panel';
|
||||
|
||||
$vers = (array) get_user_meta( get_current_user_id(),
|
||||
'wpcf7_hide_welcome_panel_on', true
|
||||
);
|
||||
|
||||
if ( wpcf7_version_grep( wpcf7_version( 'only_major=1' ), $vers ) ) {
|
||||
$classes .= ' hidden';
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="wpcf7-welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
|
||||
<?php wp_nonce_field( 'wpcf7-welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
|
||||
<a class="welcome-panel-close" href="<?php echo esc_url( menu_page_url( 'wpcf7', false ) ); ?>"><?php echo esc_html( __( 'Dismiss', 'contact-form-7' ) ); ?></a>
|
||||
|
||||
<div class="welcome-panel-content">
|
||||
<div class="welcome-panel-column-container">
|
||||
<?php
|
||||
|
||||
foreach ( $columns as $column ) {
|
||||
$column->print_content();
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
add_action(
|
||||
'wp_ajax_wpcf7-update-welcome-panel',
|
||||
'wpcf7_admin_ajax_welcome_panel',
|
||||
10, 0
|
||||
);
|
||||
|
||||
function wpcf7_admin_ajax_welcome_panel() {
|
||||
check_ajax_referer( 'wpcf7-welcome-panel-nonce', 'welcomepanelnonce' );
|
||||
|
||||
$vers = get_user_meta( get_current_user_id(),
|
||||
'wpcf7_hide_welcome_panel_on', true
|
||||
);
|
||||
|
||||
if ( empty( $vers ) or ! is_array( $vers ) ) {
|
||||
$vers = array();
|
||||
}
|
||||
|
||||
if ( empty( $_POST['visible'] ) ) {
|
||||
$vers[] = wpcf7_version( 'only_major=1' );
|
||||
} else {
|
||||
$vers = array_diff( $vers, array( wpcf7_version( 'only_major=1' ) ) );
|
||||
}
|
||||
|
||||
$vers = array_unique( $vers );
|
||||
|
||||
update_user_meta( get_current_user_id(),
|
||||
'wpcf7_hide_welcome_panel_on', $vers
|
||||
);
|
||||
|
||||
wp_die( 1 );
|
||||
}
|
||||
|
||||
|
||||
add_filter(
|
||||
'screen_settings',
|
||||
'wpcf7_welcome_panel_screen_settings',
|
||||
10, 2
|
||||
);
|
||||
|
||||
function wpcf7_welcome_panel_screen_settings( $screen_settings, $screen ) {
|
||||
|
||||
if ( 'toplevel_page_wpcf7' !== $screen->id ) {
|
||||
return $screen_settings;
|
||||
}
|
||||
|
||||
$vers = (array) get_user_meta( get_current_user_id(),
|
||||
'wpcf7_hide_welcome_panel_on', true
|
||||
);
|
||||
|
||||
$checkbox_id = 'wpcf7-welcome-panel-show';
|
||||
$checked = ! in_array( wpcf7_version( 'only_major=1' ), $vers );
|
||||
|
||||
$checkbox = sprintf(
|
||||
'<input %s />',
|
||||
wpcf7_format_atts( array(
|
||||
'id' => $checkbox_id,
|
||||
'type' => 'checkbox',
|
||||
'checked' => $checked,
|
||||
) )
|
||||
);
|
||||
|
||||
$screen_settings .= sprintf( '
|
||||
<fieldset class="wpcf7-welcome-panel-options">
|
||||
<legend>%1$s</legend>
|
||||
<label for="%2$s">%3$s %4$s</label>
|
||||
</fieldset>',
|
||||
esc_html( __( 'Welcome panel', 'contact-form-7' ) ),
|
||||
esc_attr( $checkbox_id ),
|
||||
$checkbox,
|
||||
esc_html( __( 'Show welcome panel', 'contact-form-7' ) )
|
||||
);
|
||||
|
||||
return $screen_settings;
|
||||
}
|
||||
319
wp-content/plugins/contact-form-7/admin/js/scripts.js
Normal file
@@ -0,0 +1,319 @@
|
||||
( function( $ ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
if ( typeof wpcf7 === 'undefined' || wpcf7 === null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$( function() {
|
||||
var welcomePanel = $( '#wpcf7-welcome-panel' );
|
||||
var updateWelcomePanel;
|
||||
|
||||
updateWelcomePanel = function( visible ) {
|
||||
$.post( ajaxurl, {
|
||||
action: 'wpcf7-update-welcome-panel',
|
||||
visible: visible,
|
||||
welcomepanelnonce: $( '#welcomepanelnonce' ).val()
|
||||
} );
|
||||
};
|
||||
|
||||
$( 'a.welcome-panel-close', welcomePanel ).click( function( event ) {
|
||||
event.preventDefault();
|
||||
welcomePanel.addClass( 'hidden' );
|
||||
updateWelcomePanel( 0 );
|
||||
$( '#wpcf7-welcome-panel-show' ).prop( 'checked', false );
|
||||
} );
|
||||
|
||||
$( '#wpcf7-welcome-panel-show' ).click( function( event ) {
|
||||
if ( this.checked ) {
|
||||
welcomePanel.removeClass( 'hidden' );
|
||||
updateWelcomePanel( 1 );
|
||||
} else {
|
||||
welcomePanel.addClass( 'hidden' );
|
||||
updateWelcomePanel( 0 );
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#contact-form-editor' ).tabs( {
|
||||
active: wpcf7.activeTab,
|
||||
activate: function( event, ui ) {
|
||||
$( '#active-tab' ).val( ui.newTab.index() );
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#contact-form-editor-tabs' ).focusin( function( event ) {
|
||||
$( '#contact-form-editor .keyboard-interaction' ).css(
|
||||
'visibility', 'visible' );
|
||||
} ).focusout( function( event ) {
|
||||
$( '#contact-form-editor .keyboard-interaction' ).css(
|
||||
'visibility', 'hidden' );
|
||||
} );
|
||||
|
||||
wpcf7.toggleMail2( 'input:checkbox.toggle-form-table' );
|
||||
|
||||
$( 'input:checkbox.toggle-form-table' ).click( function( event ) {
|
||||
wpcf7.toggleMail2( this );
|
||||
} );
|
||||
|
||||
if ( '' === $( '#title' ).val() ) {
|
||||
$( '#title' ).focus();
|
||||
}
|
||||
|
||||
wpcf7.titleHint();
|
||||
|
||||
$( '.contact-form-editor-box-mail span.mailtag' ).click( function( event ) {
|
||||
var range = document.createRange();
|
||||
range.selectNodeContents( this );
|
||||
window.getSelection().addRange( range );
|
||||
} );
|
||||
|
||||
wpcf7.updateConfigErrors();
|
||||
|
||||
$( '[data-config-field]' ).change( function() {
|
||||
var postId = $( '#post_ID' ).val();
|
||||
|
||||
if ( ! postId || -1 == postId ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = [];
|
||||
|
||||
$( this ).closest( 'form' ).find( '[data-config-field]' ).each( function() {
|
||||
var val = $( this ).val();
|
||||
|
||||
if ( $( this ).is( '[type=checkbox]' ) ) {
|
||||
val = $( this ).is( ':checked' ) ? 1 : 0;
|
||||
}
|
||||
|
||||
data.push( {
|
||||
'name': $( this ).attr( 'name' ).replace( /^wpcf7-/, '' ).replace( /-/g, '_' ),
|
||||
'value': val
|
||||
} );
|
||||
} );
|
||||
|
||||
data.push( { 'name': 'context', 'value': 'dry-run' } );
|
||||
|
||||
$.ajax( {
|
||||
method: 'POST',
|
||||
url: wpcf7.apiSettings.getRoute( '/contact-forms/' + postId ),
|
||||
beforeSend: function( xhr ) {
|
||||
xhr.setRequestHeader( 'X-WP-Nonce', wpcf7.apiSettings.nonce );
|
||||
},
|
||||
data: data
|
||||
} ).done( function( response ) {
|
||||
wpcf7.configValidator.errors = response.config_errors;
|
||||
wpcf7.updateConfigErrors();
|
||||
} );
|
||||
} );
|
||||
|
||||
$( window ).on( 'beforeunload', function( event ) {
|
||||
var changed = false;
|
||||
|
||||
$( '#wpcf7-admin-form-element :input[type!="hidden"]' ).each( function() {
|
||||
if ( $( this ).is( ':checkbox, :radio' ) ) {
|
||||
if ( this.defaultChecked != $( this ).is( ':checked' ) ) {
|
||||
changed = true;
|
||||
}
|
||||
} else if ( $( this ).is( 'select' ) ) {
|
||||
$( this ).find( 'option' ).each( function() {
|
||||
if ( this.defaultSelected != $( this ).is( ':selected' ) ) {
|
||||
changed = true;
|
||||
}
|
||||
} );
|
||||
} else {
|
||||
if ( this.defaultValue != $( this ).val() ) {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
if ( changed ) {
|
||||
event.returnValue = wpcf7.saveAlert;
|
||||
return wpcf7.saveAlert;
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#wpcf7-admin-form-element' ).submit( function() {
|
||||
if ( 'copy' != this.action.value ) {
|
||||
$( window ).off( 'beforeunload' );
|
||||
}
|
||||
|
||||
if ( 'save' == this.action.value ) {
|
||||
$( '#publishing-action .spinner' ).addClass( 'is-active' );
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#wpcf7-ctct-enable-contact-list, #wpcf7-sendinblue-enable-contact-list, #wpcf7-sendinblue-enable-transactional-email' ).on( 'change', function() {
|
||||
if ( $( this ).is( ':checked' ) ) {
|
||||
$( this ).closest( 'tr' ).removeClass( 'inactive' );
|
||||
} else {
|
||||
$( this ).closest( 'tr' ).addClass( 'inactive' );
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
||||
|
||||
wpcf7.toggleMail2 = function( checkbox ) {
|
||||
var $checkbox = $( checkbox );
|
||||
var $fieldset = $( 'fieldset',
|
||||
$checkbox.closest( '.contact-form-editor-box-mail' ) );
|
||||
|
||||
if ( $checkbox.is( ':checked' ) ) {
|
||||
$fieldset.removeClass( 'hidden' );
|
||||
} else {
|
||||
$fieldset.addClass( 'hidden' );
|
||||
}
|
||||
};
|
||||
|
||||
wpcf7.updateConfigErrors = function() {
|
||||
var errors = wpcf7.configValidator.errors;
|
||||
var errorCount = { total: 0 };
|
||||
|
||||
$( '[data-config-field]' ).each( function() {
|
||||
$( this ).removeAttr( 'aria-invalid' );
|
||||
$( this ).next( 'ul.config-error' ).remove();
|
||||
|
||||
var section = $( this ).attr( 'data-config-field' );
|
||||
|
||||
$( this ).attr( 'aria-describedby', 'wpcf7-config-error-for-' + section );
|
||||
|
||||
if ( errors[ section ] ) {
|
||||
var $list = $( '<ul></ul>' ).attr( {
|
||||
'id': 'wpcf7-config-error-for-' + section,
|
||||
'class': 'config-error'
|
||||
} );
|
||||
|
||||
$.each( errors[ section ], function( i, val ) {
|
||||
var $li = $( '<li></li>' ).append(
|
||||
wpcf7.iconInCircle( '!' )
|
||||
).append(
|
||||
$( '<span class="screen-reader-text"></span>' ).text( wpcf7.configValidator.iconAlt )
|
||||
).append( ' ' );
|
||||
|
||||
if ( val.link ) {
|
||||
$li.append(
|
||||
$( '<a></a>' ).attr( 'href', val.link ).text( val.message )
|
||||
);
|
||||
} else {
|
||||
$li.text( val.message );
|
||||
}
|
||||
|
||||
$li.appendTo( $list );
|
||||
|
||||
var tab = section
|
||||
.replace( /^mail_\d+\./, 'mail.' ).replace( /\..*$/, '' );
|
||||
|
||||
if ( ! errorCount[ tab ] ) {
|
||||
errorCount[ tab ] = 0;
|
||||
}
|
||||
|
||||
errorCount[ tab ] += 1;
|
||||
|
||||
errorCount.total += 1;
|
||||
} );
|
||||
|
||||
$( this ).after( $list ).attr( { 'aria-invalid': 'true' } );
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#contact-form-editor-tabs > li' ).each( function() {
|
||||
var $item = $( this );
|
||||
$item.find( '.icon-in-circle' ).remove();
|
||||
var tab = $item.attr( 'id' ).replace( /-panel-tab$/, '' );
|
||||
|
||||
$.each( errors, function( key, val ) {
|
||||
key = key.replace( /^mail_\d+\./, 'mail.' );
|
||||
|
||||
if ( key.replace( /\..*$/, '' ) == tab.replace( '-', '_' ) ) {
|
||||
var $mark = wpcf7.iconInCircle( '!' );
|
||||
$item.find( 'a.ui-tabs-anchor' ).first().append( $mark );
|
||||
return false;
|
||||
}
|
||||
} );
|
||||
|
||||
var $tabPanelError = $( '#' + tab + '-panel > div.config-error:first' );
|
||||
$tabPanelError.empty();
|
||||
|
||||
if ( errorCount[ tab.replace( '-', '_' ) ] ) {
|
||||
$tabPanelError.append( wpcf7.iconInCircle( '!' ) );
|
||||
|
||||
if ( 1 < errorCount[ tab.replace( '-', '_' ) ] ) {
|
||||
var manyErrorsInTab = wpcf7.configValidator.manyErrorsInTab
|
||||
.replace( '%d', errorCount[ tab.replace( '-', '_' ) ] );
|
||||
$tabPanelError.append( manyErrorsInTab );
|
||||
} else {
|
||||
$tabPanelError.append( wpcf7.configValidator.oneErrorInTab );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
$( '#misc-publishing-actions .misc-pub-section.config-error' ).remove();
|
||||
|
||||
if ( errorCount.total ) {
|
||||
var $warning = $( '<div></div>' )
|
||||
.addClass( 'misc-pub-section config-error' )
|
||||
.append( wpcf7.iconInCircle( '!' ) );
|
||||
|
||||
if ( 1 < errorCount.total ) {
|
||||
$warning.append(
|
||||
wpcf7.configValidator.manyErrors.replace( '%d', errorCount.total )
|
||||
);
|
||||
} else {
|
||||
$warning.append( wpcf7.configValidator.oneError );
|
||||
}
|
||||
|
||||
$warning.append( '<br />' ).append(
|
||||
$( '<a></a>' )
|
||||
.attr( 'href', wpcf7.configValidator.docUrl )
|
||||
.text( wpcf7.configValidator.howToCorrect )
|
||||
);
|
||||
|
||||
$( '#misc-publishing-actions' ).append( $warning );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Copied from wptitlehint() in wp-admin/js/post.js
|
||||
*/
|
||||
wpcf7.titleHint = function() {
|
||||
var $title = $( '#title' );
|
||||
var $titleprompt = $( '#title-prompt-text' );
|
||||
|
||||
if ( '' === $title.val() ) {
|
||||
$titleprompt.removeClass( 'screen-reader-text' );
|
||||
}
|
||||
|
||||
$titleprompt.click( function() {
|
||||
$( this ).addClass( 'screen-reader-text' );
|
||||
$title.focus();
|
||||
} );
|
||||
|
||||
$title.blur( function() {
|
||||
if ( '' === $(this).val() ) {
|
||||
$titleprompt.removeClass( 'screen-reader-text' );
|
||||
}
|
||||
} ).focus( function() {
|
||||
$titleprompt.addClass( 'screen-reader-text' );
|
||||
} ).keydown( function( e ) {
|
||||
$titleprompt.addClass( 'screen-reader-text' );
|
||||
$( this ).unbind( e );
|
||||
} );
|
||||
};
|
||||
|
||||
wpcf7.iconInCircle = function( icon ) {
|
||||
var $span = $( '<span class="icon-in-circle" aria-hidden="true"></span>' );
|
||||
return $span.text( icon );
|
||||
};
|
||||
|
||||
wpcf7.apiSettings.getRoute = function( path ) {
|
||||
var url = wpcf7.apiSettings.root;
|
||||
|
||||
url = url.replace(
|
||||
wpcf7.apiSettings.namespace,
|
||||
wpcf7.apiSettings.namespace + path );
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
} )( jQuery );
|
||||
249
wp-content/plugins/contact-form-7/admin/js/tag-generator.js
Normal file
@@ -0,0 +1,249 @@
|
||||
( function( $ ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
if ( typeof wpcf7 === 'undefined' || wpcf7 === null ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wpcf7.taggen = {};
|
||||
|
||||
$( function() {
|
||||
$( 'form.tag-generator-panel' ).each( function() {
|
||||
wpcf7.taggen.update( $( this ) );
|
||||
} );
|
||||
} );
|
||||
|
||||
$( 'form.tag-generator-panel' ).submit( function() {
|
||||
return false;
|
||||
} );
|
||||
|
||||
$( 'form.tag-generator-panel .control-box :input' ).change( function() {
|
||||
var $form = $( this ).closest( 'form.tag-generator-panel' );
|
||||
wpcf7.taggen.normalize( $( this ) );
|
||||
wpcf7.taggen.update( $form );
|
||||
} );
|
||||
|
||||
$( 'input.insert-tag' ).click( function() {
|
||||
var $form = $( this ).closest( 'form.tag-generator-panel' );
|
||||
var tag = $form.find( 'input.tag' ).val();
|
||||
wpcf7.taggen.insert( tag );
|
||||
tb_remove(); // close thickbox
|
||||
return false;
|
||||
} );
|
||||
|
||||
wpcf7.taggen.update = function( $form ) {
|
||||
var id = $form.attr( 'data-id' );
|
||||
var name = '';
|
||||
var name_fields = $form.find( 'input[name="name"]' );
|
||||
|
||||
if ( name_fields.length ) {
|
||||
name = name_fields.val();
|
||||
|
||||
if ( '' === name ) {
|
||||
name = id + '-' + Math.floor( Math.random() * 1000 );
|
||||
name_fields.val( name );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $.isFunction( wpcf7.taggen.update[ id ] ) ) {
|
||||
return wpcf7.taggen.update[ id ].call( this, $form );
|
||||
}
|
||||
|
||||
$form.find( 'input.tag' ).each( function() {
|
||||
var tag_type = $( this ).attr( 'name' );
|
||||
|
||||
if ( $form.find( ':input[name="tagtype"]' ).length ) {
|
||||
tag_type = $form.find( ':input[name="tagtype"]' ).val();
|
||||
}
|
||||
|
||||
if ( $form.find( ':input[name="required"]' ).is( ':checked' ) ) {
|
||||
tag_type += '*';
|
||||
}
|
||||
|
||||
var components = wpcf7.taggen.compose( tag_type, $form );
|
||||
$( this ).val( components );
|
||||
} );
|
||||
|
||||
$form.find( 'span.mail-tag' ).text( '[' + name + ']' );
|
||||
|
||||
$form.find( 'input.mail-tag' ).each( function() {
|
||||
$( this ).val( '[' + name + ']' );
|
||||
} );
|
||||
};
|
||||
|
||||
wpcf7.taggen.update.captcha = function( $form ) {
|
||||
var captchac = wpcf7.taggen.compose( 'captchac', $form );
|
||||
var captchar = wpcf7.taggen.compose( 'captchar', $form );
|
||||
|
||||
$form.find( 'input.tag' ).val( captchac + ' ' + captchar );
|
||||
};
|
||||
|
||||
wpcf7.taggen.compose = function( tagType, $form ) {
|
||||
var name = $form.find( 'input[name="name"]' ).val();
|
||||
var scope = $form.find( '.scope.' + tagType );
|
||||
|
||||
if ( ! scope.length ) {
|
||||
scope = $form;
|
||||
}
|
||||
|
||||
var options = [];
|
||||
|
||||
scope.find( 'input.option' ).not( ':checkbox,:radio' ).each( function( i ) {
|
||||
var val = $( this ).val();
|
||||
|
||||
if ( ! val ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $( this ).hasClass( 'filetype' ) ) {
|
||||
val = val.split( /[,|\s]+/ ).join( '|' );
|
||||
}
|
||||
|
||||
if ( $( this ).hasClass( 'color' ) ) {
|
||||
val = '#' + val;
|
||||
}
|
||||
|
||||
if ( 'class' == $( this ).attr( 'name' ) ) {
|
||||
$.each( val.split( ' ' ), function( i, n ) {
|
||||
options.push( 'class:' + n );
|
||||
} );
|
||||
} else {
|
||||
options.push( $( this ).attr( 'name' ) + ':' + val );
|
||||
}
|
||||
} );
|
||||
|
||||
scope.find( 'input:checkbox.option' ).each( function( i ) {
|
||||
if ( $( this ).is( ':checked' ) ) {
|
||||
options.push( $( this ).attr( 'name' ) );
|
||||
}
|
||||
} );
|
||||
|
||||
scope.find( 'input:radio.option' ).each( function( i ) {
|
||||
if ( $( this ).is( ':checked' ) && ! $( this ).hasClass( 'default' ) ) {
|
||||
options.push( $( this ).attr( 'name' ) + ':' + $( this ).val() );
|
||||
}
|
||||
} );
|
||||
|
||||
if ( 'radio' == tagType ) {
|
||||
options.push( 'default:1' );
|
||||
}
|
||||
|
||||
options = ( options.length > 0 ) ? options.join( ' ' ) : '';
|
||||
|
||||
var value = '';
|
||||
|
||||
if ( scope.find( ':input[name="values"]' ).val() ) {
|
||||
$.each(
|
||||
scope.find( ':input[name="values"]' ).val().split( "\n" ),
|
||||
function( i, n ) {
|
||||
value += ' "' + n.replace( /["]/g, '"' ) + '"';
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
var components = [];
|
||||
|
||||
$.each( [ tagType, name, options, value ], function( i, v ) {
|
||||
v = $.trim( v );
|
||||
|
||||
if ( '' != v ) {
|
||||
components.push( v );
|
||||
}
|
||||
} );
|
||||
|
||||
components = $.trim( components.join( ' ' ) );
|
||||
components = '[' + components + ']';
|
||||
|
||||
var content = scope.find( ':input[name="content"]' ).val();
|
||||
content = $.trim( content );
|
||||
|
||||
if ( content ) {
|
||||
components += ' ' + content + ' [/' + tagType + ']';
|
||||
}
|
||||
|
||||
return components;
|
||||
};
|
||||
|
||||
wpcf7.taggen.normalize = function( $input ) {
|
||||
var val = $input.val();
|
||||
|
||||
if ( $input.is( 'input[name="name"]' ) ) {
|
||||
val = val.replace( /[^0-9a-zA-Z:._-]/g, '' ).replace( /^[^a-zA-Z]+/, '' );
|
||||
}
|
||||
|
||||
if ( $input.is( '.numeric' ) ) {
|
||||
val = val.replace( /[^0-9.-]/g, '' );
|
||||
}
|
||||
|
||||
if ( $input.is( '.idvalue' ) ) {
|
||||
val = val.replace( /[^-0-9a-zA-Z_]/g, '' );
|
||||
}
|
||||
|
||||
if ( $input.is( '.classvalue' ) ) {
|
||||
val = $.map( val.split( ' ' ), function( n ) {
|
||||
return n.replace( /[^-0-9a-zA-Z_]/g, '' );
|
||||
} ).join( ' ' );
|
||||
|
||||
val = $.trim( val.replace( /\s+/g, ' ' ) );
|
||||
}
|
||||
|
||||
if ( $input.is( '.color' ) ) {
|
||||
val = val.replace( /[^0-9a-fA-F]/g, '' );
|
||||
}
|
||||
|
||||
if ( $input.is( '.filesize' ) ) {
|
||||
val = val.replace( /[^0-9kKmMbB]/g, '' );
|
||||
}
|
||||
|
||||
if ( $input.is( '.filetype' ) ) {
|
||||
val = val.replace( /[^0-9a-zA-Z.,|\s]/g, '' );
|
||||
}
|
||||
|
||||
if ( $input.is( '.date' ) ) {
|
||||
// 'yyyy-mm-dd' ISO 8601 format
|
||||
if ( ! val.match( /^\d{4}-\d{2}-\d{2}$/ ) ) {
|
||||
val = '';
|
||||
}
|
||||
}
|
||||
|
||||
if ( $input.is( ':input[name="values"]' ) ) {
|
||||
val = $.trim( val );
|
||||
}
|
||||
|
||||
$input.val( val );
|
||||
|
||||
if ( $input.is( ':checkbox.exclusive' ) ) {
|
||||
wpcf7.taggen.exclusiveCheckbox( $input );
|
||||
}
|
||||
};
|
||||
|
||||
wpcf7.taggen.exclusiveCheckbox = function( $cb ) {
|
||||
if ( $cb.is( ':checked' ) ) {
|
||||
$cb.siblings( ':checkbox.exclusive' ).prop( 'checked', false );
|
||||
}
|
||||
};
|
||||
|
||||
wpcf7.taggen.insert = function( content ) {
|
||||
$( 'textarea#wpcf7-form' ).each( function() {
|
||||
this.focus();
|
||||
|
||||
if ( document.selection ) { // IE
|
||||
var selection = document.selection.createRange();
|
||||
selection.text = content;
|
||||
} else if ( this.selectionEnd || 0 === this.selectionEnd ) {
|
||||
var val = $( this ).val();
|
||||
var end = this.selectionEnd;
|
||||
$( this ).val( val.substring( 0, end ) +
|
||||
content + val.substring( end, val.length ) );
|
||||
this.selectionStart = end + content.length;
|
||||
this.selectionEnd = end + content.length;
|
||||
} else {
|
||||
$( this ).val( $( this ).val() + content );
|
||||
}
|
||||
|
||||
this.focus();
|
||||
} );
|
||||
};
|
||||
|
||||
} )( jQuery );
|
||||
BIN
wp-content/plugins/contact-form-7/assets/icon.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
1
wp-content/plugins/contact-form-7/assets/icon.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 242.5 239.46"><defs><style>.cls-1,.cls-6{fill:none;}.cls-2{clip-path:url(#clip-path);}.cls-3{fill:#33c6f4;}.cls-4{fill:#1b447e;}.cls-5{fill:#fff;}.cls-6{stroke:#221e1f;stroke-miterlimit:10;stroke-width:7.16px;}</style><clipPath id="clip-path" transform="translate(1.72)"><circle class="cls-1" cx="119.73" cy="119.73" r="116.15"/></clipPath></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1" data-name="Layer 1"><g class="cls-2"><circle class="cls-3" cx="121.45" cy="119.73" r="116.15"/><path class="cls-4" d="M239.32,167.79c-53.41-24-108.37-91.46-113-94.55s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11S36.94,237.79,122,237.79C208.48,237.79,239.32,167.79,239.32,167.79Z" transform="translate(1.72)"/><path class="cls-5" d="M67.48,116.58s15.48-7,12.38,4.65-15.48,28.64-11.61,29.41S83,140.58,86.06,142.12s5.42.78,3.87,6.2-3.1,9.29,0,9.29,5.42-7,9.29-13.94,10.06-3.87,12.38-1.55,9.29,15.49,14.71,13.94,8.51-8.52,6.19-24,1.55-20.12,1.55-20.12,4.64-2.32,13.16,8.51,24,27.09,26.31,26.32-10.83-17.8-7.74-19.35,15.48,2.32,21.68,7.74c0,0,2.12,8.87,2.12.36L126.31,73.24,115.47,74l-10.06.77S80.64,111.94,67.48,116.58Z" transform="translate(1.72)"/><path class="cls-6" d="M239.32,170.11c-53.41-24-108.37-93.78-113-96.87s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11" transform="translate(1.72)"/></g><circle class="cls-6" cx="121.45" cy="119.73" r="116.15"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
add_action(
|
||||
'init',
|
||||
'wpcf7_init_block_editor_assets',
|
||||
10, 0
|
||||
);
|
||||
|
||||
function wpcf7_init_block_editor_assets() {
|
||||
$assets = array();
|
||||
|
||||
$asset_file = wpcf7_plugin_path(
|
||||
'includes/block-editor/index.asset.php'
|
||||
);
|
||||
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$assets = include( $asset_file );
|
||||
}
|
||||
|
||||
$assets = wp_parse_args( $assets, array(
|
||||
'dependencies' => array(
|
||||
'wp-api-fetch',
|
||||
'wp-block-editor',
|
||||
'wp-blocks',
|
||||
'wp-components',
|
||||
'wp-element',
|
||||
'wp-i18n',
|
||||
'wp-url',
|
||||
),
|
||||
'version' => WPCF7_VERSION,
|
||||
) );
|
||||
|
||||
wp_register_script(
|
||||
'contact-form-7-block-editor',
|
||||
wpcf7_plugin_url( 'includes/block-editor/index.js' ),
|
||||
$assets['dependencies'],
|
||||
$assets['version']
|
||||
);
|
||||
|
||||
wp_set_script_translations(
|
||||
'contact-form-7-block-editor',
|
||||
'contact-form-7'
|
||||
);
|
||||
|
||||
register_block_type(
|
||||
wpcf7_plugin_path( 'includes/block-editor' ),
|
||||
array(
|
||||
'editor_script' => 'contact-form-7-block-editor',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
add_action(
|
||||
'enqueue_block_editor_assets',
|
||||
'wpcf7_enqueue_block_editor_assets',
|
||||
10, 0
|
||||
);
|
||||
|
||||
function wpcf7_enqueue_block_editor_assets() {
|
||||
$contact_forms = array_map(
|
||||
static function ( $contact_form ) {
|
||||
return array(
|
||||
'id' => $contact_form->id(),
|
||||
'hash' => $contact_form->hash(),
|
||||
'slug' => $contact_form->name(),
|
||||
'title' => $contact_form->title(),
|
||||
'locale' => $contact_form->locale(),
|
||||
);
|
||||
},
|
||||
WPCF7_ContactForm::find( array(
|
||||
'posts_per_page' => 20,
|
||||
'orderby' => 'modified',
|
||||
'order' => 'DESC',
|
||||
) )
|
||||
);
|
||||
|
||||
wp_add_inline_script(
|
||||
'contact-form-7-block-editor',
|
||||
sprintf(
|
||||
'window.wpcf7 = {contactForms:%s};',
|
||||
wp_json_encode( $contact_forms )
|
||||
),
|
||||
'before'
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 3,
|
||||
"name": "contact-form-7/contact-form-selector",
|
||||
"title": "Contact Form 7",
|
||||
"category": "widgets",
|
||||
"description": "Insert a contact form you have created with Contact Form 7.",
|
||||
"keywords": [ "form" ],
|
||||
"textdomain": "contact-form-7",
|
||||
"attributes": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"htmlId": {
|
||||
"type": "string"
|
||||
},
|
||||
"htmlName": {
|
||||
"type": "string"
|
||||
},
|
||||
"htmlTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"htmlClass": {
|
||||
"type": "string"
|
||||
},
|
||||
"output": {
|
||||
"enum": [ "form", "raw_form" ],
|
||||
"default": "form"
|
||||
}
|
||||
},
|
||||
"editorScript": "file:./index.js"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'dependencies' => array(
|
||||
'react',
|
||||
'wp-api-fetch',
|
||||
'wp-block-editor',
|
||||
'wp-blocks',
|
||||
'wp-components',
|
||||
'wp-element',
|
||||
'wp-i18n',
|
||||
'wp-url',
|
||||
),
|
||||
'version' => WPCF7_VERSION,
|
||||
);
|
||||
26
wp-content/plugins/contact-form-7/includes/capabilities.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
add_filter( 'map_meta_cap', 'wpcf7_map_meta_cap', 10, 4 );
|
||||
|
||||
function wpcf7_map_meta_cap( $caps, $cap, $user_id, $args ) {
|
||||
$meta_caps = array(
|
||||
'wpcf7_edit_contact_form' => WPCF7_ADMIN_READ_WRITE_CAPABILITY,
|
||||
'wpcf7_edit_contact_forms' => WPCF7_ADMIN_READ_WRITE_CAPABILITY,
|
||||
'wpcf7_read_contact_form' => WPCF7_ADMIN_READ_CAPABILITY,
|
||||
'wpcf7_read_contact_forms' => WPCF7_ADMIN_READ_CAPABILITY,
|
||||
'wpcf7_delete_contact_form' => WPCF7_ADMIN_READ_WRITE_CAPABILITY,
|
||||
'wpcf7_delete_contact_forms' => WPCF7_ADMIN_READ_WRITE_CAPABILITY,
|
||||
'wpcf7_manage_integration' => 'manage_options',
|
||||
'wpcf7_submit' => 'read',
|
||||
);
|
||||
|
||||
$meta_caps = apply_filters( 'wpcf7_map_meta_cap', $meta_caps );
|
||||
|
||||
$caps = array_diff( $caps, array_keys( $meta_caps ) );
|
||||
|
||||
if ( isset( $meta_caps[$cap] ) ) {
|
||||
$caps[] = $meta_caps[$cap];
|
||||
}
|
||||
|
||||
return $caps;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
add_action(
|
||||
'wpcf7_update_option',
|
||||
'wpcf7_config_validator_update_option',
|
||||
10, 3
|
||||
);
|
||||
|
||||
/**
|
||||
* Runs bulk validation after the reCAPTCHA integration option is updated.
|
||||
*/
|
||||
function wpcf7_config_validator_update_option( $name, $value, $old_option ) {
|
||||
if ( 'recaptcha' === $name ) {
|
||||
$contact_forms = WPCF7_ContactForm::find();
|
||||
|
||||
$options = array(
|
||||
'include' => 'unsafe_email_without_protection',
|
||||
);
|
||||
|
||||
foreach ( $contact_forms as $contact_form ) {
|
||||
$config_validator = new WPCF7_ConfigValidator( $contact_form, $options );
|
||||
$config_validator->restore();
|
||||
$config_validator->validate();
|
||||
$config_validator->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
trait WPCF7_ConfigValidator_AdditionalSettings {
|
||||
|
||||
/**
|
||||
* Runs error detection for the additional settings section.
|
||||
*/
|
||||
public function validate_additional_settings() {
|
||||
$section = 'additional_settings.body';
|
||||
|
||||
if ( $this->supports( 'deprecated_settings' ) ) {
|
||||
$deprecated_settings_used =
|
||||
$this->contact_form->additional_setting( 'on_sent_ok' ) ||
|
||||
$this->contact_form->additional_setting( 'on_submit' );
|
||||
|
||||
if ( $deprecated_settings_used ) {
|
||||
$this->add_error( $section, 'deprecated_settings',
|
||||
array(
|
||||
'message' => __( "Deprecated settings are used.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'deprecated_settings' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
<?php
|
||||
|
||||
trait WPCF7_ConfigValidator_Form {
|
||||
|
||||
/**
|
||||
* Runs error detection for the form section.
|
||||
*/
|
||||
public function validate_form() {
|
||||
$section = 'form.body';
|
||||
$form = $this->contact_form->prop( 'form' );
|
||||
|
||||
if ( $this->supports( 'multiple_controls_in_label' ) ) {
|
||||
if ( $this->detect_multiple_controls_in_label( $section, $form ) ) {
|
||||
$this->add_error( $section, 'multiple_controls_in_label',
|
||||
array(
|
||||
'message' => __( "Multiple form controls are in a single label element.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'multiple_controls_in_label' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'unavailable_names' ) ) {
|
||||
$ng_names = $this->detect_unavailable_names( $section, $form );
|
||||
|
||||
if ( $ng_names ) {
|
||||
$this->add_error( $section, 'unavailable_names',
|
||||
array(
|
||||
'message' =>
|
||||
/* translators: %names%: a list of form control names */
|
||||
__( "Unavailable names (%names%) are used for form controls.", 'contact-form-7' ),
|
||||
'params' => array( 'names' => implode( ', ', $ng_names ) ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'unavailable_names' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'unavailable_html_elements' ) ) {
|
||||
if ( $this->detect_unavailable_html_elements( $section, $form ) ) {
|
||||
$this->add_error( $section, 'unavailable_html_elements',
|
||||
array(
|
||||
'message' => __( "Unavailable HTML elements are used in the form template.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'unavailable_html_elements' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'dots_in_names' ) ) {
|
||||
if ( $this->detect_dots_in_names( $section, $form ) ) {
|
||||
$this->add_error( $section, 'dots_in_names',
|
||||
array(
|
||||
'message' => __( "Dots are used in form-tag names.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'dots_in_names' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'colons_in_names' ) ) {
|
||||
if ( $this->detect_colons_in_names( $section, $form ) ) {
|
||||
$this->add_error( $section, 'colons_in_names',
|
||||
array(
|
||||
'message' => __( "Colons are used in form-tag names.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'colons_in_names' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'upload_filesize_overlimit' ) ) {
|
||||
if ( $this->detect_upload_filesize_overlimit( $section, $form ) ) {
|
||||
$this->add_error( $section, 'upload_filesize_overlimit',
|
||||
array(
|
||||
'message' => __( "Uploadable file size exceeds PHP’s maximum acceptable size.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'upload_filesize_overlimit' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of multiple form controls in a single label.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/multiple-controls-in-label/
|
||||
*/
|
||||
public function detect_multiple_controls_in_label( $section, $content ) {
|
||||
$pattern = '%<label(?:[ \t\n]+.*?)?>(.+?)</label>%s';
|
||||
|
||||
if ( preg_match_all( $pattern, $content, $matches ) ) {
|
||||
$form_tags_manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
foreach ( $matches[1] as $insidelabel ) {
|
||||
$tags = $form_tags_manager->scan( $insidelabel );
|
||||
$fields_count = 0;
|
||||
|
||||
foreach ( $tags as $tag ) {
|
||||
$is_multiple_controls_container = wpcf7_form_tag_supports(
|
||||
$tag->type, 'multiple-controls-container'
|
||||
);
|
||||
|
||||
$is_zero_controls_container = wpcf7_form_tag_supports(
|
||||
$tag->type, 'zero-controls-container'
|
||||
);
|
||||
|
||||
if ( $is_multiple_controls_container ) {
|
||||
$fields_count += count( $tag->values );
|
||||
|
||||
if ( $tag->has_option( 'free_text' ) ) {
|
||||
$fields_count += 1;
|
||||
}
|
||||
} elseif ( $is_zero_controls_container ) {
|
||||
$fields_count += 0;
|
||||
} elseif ( ! empty( $tag->name ) ) {
|
||||
$fields_count += 1;
|
||||
}
|
||||
|
||||
if ( 1 < $fields_count ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of unavailable form-tag names.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/unavailable-names/
|
||||
*/
|
||||
public function detect_unavailable_names( $section, $content ) {
|
||||
$public_query_vars = array( 'm', 'p', 'posts', 'w', 'cat',
|
||||
'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence',
|
||||
'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order',
|
||||
'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second',
|
||||
'name', 'category_name', 'tag', 'feed', 'author_name', 'static',
|
||||
'pagename', 'page_id', 'error', 'attachment', 'attachment_id',
|
||||
'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term',
|
||||
'cpage', 'post_type', 'embed',
|
||||
);
|
||||
|
||||
$form_tags_manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
$ng_named_tags = $form_tags_manager->filter( $content, array(
|
||||
'name' => $public_query_vars,
|
||||
) );
|
||||
|
||||
$ng_names = array();
|
||||
|
||||
foreach ( $ng_named_tags as $tag ) {
|
||||
$ng_names[] = sprintf( '"%s"', $tag->name );
|
||||
}
|
||||
|
||||
if ( $ng_names ) {
|
||||
return array_unique( $ng_names );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of unavailable HTML elements.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/unavailable-html-elements/
|
||||
*/
|
||||
public function detect_unavailable_html_elements( $section, $content ) {
|
||||
$pattern = '%(?:<form[\s\t>]|</form>)%i';
|
||||
|
||||
if ( preg_match( $pattern, $content ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of dots in form-tag names.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/dots-in-names/
|
||||
*/
|
||||
public function detect_dots_in_names( $section, $content ) {
|
||||
$form_tags_manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
$tags = $form_tags_manager->filter( $content, array(
|
||||
'feature' => 'name-attr',
|
||||
) );
|
||||
|
||||
foreach ( $tags as $tag ) {
|
||||
if ( str_contains( $tag->raw_name, '.' ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of colons in form-tag names.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/colons-in-names/
|
||||
*/
|
||||
public function detect_colons_in_names( $section, $content ) {
|
||||
$form_tags_manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
$tags = $form_tags_manager->filter( $content, array(
|
||||
'feature' => 'name-attr',
|
||||
) );
|
||||
|
||||
foreach ( $tags as $tag ) {
|
||||
if ( str_contains( $tag->raw_name, ':' ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of uploadable file size overlimit.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/upload-filesize-overlimit
|
||||
*/
|
||||
public function detect_upload_filesize_overlimit( $section, $content ) {
|
||||
$upload_max_filesize = ini_get( 'upload_max_filesize' );
|
||||
|
||||
if ( ! $upload_max_filesize ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$upload_max_filesize = strtolower( $upload_max_filesize );
|
||||
$upload_max_filesize = trim( $upload_max_filesize );
|
||||
|
||||
if ( ! preg_match( '/^(\d+)([kmg]?)$/', $upload_max_filesize, $matches ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( 'k' === $matches[2] ) {
|
||||
$upload_max_filesize = (int) $matches[1] * KB_IN_BYTES;
|
||||
} elseif ( 'm' === $matches[2] ) {
|
||||
$upload_max_filesize = (int) $matches[1] * MB_IN_BYTES;
|
||||
} elseif ( 'g' === $matches[2] ) {
|
||||
$upload_max_filesize = (int) $matches[1] * GB_IN_BYTES;
|
||||
} else {
|
||||
$upload_max_filesize = (int) $matches[1];
|
||||
}
|
||||
|
||||
$form_tags_manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
$tags = $form_tags_manager->filter( $content, array(
|
||||
'basetype' => 'file',
|
||||
) );
|
||||
|
||||
foreach ( $tags as $tag ) {
|
||||
if ( $upload_max_filesize < $tag->get_limit_option() ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,578 @@
|
||||
<?php
|
||||
|
||||
trait WPCF7_ConfigValidator_Mail {
|
||||
|
||||
/**
|
||||
* Replaces all mail-tags in the given content.
|
||||
*/
|
||||
public function replace_mail_tags( $content, $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'html' => false,
|
||||
'callback' =>
|
||||
array( $this, 'replace_mail_tags_with_minimum_input_callback' ),
|
||||
) );
|
||||
|
||||
$content = new WPCF7_MailTaggedText( $content, $args );
|
||||
|
||||
return $content->replace_tags();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function for WPCF7_MailTaggedText. Replaces mail-tags with
|
||||
* the most conservative inputs.
|
||||
*/
|
||||
public function replace_mail_tags_with_minimum_input_callback( $matches ) {
|
||||
// allow [[foo]] syntax for escaping a tag
|
||||
if ( $matches[1] === '[' and $matches[4] === ']' ) {
|
||||
return substr( $matches[0], 1, -1 );
|
||||
}
|
||||
|
||||
$tag = $matches[0];
|
||||
$tagname = $matches[2];
|
||||
$values = $matches[3];
|
||||
|
||||
$mail_tag = new WPCF7_MailTag( $tag, $tagname, $values );
|
||||
$field_name = $mail_tag->field_name();
|
||||
|
||||
$example_email = 'example@example.com';
|
||||
$example_text = 'example';
|
||||
$example_blank = '';
|
||||
|
||||
// for back-compat
|
||||
$field_name = preg_replace( '/^wpcf7\./', '_', $field_name );
|
||||
|
||||
if ( '_site_admin_email' === $field_name ) {
|
||||
return get_bloginfo( 'admin_email', 'raw' );
|
||||
|
||||
} elseif ( '_user_agent' === $field_name ) {
|
||||
return $example_text;
|
||||
|
||||
} elseif ( '_user_email' === $field_name ) {
|
||||
return $this->contact_form->is_true( 'subscribers_only' )
|
||||
? $example_email
|
||||
: $example_blank;
|
||||
|
||||
} elseif ( str_starts_with( $field_name, '_user_' ) ) {
|
||||
return $this->contact_form->is_true( 'subscribers_only' )
|
||||
? $example_text
|
||||
: $example_blank;
|
||||
|
||||
} elseif ( str_starts_with( $field_name, '_' ) ) {
|
||||
return str_ends_with( $field_name, '_email' )
|
||||
? $example_email
|
||||
: $example_text;
|
||||
|
||||
}
|
||||
|
||||
static $opcalcset = array();
|
||||
|
||||
if ( ! isset( $opcalcset[$this->contact_form->id()] ) ) {
|
||||
$opcalcset[$this->contact_form->id()] =
|
||||
new WPCF7_MailTag_OutputCalculator( $this->contact_form );
|
||||
}
|
||||
|
||||
$opcalc = $opcalcset[$this->contact_form->id()];
|
||||
$op = $opcalc->calc_output( $mail_tag );
|
||||
|
||||
if ( WPCF7_MailTag_OutputCalculator::email === $op ) {
|
||||
return $example_email;
|
||||
} elseif ( ! ( WPCF7_MailTag_OutputCalculator::blank & $op ) ) {
|
||||
return $example_text;
|
||||
} else {
|
||||
return $example_blank;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs error detection for the mail sections.
|
||||
*/
|
||||
public function validate_mail( $template = 'mail' ) {
|
||||
if (
|
||||
$this->contact_form->is_true( 'demo_mode' ) or
|
||||
$this->contact_form->is_true( 'skip_mail' )
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
$components = (array) $this->contact_form->prop( $template );
|
||||
|
||||
if ( ! $components ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( 'mail' !== $template and empty( $components['active'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$components = wp_parse_args( $components, array(
|
||||
'subject' => '',
|
||||
'sender' => '',
|
||||
'recipient' => '',
|
||||
'additional_headers' => '',
|
||||
'body' => '',
|
||||
'attachments' => '',
|
||||
) );
|
||||
|
||||
$this->validate_mail_subject(
|
||||
$template,
|
||||
$components['subject']
|
||||
);
|
||||
|
||||
$this->validate_mail_sender(
|
||||
$template,
|
||||
$components['sender']
|
||||
);
|
||||
|
||||
$this->validate_mail_recipient(
|
||||
$template,
|
||||
$components['recipient']
|
||||
);
|
||||
|
||||
$this->validate_mail_additional_headers(
|
||||
$template,
|
||||
$components['additional_headers']
|
||||
);
|
||||
|
||||
$this->validate_mail_body(
|
||||
$template,
|
||||
$components['body']
|
||||
);
|
||||
|
||||
$this->validate_mail_attachments(
|
||||
$template,
|
||||
$components['attachments']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs error detection for the mail subject section.
|
||||
*/
|
||||
public function validate_mail_subject( $template, $content ) {
|
||||
$section = sprintf( '%s.subject', $template );
|
||||
|
||||
if ( $this->supports( 'maybe_empty' ) ) {
|
||||
if ( $this->detect_maybe_empty( $section, $content ) ) {
|
||||
$this->add_error( $section, 'maybe_empty',
|
||||
array(
|
||||
'message' => __( "There is a possible empty field.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'maybe_empty' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs error detection for the mail sender section.
|
||||
*/
|
||||
public function validate_mail_sender( $template, $content ) {
|
||||
$section = sprintf( '%s.sender', $template );
|
||||
|
||||
if ( $this->supports( 'invalid_mailbox_syntax' ) ) {
|
||||
if ( $this->detect_invalid_mailbox_syntax( $section, $content ) ) {
|
||||
$this->add_error( $section, 'invalid_mailbox_syntax',
|
||||
array(
|
||||
'message' => __( "Invalid mailbox syntax is used.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'invalid_mailbox_syntax' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'email_not_in_site_domain' ) ) {
|
||||
$this->remove_error( $section, 'email_not_in_site_domain' );
|
||||
|
||||
if ( ! $this->has_error( $section, 'invalid_mailbox_syntax' ) ) {
|
||||
$sender = $this->replace_mail_tags( $content );
|
||||
$sender = wpcf7_strip_newline( $sender );
|
||||
|
||||
if ( ! wpcf7_is_email_in_site_domain( $sender ) ) {
|
||||
$this->add_error( $section, 'email_not_in_site_domain',
|
||||
array(
|
||||
'message' => __( "Sender email address does not belong to the site domain.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs error detection for the mail recipient section.
|
||||
*/
|
||||
public function validate_mail_recipient( $template, $content ) {
|
||||
$section = sprintf( '%s.recipient', $template );
|
||||
|
||||
if ( $this->supports( 'invalid_mailbox_syntax' ) ) {
|
||||
if ( $this->detect_invalid_mailbox_syntax( $section, $content ) ) {
|
||||
$this->add_error( $section, 'invalid_mailbox_syntax',
|
||||
array(
|
||||
'message' => __( "Invalid mailbox syntax is used.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'invalid_mailbox_syntax' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'unsafe_email_without_protection' ) ) {
|
||||
$this->remove_error( $section, 'unsafe_email_without_protection' );
|
||||
|
||||
if ( ! $this->has_error( $section, 'invalid_mailbox_syntax' ) ) {
|
||||
if (
|
||||
$this->detect_unsafe_email_without_protection( $section, $content )
|
||||
) {
|
||||
$this->add_error( $section, 'unsafe_email_without_protection',
|
||||
array(
|
||||
'message' => __( "Unsafe email config is used without sufficient protection.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs error detection for the mail additional headers section.
|
||||
*/
|
||||
public function validate_mail_additional_headers( $template, $content ) {
|
||||
$section = sprintf( '%s.additional_headers', $template );
|
||||
|
||||
$invalid_mail_headers = array();
|
||||
$invalid_mailbox_fields = array();
|
||||
$unsafe_email_fields = array();
|
||||
|
||||
foreach ( explode( "\n", $content ) as $header ) {
|
||||
$header = trim( $header );
|
||||
|
||||
if ( '' === $header ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$is_valid_header = preg_match(
|
||||
'/^([0-9A-Za-z-]+):(.*)$/',
|
||||
$header,
|
||||
$matches
|
||||
);
|
||||
|
||||
if ( ! $is_valid_header ) {
|
||||
$invalid_mail_headers[] = $header;
|
||||
continue;
|
||||
}
|
||||
|
||||
$header_name = $matches[1];
|
||||
$header_value = trim( $matches[2] );
|
||||
|
||||
if (
|
||||
in_array(
|
||||
strtolower( $header_name ), array( 'reply-to', 'cc', 'bcc' )
|
||||
) and
|
||||
'' !== $header_value and
|
||||
$this->detect_invalid_mailbox_syntax( $section, $header_value )
|
||||
) {
|
||||
$invalid_mailbox_fields[] = $header_name;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
in_array( strtolower( $header_name ), array( 'cc', 'bcc' ) ) and
|
||||
$this->detect_unsafe_email_without_protection( $section, $header_value )
|
||||
) {
|
||||
$unsafe_email_fields[] = $header_name;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'invalid_mail_header' ) ) {
|
||||
if ( ! empty( $invalid_mail_headers ) ) {
|
||||
$this->add_error( $section, 'invalid_mail_header',
|
||||
array(
|
||||
'message' => __( "There are invalid mail header fields.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'invalid_mail_header' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'invalid_mailbox_syntax' ) ) {
|
||||
if ( ! empty( $invalid_mailbox_fields ) ) {
|
||||
foreach ( $invalid_mailbox_fields as $header_name ) {
|
||||
$this->add_error( $section, 'invalid_mailbox_syntax',
|
||||
array(
|
||||
'message' => __( "Invalid mailbox syntax is used in the %name% field.", 'contact-form-7' ),
|
||||
'params' => array( 'name' => $header_name ),
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->remove_error( $section, 'invalid_mailbox_syntax' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'unsafe_email_without_protection' ) ) {
|
||||
if ( ! empty( $unsafe_email_fields ) ) {
|
||||
$this->add_error( $section, 'unsafe_email_without_protection',
|
||||
array(
|
||||
'message' => __( "Unsafe email config is used without sufficient protection.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'unsafe_email_without_protection' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs error detection for the mail body section.
|
||||
*/
|
||||
public function validate_mail_body( $template, $content ) {
|
||||
$section = sprintf( '%s.body', $template );
|
||||
|
||||
if ( $this->supports( 'maybe_empty' ) ) {
|
||||
if ( $this->detect_maybe_empty( $section, $content ) ) {
|
||||
$this->add_error( $section, 'maybe_empty',
|
||||
array(
|
||||
'message' => __( "There is a possible empty field.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'maybe_empty' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs error detection for the mail attachments section.
|
||||
*/
|
||||
public function validate_mail_attachments( $template, $content ) {
|
||||
$section = sprintf( '%s.attachments', $template );
|
||||
|
||||
$total_size = 0;
|
||||
$files_not_found = array();
|
||||
$files_out_of_content = array();
|
||||
|
||||
if ( '' !== $content ) {
|
||||
$attachables = array();
|
||||
|
||||
$tags = $this->contact_form->scan_form_tags(
|
||||
array( 'type' => array( 'file', 'file*' ) )
|
||||
);
|
||||
|
||||
foreach ( $tags as $tag ) {
|
||||
$name = $tag->name;
|
||||
|
||||
if ( ! str_contains( $content, "[{$name}]" ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$limit = (int) $tag->get_limit_option();
|
||||
|
||||
if ( empty( $attachables[$name] ) or $attachables[$name] < $limit ) {
|
||||
$attachables[$name] = $limit;
|
||||
}
|
||||
}
|
||||
|
||||
$total_size = array_sum( $attachables );
|
||||
|
||||
foreach ( explode( "\n", $content ) as $line ) {
|
||||
$line = trim( $line );
|
||||
|
||||
if ( '' === $line or str_starts_with( $line, '[' ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $this->detect_file_not_found( $section, $line ) ) {
|
||||
$files_not_found[] = $line;
|
||||
} elseif ( $this->detect_file_not_in_content_dir( $section, $line ) ) {
|
||||
$files_out_of_content[] = $line;
|
||||
} else {
|
||||
$total_size += (int) @filesize( $path );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'file_not_found' ) ) {
|
||||
if ( ! empty( $files_not_found ) ) {
|
||||
foreach ( $files_not_found as $line ) {
|
||||
$this->add_error( $section, 'file_not_found',
|
||||
array(
|
||||
'message' => __( "Attachment file does not exist at %path%.", 'contact-form-7' ),
|
||||
'params' => array( 'path' => $line ),
|
||||
)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->remove_error( $section, 'file_not_found' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'file_not_in_content_dir' ) ) {
|
||||
if ( ! empty( $files_out_of_content ) ) {
|
||||
$this->add_error( $section, 'file_not_in_content_dir',
|
||||
array(
|
||||
'message' => __( "It is not allowed to use files outside the wp-content directory.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'file_not_in_content_dir' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->supports( 'attachments_overweight' ) ) {
|
||||
$max = 25 * MB_IN_BYTES; // 25 MB
|
||||
|
||||
if ( $max < $total_size ) {
|
||||
$this->add_error( $section, 'attachments_overweight',
|
||||
array(
|
||||
'message' => __( "The total size of attachment files is too large.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'attachments_overweight' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of invalid mailbox syntax.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/invalid-mailbox-syntax/
|
||||
*/
|
||||
public function detect_invalid_mailbox_syntax( $section, $content ) {
|
||||
$content = $this->replace_mail_tags( $content );
|
||||
$content = wpcf7_strip_newline( $content );
|
||||
|
||||
if ( ! wpcf7_is_mailbox_list( $content ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of empty message fields.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/maybe-empty/
|
||||
*/
|
||||
public function detect_maybe_empty( $section, $content ) {
|
||||
$content = $this->replace_mail_tags( $content );
|
||||
$content = wpcf7_strip_newline( $content );
|
||||
|
||||
if ( '' === $content ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of nonexistent attachment files.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/file-not-found/
|
||||
*/
|
||||
public function detect_file_not_found( $section, $content ) {
|
||||
$path = path_join( WP_CONTENT_DIR, $content );
|
||||
|
||||
if ( ! is_readable( $path ) or ! is_file( $path ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of attachment files out of the content directory.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/file-not-in-content-dir/
|
||||
*/
|
||||
public function detect_file_not_in_content_dir( $section, $content ) {
|
||||
$path = path_join( WP_CONTENT_DIR, $content );
|
||||
|
||||
if ( ! wpcf7_is_file_path_in_content_dir( $path ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of that unsafe email config is used without
|
||||
* sufficient protection.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/unsafe-email-without-protection/
|
||||
*/
|
||||
public function detect_unsafe_email_without_protection( $section, $content ) {
|
||||
static $is_recaptcha_active = null;
|
||||
|
||||
if ( null === $is_recaptcha_active ) {
|
||||
$is_recaptcha_active = call_user_func( function () {
|
||||
$service = WPCF7_RECAPTCHA::get_instance();
|
||||
return $service->is_active();
|
||||
} );
|
||||
}
|
||||
|
||||
if ( $is_recaptcha_active ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$example_email = 'user-specified@example.com';
|
||||
|
||||
// Replace mail-tags connected to an email type form-tag first.
|
||||
$content = $this->replace_mail_tags( $content, array(
|
||||
'callback' => function ( $matches ) use ( $example_email ) {
|
||||
// allow [[foo]] syntax for escaping a tag
|
||||
if ( $matches[1] === '[' and $matches[4] === ']' ) {
|
||||
return substr( $matches[0], 1, -1 );
|
||||
}
|
||||
|
||||
$tag = $matches[0];
|
||||
$tagname = $matches[2];
|
||||
$values = $matches[3];
|
||||
|
||||
$mail_tag = new WPCF7_MailTag( $tag, $tagname, $values );
|
||||
$field_name = $mail_tag->field_name();
|
||||
|
||||
$form_tags = $this->contact_form->scan_form_tags(
|
||||
array( 'name' => $field_name )
|
||||
);
|
||||
|
||||
if ( $form_tags ) {
|
||||
$form_tag = new WPCF7_FormTag( $form_tags[0] );
|
||||
|
||||
if ( 'email' === $form_tag->basetype ) {
|
||||
return $example_email;
|
||||
}
|
||||
}
|
||||
|
||||
return $tag;
|
||||
},
|
||||
) );
|
||||
|
||||
// Replace remaining mail-tags.
|
||||
$content = $this->replace_mail_tags( $content );
|
||||
|
||||
$content = wpcf7_strip_newline( $content );
|
||||
|
||||
if ( str_contains( $content, $example_email ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
trait WPCF7_ConfigValidator_Messages {
|
||||
|
||||
/**
|
||||
* Runs error detection for the messages section.
|
||||
*/
|
||||
public function validate_messages() {
|
||||
$messages = (array) $this->contact_form->prop( 'messages' );
|
||||
|
||||
if ( ! $messages ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
isset( $messages['captcha_not_match'] ) and
|
||||
! wpcf7_use_really_simple_captcha()
|
||||
) {
|
||||
unset( $messages['captcha_not_match'] );
|
||||
}
|
||||
|
||||
foreach ( $messages as $key => $message ) {
|
||||
$section = sprintf( 'messages.%s', $key );
|
||||
|
||||
if ( $this->supports( 'html_in_message' ) ) {
|
||||
if ( $this->detect_html_in_message( $section, $message ) ) {
|
||||
$this->add_error( $section, 'html_in_message',
|
||||
array(
|
||||
'message' => __( "HTML tags are used in a message.", 'contact-form-7' ),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
$this->remove_error( $section, 'html_in_message' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Detects errors of HTML uses in a message.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/html-in-message/
|
||||
*/
|
||||
public function detect_html_in_message( $section, $content ) {
|
||||
$stripped = wp_strip_all_tags( $content );
|
||||
|
||||
if ( $stripped !== $content ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,376 @@
|
||||
<?php
|
||||
|
||||
require_once path_join( __DIR__, 'form.php' );
|
||||
require_once path_join( __DIR__, 'mail.php' );
|
||||
require_once path_join( __DIR__, 'messages.php' );
|
||||
require_once path_join( __DIR__, 'additional-settings.php' );
|
||||
require_once path_join( __DIR__, 'actions.php' );
|
||||
|
||||
|
||||
/**
|
||||
* Configuration validator.
|
||||
*
|
||||
* @link https://contactform7.com/configuration-errors/
|
||||
*/
|
||||
class WPCF7_ConfigValidator {
|
||||
|
||||
/**
|
||||
* The plugin version in which important updates happened last time.
|
||||
*/
|
||||
const last_important_update = '5.8.1';
|
||||
|
||||
const error_codes = array(
|
||||
'maybe_empty',
|
||||
'invalid_mailbox_syntax',
|
||||
'email_not_in_site_domain',
|
||||
'html_in_message',
|
||||
'multiple_controls_in_label',
|
||||
'file_not_found',
|
||||
'unavailable_names',
|
||||
'invalid_mail_header',
|
||||
'deprecated_settings',
|
||||
'file_not_in_content_dir',
|
||||
'unavailable_html_elements',
|
||||
'attachments_overweight',
|
||||
'dots_in_names',
|
||||
'colons_in_names',
|
||||
'upload_filesize_overlimit',
|
||||
'unsafe_email_without_protection',
|
||||
);
|
||||
|
||||
use WPCF7_ConfigValidator_Form;
|
||||
use WPCF7_ConfigValidator_Mail;
|
||||
use WPCF7_ConfigValidator_Messages;
|
||||
use WPCF7_ConfigValidator_AdditionalSettings;
|
||||
|
||||
private $contact_form;
|
||||
private $errors = array();
|
||||
private $include;
|
||||
private $exclude;
|
||||
|
||||
|
||||
/**
|
||||
* Returns a URL linking to the documentation page for the error type.
|
||||
*/
|
||||
public static function get_doc_link( $child_page = '' ) {
|
||||
$url = __( 'https://contactform7.com/configuration-errors/',
|
||||
'contact-form-7'
|
||||
);
|
||||
|
||||
if ( '' !== $child_page ) {
|
||||
$child_page = strtr( $child_page, '_', '-' );
|
||||
|
||||
$url = sprintf( '%s/%s', untrailingslashit( $url ), $child_page );
|
||||
}
|
||||
|
||||
return esc_url( $url );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct( WPCF7_ContactForm $contact_form, $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'include' => null,
|
||||
'exclude' => null,
|
||||
) );
|
||||
|
||||
$this->contact_form = $contact_form;
|
||||
|
||||
if ( isset( $args['include'] ) ) {
|
||||
$this->include = (array) $args['include'];
|
||||
}
|
||||
|
||||
if ( isset( $args['exclude'] ) ) {
|
||||
$this->exclude = (array) $args['exclude'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the contact form object that is tied to this validator.
|
||||
*/
|
||||
public function contact_form() {
|
||||
return $this->contact_form;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if no error has been detected.
|
||||
*/
|
||||
public function is_valid() {
|
||||
return ! $this->count_errors();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the given error code is supported by this instance.
|
||||
*/
|
||||
public function supports( $error_code ) {
|
||||
if ( isset( $this->include ) ) {
|
||||
$supported_codes = array_intersect( self::error_codes, $this->include );
|
||||
} else {
|
||||
$supported_codes = self::error_codes;
|
||||
}
|
||||
|
||||
if ( isset( $this->exclude ) ) {
|
||||
$supported_codes = array_diff( $supported_codes, $this->exclude );
|
||||
}
|
||||
|
||||
return in_array( $error_code, $supported_codes, true );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Counts detected errors.
|
||||
*/
|
||||
public function count_errors( $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'section' => '',
|
||||
'code' => '',
|
||||
) );
|
||||
|
||||
$count = 0;
|
||||
|
||||
foreach ( $this->errors as $key => $errors ) {
|
||||
if ( preg_match( '/^mail_[0-9]+\.(.*)$/', $key, $matches ) ) {
|
||||
$key = sprintf( 'mail.%s', $matches[1] );
|
||||
}
|
||||
|
||||
if ( $args['section']
|
||||
and $key !== $args['section']
|
||||
and preg_replace( '/\..*$/', '', $key, 1 ) !== $args['section'] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ( $errors as $error ) {
|
||||
if ( empty( $error ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $args['code'] and $error['code'] !== $args['code'] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$count += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Collects messages for detected errors.
|
||||
*/
|
||||
public function collect_error_messages() {
|
||||
$error_messages = array();
|
||||
|
||||
foreach ( $this->errors as $section => $errors ) {
|
||||
$error_messages[$section] = array();
|
||||
|
||||
foreach ( $errors as $error ) {
|
||||
if ( empty( $error['args']['message'] ) ) {
|
||||
$message = $this->get_default_message( $error['code'] );
|
||||
} elseif ( empty( $error['args']['params'] ) ) {
|
||||
$message = $error['args']['message'];
|
||||
} else {
|
||||
$message = $this->build_message(
|
||||
$error['args']['message'],
|
||||
$error['args']['params']
|
||||
);
|
||||
}
|
||||
|
||||
$link = '';
|
||||
|
||||
if ( ! empty( $error['args']['link'] ) ) {
|
||||
$link = $error['args']['link'];
|
||||
}
|
||||
|
||||
$error_messages[$section][] = array(
|
||||
'message' => $message,
|
||||
'link' => esc_url( $link ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $error_messages;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builds an error message by replacing placeholders.
|
||||
*/
|
||||
public function build_message( $message, $params = '' ) {
|
||||
$params = wp_parse_args( $params, array() );
|
||||
|
||||
foreach ( $params as $key => $val ) {
|
||||
if ( ! preg_match( '/^[0-9A-Za-z_]+$/', $key ) ) { // invalid key
|
||||
continue;
|
||||
}
|
||||
|
||||
$placeholder = '%' . $key . '%';
|
||||
|
||||
if ( false !== stripos( $message, $placeholder ) ) {
|
||||
$message = str_ireplace( $placeholder, $val, $message );
|
||||
}
|
||||
}
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a default message that is used when the message for the error
|
||||
* is not specified.
|
||||
*/
|
||||
public function get_default_message( $code = '' ) {
|
||||
return __( "Configuration error is detected.", 'contact-form-7' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the specified section has the specified error.
|
||||
*
|
||||
* @param string $section The section where the error detected.
|
||||
* @param string $code The unique code of the error.
|
||||
*/
|
||||
public function has_error( $section, $code ) {
|
||||
if ( empty( $this->errors[$section] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ( (array) $this->errors[$section] as $error ) {
|
||||
if ( isset( $error['code'] ) and $error['code'] === $code ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a validation error.
|
||||
*
|
||||
* @param string $section The section where the error detected.
|
||||
* @param string $code The unique code of the error.
|
||||
* @param string|array $args Optional options for the error.
|
||||
*/
|
||||
public function add_error( $section, $code, $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'message' => '',
|
||||
'params' => array(),
|
||||
) );
|
||||
|
||||
$available_error_codes = (array) apply_filters(
|
||||
'wpcf7_config_validator_available_error_codes',
|
||||
self::error_codes,
|
||||
$this->contact_form
|
||||
);
|
||||
|
||||
if ( ! in_array( $code, $available_error_codes, true ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! isset( $args['link'] ) ) {
|
||||
$args['link'] = self::get_doc_link( $code );
|
||||
}
|
||||
|
||||
if ( ! isset( $this->errors[$section] ) ) {
|
||||
$this->errors[$section] = array();
|
||||
}
|
||||
|
||||
$this->errors[$section][] = array(
|
||||
'code' => $code,
|
||||
'args' => $args,
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes an error.
|
||||
*
|
||||
* @param string $section The section where the error detected.
|
||||
* @param string $code The unique code of the error.
|
||||
*/
|
||||
public function remove_error( $section, $code ) {
|
||||
if ( empty( $this->errors[$section] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( (array) $this->errors[$section] as $key => $error ) {
|
||||
if ( isset( $error['code'] ) and $error['code'] === $code ) {
|
||||
unset( $this->errors[$section][$key] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( empty( $this->errors[$section] ) ) {
|
||||
unset( $this->errors[$section] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The main validation runner.
|
||||
*
|
||||
* @return bool True if there is no error detected.
|
||||
*/
|
||||
public function validate() {
|
||||
$this->validate_form();
|
||||
$this->validate_mail( 'mail' );
|
||||
$this->validate_mail( 'mail_2' );
|
||||
$this->validate_messages();
|
||||
$this->validate_additional_settings();
|
||||
|
||||
do_action( 'wpcf7_config_validator_validate', $this );
|
||||
|
||||
return $this->is_valid();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves detected errors as a post meta data.
|
||||
*/
|
||||
public function save() {
|
||||
if ( $this->contact_form->initial() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
delete_post_meta( $this->contact_form->id(), '_config_validation' );
|
||||
|
||||
if ( $this->errors ) {
|
||||
update_post_meta(
|
||||
$this->contact_form->id(), '_config_validation', $this->errors
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Restore errors from the database.
|
||||
*/
|
||||
public function restore() {
|
||||
$config_errors = get_post_meta(
|
||||
$this->contact_form->id(), '_config_validation', true
|
||||
);
|
||||
|
||||
foreach ( (array) $config_errors as $section => $errors ) {
|
||||
if ( empty( $errors ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ( (array) $errors as $error ) {
|
||||
if ( ! empty( $error['code'] ) ) {
|
||||
$code = $error['code'];
|
||||
$args = isset( $error['args'] ) ? $error['args'] : '';
|
||||
$this->add_error( $section, $code, $args );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,471 @@
|
||||
<?php
|
||||
/**
|
||||
* Contact form helper functions
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper function of WPCF7_ContactForm::get_instance().
|
||||
*
|
||||
* @param WPCF7_ContactForm|WP_Post|int $post Object or post ID.
|
||||
* @return WPCF7_ContactForm|null Contact form object. Null if unset.
|
||||
*/
|
||||
function wpcf7_contact_form( $post ) {
|
||||
return WPCF7_ContactForm::get_instance( $post );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Searches for a contact form by an old unit ID.
|
||||
*
|
||||
* @param int $old_id Old unit ID.
|
||||
* @return WPCF7_ContactForm Contact form object.
|
||||
*/
|
||||
function wpcf7_get_contact_form_by_old_id( $old_id ) {
|
||||
global $wpdb;
|
||||
|
||||
$q = "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_old_cf7_unit_id'"
|
||||
. $wpdb->prepare( " AND meta_value = %d", $old_id );
|
||||
|
||||
if ( $new_id = $wpdb->get_var( $q ) ) {
|
||||
return wpcf7_contact_form( $new_id );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Searches for a contact form by a hash string.
|
||||
*
|
||||
* @param string $hash Part of a hash string.
|
||||
* @return WPCF7_ContactForm Contact form object.
|
||||
*/
|
||||
function wpcf7_get_contact_form_by_hash( $hash ) {
|
||||
global $wpdb;
|
||||
|
||||
$hash = trim( $hash );
|
||||
|
||||
if ( strlen( $hash ) < 7 ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$like = $wpdb->esc_like( $hash ) . '%';
|
||||
|
||||
$q = "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_hash'"
|
||||
. $wpdb->prepare( " AND meta_value LIKE %s", $like );
|
||||
|
||||
if ( $post_id = $wpdb->get_var( $q ) ) {
|
||||
return wpcf7_contact_form( $post_id );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Searches for a contact form by title.
|
||||
*
|
||||
* @param string $title Title of contact form.
|
||||
* @return WPCF7_ContactForm|null Contact form object if found, null otherwise.
|
||||
*/
|
||||
function wpcf7_get_contact_form_by_title( $title ) {
|
||||
if ( ! is_string( $title ) or '' === $title ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$contact_forms = WPCF7_ContactForm::find( array(
|
||||
'title' => $title,
|
||||
'posts_per_page' => 1,
|
||||
) );
|
||||
|
||||
if ( $contact_forms ) {
|
||||
return wpcf7_contact_form( reset( $contact_forms ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper function of WPCF7_ContactForm::get_current().
|
||||
*
|
||||
* @return WPCF7_ContactForm Contact form object.
|
||||
*/
|
||||
function wpcf7_get_current_contact_form() {
|
||||
if ( $current = WPCF7_ContactForm::get_current() ) {
|
||||
return $current;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if it is in the state that a non-Ajax submission is accepted.
|
||||
*/
|
||||
function wpcf7_is_posted() {
|
||||
if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $contact_form->is_posted();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the user input value through a non-Ajax submission.
|
||||
*
|
||||
* @param string $name Name of form control.
|
||||
* @param string $default_value Optional default value.
|
||||
* @return string The user input value through the form-control.
|
||||
*/
|
||||
function wpcf7_get_hangover( $name, $default_value = null ) {
|
||||
if ( ! wpcf7_is_posted() ) {
|
||||
return $default_value;
|
||||
}
|
||||
|
||||
$submission = WPCF7_Submission::get_instance();
|
||||
|
||||
if ( ! $submission
|
||||
or $submission->is( 'mail_sent' ) ) {
|
||||
return $default_value;
|
||||
}
|
||||
|
||||
return isset( $_POST[$name] ) ? wp_unslash( $_POST[$name] ) : $default_value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves an HTML snippet of validation error on the given form control.
|
||||
*
|
||||
* @param string $name Name of form control.
|
||||
* @return string Validation error message in a form of HTML snippet.
|
||||
*/
|
||||
function wpcf7_get_validation_error( $name ) {
|
||||
if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $contact_form->validation_error( $name );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a reference key to a validation error message.
|
||||
*
|
||||
* @param string $name Name of form control.
|
||||
* @param string $unit_tag Optional. Unit tag of the contact form.
|
||||
* @return string Reference key code.
|
||||
*/
|
||||
function wpcf7_get_validation_error_reference( $name, $unit_tag = '' ) {
|
||||
if ( '' === $unit_tag ) {
|
||||
$contact_form = wpcf7_get_current_contact_form();
|
||||
|
||||
if ( $contact_form and $contact_form->validation_error( $name ) ) {
|
||||
$unit_tag = $contact_form->unit_tag();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return preg_replace( '/[^0-9a-z_-]+/i', '',
|
||||
sprintf(
|
||||
'%1$s-ve-%2$s',
|
||||
$unit_tag,
|
||||
$name
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves a message for the given status.
|
||||
*/
|
||||
function wpcf7_get_message( $status ) {
|
||||
if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $contact_form->message( $status );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a class names list for a form-tag of the specified type.
|
||||
*
|
||||
* @param string $type Form-tag type.
|
||||
* @param string $default_classes Optional default classes.
|
||||
* @return string Whitespace-separated list of class names.
|
||||
*/
|
||||
function wpcf7_form_controls_class( $type, $default_classes = '' ) {
|
||||
$type = trim( $type );
|
||||
|
||||
if ( is_string( $default_classes ) ) {
|
||||
$default_classes = explode( ' ', $default_classes );
|
||||
}
|
||||
|
||||
$classes = array(
|
||||
'wpcf7-form-control',
|
||||
sprintf( 'wpcf7-%s', rtrim( $type, '*' ) ),
|
||||
);
|
||||
|
||||
if ( str_ends_with( $type, '*' ) ) {
|
||||
$classes[] = 'wpcf7-validates-as-required';
|
||||
}
|
||||
|
||||
$classes = array_merge( $classes, $default_classes );
|
||||
$classes = array_filter( array_unique( $classes ) );
|
||||
|
||||
return implode( ' ', $classes );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function for the contact-form-7 shortcode.
|
||||
*/
|
||||
function wpcf7_contact_form_tag_func( $atts, $content = null, $code = '' ) {
|
||||
if ( is_feed() ) {
|
||||
return '[contact-form-7]';
|
||||
}
|
||||
|
||||
if ( 'contact-form-7' === $code ) {
|
||||
$atts = shortcode_atts(
|
||||
array(
|
||||
'id' => '',
|
||||
'title' => '',
|
||||
'html_id' => '',
|
||||
'html_name' => '',
|
||||
'html_title' => '',
|
||||
'html_class' => '',
|
||||
'output' => 'form',
|
||||
),
|
||||
$atts, 'wpcf7'
|
||||
);
|
||||
|
||||
$id = trim( $atts['id'] );
|
||||
$title = trim( $atts['title'] );
|
||||
|
||||
$contact_form = wpcf7_get_contact_form_by_hash( $id );
|
||||
|
||||
if ( ! $contact_form ) {
|
||||
$contact_form = wpcf7_contact_form( $id );
|
||||
}
|
||||
|
||||
if ( ! $contact_form ) {
|
||||
$contact_form = wpcf7_get_contact_form_by_title( $title );
|
||||
}
|
||||
|
||||
} else {
|
||||
if ( is_string( $atts ) ) {
|
||||
$atts = explode( ' ', $atts, 2 );
|
||||
}
|
||||
|
||||
$id = (int) array_shift( $atts );
|
||||
$contact_form = wpcf7_get_contact_form_by_old_id( $id );
|
||||
}
|
||||
|
||||
if ( ! $contact_form ) {
|
||||
return sprintf(
|
||||
'<p class="wpcf7-contact-form-not-found"><strong>%1$s</strong> %2$s</p>',
|
||||
esc_html( __( 'Error:', 'contact-form-7' ) ),
|
||||
esc_html( __( "Contact form not found.", 'contact-form-7' ) )
|
||||
);
|
||||
}
|
||||
|
||||
$callback = static function ( $contact_form, $atts ) {
|
||||
return $contact_form->form_html( $atts );
|
||||
};
|
||||
|
||||
$output = wpcf7_switch_locale(
|
||||
$contact_form->locale(),
|
||||
$callback,
|
||||
$contact_form, $atts
|
||||
);
|
||||
|
||||
do_action( 'wpcf7_shortcode_callback', $contact_form, $atts );
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves the contact form data.
|
||||
*/
|
||||
function wpcf7_save_contact_form( $args = '', $context = 'save' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'id' => -1,
|
||||
'title' => null,
|
||||
'locale' => null,
|
||||
'form' => null,
|
||||
'mail' => null,
|
||||
'mail_2' => null,
|
||||
'messages' => null,
|
||||
'additional_settings' => null,
|
||||
) );
|
||||
|
||||
$args = wp_unslash( $args );
|
||||
|
||||
$args['id'] = (int) $args['id'];
|
||||
|
||||
if ( -1 == $args['id'] ) {
|
||||
$contact_form = WPCF7_ContactForm::get_template();
|
||||
} else {
|
||||
$contact_form = wpcf7_contact_form( $args['id'] );
|
||||
}
|
||||
|
||||
if ( empty( $contact_form ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( null !== $args['title'] ) {
|
||||
$contact_form->set_title( $args['title'] );
|
||||
}
|
||||
|
||||
if ( null !== $args['locale'] ) {
|
||||
$contact_form->set_locale( $args['locale'] );
|
||||
}
|
||||
|
||||
$properties = array();
|
||||
|
||||
if ( null !== $args['form'] ) {
|
||||
$properties['form'] = wpcf7_sanitize_form( $args['form'] );
|
||||
}
|
||||
|
||||
if ( null !== $args['mail'] ) {
|
||||
$properties['mail'] = wpcf7_sanitize_mail( $args['mail'] );
|
||||
$properties['mail']['active'] = true;
|
||||
}
|
||||
|
||||
if ( null !== $args['mail_2'] ) {
|
||||
$properties['mail_2'] = wpcf7_sanitize_mail( $args['mail_2'] );
|
||||
}
|
||||
|
||||
if ( null !== $args['messages'] ) {
|
||||
$properties['messages'] = wpcf7_sanitize_messages( $args['messages'] );
|
||||
}
|
||||
|
||||
if ( null !== $args['additional_settings'] ) {
|
||||
$properties['additional_settings'] = wpcf7_sanitize_additional_settings(
|
||||
$args['additional_settings']
|
||||
);
|
||||
}
|
||||
|
||||
$contact_form->set_properties( $properties );
|
||||
|
||||
do_action( 'wpcf7_save_contact_form', $contact_form, $args, $context );
|
||||
|
||||
if ( 'save' == $context ) {
|
||||
$contact_form->save();
|
||||
}
|
||||
|
||||
return $contact_form;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sanitizes the form property data.
|
||||
*/
|
||||
function wpcf7_sanitize_form( $input, $default_template = '' ) {
|
||||
if ( null === $input ) {
|
||||
return $default_template;
|
||||
}
|
||||
|
||||
$output = trim( $input );
|
||||
|
||||
if ( ! current_user_can( 'unfiltered_html' ) ) {
|
||||
$output = wpcf7_kses( $output, 'form' );
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sanitizes the mail property data.
|
||||
*/
|
||||
function wpcf7_sanitize_mail( $input, $defaults = array() ) {
|
||||
$input = wp_parse_args( $input, array(
|
||||
'active' => false,
|
||||
'subject' => '',
|
||||
'sender' => '',
|
||||
'recipient' => '',
|
||||
'body' => '',
|
||||
'additional_headers' => '',
|
||||
'attachments' => '',
|
||||
'use_html' => false,
|
||||
'exclude_blank' => false,
|
||||
) );
|
||||
|
||||
$input = wp_parse_args( $input, $defaults );
|
||||
|
||||
$output = array();
|
||||
$output['active'] = (bool) $input['active'];
|
||||
$output['subject'] = trim( $input['subject'] );
|
||||
$output['sender'] = trim( $input['sender'] );
|
||||
$output['recipient'] = trim( $input['recipient'] );
|
||||
$output['body'] = trim( $input['body'] );
|
||||
|
||||
if ( ! current_user_can( 'unfiltered_html' ) ) {
|
||||
$output['body'] = wpcf7_kses( $output['body'], 'mail' );
|
||||
}
|
||||
|
||||
$output['additional_headers'] = '';
|
||||
|
||||
$headers = str_replace( "\r\n", "\n", $input['additional_headers'] );
|
||||
$headers = explode( "\n", $headers );
|
||||
|
||||
foreach ( $headers as $header ) {
|
||||
$header = trim( $header );
|
||||
|
||||
if ( '' !== $header ) {
|
||||
$output['additional_headers'] .= $header . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$output['additional_headers'] = trim( $output['additional_headers'] );
|
||||
$output['attachments'] = trim( $input['attachments'] );
|
||||
$output['use_html'] = (bool) $input['use_html'];
|
||||
$output['exclude_blank'] = (bool) $input['exclude_blank'];
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sanitizes the messages property data.
|
||||
*/
|
||||
function wpcf7_sanitize_messages( $input, $defaults = array() ) {
|
||||
$output = array();
|
||||
|
||||
foreach ( wpcf7_messages() as $key => $val ) {
|
||||
if ( isset( $input[$key] ) ) {
|
||||
$output[$key] = trim( $input[$key] );
|
||||
} elseif ( isset( $defaults[$key] ) ) {
|
||||
$output[$key] = $defaults[$key];
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sanitizes the additional settings property data.
|
||||
*/
|
||||
function wpcf7_sanitize_additional_settings( $input, $default_template = '' ) {
|
||||
if ( null === $input ) {
|
||||
return $default_template;
|
||||
}
|
||||
|
||||
$output = trim( $input );
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generates a random hash string for a contact form.
|
||||
*
|
||||
* @param int $post_id Post ID.
|
||||
* @return string SHA-1 hash.
|
||||
*/
|
||||
function wpcf7_generate_contact_form_hash( $post_id ) {
|
||||
return sha1( implode( '|', array(
|
||||
get_current_user_id(),
|
||||
$post_id,
|
||||
time(),
|
||||
home_url(),
|
||||
) ) );
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
|
||||
class WPCF7_ContactFormTemplate {
|
||||
|
||||
public static function get_default( $prop = 'form' ) {
|
||||
if ( 'form' == $prop ) {
|
||||
$template = self::form();
|
||||
} elseif ( 'mail' == $prop ) {
|
||||
$template = self::mail();
|
||||
} elseif ( 'mail_2' == $prop ) {
|
||||
$template = self::mail_2();
|
||||
} elseif ( 'messages' == $prop ) {
|
||||
$template = self::messages();
|
||||
} else {
|
||||
$template = null;
|
||||
}
|
||||
|
||||
return apply_filters( 'wpcf7_default_template', $template, $prop );
|
||||
}
|
||||
|
||||
public static function form() {
|
||||
$template = sprintf(
|
||||
'
|
||||
<label> %2$s
|
||||
[text* your-name autocomplete:name] </label>
|
||||
|
||||
<label> %3$s
|
||||
[email* your-email autocomplete:email] </label>
|
||||
|
||||
<label> %4$s
|
||||
[text* your-subject] </label>
|
||||
|
||||
<label> %5$s %1$s
|
||||
[textarea your-message] </label>
|
||||
|
||||
[submit "%6$s"]',
|
||||
__( '(optional)', 'contact-form-7' ),
|
||||
__( 'Your name', 'contact-form-7' ),
|
||||
__( 'Your email', 'contact-form-7' ),
|
||||
__( 'Subject', 'contact-form-7' ),
|
||||
__( 'Your message', 'contact-form-7' ),
|
||||
__( 'Submit', 'contact-form-7' )
|
||||
);
|
||||
|
||||
return trim( $template );
|
||||
}
|
||||
|
||||
public static function mail() {
|
||||
$template = array(
|
||||
'subject' => sprintf(
|
||||
/* translators: 1: blog name, 2: [your-subject] */
|
||||
_x( '%1$s "%2$s"', 'mail subject', 'contact-form-7' ),
|
||||
'[_site_title]',
|
||||
'[your-subject]'
|
||||
),
|
||||
'sender' => sprintf(
|
||||
'%s <%s>',
|
||||
'[_site_title]',
|
||||
self::from_email()
|
||||
),
|
||||
'body' =>
|
||||
sprintf(
|
||||
/* translators: %s: [your-name] [your-email] */
|
||||
__( 'From: %s', 'contact-form-7' ),
|
||||
'[your-name] [your-email]'
|
||||
) . "\n"
|
||||
. sprintf(
|
||||
/* translators: %s: [your-subject] */
|
||||
__( 'Subject: %s', 'contact-form-7' ),
|
||||
'[your-subject]'
|
||||
) . "\n\n"
|
||||
. __( 'Message Body:', 'contact-form-7' )
|
||||
. "\n" . '[your-message]' . "\n\n"
|
||||
. '-- ' . "\n"
|
||||
. sprintf(
|
||||
/* translators: 1: blog name, 2: blog URL */
|
||||
__( 'This is a notification that a contact form was submitted on your website (%1$s %2$s).', 'contact-form-7' ),
|
||||
'[_site_title]',
|
||||
'[_site_url]'
|
||||
),
|
||||
'recipient' => '[_site_admin_email]',
|
||||
'additional_headers' => 'Reply-To: [your-email]',
|
||||
'attachments' => '',
|
||||
'use_html' => 0,
|
||||
'exclude_blank' => 0,
|
||||
);
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
public static function mail_2() {
|
||||
$template = array(
|
||||
'active' => false,
|
||||
'subject' => sprintf(
|
||||
/* translators: 1: blog name, 2: [your-subject] */
|
||||
_x( '%1$s "%2$s"', 'mail subject', 'contact-form-7' ),
|
||||
'[_site_title]',
|
||||
'[your-subject]'
|
||||
),
|
||||
'sender' => sprintf(
|
||||
'%s <%s>',
|
||||
'[_site_title]',
|
||||
self::from_email()
|
||||
),
|
||||
'body' =>
|
||||
__( 'Message Body:', 'contact-form-7' )
|
||||
. "\n" . '[your-message]' . "\n\n"
|
||||
. '-- ' . "\n"
|
||||
. sprintf(
|
||||
/* translators: 1: blog name, 2: blog URL */
|
||||
__( 'This email is a receipt for your contact form submission on our website (%1$s %2$s) in which your email address was used. If that was not you, please ignore this message.', 'contact-form-7' ),
|
||||
'[_site_title]',
|
||||
'[_site_url]'
|
||||
),
|
||||
'recipient' => '[your-email]',
|
||||
'additional_headers' => sprintf(
|
||||
'Reply-To: %s',
|
||||
'[_site_admin_email]'
|
||||
),
|
||||
'attachments' => '',
|
||||
'use_html' => 0,
|
||||
'exclude_blank' => 0,
|
||||
);
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
public static function from_email() {
|
||||
$admin_email = get_option( 'admin_email' );
|
||||
|
||||
if ( wpcf7_is_localhost() ) {
|
||||
return $admin_email;
|
||||
}
|
||||
|
||||
$sitename = wp_parse_url( network_home_url(), PHP_URL_HOST );
|
||||
$sitename = strtolower( $sitename );
|
||||
|
||||
if ( 'www.' === substr( $sitename, 0, 4 ) ) {
|
||||
$sitename = substr( $sitename, 4 );
|
||||
}
|
||||
|
||||
if ( strpbrk( $admin_email, '@' ) === '@' . $sitename ) {
|
||||
return $admin_email;
|
||||
}
|
||||
|
||||
return 'wordpress@' . $sitename;
|
||||
}
|
||||
|
||||
public static function messages() {
|
||||
$messages = array();
|
||||
|
||||
foreach ( wpcf7_messages() as $key => $arr ) {
|
||||
$messages[$key] = $arr['default'];
|
||||
}
|
||||
|
||||
return $messages;
|
||||
}
|
||||
}
|
||||
|
||||
function wpcf7_messages() {
|
||||
$messages = array(
|
||||
'mail_sent_ok' => array(
|
||||
'description'
|
||||
=> __( "Sender's message was sent successfully", 'contact-form-7' ),
|
||||
'default'
|
||||
=> __( "Thank you for your message. It has been sent.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'mail_sent_ng' => array(
|
||||
'description'
|
||||
=> __( "Sender's message failed to send", 'contact-form-7' ),
|
||||
'default'
|
||||
=> __( "There was an error trying to send your message. Please try again later.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'validation_error' => array(
|
||||
'description'
|
||||
=> __( "Validation errors occurred", 'contact-form-7' ),
|
||||
'default'
|
||||
=> __( "One or more fields have an error. Please check and try again.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'spam' => array(
|
||||
'description'
|
||||
=> __( "Submission was referred to as spam", 'contact-form-7' ),
|
||||
'default'
|
||||
=> __( "There was an error trying to send your message. Please try again later.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'accept_terms' => array(
|
||||
'description'
|
||||
=> __( "There are terms that the sender must accept", 'contact-form-7' ),
|
||||
'default'
|
||||
=> __( "You must accept the terms and conditions before sending your message.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'invalid_required' => array(
|
||||
'description'
|
||||
=> __( "There is a field that the sender must fill in", 'contact-form-7' ),
|
||||
'default'
|
||||
=> __( "Please fill out this field.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'invalid_too_long' => array(
|
||||
'description'
|
||||
=> __( "There is a field with input that is longer than the maximum allowed length", 'contact-form-7' ),
|
||||
'default'
|
||||
=> __( "This field has a too long input.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'invalid_too_short' => array(
|
||||
'description'
|
||||
=> __( "There is a field with input that is shorter than the minimum allowed length", 'contact-form-7' ),
|
||||
'default'
|
||||
=> __( "This field has a too short input.", 'contact-form-7' ),
|
||||
),
|
||||
);
|
||||
|
||||
return apply_filters( 'wpcf7_messages', $messages );
|
||||
}
|
||||
1365
wp-content/plugins/contact-form-7/includes/contact-form.php
Normal file
180
wp-content/plugins/contact-form-7/includes/controller.php
Normal file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
/**
|
||||
* Controller for front-end requests, scripts, and styles
|
||||
*/
|
||||
|
||||
|
||||
add_action(
|
||||
'parse_request',
|
||||
'wpcf7_control_init',
|
||||
20, 0
|
||||
);
|
||||
|
||||
/**
|
||||
* Handles a submission in non-Ajax mode.
|
||||
*/
|
||||
function wpcf7_control_init() {
|
||||
if ( WPCF7_Submission::is_restful() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( isset( $_POST['_wpcf7'] ) ) {
|
||||
$contact_form = wpcf7_contact_form( (int) $_POST['_wpcf7'] );
|
||||
|
||||
if ( $contact_form ) {
|
||||
$contact_form->submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers main scripts and styles.
|
||||
*/
|
||||
add_action(
|
||||
'wp_enqueue_scripts',
|
||||
static function () {
|
||||
$assets = array();
|
||||
$asset_file = wpcf7_plugin_path( 'includes/js/index.asset.php' );
|
||||
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$assets = include( $asset_file );
|
||||
}
|
||||
|
||||
$assets = wp_parse_args( $assets, array(
|
||||
'dependencies' => array(),
|
||||
'version' => WPCF7_VERSION,
|
||||
) );
|
||||
|
||||
wp_register_script(
|
||||
'contact-form-7',
|
||||
wpcf7_plugin_url( 'includes/js/index.js' ),
|
||||
array_merge(
|
||||
$assets['dependencies'],
|
||||
array( 'swv' )
|
||||
),
|
||||
$assets['version'],
|
||||
array( 'in_footer' => true )
|
||||
);
|
||||
|
||||
wp_register_script(
|
||||
'contact-form-7-html5-fallback',
|
||||
wpcf7_plugin_url( 'includes/js/html5-fallback.js' ),
|
||||
array( 'jquery-ui-datepicker' ),
|
||||
WPCF7_VERSION,
|
||||
array( 'in_footer' => true )
|
||||
);
|
||||
|
||||
if ( wpcf7_load_js() ) {
|
||||
wpcf7_enqueue_scripts();
|
||||
}
|
||||
|
||||
wp_register_style(
|
||||
'contact-form-7',
|
||||
wpcf7_plugin_url( 'includes/css/styles.css' ),
|
||||
array(),
|
||||
WPCF7_VERSION,
|
||||
'all'
|
||||
);
|
||||
|
||||
wp_register_style(
|
||||
'contact-form-7-rtl',
|
||||
wpcf7_plugin_url( 'includes/css/styles-rtl.css' ),
|
||||
array( 'contact-form-7' ),
|
||||
WPCF7_VERSION,
|
||||
'all'
|
||||
);
|
||||
|
||||
wp_register_style(
|
||||
'jquery-ui-smoothness',
|
||||
wpcf7_plugin_url(
|
||||
'includes/js/jquery-ui/themes/smoothness/jquery-ui.min.css'
|
||||
),
|
||||
array(),
|
||||
'1.12.1',
|
||||
'screen'
|
||||
);
|
||||
|
||||
if ( wpcf7_load_css() ) {
|
||||
wpcf7_enqueue_styles();
|
||||
}
|
||||
},
|
||||
10, 0
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Enqueues scripts.
|
||||
*/
|
||||
function wpcf7_enqueue_scripts() {
|
||||
wp_enqueue_script( 'contact-form-7' );
|
||||
|
||||
$wpcf7 = array(
|
||||
'api' => array(
|
||||
'root' => sanitize_url( get_rest_url() ),
|
||||
'namespace' => 'contact-form-7/v1',
|
||||
),
|
||||
);
|
||||
|
||||
if ( defined( 'WP_CACHE' ) and WP_CACHE ) {
|
||||
$wpcf7['cached'] = 1;
|
||||
}
|
||||
|
||||
wp_localize_script( 'contact-form-7', 'wpcf7', $wpcf7 );
|
||||
|
||||
do_action( 'wpcf7_enqueue_scripts' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the main script is enqueued.
|
||||
*/
|
||||
function wpcf7_script_is() {
|
||||
return wp_script_is( 'contact-form-7' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Enqueues styles.
|
||||
*/
|
||||
function wpcf7_enqueue_styles() {
|
||||
wp_enqueue_style( 'contact-form-7' );
|
||||
|
||||
if ( wpcf7_is_rtl() ) {
|
||||
wp_enqueue_style( 'contact-form-7-rtl' );
|
||||
}
|
||||
|
||||
do_action( 'wpcf7_enqueue_styles' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the main stylesheet is enqueued.
|
||||
*/
|
||||
function wpcf7_style_is() {
|
||||
return wp_style_is( 'contact-form-7' );
|
||||
}
|
||||
|
||||
|
||||
add_action(
|
||||
'wp_enqueue_scripts',
|
||||
'wpcf7_html5_fallback',
|
||||
20, 0
|
||||
);
|
||||
|
||||
/**
|
||||
* Enqueues scripts and styles for the HTML5 fallback.
|
||||
*/
|
||||
function wpcf7_html5_fallback() {
|
||||
if ( ! wpcf7_support_html5_fallback() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( wpcf7_script_is() ) {
|
||||
wp_enqueue_script( 'contact-form-7-html5-fallback' );
|
||||
}
|
||||
|
||||
if ( wpcf7_style_is() ) {
|
||||
wp_enqueue_style( 'jquery-ui-smoothness' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
.wpcf7-not-valid-tip {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.use-floating-validation-tip .wpcf7-not-valid-tip {
|
||||
right: 1em;
|
||||
}
|
||||
|
||||
.wpcf7-list-item {
|
||||
margin: 0 1em 0 0;
|
||||
}
|
||||
172
wp-content/plugins/contact-form-7/includes/css/styles.css
Normal file
@@ -0,0 +1,172 @@
|
||||
.wpcf7 .screen-reader-response {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
clip-path: inset(50%);
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
word-wrap: normal !important;
|
||||
}
|
||||
|
||||
.wpcf7 form .wpcf7-response-output {
|
||||
margin: 2em 0.5em 1em;
|
||||
padding: 0.2em 1em;
|
||||
border: 2px solid #00a0d2; /* Blue */
|
||||
}
|
||||
|
||||
.wpcf7 form.init .wpcf7-response-output,
|
||||
.wpcf7 form.resetting .wpcf7-response-output,
|
||||
.wpcf7 form.submitting .wpcf7-response-output {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wpcf7 form.sent .wpcf7-response-output {
|
||||
border-color: #46b450; /* Green */
|
||||
}
|
||||
|
||||
.wpcf7 form.failed .wpcf7-response-output,
|
||||
.wpcf7 form.aborted .wpcf7-response-output {
|
||||
border-color: #dc3232; /* Red */
|
||||
}
|
||||
|
||||
.wpcf7 form.spam .wpcf7-response-output {
|
||||
border-color: #f56e28; /* Orange */
|
||||
}
|
||||
|
||||
.wpcf7 form.invalid .wpcf7-response-output,
|
||||
.wpcf7 form.unaccepted .wpcf7-response-output,
|
||||
.wpcf7 form.payment-required .wpcf7-response-output {
|
||||
border-color: #ffb900; /* Yellow */
|
||||
}
|
||||
|
||||
.wpcf7-form-control-wrap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wpcf7-not-valid-tip {
|
||||
color: #dc3232; /* Red */
|
||||
font-size: 1em;
|
||||
font-weight: normal;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.use-floating-validation-tip .wpcf7-not-valid-tip {
|
||||
position: relative;
|
||||
top: -2ex;
|
||||
left: 1em;
|
||||
z-index: 100;
|
||||
border: 1px solid #dc3232;
|
||||
background: #fff;
|
||||
padding: .2em .8em;
|
||||
width: 24em;
|
||||
}
|
||||
|
||||
.wpcf7-list-item {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
|
||||
.wpcf7-list-item-label::before,
|
||||
.wpcf7-list-item-label::after {
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.wpcf7-spinner {
|
||||
visibility: hidden;
|
||||
display: inline-block;
|
||||
background-color: #23282d; /* Dark Gray 800 */
|
||||
opacity: 0.75;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: none;
|
||||
border-radius: 100%;
|
||||
padding: 0;
|
||||
margin: 0 24px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
form.submitting .wpcf7-spinner {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.wpcf7-spinner::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
background-color: #fbfbfc; /* Light Gray 100 */
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border: none;
|
||||
border-radius: 100%;
|
||||
transform-origin: 8px 8px;
|
||||
animation-name: spin;
|
||||
animation-duration: 1000ms;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.wpcf7-spinner::before {
|
||||
animation-name: blink;
|
||||
animation-duration: 2000ms;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.wpcf7 [inert] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.wpcf7 input[type="file"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpcf7 input[type="file"]:disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.wpcf7 .wpcf7-submit:disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.wpcf7 input[type="url"],
|
||||
.wpcf7 input[type="email"],
|
||||
.wpcf7 input[type="tel"] {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.wpcf7-reflection > output {
|
||||
display: list-item;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.wpcf7-reflection > output[hidden] {
|
||||
display: none;
|
||||
}
|
||||
426
wp-content/plugins/contact-form-7/includes/file.php
Normal file
@@ -0,0 +1,426 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Validates uploaded files and moves them to the temporary directory.
|
||||
*
|
||||
* @param array $file An item of `$_FILES`.
|
||||
* @param string|array $args Optional. Arguments to control behavior.
|
||||
* @return array|WP_Error Array of file paths, or WP_Error if validation fails.
|
||||
*/
|
||||
function wpcf7_unship_uploaded_file( $file, $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'required' => false,
|
||||
'filetypes' => '',
|
||||
'limit' => MB_IN_BYTES,
|
||||
) );
|
||||
|
||||
foreach ( array( 'name', 'size', 'tmp_name', 'error' ) as $key ) {
|
||||
if ( ! isset( $file[$key] ) ) {
|
||||
$file[$key] = array();
|
||||
}
|
||||
}
|
||||
|
||||
$names = wpcf7_array_flatten( $file['name'] );
|
||||
$sizes = wpcf7_array_flatten( $file['size'] );
|
||||
$tmp_names = wpcf7_array_flatten( $file['tmp_name'] );
|
||||
$errors = wpcf7_array_flatten( $file['error'] );
|
||||
|
||||
foreach ( $errors as $error ) {
|
||||
if ( ! empty( $error ) and UPLOAD_ERR_NO_FILE !== $error ) {
|
||||
return new WP_Error( 'wpcf7_upload_failed_php_error',
|
||||
wpcf7_get_message( 'upload_failed_php_error' )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $args['schema'] ) and isset( $args['name'] ) ) {
|
||||
$context = array(
|
||||
'file' => true,
|
||||
'field' => $args['name'],
|
||||
);
|
||||
|
||||
foreach ( $args['schema']->validate( $context ) as $result ) {
|
||||
if ( is_wp_error( $result ) ) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Move uploaded file to tmp dir
|
||||
$uploads_dir = wpcf7_upload_tmp_dir();
|
||||
$uploads_dir = wpcf7_maybe_add_random_dir( $uploads_dir );
|
||||
|
||||
$uploaded_files = array();
|
||||
|
||||
foreach ( $names as $key => $name ) {
|
||||
$tmp_name = $tmp_names[$key];
|
||||
|
||||
if ( empty( $tmp_name ) or ! is_uploaded_file( $tmp_name ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$filename = $name;
|
||||
$filename = wpcf7_canonicalize( $filename, array( 'strto' => 'as-is' ) );
|
||||
$filename = wpcf7_antiscript_file_name( $filename );
|
||||
|
||||
$filename = apply_filters( 'wpcf7_upload_file_name',
|
||||
$filename, $name, $args
|
||||
);
|
||||
|
||||
$filename = wp_unique_filename( $uploads_dir, $filename );
|
||||
$new_file = path_join( $uploads_dir, $filename );
|
||||
|
||||
if ( false === @move_uploaded_file( $tmp_name, $new_file ) ) {
|
||||
return new WP_Error( 'wpcf7_upload_failed',
|
||||
wpcf7_get_message( 'upload_failed' )
|
||||
);
|
||||
}
|
||||
|
||||
// Make sure the uploaded file is only readable for the owner process
|
||||
chmod( $new_file, 0400 );
|
||||
|
||||
$uploaded_files[] = $new_file;
|
||||
}
|
||||
|
||||
return $uploaded_files;
|
||||
}
|
||||
|
||||
|
||||
add_filter(
|
||||
'wpcf7_messages',
|
||||
'wpcf7_file_messages',
|
||||
10, 1
|
||||
);
|
||||
|
||||
/**
|
||||
* A wpcf7_messages filter callback that adds messages for
|
||||
* file-uploading fields.
|
||||
*/
|
||||
function wpcf7_file_messages( $messages ) {
|
||||
return array_merge( $messages, array(
|
||||
'upload_failed' => array(
|
||||
'description' => __( "Uploading a file fails for any reason", 'contact-form-7' ),
|
||||
'default' => __( "There was an unknown error uploading the file.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'upload_file_type_invalid' => array(
|
||||
'description' => __( "Uploaded file is not allowed for file type", 'contact-form-7' ),
|
||||
'default' => __( "You are not allowed to upload files of this type.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'upload_file_too_large' => array(
|
||||
'description' => __( "Uploaded file is too large", 'contact-form-7' ),
|
||||
'default' => __( "The uploaded file is too large.", 'contact-form-7' ),
|
||||
),
|
||||
|
||||
'upload_failed_php_error' => array(
|
||||
'description' => __( "Uploading a file fails for PHP error", 'contact-form-7' ),
|
||||
'default' => __( "There was an error uploading the file.", 'contact-form-7' ),
|
||||
),
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
add_filter(
|
||||
'wpcf7_form_enctype',
|
||||
'wpcf7_file_form_enctype_filter',
|
||||
10, 1
|
||||
);
|
||||
|
||||
/**
|
||||
* A wpcf7_form_enctype filter callback that sets the enctype attribute
|
||||
* to multipart/form-data if the form has file-uploading fields.
|
||||
*/
|
||||
function wpcf7_file_form_enctype_filter( $enctype ) {
|
||||
$multipart = (bool) wpcf7_scan_form_tags( array(
|
||||
'feature' => 'file-uploading',
|
||||
) );
|
||||
|
||||
if ( $multipart ) {
|
||||
$enctype = 'multipart/form-data';
|
||||
}
|
||||
|
||||
return $enctype;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Converts a MIME type string to an array of corresponding file extensions.
|
||||
*
|
||||
* @param string $mime MIME type.
|
||||
* Wildcard (*) is available for the subtype part.
|
||||
* @return array Corresponding file extensions.
|
||||
*/
|
||||
function wpcf7_convert_mime_to_ext( $mime ) {
|
||||
static $mime_types = array();
|
||||
|
||||
$mime_types = wp_get_mime_types();
|
||||
|
||||
$results = array();
|
||||
|
||||
if ( preg_match( '%^([a-z]+)/([*]|[a-z0-9.+-]+)$%i', $mime, $matches ) ) {
|
||||
foreach ( $mime_types as $key => $val ) {
|
||||
if ( '*' === $matches[2] and str_starts_with( $val, $matches[1] . '/' )
|
||||
or $val === $matches[0] ) {
|
||||
$results = array_merge( $results, explode( '|', $key ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$results = array_unique( $results );
|
||||
$results = array_filter( $results );
|
||||
$results = array_values( $results );
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a formatted list of acceptable filetypes.
|
||||
*
|
||||
* @param string|array $types Optional. Array of filetypes.
|
||||
* @param string $format Optional. Pre-defined format designator.
|
||||
* @return string Formatted list of acceptable filetypes.
|
||||
*/
|
||||
function wpcf7_acceptable_filetypes( $types = 'default', $format = 'regex' ) {
|
||||
if ( 'default' === $types or empty( $types ) ) {
|
||||
$types = array(
|
||||
'audio/*',
|
||||
'video/*',
|
||||
'image/*',
|
||||
);
|
||||
} else {
|
||||
$types = array_map(
|
||||
static function ( $type ) {
|
||||
if ( is_string( $type ) ) {
|
||||
return preg_split( '/[\s|,]+/', strtolower( $type ) );
|
||||
}
|
||||
},
|
||||
(array) $types
|
||||
);
|
||||
|
||||
$types = wpcf7_array_flatten( $types );
|
||||
$types = array_filter( array_unique( $types ) );
|
||||
}
|
||||
|
||||
if ( 'attr' === $format or 'attribute' === $format ) {
|
||||
$types = array_map(
|
||||
static function ( $type ) {
|
||||
if ( false === strpos( $type, '/' ) ) {
|
||||
return sprintf( '.%s', trim( $type, '.' ) );
|
||||
} elseif ( preg_match( '%^([a-z]+)/[*]$%i', $type, $matches ) ) {
|
||||
if ( in_array( $matches[1], array( 'audio', 'video', 'image' ) ) ) {
|
||||
return $type;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} elseif ( wpcf7_convert_mime_to_ext( $type ) ) {
|
||||
return $type;
|
||||
}
|
||||
},
|
||||
$types
|
||||
);
|
||||
|
||||
$types = array_filter( $types );
|
||||
|
||||
return implode( ',', $types );
|
||||
|
||||
} elseif ( 'regex' === $format ) {
|
||||
$types = array_map(
|
||||
static function ( $type ) {
|
||||
if ( false === strpos( $type, '/' ) ) {
|
||||
return preg_quote( trim( $type, '.' ) );
|
||||
} elseif ( $type = wpcf7_convert_mime_to_ext( $type ) ) {
|
||||
return $type;
|
||||
}
|
||||
},
|
||||
$types
|
||||
);
|
||||
|
||||
$types = wpcf7_array_flatten( $types );
|
||||
$types = array_filter( array_unique( $types ) );
|
||||
|
||||
return implode( '|', $types );
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
add_action(
|
||||
'wpcf7_init',
|
||||
'wpcf7_init_uploads',
|
||||
10, 0
|
||||
);
|
||||
|
||||
/**
|
||||
* Initializes the temporary directory for uploaded files.
|
||||
*/
|
||||
function wpcf7_init_uploads() {
|
||||
$dir = wpcf7_upload_tmp_dir();
|
||||
|
||||
if ( is_dir( $dir ) and is_writable( $dir ) ) {
|
||||
$htaccess_file = path_join( $dir, '.htaccess' );
|
||||
|
||||
if ( file_exists( $htaccess_file ) ) {
|
||||
list( $first_line_comment ) = (array) file(
|
||||
$htaccess_file,
|
||||
FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES
|
||||
);
|
||||
|
||||
if ( '# Apache 2.4+' === $first_line_comment ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $handle = @fopen( $htaccess_file, 'w' ) ) {
|
||||
fwrite( $handle, "# Apache 2.4+\n" );
|
||||
fwrite( $handle, "<IfModule authz_core_module>\n" );
|
||||
fwrite( $handle, " Require all denied\n" );
|
||||
fwrite( $handle, "</IfModule>\n" );
|
||||
fwrite( $handle, "\n" );
|
||||
fwrite( $handle, "# Apache 2.2\n" );
|
||||
fwrite( $handle, "<IfModule !authz_core_module>\n" );
|
||||
fwrite( $handle, " Deny from all\n" );
|
||||
fwrite( $handle, "</IfModule>\n" );
|
||||
|
||||
fclose( $handle );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a child directory with a randomly generated name.
|
||||
*
|
||||
* @param string $dir The parent directory path.
|
||||
* @return string The child directory path if created, otherwise the parent.
|
||||
*/
|
||||
function wpcf7_maybe_add_random_dir( $dir ) {
|
||||
do {
|
||||
$rand_max = mt_getrandmax();
|
||||
$rand = zeroise( mt_rand( 0, $rand_max ), strlen( $rand_max ) );
|
||||
$dir_new = path_join( $dir, $rand );
|
||||
} while ( file_exists( $dir_new ) );
|
||||
|
||||
if ( wp_mkdir_p( $dir_new ) ) {
|
||||
return $dir_new;
|
||||
}
|
||||
|
||||
return $dir;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the directory path for uploaded files.
|
||||
*
|
||||
* @return string Directory path.
|
||||
*/
|
||||
function wpcf7_upload_tmp_dir() {
|
||||
if ( defined( 'WPCF7_UPLOADS_TMP_DIR' ) ) {
|
||||
$dir = path_join( WP_CONTENT_DIR, WPCF7_UPLOADS_TMP_DIR );
|
||||
wp_mkdir_p( $dir );
|
||||
|
||||
if ( wpcf7_is_file_path_in_content_dir( $dir ) ) {
|
||||
return $dir;
|
||||
}
|
||||
}
|
||||
|
||||
$dir = path_join( wpcf7_upload_dir( 'dir' ), 'wpcf7_uploads' );
|
||||
wp_mkdir_p( $dir );
|
||||
return $dir;
|
||||
}
|
||||
|
||||
|
||||
add_action(
|
||||
'shutdown',
|
||||
'wpcf7_cleanup_upload_files',
|
||||
20, 0
|
||||
);
|
||||
|
||||
/**
|
||||
* Cleans up files in the temporary directory for uploaded files.
|
||||
*
|
||||
* @param int $seconds Files older than this are removed. Default 60.
|
||||
* @param int $max Maximum number of files to be removed in a function call.
|
||||
* Default 100.
|
||||
*/
|
||||
function wpcf7_cleanup_upload_files( $seconds = 60, $max = 100 ) {
|
||||
$dir = trailingslashit( wpcf7_upload_tmp_dir() );
|
||||
|
||||
if ( ! is_dir( $dir )
|
||||
or ! is_readable( $dir )
|
||||
or ! wp_is_writable( $dir ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$seconds = absint( $seconds );
|
||||
$max = absint( $max );
|
||||
$count = 0;
|
||||
|
||||
if ( $handle = opendir( $dir ) ) {
|
||||
while ( false !== ( $file = readdir( $handle ) ) ) {
|
||||
if ( '.' == $file
|
||||
or '..' == $file
|
||||
or '.htaccess' == $file ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$mtime = @filemtime( path_join( $dir, $file ) );
|
||||
|
||||
if ( $mtime and time() < $mtime + $seconds ) { // less than $seconds old
|
||||
continue;
|
||||
}
|
||||
|
||||
wpcf7_rmdir_p( path_join( $dir, $file ) );
|
||||
$count += 1;
|
||||
|
||||
if ( $max <= $count ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
closedir( $handle );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
add_action(
|
||||
'wpcf7_admin_warnings',
|
||||
'wpcf7_file_display_warning_message',
|
||||
10, 3
|
||||
);
|
||||
|
||||
/**
|
||||
* Displays warning messages about file-uploading fields.
|
||||
*/
|
||||
function wpcf7_file_display_warning_message( $page, $action, $object ) {
|
||||
if ( $object instanceof WPCF7_ContactForm ) {
|
||||
$contact_form = $object;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
$has_tags = (bool) $contact_form->scan_form_tags( array(
|
||||
'feature' => 'file-uploading',
|
||||
) );
|
||||
|
||||
if ( ! $has_tags ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$uploads_dir = wpcf7_upload_tmp_dir();
|
||||
|
||||
if ( ! is_dir( $uploads_dir ) or ! wp_is_writable( $uploads_dir ) ) {
|
||||
$message = sprintf(
|
||||
/* translators: %s: the path of the temporary folder */
|
||||
__( 'This contact form has file uploading fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually.', 'contact-form-7' ),
|
||||
$uploads_dir
|
||||
);
|
||||
|
||||
echo sprintf(
|
||||
'<div class="notice notice-warning"><p>%s</p></div>',
|
||||
esc_html( $message )
|
||||
);
|
||||
}
|
||||
}
|
||||
580
wp-content/plugins/contact-form-7/includes/form-tag.php
Normal file
@@ -0,0 +1,580 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* A form-tag.
|
||||
*
|
||||
* @link https://contactform7.com/tag-syntax/#form_tag
|
||||
*/
|
||||
class WPCF7_FormTag implements ArrayAccess {
|
||||
|
||||
public $type;
|
||||
public $basetype;
|
||||
public $raw_name = '';
|
||||
public $name = '';
|
||||
public $options = array();
|
||||
public $raw_values = array();
|
||||
public $values = array();
|
||||
public $pipes;
|
||||
public $labels = array();
|
||||
public $attr = '';
|
||||
public $content = '';
|
||||
|
||||
public function __construct( $tag = array() ) {
|
||||
if ( is_array( $tag )
|
||||
or $tag instanceof self ) {
|
||||
foreach ( $tag as $key => $value ) {
|
||||
if ( property_exists( __CLASS__, $key ) ) {
|
||||
$this->{$key} = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the type has a trailing asterisk.
|
||||
*/
|
||||
public function is_required() {
|
||||
return str_ends_with( $this->type, '*' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the form-tag has a specified option.
|
||||
*/
|
||||
public function has_option( $option_name ) {
|
||||
$pattern = sprintf( '/^%s(:.+)?$/i', preg_quote( $option_name, '/' ) );
|
||||
return (bool) preg_grep( $pattern, $this->options );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves option values with the specified option name.
|
||||
*
|
||||
* @param string $option_name Option name.
|
||||
* @param string $pattern Optional. A regular expression pattern or one of
|
||||
* the keys of preset patterns. If specified, only options
|
||||
* whose value part matches this pattern will be returned.
|
||||
* @param bool $single Optional. If true, only the first matching option
|
||||
* will be returned. Default false.
|
||||
* @return string|array|bool The option value or an array of option values.
|
||||
* False if there is no option matches the pattern.
|
||||
*/
|
||||
public function get_option( $option_name, $pattern = '', $single = false ) {
|
||||
$preset_patterns = array(
|
||||
'date' => '[0-9]{4}-[0-9]{2}-[0-9]{2}',
|
||||
'int' => '[0-9]+',
|
||||
'signed_int' => '[-]?[0-9]+',
|
||||
'num' => '(?:[0-9]+|(?:[0-9]+)?[.][0-9]+)',
|
||||
'signed_num' => '[-]?(?:[0-9]+|(?:[0-9]+)?[.][0-9]+)',
|
||||
'class' => '[-0-9a-zA-Z_]+',
|
||||
'id' => '[-0-9a-zA-Z_]+',
|
||||
);
|
||||
|
||||
if ( isset( $preset_patterns[$pattern] ) ) {
|
||||
$pattern = $preset_patterns[$pattern];
|
||||
}
|
||||
|
||||
if ( '' == $pattern ) {
|
||||
$pattern = '.+';
|
||||
}
|
||||
|
||||
$pattern = sprintf(
|
||||
'/^%s:%s$/i',
|
||||
preg_quote( $option_name, '/' ),
|
||||
$pattern
|
||||
);
|
||||
|
||||
if ( $single ) {
|
||||
$matches = $this->get_first_match_option( $pattern );
|
||||
|
||||
if ( ! $matches ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return substr( $matches[0], strlen( $option_name ) + 1 );
|
||||
} else {
|
||||
$matches_a = $this->get_all_match_options( $pattern );
|
||||
|
||||
if ( ! $matches_a ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$results = array();
|
||||
|
||||
foreach ( $matches_a as $matches ) {
|
||||
$results[] = substr( $matches[0], strlen( $option_name ) + 1 );
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the id option value from the form-tag.
|
||||
*/
|
||||
public function get_id_option() {
|
||||
static $used = array();
|
||||
|
||||
$option = $this->get_option( 'id', 'id', true );
|
||||
|
||||
if (
|
||||
! $option or
|
||||
str_starts_with( $option, 'wpcf7' ) or
|
||||
in_array( $option, $used, true )
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$used[] = $option;
|
||||
|
||||
return $option;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the class option value from the form-tag.
|
||||
*
|
||||
* @param string|array $default_classes Optional. Preset classes as an array
|
||||
* or a whitespace-separated list. Default empty string.
|
||||
* @return string|bool A whitespace-separated list of classes.
|
||||
* False if there is no class to return.
|
||||
*/
|
||||
public function get_class_option( $default_classes = '' ) {
|
||||
if ( is_string( $default_classes ) ) {
|
||||
$default_classes = explode( ' ', $default_classes );
|
||||
}
|
||||
|
||||
$options = array_merge(
|
||||
(array) $default_classes,
|
||||
(array) $this->get_option( 'class' )
|
||||
);
|
||||
|
||||
$options = array_map( 'sanitize_html_class', $options );
|
||||
$options = array_filter( array_unique( $options ) );
|
||||
|
||||
if ( empty( $options ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return implode( ' ', $options );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the size option value from the form-tag.
|
||||
*
|
||||
* @param string $default_value Optional default value.
|
||||
* @return string The option value.
|
||||
*/
|
||||
public function get_size_option( $default_value = false ) {
|
||||
$option = $this->get_option( 'size', 'int', true );
|
||||
|
||||
if ( $option ) {
|
||||
return $option;
|
||||
}
|
||||
|
||||
$matches_a = $this->get_all_match_options( '%^([0-9]*)/[0-9]*$%' );
|
||||
|
||||
foreach ( (array) $matches_a as $matches ) {
|
||||
if ( isset( $matches[1] ) and '' !== $matches[1] ) {
|
||||
return $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
return $default_value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the maxlength option value from the form-tag.
|
||||
*
|
||||
* @param string $default_value Optional default value.
|
||||
* @return string The option value.
|
||||
*/
|
||||
public function get_maxlength_option( $default_value = false ) {
|
||||
$option = $this->get_option( 'maxlength', 'int', true );
|
||||
|
||||
if ( $option ) {
|
||||
return $option;
|
||||
}
|
||||
|
||||
$matches_a = $this->get_all_match_options(
|
||||
'%^(?:[0-9]*x?[0-9]*)?/([0-9]+)$%'
|
||||
);
|
||||
|
||||
foreach ( (array) $matches_a as $matches ) {
|
||||
if ( isset( $matches[1] ) and '' !== $matches[1] ) {
|
||||
return $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
return $default_value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the minlength option value from the form-tag.
|
||||
*
|
||||
* @param string $default_value Optional default value.
|
||||
* @return string The option value.
|
||||
*/
|
||||
public function get_minlength_option( $default_value = false ) {
|
||||
$option = $this->get_option( 'minlength', 'int', true );
|
||||
|
||||
if ( $option ) {
|
||||
return $option;
|
||||
} else {
|
||||
return $default_value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the cols option value from the form-tag.
|
||||
*
|
||||
* @param string $default_value Optional default value.
|
||||
* @return string The option value.
|
||||
*/
|
||||
public function get_cols_option( $default_value = false ) {
|
||||
$option = $this->get_option( 'cols', 'int', true );
|
||||
|
||||
if ( $option ) {
|
||||
return $option;
|
||||
}
|
||||
|
||||
$matches_a = $this->get_all_match_options(
|
||||
'%^([0-9]*)x([0-9]*)(?:/[0-9]+)?$%'
|
||||
);
|
||||
|
||||
foreach ( (array) $matches_a as $matches ) {
|
||||
if ( isset( $matches[1] ) and '' !== $matches[1] ) {
|
||||
return $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
return $default_value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the rows option value from the form-tag.
|
||||
*
|
||||
* @param string $default_value Optional default value.
|
||||
* @return string The option value.
|
||||
*/
|
||||
public function get_rows_option( $default_value = false ) {
|
||||
$option = $this->get_option( 'rows', 'int', true );
|
||||
|
||||
if ( $option ) {
|
||||
return $option;
|
||||
}
|
||||
|
||||
$matches_a = $this->get_all_match_options(
|
||||
'%^([0-9]*)x([0-9]*)(?:/[0-9]+)?$%'
|
||||
);
|
||||
|
||||
foreach ( (array) $matches_a as $matches ) {
|
||||
if ( isset( $matches[2] ) and '' !== $matches[2] ) {
|
||||
return $matches[2];
|
||||
}
|
||||
}
|
||||
|
||||
return $default_value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves a date-type option value from the form-tag.
|
||||
*
|
||||
* @param string $option_name A date-type option name, such as 'min' or 'max'.
|
||||
* @return string|bool The option value in YYYY-MM-DD format. False if the
|
||||
* option does not exist or the date value is invalid.
|
||||
*/
|
||||
public function get_date_option( $option_name ) {
|
||||
$option_value = $this->get_option( $option_name, '', true );
|
||||
|
||||
if ( empty( $option_value ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$date = apply_filters( 'wpcf7_form_tag_date_option',
|
||||
null,
|
||||
array( $option_name => $option_value )
|
||||
);
|
||||
|
||||
if ( $date ) {
|
||||
$date_pattern = '/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/';
|
||||
|
||||
if ( preg_match( $date_pattern, $date, $matches )
|
||||
and checkdate( $matches[2], $matches[3], $matches[1] ) ) {
|
||||
return $date;
|
||||
}
|
||||
} else {
|
||||
$datetime_obj = date_create_immutable(
|
||||
preg_replace( '/[_]+/', ' ', $option_value ),
|
||||
wp_timezone()
|
||||
);
|
||||
|
||||
if ( $datetime_obj ) {
|
||||
return $datetime_obj->format( 'Y-m-d' );
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the default option value from the form-tag.
|
||||
*
|
||||
* @param string|array $default_value Optional default value.
|
||||
* @param string|array $args Optional options for the option value retrieval.
|
||||
* @return string|array The option value. If the multiple option is enabled,
|
||||
* an array of option values.
|
||||
*/
|
||||
public function get_default_option( $default_value = '', $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'multiple' => false,
|
||||
'shifted' => false,
|
||||
) );
|
||||
|
||||
$options = (array) $this->get_option( 'default' );
|
||||
$values = array();
|
||||
|
||||
if ( empty( $options ) ) {
|
||||
return $args['multiple'] ? $values : $default_value;
|
||||
}
|
||||
|
||||
foreach ( $options as $opt ) {
|
||||
$opt = sanitize_key( $opt );
|
||||
|
||||
if ( 'user_' == substr( $opt, 0, 5 ) and is_user_logged_in() ) {
|
||||
$primary_props = array( 'user_login', 'user_email', 'user_url' );
|
||||
$opt = in_array( $opt, $primary_props ) ? $opt : substr( $opt, 5 );
|
||||
|
||||
$user = wp_get_current_user();
|
||||
$user_prop = $user->get( $opt );
|
||||
|
||||
if ( ! empty( $user_prop ) ) {
|
||||
if ( $args['multiple'] ) {
|
||||
$values[] = $user_prop;
|
||||
} else {
|
||||
return $user_prop;
|
||||
}
|
||||
}
|
||||
|
||||
} elseif ( 'post_meta' === $opt and in_the_loop() ) {
|
||||
if ( $args['multiple'] ) {
|
||||
$values = array_merge( $values,
|
||||
get_post_meta( get_the_ID(), $this->name )
|
||||
);
|
||||
} else {
|
||||
$val = (string) get_post_meta( get_the_ID(), $this->name, true );
|
||||
|
||||
if ( strlen( $val ) ) {
|
||||
return $val;
|
||||
}
|
||||
}
|
||||
|
||||
} elseif ( 'get' === $opt and isset( $_GET[$this->name] ) ) {
|
||||
$vals = (array) $_GET[$this->name];
|
||||
$vals = array_map( 'wpcf7_sanitize_query_var', $vals );
|
||||
|
||||
if ( $args['multiple'] ) {
|
||||
$values = array_merge( $values, $vals );
|
||||
} else {
|
||||
$val = isset( $vals[0] ) ? (string) $vals[0] : '';
|
||||
|
||||
if ( strlen( $val ) ) {
|
||||
return $val;
|
||||
}
|
||||
}
|
||||
|
||||
} elseif ( 'post' === $opt and isset( $_POST[$this->name] ) ) {
|
||||
$vals = (array) $_POST[$this->name];
|
||||
$vals = array_map( 'wpcf7_sanitize_query_var', $vals );
|
||||
|
||||
if ( $args['multiple'] ) {
|
||||
$values = array_merge( $values, $vals );
|
||||
} else {
|
||||
$val = isset( $vals[0] ) ? (string) $vals[0] : '';
|
||||
|
||||
if ( strlen( $val ) ) {
|
||||
return $val;
|
||||
}
|
||||
}
|
||||
|
||||
} elseif ( 'shortcode_attr' === $opt ) {
|
||||
if ( $contact_form = WPCF7_ContactForm::get_current() ) {
|
||||
$val = $contact_form->shortcode_attr( $this->name );
|
||||
|
||||
if ( isset( $val ) and strlen( $val ) ) {
|
||||
if ( $args['multiple'] ) {
|
||||
$values[] = $val;
|
||||
} else {
|
||||
return $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} elseif ( preg_match( '/^[0-9_]+$/', $opt ) ) {
|
||||
$nums = explode( '_', $opt );
|
||||
|
||||
foreach ( $nums as $num ) {
|
||||
$num = absint( $num );
|
||||
$num = $args['shifted'] ? $num : $num - 1;
|
||||
|
||||
if ( isset( $this->values[$num] ) ) {
|
||||
if ( $args['multiple'] ) {
|
||||
$values[] = $this->values[$num];
|
||||
} else {
|
||||
return $this->values[$num];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $args['multiple'] ) {
|
||||
$values = array_unique( $values );
|
||||
return $values;
|
||||
} else {
|
||||
return $default_value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the data option value from the form-tag.
|
||||
*
|
||||
* @param string|array $args Optional options for the option value retrieval.
|
||||
* @return mixed The option value.
|
||||
*/
|
||||
public function get_data_option( $args = '' ) {
|
||||
$options = (array) $this->get_option( 'data' );
|
||||
|
||||
return apply_filters( 'wpcf7_form_tag_data_option', null, $options, $args );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the limit option value from the form-tag.
|
||||
*
|
||||
* @param int $default_value Optional default value. Default 1048576.
|
||||
* @return int The option value.
|
||||
*/
|
||||
public function get_limit_option( $default_value = MB_IN_BYTES ) {
|
||||
$pattern = '/^limit:([1-9][0-9]*)([kKmM]?[bB])?$/';
|
||||
|
||||
$matches = $this->get_first_match_option( $pattern );
|
||||
|
||||
if ( $matches ) {
|
||||
$size = (int) $matches[1];
|
||||
|
||||
if ( ! empty( $matches[2] ) ) {
|
||||
$kbmb = strtolower( $matches[2] );
|
||||
|
||||
if ( 'kb' === $kbmb ) {
|
||||
$size *= KB_IN_BYTES;
|
||||
} elseif ( 'mb' === $kbmb ) {
|
||||
$size *= MB_IN_BYTES;
|
||||
}
|
||||
}
|
||||
|
||||
return $size;
|
||||
}
|
||||
|
||||
return (int) $default_value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the value of the first option matches the given
|
||||
* regular expression pattern.
|
||||
*
|
||||
* @param string $pattern Regular expression pattern.
|
||||
* @return array|bool Option value as an array of matched strings.
|
||||
* False if there is no option matches the pattern.
|
||||
*/
|
||||
public function get_first_match_option( $pattern ) {
|
||||
foreach( (array) $this->options as $option ) {
|
||||
if ( preg_match( $pattern, $option, $matches ) ) {
|
||||
return $matches;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves values of options that match the given
|
||||
* regular expression pattern.
|
||||
*
|
||||
* @param string $pattern Regular expression pattern.
|
||||
* @return array Array of arrays of strings that match the pattern.
|
||||
*/
|
||||
public function get_all_match_options( $pattern ) {
|
||||
$result = array();
|
||||
|
||||
foreach( (array) $this->options as $option ) {
|
||||
if ( preg_match( $pattern, $option, $matches ) ) {
|
||||
$result[] = $matches;
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Assigns a value to the specified offset.
|
||||
*
|
||||
* @link https://www.php.net/manual/en/arrayaccess.offsetset.php
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetSet( $offset, $value ) {
|
||||
if ( property_exists( __CLASS__, $offset ) ) {
|
||||
$this->{$offset} = $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the value at specified offset.
|
||||
*
|
||||
* @link https://www.php.net/manual/en/arrayaccess.offsetget.php
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet( $offset ) {
|
||||
if ( property_exists( __CLASS__, $offset ) ) {
|
||||
return $this->{$offset};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the specified offset exists.
|
||||
*
|
||||
* @link https://www.php.net/manual/en/arrayaccess.offsetexists.php
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetExists( $offset ) {
|
||||
return property_exists( __CLASS__, $offset );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Unsets an offset.
|
||||
*
|
||||
* @link https://www.php.net/manual/en/arrayaccess.offsetunset.php
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetUnset( $offset ) {
|
||||
}
|
||||
|
||||
}
|
||||
590
wp-content/plugins/contact-form-7/includes/form-tags-manager.php
Normal file
@@ -0,0 +1,590 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Wrapper function of WPCF7_FormTagsManager::add().
|
||||
*/
|
||||
function wpcf7_add_form_tag( $tag_types, $callback, $features = '' ) {
|
||||
$manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
return $manager->add( $tag_types, $callback, $features );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper function of WPCF7_FormTagsManager::remove().
|
||||
*/
|
||||
function wpcf7_remove_form_tag( $tag_type ) {
|
||||
$manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
return $manager->remove( $tag_type );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper function of WPCF7_FormTagsManager::replace_all().
|
||||
*/
|
||||
function wpcf7_replace_all_form_tags( $content ) {
|
||||
$manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
return $manager->replace_all( $content );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper function of WPCF7_ContactForm::scan_form_tags().
|
||||
*/
|
||||
function wpcf7_scan_form_tags( $cond = null ) {
|
||||
$contact_form = WPCF7_ContactForm::get_current();
|
||||
|
||||
if ( $contact_form ) {
|
||||
return $contact_form->scan_form_tags( $cond );
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper function of WPCF7_FormTagsManager::tag_type_supports().
|
||||
*/
|
||||
function wpcf7_form_tag_supports( $tag_type, $feature ) {
|
||||
$manager = WPCF7_FormTagsManager::get_instance();
|
||||
|
||||
return $manager->tag_type_supports( $tag_type, $feature );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The singleton instance of this class manages the collection of form-tags.
|
||||
*/
|
||||
class WPCF7_FormTagsManager {
|
||||
|
||||
private static $instance;
|
||||
|
||||
private $tag_types = array();
|
||||
private $scanned_tags = null; // Tags scanned at the last time of scan()
|
||||
private $placeholders = array();
|
||||
|
||||
private function __construct() {}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the singleton instance.
|
||||
*
|
||||
* @return WPCF7_FormTagsManager The singleton manager.
|
||||
*/
|
||||
public static function get_instance() {
|
||||
if ( empty( self::$instance ) ) {
|
||||
self::$instance = new self;
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns scanned form-tags.
|
||||
*
|
||||
* @return array Array of WPCF7_FormTag objects.
|
||||
*/
|
||||
public function get_scanned_tags() {
|
||||
return $this->scanned_tags;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers form-tag types to the manager.
|
||||
*
|
||||
* @param string|array $tag_types The name of the form-tag type or
|
||||
* an array of the names.
|
||||
* @param callable $callback The callback to generates a form control HTML
|
||||
* for a form-tag in this type.
|
||||
* @param string|array $features Optional. Features a form-tag
|
||||
* in this type supports.
|
||||
*/
|
||||
public function add( $tag_types, $callback, $features = '' ) {
|
||||
if ( ! is_callable( $callback ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( true === $features ) { // for back-compat
|
||||
$features = array( 'name-attr' => true );
|
||||
}
|
||||
|
||||
$features = wp_parse_args( $features, array() );
|
||||
|
||||
$tag_types = array_filter( array_unique( (array) $tag_types ) );
|
||||
|
||||
foreach ( $tag_types as $tag_type ) {
|
||||
$tag_type = $this->sanitize_tag_type( $tag_type );
|
||||
|
||||
if ( ! $this->tag_type_exists( $tag_type ) ) {
|
||||
$this->tag_types[$tag_type] = array(
|
||||
'function' => $callback,
|
||||
'features' => $features,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the given tag type exists.
|
||||
*/
|
||||
public function tag_type_exists( $tag_type ) {
|
||||
return isset( $this->tag_types[$tag_type] );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the tag type supports the features.
|
||||
*
|
||||
* @param string $tag_type The name of the form-tag type.
|
||||
* @param array|string $features The feature to check or an array of features.
|
||||
* @return bool True if the form-tag type supports at least one of
|
||||
* the given features, false otherwise.
|
||||
*/
|
||||
public function tag_type_supports( $tag_type, $features ) {
|
||||
$features = array_filter( (array) $features );
|
||||
|
||||
if ( isset( $this->tag_types[$tag_type]['features'] ) ) {
|
||||
return (bool) array_intersect(
|
||||
array_keys( array_filter( $this->tag_types[$tag_type]['features'] ) ),
|
||||
$features
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns form-tag types that support the given features.
|
||||
*
|
||||
* @param array|string $features Optional. The feature to check or
|
||||
* an array of features. Default empty array.
|
||||
* @param bool $invert Optional. If this value is true, returns form-tag
|
||||
* types that do not support the given features. Default false.
|
||||
* @return array An array of form-tag types. If the $features param is empty,
|
||||
* returns all form-tag types that have been registered.
|
||||
*/
|
||||
public function collect_tag_types( $features = array(), $invert = false ) {
|
||||
$tag_types = array_keys( $this->tag_types );
|
||||
|
||||
if ( empty( $features ) ) {
|
||||
return $tag_types;
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
foreach ( $tag_types as $tag_type ) {
|
||||
if ( ! $invert && $this->tag_type_supports( $tag_type, $features )
|
||||
|| $invert && ! $this->tag_type_supports( $tag_type, $features ) ) {
|
||||
$output[] = $tag_type;
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sanitizes the form-tag type name.
|
||||
*/
|
||||
private function sanitize_tag_type( $tag_type ) {
|
||||
$tag_type = preg_replace( '/[^a-zA-Z0-9_*]+/', '_', $tag_type );
|
||||
$tag_type = rtrim( $tag_type, '_' );
|
||||
$tag_type = strtolower( $tag_type );
|
||||
return $tag_type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deregisters the form-tag type.
|
||||
*/
|
||||
public function remove( $tag_type ) {
|
||||
unset( $this->tag_types[$tag_type] );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Normalizes the text content that includes form-tags.
|
||||
*/
|
||||
public function normalize( $content ) {
|
||||
if ( empty( $this->tag_types ) ) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
$content = preg_replace_callback(
|
||||
'/' . $this->tag_regex() . '/s',
|
||||
array( $this, 'normalize_callback' ),
|
||||
$content
|
||||
);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The callback function used within normalize().
|
||||
*/
|
||||
private function normalize_callback( $matches ) {
|
||||
// allow [[foo]] syntax for escaping a tag
|
||||
if ( $matches[1] == '['
|
||||
and $matches[6] == ']' ) {
|
||||
return $matches[0];
|
||||
}
|
||||
|
||||
$tag = $matches[2];
|
||||
|
||||
$attr = trim( preg_replace( '/[\r\n\t ]+/', ' ', $matches[3] ) );
|
||||
$attr = strtr( $attr, array( '<' => '<', '>' => '>' ) );
|
||||
|
||||
$content = trim( $matches[5] );
|
||||
$content = str_replace( "\n", '<WPPreserveNewline />', $content );
|
||||
|
||||
$result = $matches[1] . '[' . $tag
|
||||
. ( $attr ? ' ' . $attr : '' )
|
||||
. ( $matches[4] ? ' ' . $matches[4] : '' )
|
||||
. ']'
|
||||
. ( $content ? $content . '[/' . $tag . ']' : '' )
|
||||
. $matches[6];
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Replace all form-tags in the given text with placeholders.
|
||||
*/
|
||||
public function replace_with_placeholders( $content ) {
|
||||
if ( empty( $this->tag_types ) ) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
$this->placeholders = array();
|
||||
|
||||
$callback = function ( $matches ) {
|
||||
// Allow [[foo]] syntax for escaping a tag.
|
||||
if ( '[' === $matches[1] and ']' === $matches[6] ) {
|
||||
return $matches[0];
|
||||
}
|
||||
|
||||
$tag = $matches[0];
|
||||
$tag_type = $matches[2];
|
||||
|
||||
$block_or_hidden = $this->tag_type_supports(
|
||||
$tag_type,
|
||||
array( 'display-block', 'display-hidden' )
|
||||
);
|
||||
|
||||
if ( $block_or_hidden ) {
|
||||
$placeholder_tag_name = WPCF7_HTMLFormatter::placeholder_block;
|
||||
} else {
|
||||
$placeholder_tag_name = WPCF7_HTMLFormatter::placeholder_inline;
|
||||
}
|
||||
|
||||
$placeholder = sprintf(
|
||||
'<%1$s id="%2$s" />',
|
||||
$placeholder_tag_name,
|
||||
sha1( $tag )
|
||||
);
|
||||
|
||||
list( $placeholder ) =
|
||||
WPCF7_HTMLFormatter::normalize_start_tag( $placeholder );
|
||||
|
||||
$this->placeholders[$placeholder] = $tag;
|
||||
|
||||
return $placeholder;
|
||||
};
|
||||
|
||||
return preg_replace_callback(
|
||||
'/' . $this->tag_regex() . '/s',
|
||||
$callback,
|
||||
$content
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Replace placeholders in the given text with original form-tags.
|
||||
*/
|
||||
public function restore_from_placeholders( $content ) {
|
||||
return str_replace(
|
||||
array_keys( $this->placeholders ),
|
||||
array_values( $this->placeholders ),
|
||||
$content
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Replaces all form-tags in the text content.
|
||||
*
|
||||
* @param string $content The text content including form-tags.
|
||||
* @return string The result of replacements.
|
||||
*/
|
||||
public function replace_all( $content ) {
|
||||
return $this->scan( $content, true );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Scans form-tags in the text content.
|
||||
*
|
||||
* @param string $content The text content including form-tags.
|
||||
* @param bool $replace Optional. Whether scanned form-tags will be
|
||||
* replaced. Default false.
|
||||
* @return array|string An array of scanned form-tags if $replace is false.
|
||||
* Otherwise text that scanned form-tags are replaced.
|
||||
*/
|
||||
public function scan( $content, $replace = false ) {
|
||||
$this->scanned_tags = array();
|
||||
|
||||
if ( empty( $this->tag_types ) ) {
|
||||
if ( $replace ) {
|
||||
return $content;
|
||||
} else {
|
||||
return $this->scanned_tags;
|
||||
}
|
||||
}
|
||||
|
||||
if ( $replace ) {
|
||||
$content = preg_replace_callback(
|
||||
'/' . $this->tag_regex() . '/s',
|
||||
array( $this, 'replace_callback' ),
|
||||
$content
|
||||
);
|
||||
|
||||
return $content;
|
||||
} else {
|
||||
preg_replace_callback(
|
||||
'/' . $this->tag_regex() . '/s',
|
||||
array( $this, 'scan_callback' ),
|
||||
$content
|
||||
);
|
||||
|
||||
return $this->scanned_tags;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filters form-tags based on a condition array argument.
|
||||
*
|
||||
* @param array|string $input The original form-tags collection.
|
||||
* If it is a string, scans form-tags from it.
|
||||
* @param array $cond The conditions that filtering will be based on.
|
||||
* @return array The filtered form-tags collection.
|
||||
*/
|
||||
public function filter( $input, $cond ) {
|
||||
if ( is_array( $input ) ) {
|
||||
$tags = $input;
|
||||
} elseif ( is_string( $input ) ) {
|
||||
$tags = $this->scan( $input );
|
||||
} else {
|
||||
$tags = $this->scanned_tags;
|
||||
}
|
||||
|
||||
$cond = wp_parse_args( $cond, array(
|
||||
'type' => array(),
|
||||
'basetype' => array(),
|
||||
'name' => array(),
|
||||
'feature' => array(),
|
||||
) );
|
||||
|
||||
$cond = array_map( static function ( $c ) {
|
||||
return array_filter( array_map( 'trim', (array) $c ) );
|
||||
}, $cond );
|
||||
|
||||
$tags = array_filter(
|
||||
(array) $tags,
|
||||
function ( $tag ) use ( $cond ) {
|
||||
$tag = new WPCF7_FormTag( $tag );
|
||||
|
||||
if ( $cond['type']
|
||||
and ! in_array( $tag->type, $cond['type'], true ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $cond['basetype']
|
||||
and ! in_array( $tag->basetype, $cond['basetype'], true ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $cond['name']
|
||||
and ! in_array( $tag->name, $cond['name'], true ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ( $cond['feature'] as $feature ) {
|
||||
if ( '!' === substr( $feature, 0, 1 ) ) { // Negation
|
||||
$feature = trim( substr( $feature, 1 ) );
|
||||
|
||||
if ( $this->tag_type_supports( $tag->type, $feature ) ) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if ( ! $this->tag_type_supports( $tag->type, $feature ) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
);
|
||||
|
||||
return array_values( $tags );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the regular expression for a form-tag.
|
||||
*/
|
||||
private function tag_regex() {
|
||||
$tagnames = array_keys( $this->tag_types );
|
||||
$tagregexp = implode( '|', array_map( 'preg_quote', $tagnames ) );
|
||||
|
||||
return '(\[?)'
|
||||
. '\[(' . $tagregexp . ')(?:[\r\n\t ](.*?))?(?:[\r\n\t ](\/))?\]'
|
||||
. '(?:([^[]*?)\[\/\2\])?'
|
||||
. '(\]?)';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The callback function for the form-tag replacement.
|
||||
*/
|
||||
private function replace_callback( $matches ) {
|
||||
return $this->scan_callback( $matches, true );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The callback function for the form-tag scanning.
|
||||
*/
|
||||
private function scan_callback( $matches, $replace = false ) {
|
||||
// allow [[foo]] syntax for escaping a tag
|
||||
if ( $matches[1] == '['
|
||||
and $matches[6] == ']' ) {
|
||||
return substr( $matches[0], 1, -1 );
|
||||
}
|
||||
|
||||
$tag_type = $matches[2];
|
||||
$tag_basetype = trim( $tag_type, '*' );
|
||||
$attr = $this->parse_atts( $matches[3] );
|
||||
|
||||
$scanned_tag = array(
|
||||
'type' => $tag_type,
|
||||
'basetype' => $tag_basetype,
|
||||
'raw_name' => '',
|
||||
'name' => '',
|
||||
'options' => array(),
|
||||
'raw_values' => array(),
|
||||
'values' => array(),
|
||||
'pipes' => null,
|
||||
'labels' => array(),
|
||||
'attr' => '',
|
||||
'content' => '',
|
||||
);
|
||||
|
||||
if ( $this->tag_type_supports( $tag_type, 'singular' ) ) {
|
||||
$tags_in_same_basetype = $this->filter(
|
||||
$this->scanned_tags,
|
||||
array( 'basetype' => $tag_basetype )
|
||||
);
|
||||
|
||||
if ( $tags_in_same_basetype ) {
|
||||
// Another tag in the same base type already exists. Ignore this one.
|
||||
return $matches[0];
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->tag_type_supports( $tag_type, 'name-attr' ) ) {
|
||||
if ( ! is_array( $attr ) ) {
|
||||
return $matches[0]; // Invalid form-tag.
|
||||
}
|
||||
|
||||
$scanned_tag['raw_name'] = (string) array_shift( $attr['options'] );
|
||||
|
||||
if ( ! wpcf7_is_name( $scanned_tag['raw_name'] ) ) {
|
||||
return $matches[0]; // Invalid name is used. Ignore this tag.
|
||||
}
|
||||
|
||||
$scanned_tag['name'] = strtr( $scanned_tag['raw_name'], '.', '_' );
|
||||
}
|
||||
|
||||
if ( is_array( $attr ) ) {
|
||||
$scanned_tag['options'] = (array) $attr['options'];
|
||||
$scanned_tag['raw_values'] = (array) $attr['values'];
|
||||
|
||||
if ( WPCF7_USE_PIPE ) {
|
||||
$pipes = new WPCF7_Pipes( $scanned_tag['raw_values'] );
|
||||
$scanned_tag['values'] = $pipes->collect_befores();
|
||||
$scanned_tag['pipes'] = $pipes;
|
||||
} else {
|
||||
$scanned_tag['values'] = $scanned_tag['raw_values'];
|
||||
}
|
||||
|
||||
$scanned_tag['labels'] = $scanned_tag['values'];
|
||||
|
||||
} else {
|
||||
$scanned_tag['attr'] = $attr;
|
||||
}
|
||||
|
||||
$scanned_tag['values'] = array_map( 'trim', $scanned_tag['values'] );
|
||||
$scanned_tag['labels'] = array_map( 'trim', $scanned_tag['labels'] );
|
||||
|
||||
$content = trim( $matches[5] );
|
||||
$content = preg_replace( "/<br[\r\n\t ]*\/?>$/m", '', $content );
|
||||
$scanned_tag['content'] = $content;
|
||||
|
||||
$scanned_tag = apply_filters( 'wpcf7_form_tag', $scanned_tag, $replace );
|
||||
|
||||
$scanned_tag = new WPCF7_FormTag( $scanned_tag );
|
||||
|
||||
$this->scanned_tags[] = $scanned_tag;
|
||||
|
||||
if ( $replace ) {
|
||||
$callback = $this->tag_types[$tag_type]['function'];
|
||||
return $matches[1] . call_user_func( $callback, $scanned_tag ) . $matches[6];
|
||||
} else {
|
||||
return $matches[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses the attributes of a form-tag to extract the name,
|
||||
* options, and values.
|
||||
*
|
||||
* @param string $text Attributes of a form-tag.
|
||||
* @return array|string An associative array of the options and values
|
||||
* if the input is in the correct syntax,
|
||||
* otherwise the input text itself.
|
||||
*/
|
||||
private function parse_atts( $text ) {
|
||||
$atts = array( 'options' => array(), 'values' => array() );
|
||||
$text = preg_replace( "/[\x{00a0}\x{200b}]+/u", " ", $text );
|
||||
$text = trim( $text );
|
||||
|
||||
$pattern = '%^([-+*=0-9a-zA-Z:.!?#$&@_/|\%\r\n\t ]*?)((?:[\r\n\t ]*"[^"]*"|[\r\n\t ]*\'[^\']*\')*)$%';
|
||||
|
||||
if ( preg_match( $pattern, $text, $matches ) ) {
|
||||
if ( ! empty( $matches[1] ) ) {
|
||||
$atts['options'] = preg_split( '/[\r\n\t ]+/', trim( $matches[1] ) );
|
||||
}
|
||||
|
||||
if ( ! empty( $matches[2] ) ) {
|
||||
preg_match_all( '/"[^"]*"|\'[^\']*\'/', $matches[2], $matched_values );
|
||||
$atts['values'] = wpcf7_strip_quote_deep( $matched_values[0] );
|
||||
}
|
||||
} else {
|
||||
$atts = $text;
|
||||
}
|
||||
|
||||
return $atts;
|
||||
}
|
||||
|
||||
}
|
||||
569
wp-content/plugins/contact-form-7/includes/formatting.php
Normal file
@@ -0,0 +1,569 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Replaces double line breaks with paragraph elements.
|
||||
*
|
||||
* @param string $input The text which has to be formatted.
|
||||
* @param bool $br Optional. If set, this will convert all remaining
|
||||
* line breaks after paragraphing. Default true.
|
||||
* @return string Text which has been converted into correct paragraph tags.
|
||||
*/
|
||||
function wpcf7_autop( $input, $br = true ) {
|
||||
$placeholders = array();
|
||||
|
||||
// Replace non-HTML embedded elements with placeholders.
|
||||
$input = preg_replace_callback(
|
||||
'/<(math|svg).*?<\/\1>/is',
|
||||
static function ( $matches ) use ( &$placeholders ) {
|
||||
$placeholder = sprintf(
|
||||
'<%1$s id="%2$s" />',
|
||||
WPCF7_HTMLFormatter::placeholder_inline,
|
||||
sha1( $matches[0] )
|
||||
);
|
||||
|
||||
list( $placeholder ) =
|
||||
WPCF7_HTMLFormatter::normalize_start_tag( $placeholder );
|
||||
|
||||
$placeholders[$placeholder] = $matches[0];
|
||||
|
||||
return $placeholder;
|
||||
},
|
||||
$input
|
||||
);
|
||||
|
||||
$formatter = new WPCF7_HTMLFormatter( array(
|
||||
'auto_br' => $br,
|
||||
) );
|
||||
|
||||
$chunks = $formatter->separate_into_chunks( $input );
|
||||
|
||||
$output = $formatter->format( $chunks );
|
||||
|
||||
// Restore from placeholders.
|
||||
$output = str_replace(
|
||||
array_keys( $placeholders ),
|
||||
array_values( $placeholders ),
|
||||
$output
|
||||
);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Newline preservation help function for wpcf7_autop().
|
||||
*
|
||||
* @deprecated 5.7 Unnecessary to use any more.
|
||||
*
|
||||
* @param array $matches preg_replace_callback() matches array.
|
||||
* @return string Text including newline placeholders.
|
||||
*/
|
||||
function wpcf7_autop_preserve_newline_callback( $matches ) {
|
||||
return str_replace( "\n", '<WPPreserveNewline />', $matches[0] );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sanitizes the query variables.
|
||||
*
|
||||
* @param string $text Query variable.
|
||||
* @return string Text sanitized.
|
||||
*/
|
||||
function wpcf7_sanitize_query_var( $text ) {
|
||||
$text = wp_unslash( $text );
|
||||
$text = wp_check_invalid_utf8( $text );
|
||||
|
||||
if ( false !== strpos( $text, '<' ) ) {
|
||||
$text = wp_pre_kses_less_than( $text );
|
||||
$text = wp_strip_all_tags( $text );
|
||||
}
|
||||
|
||||
$text = preg_replace( '/%[a-f0-9]{2}/i', '', $text );
|
||||
$text = preg_replace( '/ +/', ' ', $text );
|
||||
$text = trim( $text, ' ' );
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Strips quote characters surrounding the input.
|
||||
*
|
||||
* @param string $text Input text.
|
||||
* @return string Processed output.
|
||||
*/
|
||||
function wpcf7_strip_quote( $text ) {
|
||||
$text = trim( $text );
|
||||
|
||||
if ( preg_match( '/^"(.*)"$/s', $text, $matches ) ) {
|
||||
$text = $matches[1];
|
||||
} elseif ( preg_match( "/^'(.*)'$/s", $text, $matches ) ) {
|
||||
$text = $matches[1];
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Navigates through an array, object, or scalar, and
|
||||
* strips quote characters surrounding the each value.
|
||||
*
|
||||
* @param mixed $input The array or string to be processed.
|
||||
* @return mixed Processed value.
|
||||
*/
|
||||
function wpcf7_strip_quote_deep( $input ) {
|
||||
if ( is_string( $input ) ) {
|
||||
return wpcf7_strip_quote( $input );
|
||||
}
|
||||
|
||||
if ( is_array( $input ) ) {
|
||||
$result = array();
|
||||
|
||||
foreach ( $input as $key => $text ) {
|
||||
$result[$key] = wpcf7_strip_quote_deep( $text );
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Normalizes newline characters.
|
||||
*
|
||||
* @param string $text Input text.
|
||||
* @param string $to Optional. The newline character that is used in the output.
|
||||
* @return string Normalized text.
|
||||
*/
|
||||
function wpcf7_normalize_newline( $text, $to = "\n" ) {
|
||||
if ( ! is_string( $text ) ) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
$nls = array( "\r\n", "\r", "\n" );
|
||||
|
||||
if ( ! in_array( $to, $nls ) ) {
|
||||
return $text;
|
||||
}
|
||||
|
||||
return str_replace( $nls, $to, $text );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Navigates through an array, object, or scalar, and
|
||||
* normalizes newline characters in the each value.
|
||||
*
|
||||
* @param mixed $input The array or string to be processed.
|
||||
* @param string $to Optional. The newline character that is used in the output.
|
||||
* @return mixed Processed value.
|
||||
*/
|
||||
function wpcf7_normalize_newline_deep( $input, $to = "\n" ) {
|
||||
if ( is_array( $input ) ) {
|
||||
$result = array();
|
||||
|
||||
foreach ( $input as $key => $text ) {
|
||||
$result[$key] = wpcf7_normalize_newline_deep( $text, $to );
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
return wpcf7_normalize_newline( $input, $to );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Strips newline characters.
|
||||
*
|
||||
* @param string $text Input text.
|
||||
* @return string Processed one-line text.
|
||||
*/
|
||||
function wpcf7_strip_newline( $text ) {
|
||||
$text = (string) $text;
|
||||
$text = str_replace( array( "\r", "\n" ), '', $text );
|
||||
return trim( $text );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Canonicalizes text.
|
||||
*
|
||||
* @param string $text Input text.
|
||||
* @param string|array|object $args Options.
|
||||
* @return string Canonicalized text.
|
||||
*/
|
||||
function wpcf7_canonicalize( $text, $args = '' ) {
|
||||
// for back-compat
|
||||
if ( is_string( $args ) and '' !== $args
|
||||
and false === strpos( $args, '=' ) ) {
|
||||
$args = array(
|
||||
'strto' => $args,
|
||||
);
|
||||
}
|
||||
|
||||
$args = wp_parse_args( $args, array(
|
||||
'strto' => 'lower',
|
||||
'strip_separators' => false,
|
||||
) );
|
||||
|
||||
static $charset = null;
|
||||
|
||||
if ( ! isset( $charset ) ) {
|
||||
$charset = get_option( 'blog_charset' );
|
||||
|
||||
$is_utf8 = in_array(
|
||||
$charset,
|
||||
array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' )
|
||||
);
|
||||
|
||||
if ( $is_utf8 ) {
|
||||
$charset = 'UTF-8';
|
||||
}
|
||||
}
|
||||
|
||||
$text = html_entity_decode( $text, ENT_QUOTES | ENT_HTML5, $charset );
|
||||
|
||||
if ( function_exists( 'mb_convert_kana' ) ) {
|
||||
$text = mb_convert_kana( $text, 'asKV', $charset );
|
||||
}
|
||||
|
||||
if ( $args['strip_separators'] ) {
|
||||
$text = preg_replace( '/[\r\n\t ]+/', '', $text );
|
||||
} else {
|
||||
$text = preg_replace( '/[\r\n\t ]+/', ' ', $text );
|
||||
}
|
||||
|
||||
if ( 'lower' == $args['strto'] ) {
|
||||
if ( function_exists( 'mb_strtolower' ) ) {
|
||||
$text = mb_strtolower( $text, $charset );
|
||||
} else {
|
||||
$text = strtolower( $text );
|
||||
}
|
||||
} elseif ( 'upper' == $args['strto'] ) {
|
||||
if ( function_exists( 'mb_strtoupper' ) ) {
|
||||
$text = mb_strtoupper( $text, $charset );
|
||||
} else {
|
||||
$text = strtoupper( $text );
|
||||
}
|
||||
}
|
||||
|
||||
$text = trim( $text );
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sanitizes Contact Form 7's form unit-tag.
|
||||
*
|
||||
* @param string $tag Unit-tag.
|
||||
* @return string Sanitized unit-tag.
|
||||
*/
|
||||
function wpcf7_sanitize_unit_tag( $tag ) {
|
||||
$tag = preg_replace( '/[^A-Za-z0-9_-]/', '', (string) $tag );
|
||||
return $tag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Converts a file name to one that is not executable as a script.
|
||||
*
|
||||
* @param string $filename File name.
|
||||
* @return string Converted file name.
|
||||
*/
|
||||
function wpcf7_antiscript_file_name( $filename ) {
|
||||
$filename = wp_basename( $filename );
|
||||
|
||||
// Apply part of protection logic from sanitize_file_name().
|
||||
$filename = str_replace(
|
||||
array(
|
||||
'?', '[', ']', '/', '\\', '=', '<', '>', ':', ';', ',', "'", '"',
|
||||
'&', '$', '#', '*', '(', ')', '|', '~', '`', '!', '{', '}',
|
||||
'%', '+', '’', '«', '»', '”', '“', chr( 0 )
|
||||
),
|
||||
'',
|
||||
$filename
|
||||
);
|
||||
|
||||
$filename = preg_replace( '/[\r\n\t -]+/', '-', $filename );
|
||||
$filename = preg_replace( '/[\pC\pZ]+/iu', '', $filename );
|
||||
|
||||
$parts = explode( '.', $filename );
|
||||
|
||||
if ( count( $parts ) < 2 ) {
|
||||
return $filename;
|
||||
}
|
||||
|
||||
$script_pattern = '/^(php|phtml|pl|py|rb|cgi|asp|aspx)\d?$/i';
|
||||
|
||||
$filename = array_shift( $parts );
|
||||
$extension = array_pop( $parts );
|
||||
|
||||
foreach ( (array) $parts as $part ) {
|
||||
if ( preg_match( $script_pattern, $part ) ) {
|
||||
$filename .= '.' . $part . '_';
|
||||
} else {
|
||||
$filename .= '.' . $part;
|
||||
}
|
||||
}
|
||||
|
||||
if ( preg_match( $script_pattern, $extension ) ) {
|
||||
$filename .= '.' . $extension . '_.txt';
|
||||
} else {
|
||||
$filename .= '.' . $extension;
|
||||
}
|
||||
|
||||
return $filename;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Masks a password with asterisks (*).
|
||||
*
|
||||
* @param int $right Length of right-hand unmasked text. Default 0.
|
||||
* @param int $left Length of left-hand unmasked text. Default 0.
|
||||
* @return string Text of masked password.
|
||||
*/
|
||||
function wpcf7_mask_password( $text, $right = 0, $left = 0 ) {
|
||||
$length = strlen( $text );
|
||||
|
||||
$right = absint( $right );
|
||||
$left = absint( $left );
|
||||
|
||||
if ( $length < $right + $left ) {
|
||||
$right = $left = 0;
|
||||
}
|
||||
|
||||
if ( $length <= 48 ) {
|
||||
$masked = str_repeat( '*', $length - ( $right + $left ) );
|
||||
} elseif ( $right + $left < 48 ) {
|
||||
$masked = str_repeat( '*', 48 - ( $right + $left ) );
|
||||
} else {
|
||||
$masked = '****';
|
||||
}
|
||||
|
||||
$left_unmasked = $left ? substr( $text, 0, $left ) : '';
|
||||
$right_unmasked = $right ? substr( $text, -1 * $right ) : '';
|
||||
|
||||
$text = $left_unmasked . $masked . $right_unmasked;
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array of allowed HTML tags and attributes for a given context.
|
||||
*
|
||||
* @param string $context Context used to decide allowed tags and attributes.
|
||||
* @return array Array of allowed HTML tags and their allowed attributes.
|
||||
*/
|
||||
function wpcf7_kses_allowed_html( $context = 'form' ) {
|
||||
static $allowed_tags = array();
|
||||
|
||||
if ( isset( $allowed_tags[$context] ) ) {
|
||||
return apply_filters(
|
||||
'wpcf7_kses_allowed_html',
|
||||
$allowed_tags[$context],
|
||||
$context
|
||||
);
|
||||
}
|
||||
|
||||
$allowed_tags[$context] = wp_kses_allowed_html( 'post' );
|
||||
|
||||
if ( 'form' === $context ) {
|
||||
$additional_tags_for_form = array(
|
||||
'button' => array(
|
||||
'disabled' => true,
|
||||
'name' => true,
|
||||
'type' => true,
|
||||
'value' => true,
|
||||
),
|
||||
'datalist' => array(),
|
||||
'fieldset' => array(
|
||||
'disabled' => true,
|
||||
'name' => true,
|
||||
),
|
||||
'input' => array(
|
||||
'accept' => true,
|
||||
'alt' => true,
|
||||
'capture' => true,
|
||||
'checked' => true,
|
||||
'disabled' => true,
|
||||
'list' => true,
|
||||
'max' => true,
|
||||
'maxlength' => true,
|
||||
'min' => true,
|
||||
'minlength' => true,
|
||||
'multiple' => true,
|
||||
'name' => true,
|
||||
'placeholder' => true,
|
||||
'readonly' => true,
|
||||
'size' => true,
|
||||
'step' => true,
|
||||
'type' => true,
|
||||
'value' => true,
|
||||
),
|
||||
'label' => array(
|
||||
'for' => true,
|
||||
),
|
||||
'legend' => array(),
|
||||
'meter' => array(
|
||||
'value' => true,
|
||||
'min' => true,
|
||||
'max' => true,
|
||||
'low' => true,
|
||||
'high' => true,
|
||||
'optimum' => true,
|
||||
),
|
||||
'optgroup' => array(
|
||||
'disabled' => true,
|
||||
'label' => true,
|
||||
),
|
||||
'option' => array(
|
||||
'disabled' => true,
|
||||
'label' => true,
|
||||
'selected' => true,
|
||||
'value' => true,
|
||||
),
|
||||
'output' => array(
|
||||
'for' => true,
|
||||
'name' => true,
|
||||
),
|
||||
'progress' => array(
|
||||
'max' => true,
|
||||
'value' => true,
|
||||
),
|
||||
'select' => array(
|
||||
'disabled' => true,
|
||||
'multiple' => true,
|
||||
'name' => true,
|
||||
'size' => true,
|
||||
),
|
||||
'textarea' => array(
|
||||
'cols' => true,
|
||||
'disabled' => true,
|
||||
'maxlength' => true,
|
||||
'minlength' => true,
|
||||
'name' => true,
|
||||
'placeholder' => true,
|
||||
'readonly' => true,
|
||||
'rows' => true,
|
||||
'spellcheck' => true,
|
||||
'wrap' => true,
|
||||
),
|
||||
);
|
||||
|
||||
$additional_tags_for_form = array_map(
|
||||
static function ( $elm ) {
|
||||
$global_attributes = array(
|
||||
'aria-atomic' => true,
|
||||
'aria-checked' => true,
|
||||
'aria-describedby' => true,
|
||||
'aria-details' => true,
|
||||
'aria-disabled' => true,
|
||||
'aria-hidden' => true,
|
||||
'aria-invalid' => true,
|
||||
'aria-label' => true,
|
||||
'aria-labelledby' => true,
|
||||
'aria-live' => true,
|
||||
'aria-relevant' => true,
|
||||
'aria-required' => true,
|
||||
'aria-selected' => true,
|
||||
'class' => true,
|
||||
'data-*' => true,
|
||||
'id' => true,
|
||||
'inputmode' => true,
|
||||
'role' => true,
|
||||
'style' => true,
|
||||
'tabindex' => true,
|
||||
'title' => true,
|
||||
);
|
||||
|
||||
return array_merge( $global_attributes, (array) $elm );
|
||||
},
|
||||
$additional_tags_for_form
|
||||
);
|
||||
|
||||
$allowed_tags[$context] = array_merge(
|
||||
$allowed_tags[$context],
|
||||
$additional_tags_for_form
|
||||
);
|
||||
}
|
||||
|
||||
return apply_filters(
|
||||
'wpcf7_kses_allowed_html',
|
||||
$allowed_tags[$context],
|
||||
$context
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sanitizes content for allowed HTML tags for the specified context.
|
||||
*
|
||||
* @param string $input Content to filter.
|
||||
* @param string $context Context used to decide allowed tags and attributes.
|
||||
* @return string Filtered text with allowed HTML tags and attributes intact.
|
||||
*/
|
||||
function wpcf7_kses( $input, $context = 'form' ) {
|
||||
$output = wp_kses(
|
||||
$input,
|
||||
wpcf7_kses_allowed_html( $context )
|
||||
);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a formatted string of HTML attributes.
|
||||
*
|
||||
* @param array $atts Associative array of attribute name and value pairs.
|
||||
* @return string Formatted HTML attributes.
|
||||
*/
|
||||
function wpcf7_format_atts( $atts ) {
|
||||
$atts_filtered = array();
|
||||
|
||||
foreach ( $atts as $name => $value ) {
|
||||
$name = strtolower( trim( $name ) );
|
||||
|
||||
if ( ! preg_match( '/^[a-z_:][a-z_:.0-9-]*$/', $name ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
static $boolean_attributes = array(
|
||||
'checked',
|
||||
'disabled',
|
||||
'inert',
|
||||
'multiple',
|
||||
'readonly',
|
||||
'required',
|
||||
'selected',
|
||||
);
|
||||
|
||||
if ( in_array( $name, $boolean_attributes ) and '' === $value ) {
|
||||
$value = false;
|
||||
}
|
||||
|
||||
if ( is_numeric( $value ) ) {
|
||||
$value = (string) $value;
|
||||
}
|
||||
|
||||
if ( null === $value or false === $value ) {
|
||||
unset( $atts_filtered[$name] );
|
||||
} elseif ( true === $value ) {
|
||||
$atts_filtered[$name] = $name; // boolean attribute
|
||||
} elseif ( is_string( $value ) ) {
|
||||
$atts_filtered[$name] = trim( $value );
|
||||
}
|
||||
}
|
||||
|
||||
$output = '';
|
||||
|
||||
foreach ( $atts_filtered as $name => $value ) {
|
||||
$output .= sprintf( ' %1$s="%2$s"', $name, esc_attr( $value ) );
|
||||
}
|
||||
|
||||
return trim( $output );
|
||||
}
|
||||
694
wp-content/plugins/contact-form-7/includes/functions.php
Normal file
@@ -0,0 +1,694 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Returns path to a plugin file.
|
||||
*
|
||||
* @param string $path File path relative to the plugin root directory.
|
||||
* @return string Absolute file path.
|
||||
*/
|
||||
function wpcf7_plugin_path( $path = '' ) {
|
||||
return path_join( WPCF7_PLUGIN_DIR, trim( $path, '/' ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the URL to a plugin file.
|
||||
*
|
||||
* @param string $path File path relative to the plugin root directory.
|
||||
* @return string URL.
|
||||
*/
|
||||
function wpcf7_plugin_url( $path = '' ) {
|
||||
$url = plugins_url( $path, WPCF7_PLUGIN );
|
||||
|
||||
if ( is_ssl()
|
||||
and 'http:' == substr( $url, 0, 5 ) ) {
|
||||
$url = 'https:' . substr( $url, 5 );
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Include a file under WPCF7_PLUGIN_MODULES_DIR.
|
||||
*
|
||||
* @param string $path File path relative to the module dir.
|
||||
* @return bool True on success, false on failure.
|
||||
*/
|
||||
function wpcf7_include_module_file( $path ) {
|
||||
$dir = WPCF7_PLUGIN_MODULES_DIR;
|
||||
|
||||
if ( empty( $dir ) or ! is_dir( $dir ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$path = path_join( $dir, ltrim( $path, '/' ) );
|
||||
|
||||
if ( file_exists( $path ) ) {
|
||||
include_once $path;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves uploads directory information.
|
||||
*
|
||||
* @param string|bool $type Optional. Type of output. Default false.
|
||||
* @return array|string Information about the upload directory.
|
||||
*/
|
||||
function wpcf7_upload_dir( $type = false ) {
|
||||
$uploads = wp_get_upload_dir();
|
||||
|
||||
$uploads = apply_filters( 'wpcf7_upload_dir', array(
|
||||
'dir' => $uploads['basedir'],
|
||||
'url' => $uploads['baseurl'],
|
||||
) );
|
||||
|
||||
if ( 'dir' == $type ) {
|
||||
return $uploads['dir'];
|
||||
} if ( 'url' == $type ) {
|
||||
return $uploads['url'];
|
||||
}
|
||||
|
||||
return $uploads;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Verifies that a correct security nonce was used with time limit.
|
||||
*
|
||||
* @param string $nonce Nonce value that was used for verification.
|
||||
* @param string $action Optional. Context to what is taking place.
|
||||
* Default 'wp_rest'.
|
||||
* @return int|bool 1 if the nonce is generated between 0-12 hours ago,
|
||||
* 2 if the nonce is generated between 12-24 hours ago.
|
||||
* False if the nonce is invalid.
|
||||
*/
|
||||
function wpcf7_verify_nonce( $nonce, $action = 'wp_rest' ) {
|
||||
return wp_verify_nonce( $nonce, $action );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a cryptographic token tied to a specific action, user, user session,
|
||||
* and window of time.
|
||||
*
|
||||
* @param string $action Optional. Context to what is taking place.
|
||||
* Default 'wp_rest'.
|
||||
* @return string The token.
|
||||
*/
|
||||
function wpcf7_create_nonce( $action = 'wp_rest' ) {
|
||||
return wp_create_nonce( $action );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Converts multi-dimensional array to a flat array.
|
||||
*
|
||||
* @param mixed $input Array or item of array.
|
||||
* @return array Flatten array.
|
||||
*/
|
||||
function wpcf7_array_flatten( $input ) {
|
||||
if ( ! is_array( $input ) ) {
|
||||
return array( $input );
|
||||
}
|
||||
|
||||
$output = array();
|
||||
|
||||
foreach ( $input as $value ) {
|
||||
$output = array_merge( $output, wpcf7_array_flatten( $value ) );
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Excludes unset or blank text values from the given array.
|
||||
*
|
||||
* @param array $input The array.
|
||||
* @return array Array without blank text values.
|
||||
*/
|
||||
function wpcf7_exclude_blank( $input ) {
|
||||
$output = array_filter( $input,
|
||||
static function ( $i ) {
|
||||
return isset( $i ) && '' !== $i;
|
||||
}
|
||||
);
|
||||
|
||||
return array_values( $output );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a comma-separated list from a multi-dimensional array.
|
||||
*
|
||||
* @param mixed $input Array or item of array.
|
||||
* @param string|array $args Optional. Output options.
|
||||
* @return string Comma-separated list.
|
||||
*/
|
||||
function wpcf7_flat_join( $input, $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'separator' => ', ',
|
||||
) );
|
||||
|
||||
$input = wpcf7_array_flatten( $input );
|
||||
$output = array();
|
||||
|
||||
foreach ( (array) $input as $value ) {
|
||||
if ( is_scalar( $value ) ) {
|
||||
$output[] = trim( (string) $value );
|
||||
}
|
||||
}
|
||||
|
||||
return implode( $args['separator'], $output );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if HTML5 is supported.
|
||||
*/
|
||||
function wpcf7_support_html5() {
|
||||
return (bool) wpcf7_apply_filters_deprecated(
|
||||
'wpcf7_support_html5',
|
||||
array( true ),
|
||||
'5.6',
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if HTML5 fallback is active.
|
||||
*/
|
||||
function wpcf7_support_html5_fallback() {
|
||||
return (bool) apply_filters( 'wpcf7_support_html5_fallback', false );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the Really Simple CAPTCHA plugin is used for contact forms.
|
||||
*/
|
||||
function wpcf7_use_really_simple_captcha() {
|
||||
return apply_filters( 'wpcf7_use_really_simple_captcha',
|
||||
WPCF7_USE_REALLY_SIMPLE_CAPTCHA
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if config validation is active.
|
||||
*/
|
||||
function wpcf7_validate_configuration() {
|
||||
return apply_filters( 'wpcf7_validate_configuration',
|
||||
WPCF7_VALIDATE_CONFIGURATION
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if wpcf7_autop() is applied.
|
||||
*/
|
||||
function wpcf7_autop_or_not( $options = '' ) {
|
||||
$options = wp_parse_args( $options, array(
|
||||
'for' => 'form',
|
||||
) );
|
||||
|
||||
return (bool) apply_filters( 'wpcf7_autop_or_not', WPCF7_AUTOP, $options );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if JavaScript for this plugin is loaded.
|
||||
*/
|
||||
function wpcf7_load_js() {
|
||||
return apply_filters( 'wpcf7_load_js', WPCF7_LOAD_JS );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if CSS for this plugin is loaded.
|
||||
*/
|
||||
function wpcf7_load_css() {
|
||||
return apply_filters( 'wpcf7_load_css', WPCF7_LOAD_CSS );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builds an HTML anchor element.
|
||||
*
|
||||
* @param string $url Link URL.
|
||||
* @param string $anchor_text Anchor label text.
|
||||
* @param string|array $args Optional. Link options.
|
||||
* @return string Formatted anchor element.
|
||||
*/
|
||||
function wpcf7_link( $url, $anchor_text, $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'id' => null,
|
||||
'class' => null,
|
||||
) );
|
||||
|
||||
$atts = array_merge( $args, array(
|
||||
'href' => esc_url( $url ),
|
||||
) );
|
||||
|
||||
return sprintf(
|
||||
'<a %1$s>%2$s</a>',
|
||||
wpcf7_format_atts( $atts ),
|
||||
esc_html( $anchor_text )
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the current request URL.
|
||||
*/
|
||||
function wpcf7_get_request_uri() {
|
||||
static $request_uri = '';
|
||||
|
||||
if ( empty( $request_uri ) ) {
|
||||
$request_uri = add_query_arg( array() );
|
||||
}
|
||||
|
||||
return sanitize_url( $request_uri );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers post types used for this plugin.
|
||||
*/
|
||||
function wpcf7_register_post_types() {
|
||||
if ( class_exists( 'WPCF7_ContactForm' ) ) {
|
||||
WPCF7_ContactForm::register_post_type();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the version string of this plugin.
|
||||
*
|
||||
* @param string|array $args Optional. Output options.
|
||||
* @return string Version string.
|
||||
*/
|
||||
function wpcf7_version( $args = '' ) {
|
||||
$defaults = array(
|
||||
'limit' => -1,
|
||||
'only_major' => false,
|
||||
);
|
||||
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
if ( $args['only_major'] ) {
|
||||
$args['limit'] = 2;
|
||||
}
|
||||
|
||||
$args['limit'] = (int) $args['limit'];
|
||||
|
||||
$ver = WPCF7_VERSION;
|
||||
$ver = strtr( $ver, '_-+', '...' );
|
||||
$ver = preg_replace( '/[^0-9.]+/', ".$0.", $ver );
|
||||
$ver = preg_replace( '/[.]+/', ".", $ver );
|
||||
$ver = trim( $ver, '.' );
|
||||
$ver = explode( '.', $ver );
|
||||
|
||||
if ( -1 < $args['limit'] ) {
|
||||
$ver = array_slice( $ver, 0, $args['limit'] );
|
||||
}
|
||||
|
||||
$ver = implode( '.', $ver );
|
||||
|
||||
return $ver;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns array entries that match the given version.
|
||||
*
|
||||
* @param string $version The version to search for.
|
||||
* @param array $input Search target array.
|
||||
* @return array|bool Array of matched entries. False on failure.
|
||||
*/
|
||||
function wpcf7_version_grep( $version, array $input ) {
|
||||
$pattern = '/^' . preg_quote( (string) $version, '/' ) . '(?:\.|$)/';
|
||||
|
||||
return preg_grep( $pattern, $input );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an enctype attribute value.
|
||||
*
|
||||
* @param string $enctype Enctype value.
|
||||
* @return string Enctype value. Empty if not a valid enctype.
|
||||
*/
|
||||
function wpcf7_enctype_value( $enctype ) {
|
||||
$enctype = trim( $enctype );
|
||||
|
||||
if ( empty( $enctype ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$valid_enctypes = array(
|
||||
'application/x-www-form-urlencoded',
|
||||
'multipart/form-data',
|
||||
'text/plain',
|
||||
);
|
||||
|
||||
if ( in_array( $enctype, $valid_enctypes ) ) {
|
||||
return $enctype;
|
||||
}
|
||||
|
||||
$pattern = '%^enctype="(' . implode( '|', $valid_enctypes ) . ')"$%';
|
||||
|
||||
if ( preg_match( $pattern, $enctype, $matches ) ) {
|
||||
return $matches[1]; // for back-compat
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Removes directory recursively.
|
||||
*
|
||||
* @param string $dir Directory path.
|
||||
* @return bool True on success, false on failure.
|
||||
*/
|
||||
function wpcf7_rmdir_p( $dir ) {
|
||||
if ( is_file( $dir ) ) {
|
||||
$file = $dir;
|
||||
|
||||
if ( @unlink( $file ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$stat = stat( $file );
|
||||
|
||||
if ( @chmod( $file, $stat['mode'] | 0200 ) ) { // add write for owner
|
||||
if ( @unlink( $file ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@chmod( $file, $stat['mode'] );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! is_dir( $dir ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $handle = opendir( $dir ) ) {
|
||||
while ( false !== ( $file = readdir( $handle ) ) ) {
|
||||
if ( $file == "."
|
||||
or $file == ".." ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
wpcf7_rmdir_p( path_join( $dir, $file ) );
|
||||
}
|
||||
|
||||
closedir( $handle );
|
||||
}
|
||||
|
||||
if ( false !== ( $files = scandir( $dir ) )
|
||||
and ! array_diff( $files, array( '.', '..' ) ) ) {
|
||||
return rmdir( $dir );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builds a URL-encoded query string.
|
||||
*
|
||||
* @link https://developer.wordpress.org/reference/functions/_http_build_query/
|
||||
*
|
||||
* @param array $args URL query parameters.
|
||||
* @param string $key Optional. If specified, used to prefix key name.
|
||||
* @return string Query string.
|
||||
*/
|
||||
function wpcf7_build_query( $args, $key = '' ) {
|
||||
$sep = '&';
|
||||
$ret = array();
|
||||
|
||||
foreach ( (array) $args as $k => $v ) {
|
||||
$k = urlencode( $k );
|
||||
|
||||
if ( ! empty( $key ) ) {
|
||||
$k = $key . '%5B' . $k . '%5D';
|
||||
}
|
||||
|
||||
if ( null === $v ) {
|
||||
continue;
|
||||
} elseif ( false === $v ) {
|
||||
$v = '0';
|
||||
}
|
||||
|
||||
if ( is_array( $v ) or is_object( $v ) ) {
|
||||
array_push( $ret, wpcf7_build_query( $v, $k ) );
|
||||
} else {
|
||||
array_push( $ret, $k . '=' . urlencode( $v ) );
|
||||
}
|
||||
}
|
||||
|
||||
return implode( $sep, $ret );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of code units in a string.
|
||||
*
|
||||
* @link http://www.w3.org/TR/html5/infrastructure.html#code-unit-length
|
||||
*
|
||||
* @param string $text Input string.
|
||||
* @return int|bool The number of code units, or false if
|
||||
* mb_convert_encoding is not available.
|
||||
*/
|
||||
function wpcf7_count_code_units( $text ) {
|
||||
static $use_mb = null;
|
||||
|
||||
if ( is_null( $use_mb ) ) {
|
||||
$use_mb = function_exists( 'mb_convert_encoding' );
|
||||
}
|
||||
|
||||
if ( ! $use_mb ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$text = (string) $text;
|
||||
$text = str_replace( "\r\n", "\n", $text );
|
||||
|
||||
$encoding = mb_detect_encoding( $text, mb_detect_order(), true );
|
||||
|
||||
if ( $encoding ) {
|
||||
$text = mb_convert_encoding( $text, 'UTF-16', $encoding );
|
||||
} else {
|
||||
$text = mb_convert_encoding( $text, 'UTF-16', 'UTF-8' );
|
||||
}
|
||||
|
||||
$byte_count = mb_strlen( $text, '8bit' );
|
||||
|
||||
return floor( $byte_count / 2 );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if WordPress is running on the localhost.
|
||||
*/
|
||||
function wpcf7_is_localhost() {
|
||||
$sitename = wp_parse_url( network_home_url(), PHP_URL_HOST );
|
||||
return in_array( strtolower( $sitename ), array( 'localhost', '127.0.0.1' ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Marks a function as deprecated and informs when it has been used.
|
||||
*
|
||||
* @param string $function_name The function that was called.
|
||||
* @param string $version The version of Contact Form 7 that deprecated
|
||||
* the function.
|
||||
* @param string $replacement The function that should have been called.
|
||||
*/
|
||||
function wpcf7_deprecated_function( $function_name, $version, $replacement ) {
|
||||
if ( WP_DEBUG ) {
|
||||
if ( function_exists( '__' ) ) {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
/* translators: 1: PHP function name, 2: version number, 3: alternative function name */
|
||||
__( 'Function %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ),
|
||||
$function_name, $version, $replacement
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
} else {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
'Function %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.',
|
||||
$function_name, $version, $replacement
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Fires functions attached to a deprecated filter hook.
|
||||
*
|
||||
* @param string $hook_name The name of the filter hook.
|
||||
* @param array $args Array of additional function arguments to be
|
||||
* passed to apply_filters().
|
||||
* @param string $version The version of Contact Form 7 that deprecated
|
||||
* the hook.
|
||||
* @param string $replacement The hook that should have been used.
|
||||
*/
|
||||
function wpcf7_apply_filters_deprecated( $hook_name, $args, $version, $replacement = '' ) {
|
||||
if ( ! has_filter( $hook_name ) ) {
|
||||
return $args[0];
|
||||
}
|
||||
|
||||
if ( WP_DEBUG and apply_filters( 'deprecated_hook_trigger_error', true ) ) {
|
||||
if ( $replacement ) {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
/* translators: 1: WordPress hook name, 2: version number, 3: alternative hook name */
|
||||
__( 'Hook %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ),
|
||||
$hook_name,
|
||||
$version,
|
||||
$replacement
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
} else {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
/* translators: 1: WordPress hook name, 2: version number */
|
||||
__( 'Hook %1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s with no alternative available.', 'contact-form-7' ),
|
||||
$hook_name,
|
||||
$version
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return apply_filters_ref_array( $hook_name, $args );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Marks something as being incorrectly called.
|
||||
*
|
||||
* @param string $function_name The function that was called.
|
||||
* @param string $message A message explaining what has been done incorrectly.
|
||||
* @param string $version The version of Contact Form 7 where the message
|
||||
* was added.
|
||||
*/
|
||||
function wpcf7_doing_it_wrong( $function_name, $message, $version ) {
|
||||
if ( WP_DEBUG ) {
|
||||
if ( function_exists( '__' ) ) {
|
||||
if ( $version ) {
|
||||
$version = sprintf(
|
||||
/* translators: %s: Contact Form 7 version number. */
|
||||
__( '(This message was added in Contact Form 7 version %s.)', 'contact-form-7' ),
|
||||
$version
|
||||
);
|
||||
}
|
||||
|
||||
trigger_error(
|
||||
sprintf(
|
||||
/* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Contact Form 7 version number. */
|
||||
__( 'Function %1$s was called incorrectly. %2$s %3$s', 'contact-form-7' ),
|
||||
$function_name,
|
||||
$message,
|
||||
$version
|
||||
),
|
||||
E_USER_NOTICE
|
||||
);
|
||||
} else {
|
||||
if ( $version ) {
|
||||
$version = sprintf(
|
||||
'(This message was added in Contact Form 7 version %s.)',
|
||||
$version
|
||||
);
|
||||
}
|
||||
|
||||
trigger_error(
|
||||
sprintf(
|
||||
'Function %1$s was called incorrectly. %2$s %3$s',
|
||||
$function_name,
|
||||
$message,
|
||||
$version
|
||||
),
|
||||
E_USER_NOTICE
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Triggers an error about a remote HTTP request and response.
|
||||
*
|
||||
* @param string $url The resource URL.
|
||||
* @param array $request Request arguments.
|
||||
* @param array|WP_Error $response The response or WP_Error on failure.
|
||||
*/
|
||||
function wpcf7_log_remote_request( $url, $request, $response ) {
|
||||
$log = sprintf(
|
||||
/* translators: 1: response code, 2: message, 3: body, 4: URL */
|
||||
__( 'HTTP Response: %1$s %2$s %3$s from %4$s', 'contact-form-7' ),
|
||||
(int) wp_remote_retrieve_response_code( $response ),
|
||||
wp_remote_retrieve_response_message( $response ),
|
||||
wp_remote_retrieve_body( $response ),
|
||||
$url
|
||||
);
|
||||
|
||||
$log = apply_filters( 'wpcf7_log_remote_request',
|
||||
$log, $url, $request, $response
|
||||
);
|
||||
|
||||
if ( $log ) {
|
||||
trigger_error( $log );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Anonymizes an IP address by masking local part.
|
||||
*
|
||||
* @param string $ip_addr The original IP address.
|
||||
* @return string|bool Anonymized IP address, or false on failure.
|
||||
*/
|
||||
function wpcf7_anonymize_ip_addr( $ip_addr ) {
|
||||
if ( ! function_exists( 'inet_ntop' )
|
||||
or ! function_exists( 'inet_pton' ) ) {
|
||||
return $ip_addr;
|
||||
}
|
||||
|
||||
$packed = inet_pton( $ip_addr );
|
||||
|
||||
if ( false === $packed ) {
|
||||
return $ip_addr;
|
||||
}
|
||||
|
||||
if ( 4 == strlen( $packed ) ) { // IPv4
|
||||
$mask = '255.255.255.0';
|
||||
} elseif ( 16 == strlen( $packed ) ) { // IPv6
|
||||
$mask = 'ffff:ffff:ffff:0000:0000:0000:0000:0000';
|
||||
} else {
|
||||
return $ip_addr;
|
||||
}
|
||||
|
||||
return inet_ntop( $packed & inet_pton( $mask ) );
|
||||
}
|
||||
678
wp-content/plugins/contact-form-7/includes/html-formatter.php
Normal file
@@ -0,0 +1,678 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Contact Form 7's class used for formatting HTML fragments.
|
||||
*/
|
||||
class WPCF7_HTMLFormatter {
|
||||
|
||||
// HTML component types.
|
||||
const text = 0;
|
||||
const start_tag = 1;
|
||||
const end_tag = 2;
|
||||
const comment = 3;
|
||||
|
||||
/**
|
||||
* Tag name reserved for a custom HTML element used as a block placeholder.
|
||||
*/
|
||||
const placeholder_block = 'placeholder:block';
|
||||
|
||||
/**
|
||||
* Tag name reserved for a custom HTML element used as an inline placeholder.
|
||||
*/
|
||||
const placeholder_inline = 'placeholder:inline';
|
||||
|
||||
/**
|
||||
* The void elements in HTML.
|
||||
*
|
||||
* @link https://developer.mozilla.org/en-US/docs/Glossary/Void_element
|
||||
*/
|
||||
const void_elements = array(
|
||||
'area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input',
|
||||
'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr',
|
||||
self::placeholder_block, self::placeholder_inline,
|
||||
);
|
||||
|
||||
/**
|
||||
* HTML elements that can contain flow content.
|
||||
*/
|
||||
const p_parent_elements = array(
|
||||
'address', 'article', 'aside', 'blockquote', 'body', 'caption',
|
||||
'dd', 'details', 'dialog', 'div', 'dt', 'fieldset', 'figcaption',
|
||||
'figure', 'footer', 'form', 'header', 'li', 'main', 'nav',
|
||||
'section', 'td', 'th',
|
||||
);
|
||||
|
||||
/**
|
||||
* HTML elements that can be neither the parent nor a child of
|
||||
* a paragraph element.
|
||||
*/
|
||||
const p_nonparent_elements = array(
|
||||
'colgroup', 'dl', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head',
|
||||
'hgroup', 'html', 'legend', 'menu', 'ol', 'pre', 'style', 'summary',
|
||||
'table', 'tbody', 'template', 'tfoot', 'thead', 'title', 'tr', 'ul',
|
||||
);
|
||||
|
||||
/**
|
||||
* HTML elements in the phrasing content category, plus non-phrasing
|
||||
* content elements that can be grandchildren of a paragraph element.
|
||||
*/
|
||||
const p_child_elements = array(
|
||||
'a', 'abbr', 'area', 'audio', 'b', 'bdi', 'bdo', 'br', 'button',
|
||||
'canvas', 'cite', 'code', 'data', 'datalist', 'del', 'dfn',
|
||||
'em', 'embed', 'i', 'iframe', 'img', 'input', 'ins', 'kbd',
|
||||
'keygen', 'label', 'link', 'map', 'mark', 'meta',
|
||||
'meter', 'noscript', 'object', 'output', 'picture', 'progress',
|
||||
'q', 'ruby', 's', 'samp', 'script', 'select', 'slot', 'small',
|
||||
'span', 'strong', 'sub', 'sup', 'textarea',
|
||||
'time', 'u', 'var', 'video', 'wbr',
|
||||
'optgroup', 'option', 'rp', 'rt', // non-phrasing grandchildren
|
||||
self::placeholder_inline,
|
||||
);
|
||||
|
||||
/**
|
||||
* HTML elements that can contain phrasing content.
|
||||
*/
|
||||
const br_parent_elements = array(
|
||||
'a', 'abbr', 'address', 'article', 'aside', 'audio', 'b', 'bdi',
|
||||
'bdo', 'blockquote', 'button', 'canvas', 'caption', 'cite', 'code',
|
||||
'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div',
|
||||
'dt', 'em', 'fieldset', 'figcaption', 'figure', 'footer', 'form',
|
||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'i', 'ins', 'kbd',
|
||||
'label', 'legend', 'li', 'main', 'map', 'mark', 'meter', 'nav',
|
||||
'noscript', 'object', 'output', 'p', 'progress', 'q', 'rt',
|
||||
'ruby', 's', 'samp', 'section', 'slot', 'small', 'span', 'strong',
|
||||
'sub', 'summary', 'sup', 'td', 'th', 'time', 'u', 'var',
|
||||
'video',
|
||||
);
|
||||
|
||||
|
||||
// Properties.
|
||||
private $options = array();
|
||||
private $stacked_elements = array();
|
||||
private $output = '';
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct( $args = '' ) {
|
||||
$this->options = wp_parse_args( $args, array(
|
||||
'auto_br' => true,
|
||||
'auto_indent' => true,
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Separates the given text into chunks of HTML. Each chunk must be an
|
||||
* associative array that includes 'position', 'type', and 'content' keys.
|
||||
*
|
||||
* @param string $input Text to be separated into chunks.
|
||||
* @return iterable Iterable of chunks.
|
||||
*/
|
||||
public function separate_into_chunks( $input ) {
|
||||
$input_bytelength = strlen( $input );
|
||||
$position = 0;
|
||||
|
||||
while ( $position < $input_bytelength ) {
|
||||
$next_tag = preg_match(
|
||||
'/(?:<!--.*?-->|<(?:\/?)[a-z].*?>)/is',
|
||||
$input,
|
||||
$matches,
|
||||
PREG_OFFSET_CAPTURE,
|
||||
$position
|
||||
);
|
||||
|
||||
if ( ! $next_tag ) {
|
||||
yield array(
|
||||
'position' => $position,
|
||||
'type' => self::text,
|
||||
'content' => substr( $input, $position ),
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$next_tag = $matches[0][0];
|
||||
$next_tag_position = $matches[0][1];
|
||||
|
||||
if ( $position < $next_tag_position ) {
|
||||
yield array(
|
||||
'position' => $position,
|
||||
'type' => self::text,
|
||||
'content' => substr(
|
||||
$input,
|
||||
$position,
|
||||
$next_tag_position - $position
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if ( '<!' === substr( $next_tag, 0, 2 ) ) {
|
||||
$next_tag_type = self::comment;
|
||||
} elseif ( '</' === substr( $next_tag, 0, 2 ) ) {
|
||||
$next_tag_type = self::end_tag;
|
||||
} else {
|
||||
$next_tag_type = self::start_tag;
|
||||
}
|
||||
|
||||
yield array(
|
||||
'position' => $next_tag_position,
|
||||
'type' => $next_tag_type,
|
||||
'content' => substr(
|
||||
$input,
|
||||
$next_tag_position,
|
||||
strlen( $next_tag )
|
||||
),
|
||||
);
|
||||
|
||||
$position = $next_tag_position + strlen( $next_tag );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Normalizes content in each chunk. This may change the type and position
|
||||
* of the chunk.
|
||||
*
|
||||
* @param iterable $chunks The original chunks.
|
||||
* @return iterable Normalized chunks.
|
||||
*/
|
||||
public function pre_format( $chunks ) {
|
||||
$position = 0;
|
||||
|
||||
foreach ( $chunks as $chunk ) {
|
||||
$chunk['position'] = $position;
|
||||
|
||||
// Standardize newline characters to "\n".
|
||||
$chunk['content'] = str_replace(
|
||||
array( "\r\n", "\r" ), "\n", $chunk['content']
|
||||
);
|
||||
|
||||
if ( $chunk['type'] === self::start_tag ) {
|
||||
list( $chunk['content'] ) =
|
||||
self::normalize_start_tag( $chunk['content'] );
|
||||
|
||||
// Replace <br /> by a line break.
|
||||
if (
|
||||
$this->options['auto_br'] and
|
||||
preg_match( '/^<br\s*\/?>$/i', $chunk['content'] )
|
||||
) {
|
||||
$chunk['type'] = self::text;
|
||||
$chunk['content'] = "\n";
|
||||
}
|
||||
}
|
||||
|
||||
yield $chunk;
|
||||
$position = self::calc_next_position( $chunk );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Concatenates neighboring text chunks to create a single chunk.
|
||||
*
|
||||
* @param iterable $chunks The original chunks.
|
||||
* @return iterable Processed chunks.
|
||||
*/
|
||||
public function concatenate_texts( $chunks ) {
|
||||
$position = 0;
|
||||
$text_left = null;
|
||||
|
||||
foreach ( $chunks as $chunk ) {
|
||||
$chunk['position'] = $position;
|
||||
|
||||
if ( $chunk['type'] === self::text ) {
|
||||
if ( isset( $text_left ) ) {
|
||||
$text_left['content'] .= $chunk['content'];
|
||||
} else {
|
||||
$text_left = $chunk;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( isset( $text_left ) ) {
|
||||
yield $text_left;
|
||||
$chunk['position'] = self::calc_next_position( $text_left );
|
||||
$text_left = null;
|
||||
}
|
||||
|
||||
yield $chunk;
|
||||
$position = self::calc_next_position( $chunk );
|
||||
}
|
||||
|
||||
if ( isset( $text_left ) ) {
|
||||
yield $text_left;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Outputs formatted HTML based on the given chunks.
|
||||
*
|
||||
* @param iterable $chunks The original chunks.
|
||||
* @return string Formatted HTML.
|
||||
*/
|
||||
public function format( $chunks ) {
|
||||
$chunks = $this->pre_format( $chunks );
|
||||
$chunks = $this->concatenate_texts( $chunks );
|
||||
|
||||
$this->output = '';
|
||||
$this->stacked_elements = array();
|
||||
|
||||
foreach ( $chunks as $chunk ) {
|
||||
|
||||
if ( $chunk['type'] === self::text ) {
|
||||
$this->append_text( $chunk['content'] );
|
||||
}
|
||||
|
||||
if ( $chunk['type'] === self::start_tag ) {
|
||||
$this->start_tag( $chunk['content'] );
|
||||
}
|
||||
|
||||
if ( $chunk['type'] === self::end_tag ) {
|
||||
$this->end_tag( $chunk['content'] );
|
||||
}
|
||||
|
||||
if ( $chunk['type'] === self::comment ) {
|
||||
$this->append_comment( $chunk['content'] );
|
||||
}
|
||||
}
|
||||
|
||||
// Close all remaining tags.
|
||||
$this->close_all_tags();
|
||||
|
||||
return $this->output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Appends a text node content to the output property.
|
||||
*
|
||||
* @param string $content Text node content.
|
||||
*/
|
||||
public function append_text( $content ) {
|
||||
if ( $this->is_inside( array( 'pre', 'template' ) ) ) {
|
||||
$this->output .= $content;
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
empty( $this->stacked_elements ) or
|
||||
$this->has_parent( 'p' ) or
|
||||
$this->has_parent( self::p_parent_elements )
|
||||
) {
|
||||
// Close <p> if the content starts with multiple line breaks.
|
||||
if ( preg_match( '/^\s*\n\s*\n\s*/', $content ) ) {
|
||||
$this->end_tag( 'p' );
|
||||
}
|
||||
|
||||
// Split up the contents into paragraphs, separated by double line breaks.
|
||||
$paragraphs = preg_split( '/\s*\n\s*\n\s*/', $content );
|
||||
|
||||
$paragraphs = array_filter( $paragraphs, static function ( $paragraph ) {
|
||||
return '' !== trim( $paragraph );
|
||||
} );
|
||||
|
||||
$paragraphs = array_values( $paragraphs );
|
||||
|
||||
if ( $paragraphs ) {
|
||||
if ( $this->is_inside( 'p' ) ) {
|
||||
$paragraph = array_shift( $paragraphs );
|
||||
|
||||
$paragraph = self::normalize_paragraph(
|
||||
$paragraph,
|
||||
$this->options['auto_br']
|
||||
);
|
||||
|
||||
$this->output .= $paragraph;
|
||||
}
|
||||
|
||||
foreach ( $paragraphs as $paragraph ) {
|
||||
$this->start_tag( 'p' );
|
||||
|
||||
$paragraph = ltrim( $paragraph );
|
||||
|
||||
$paragraph = self::normalize_paragraph(
|
||||
$paragraph,
|
||||
$this->options['auto_br']
|
||||
);
|
||||
|
||||
$this->output .= $paragraph;
|
||||
}
|
||||
}
|
||||
|
||||
// Close <p> if the content ends with multiple line breaks.
|
||||
if ( preg_match( '/\s*\n\s*\n\s*$/', $content ) ) {
|
||||
$this->end_tag( 'p' );
|
||||
}
|
||||
|
||||
// Cases where the content is a single line break.
|
||||
if ( preg_match( '/^\s*\n\s*$/', $content ) ) {
|
||||
$auto_br = $this->options['auto_br'] && $this->is_inside( 'p' );
|
||||
|
||||
$content = self::normalize_paragraph( $content, $auto_br );
|
||||
|
||||
$this->output .= $content;
|
||||
}
|
||||
} else {
|
||||
$auto_br = $this->options['auto_br'] &&
|
||||
$this->has_parent( self::br_parent_elements );
|
||||
|
||||
$content = self::normalize_paragraph( $content, $auto_br );
|
||||
|
||||
$this->output .= $content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Appends a start tag to the output property.
|
||||
*
|
||||
* @param string $tag A start tag.
|
||||
*/
|
||||
public function start_tag( $tag ) {
|
||||
list( $tag, $tag_name ) = self::normalize_start_tag( $tag );
|
||||
|
||||
if ( in_array( $tag_name, self::p_child_elements ) ) {
|
||||
if (
|
||||
! $this->is_inside( 'p' ) and
|
||||
! $this->is_inside( self::p_child_elements ) and
|
||||
! $this->has_parent( self::p_nonparent_elements )
|
||||
) {
|
||||
// Open <p> if it does not exist.
|
||||
$this->start_tag( 'p' );
|
||||
}
|
||||
} elseif (
|
||||
'p' === $tag_name or
|
||||
in_array( $tag_name, self::p_parent_elements ) or
|
||||
in_array( $tag_name, self::p_nonparent_elements )
|
||||
) {
|
||||
// Close <p> if it exists.
|
||||
$this->end_tag( 'p' );
|
||||
}
|
||||
|
||||
if ( 'dd' === $tag_name or 'dt' === $tag_name ) {
|
||||
// Close <dd> and <dt> if closing tag is omitted.
|
||||
$this->end_tag( 'dd' );
|
||||
$this->end_tag( 'dt' );
|
||||
}
|
||||
|
||||
if ( 'li' === $tag_name ) {
|
||||
// Close <li> if closing tag is omitted.
|
||||
$this->end_tag( 'li' );
|
||||
}
|
||||
|
||||
if ( 'optgroup' === $tag_name ) {
|
||||
// Close <option> and <optgroup> if closing tag is omitted.
|
||||
$this->end_tag( 'option' );
|
||||
$this->end_tag( 'optgroup' );
|
||||
}
|
||||
|
||||
if ( 'option' === $tag_name ) {
|
||||
// Close <option> if closing tag is omitted.
|
||||
$this->end_tag( 'option' );
|
||||
}
|
||||
|
||||
if ( 'rp' === $tag_name or 'rt' === $tag_name ) {
|
||||
// Close <rp> and <rt> if closing tag is omitted.
|
||||
$this->end_tag( 'rp' );
|
||||
$this->end_tag( 'rt' );
|
||||
}
|
||||
|
||||
if ( 'td' === $tag_name or 'th' === $tag_name ) {
|
||||
// Close <td> and <th> if closing tag is omitted.
|
||||
$this->end_tag( 'td' );
|
||||
$this->end_tag( 'th' );
|
||||
}
|
||||
|
||||
if ( 'tr' === $tag_name ) {
|
||||
// Close <tr> if closing tag is omitted.
|
||||
$this->end_tag( 'tr' );
|
||||
}
|
||||
|
||||
if ( 'tbody' === $tag_name or 'tfoot' === $tag_name ) {
|
||||
// Close <thead> if closing tag is omitted.
|
||||
$this->end_tag( 'thead' );
|
||||
}
|
||||
|
||||
if ( 'tfoot' === $tag_name ) {
|
||||
// Close <tbody> if closing tag is omitted.
|
||||
$this->end_tag( 'tbody' );
|
||||
}
|
||||
|
||||
if ( ! in_array( $tag_name, self::void_elements ) ) {
|
||||
array_unshift( $this->stacked_elements, $tag_name );
|
||||
}
|
||||
|
||||
if ( ! in_array( $tag_name, self::p_child_elements ) ) {
|
||||
if ( '' !== $this->output ) {
|
||||
$this->output = rtrim( $this->output ) . "\n";
|
||||
}
|
||||
|
||||
if ( $this->options['auto_indent'] ) {
|
||||
$this->output .= self::indent( count( $this->stacked_elements ) - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
$this->output .= $tag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Closes an element and its open descendants at a time.
|
||||
*
|
||||
* @param string $tag An end tag.
|
||||
*/
|
||||
public function end_tag( $tag ) {
|
||||
if ( preg_match( '/<\/(.+?)(?:\s|>)/', $tag, $matches ) ) {
|
||||
$tag_name = strtolower( $matches[1] );
|
||||
} else {
|
||||
$tag_name = strtolower( $tag );
|
||||
}
|
||||
|
||||
$stacked_elements = array_values( $this->stacked_elements );
|
||||
|
||||
$tag_position = array_search( $tag_name, $stacked_elements );
|
||||
|
||||
if ( false === $tag_position ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Element groups that make up an indirect nesting structure.
|
||||
// Descendant can contain ancestors.
|
||||
static $nesting_families = array(
|
||||
array(
|
||||
'ancestors' => array( 'dl', ),
|
||||
'descendants' => array( 'dd', 'dt', ),
|
||||
),
|
||||
array(
|
||||
'ancestors' => array( 'ol', 'ul', 'menu', ),
|
||||
'descendants' => array( 'li', ),
|
||||
),
|
||||
array(
|
||||
'ancestors' => array( 'table', ),
|
||||
'descendants' => array( 'td', 'th', 'tr', 'thead', 'tbody', 'tfoot', ),
|
||||
),
|
||||
);
|
||||
|
||||
foreach ( $nesting_families as $family ) {
|
||||
$ancestors = (array) $family['ancestors'];
|
||||
$descendants = (array) $family['descendants'];
|
||||
|
||||
if ( in_array( $tag_name, $descendants ) ) {
|
||||
$intersect = array_intersect(
|
||||
$ancestors,
|
||||
array_slice( $stacked_elements, 0, $tag_position )
|
||||
);
|
||||
|
||||
if ( $intersect ) { // Ancestor appears after descendant.
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while ( $element = array_shift( $this->stacked_elements ) ) {
|
||||
$this->append_end_tag( $element );
|
||||
|
||||
if ( $element === $tag_name ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Closes all open tags.
|
||||
*/
|
||||
public function close_all_tags() {
|
||||
while ( $element = array_shift( $this->stacked_elements ) ) {
|
||||
$this->append_end_tag( $element );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Appends an end tag to the output property.
|
||||
*
|
||||
* @param string $tag_name Tag name.
|
||||
*/
|
||||
public function append_end_tag( $tag_name ) {
|
||||
if ( ! in_array( $tag_name, self::p_child_elements ) ) {
|
||||
// Remove unnecessary <br />.
|
||||
$this->output = preg_replace( '/\s*<br \/>\s*$/', '', $this->output );
|
||||
|
||||
$this->output = rtrim( $this->output ) . "\n";
|
||||
|
||||
if ( $this->options['auto_indent'] ) {
|
||||
$this->output .= self::indent( count( $this->stacked_elements ) );
|
||||
}
|
||||
}
|
||||
|
||||
$this->output .= sprintf( '</%s>', $tag_name );
|
||||
|
||||
// Remove trailing <p></p>.
|
||||
$this->output = preg_replace( '/<p>\s*<\/p>$/', '', $this->output );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Appends an HTML comment to the output property.
|
||||
*
|
||||
* @param string $tag An HTML comment.
|
||||
*/
|
||||
public function append_comment( $tag ) {
|
||||
$this->output .= $tag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if it is currently inside one of HTML elements specified
|
||||
* by tag names.
|
||||
*
|
||||
* @param string|array $tag_names A tag name or an array of tag names.
|
||||
*/
|
||||
public function is_inside( $tag_names ) {
|
||||
$tag_names = (array) $tag_names;
|
||||
|
||||
foreach ( $this->stacked_elements as $element ) {
|
||||
if ( in_array( $element, $tag_names ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the parent node is one of HTML elements specified
|
||||
* by tag names.
|
||||
*
|
||||
* @param string|array $tag_names A tag name or an array of tag names.
|
||||
*/
|
||||
public function has_parent( $tag_names ) {
|
||||
$tag_names = (array) $tag_names;
|
||||
|
||||
$parent = reset( $this->stacked_elements );
|
||||
|
||||
if ( false === $parent ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return in_array( $parent, $tag_names );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculates the position of the next chunk based on the position and
|
||||
* length of the current chunk.
|
||||
*
|
||||
* @param array $chunk An associative array of the current chunk.
|
||||
* @return int The position of the next chunk.
|
||||
*/
|
||||
public static function calc_next_position( $chunk ) {
|
||||
return $chunk['position'] + strlen( $chunk['content'] );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Outputs a set of tabs to indent.
|
||||
*
|
||||
* @param int $level Indentation level.
|
||||
* @return string A series of tabs.
|
||||
*/
|
||||
public static function indent( $level ) {
|
||||
$level = (int) $level;
|
||||
|
||||
if ( 0 < $level ) {
|
||||
return str_repeat( "\t", $level );
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Normalizes a start tag.
|
||||
*
|
||||
* @param string $tag A start tag or a tag name.
|
||||
* @return array An array includes the normalized start tag and tag name.
|
||||
*/
|
||||
public static function normalize_start_tag( $tag ) {
|
||||
if ( preg_match( '/<(.+?)[\s\/>]/', $tag, $matches ) ) {
|
||||
$tag_name = strtolower( $matches[1] );
|
||||
} else {
|
||||
$tag_name = strtolower( $tag );
|
||||
$tag = sprintf( '<%s>', $tag_name );
|
||||
}
|
||||
|
||||
if ( in_array( $tag_name, self::void_elements ) ) {
|
||||
// Normalize void element.
|
||||
$tag = preg_replace( '/\s*\/?>/', ' />', $tag );
|
||||
}
|
||||
|
||||
return array( $tag, $tag_name );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Normalizes a paragraph of text.
|
||||
*
|
||||
* @param string $paragraph A paragraph of text.
|
||||
* @param bool $auto_br Optional. If true, line breaks will be replaced
|
||||
* by a br element.
|
||||
* @return string The normalized paragraph.
|
||||
*/
|
||||
public static function normalize_paragraph( $paragraph, $auto_br = false ) {
|
||||
if ( $auto_br ) {
|
||||
$paragraph = preg_replace( '/\s*\n\s*/', "<br />\n", $paragraph );
|
||||
}
|
||||
|
||||
$paragraph = preg_replace( '/[ ]+/', " ", $paragraph );
|
||||
|
||||
return $paragraph;
|
||||
}
|
||||
|
||||
}
|
||||
432
wp-content/plugins/contact-form-7/includes/integration.php
Normal file
@@ -0,0 +1,432 @@
|
||||
<?php
|
||||
/**
|
||||
* Integration API
|
||||
*
|
||||
* @link https://contactform7.com/integration-with-external-apis/
|
||||
*/
|
||||
|
||||
class WPCF7_Integration {
|
||||
|
||||
private static $instance;
|
||||
|
||||
private $services = array();
|
||||
private $categories = array();
|
||||
|
||||
private function __construct() {}
|
||||
|
||||
|
||||
/**
|
||||
* Returns initially supported service categories.
|
||||
*
|
||||
* @return array Service categories.
|
||||
*/
|
||||
public static function get_builtin_categories() {
|
||||
return array(
|
||||
'spam_protection' => __( 'Spam protection', 'contact-form-7' ),
|
||||
'email_marketing' => __( 'Email marketing', 'contact-form-7' ),
|
||||
'payments' => __( 'Payments', 'contact-form-7' ),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the singleton instance of this class.
|
||||
*
|
||||
* @return WPCF7_Integration The instance.
|
||||
*/
|
||||
public static function get_instance() {
|
||||
if ( empty( self::$instance ) ) {
|
||||
self::$instance = new self;
|
||||
self::$instance->categories = self::get_builtin_categories();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a service to the services list.
|
||||
*/
|
||||
public function add_service( $name, WPCF7_Service $service ) {
|
||||
$name = sanitize_key( $name );
|
||||
|
||||
if ( empty( $name )
|
||||
or isset( $this->services[$name] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->services[$name] = $service;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a service category to the categories list.
|
||||
*/
|
||||
public function add_category( $name, $title ) {
|
||||
$name = sanitize_key( $name );
|
||||
|
||||
if ( empty( $name )
|
||||
or isset( $this->categories[$name] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->categories[$name] = $title;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if a service with the name exists in the services list.
|
||||
*
|
||||
* @param string $name The name of service to search.
|
||||
*/
|
||||
public function service_exists( $name = '' ) {
|
||||
if ( '' == $name ) {
|
||||
return (bool) count( $this->services );
|
||||
} else {
|
||||
return isset( $this->services[$name] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a service object with the name.
|
||||
*
|
||||
* @param string $name The name of service.
|
||||
* @return WPCF7_Service|bool The service object if it exists,
|
||||
* false otherwise.
|
||||
*/
|
||||
public function get_service( $name ) {
|
||||
if ( $this->service_exists( $name ) ) {
|
||||
return $this->services[$name];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints services list.
|
||||
*/
|
||||
public function list_services( $args = '' ) {
|
||||
$args = wp_parse_args( $args, array(
|
||||
'include' => array(),
|
||||
) );
|
||||
|
||||
$singular = false;
|
||||
$services = (array) $this->services;
|
||||
|
||||
if ( ! empty( $args['include'] ) ) {
|
||||
$services = array_intersect_key( $services,
|
||||
array_flip( (array) $args['include'] )
|
||||
);
|
||||
|
||||
if ( 1 == count( $services ) ) {
|
||||
$singular = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( empty( $services ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$action = wpcf7_current_action();
|
||||
|
||||
foreach ( $services as $name => $service ) {
|
||||
$cats = array_intersect_key( $this->categories,
|
||||
array_flip( $service->get_categories() )
|
||||
);
|
||||
?>
|
||||
<div class="card<?php echo $service->is_active() ? ' active' : ''; ?>" id="<?php echo esc_attr( $name ); ?>">
|
||||
<?php $service->icon(); ?>
|
||||
<h2 class="title"><?php echo esc_html( $service->get_title() ); ?></h2>
|
||||
<div class="infobox">
|
||||
<?php echo esc_html( implode( ', ', $cats ) ); ?>
|
||||
<br />
|
||||
<?php $service->link(); ?>
|
||||
</div>
|
||||
<br class="clear" />
|
||||
|
||||
<div class="inside">
|
||||
<?php
|
||||
if ( $singular ) {
|
||||
$service->display( $action );
|
||||
} else {
|
||||
$service->display();
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Abstract class for services.
|
||||
*
|
||||
* Only instances of this class's subclasses are allowed to be
|
||||
* listed on the Integration page.
|
||||
*/
|
||||
abstract class WPCF7_Service {
|
||||
|
||||
abstract public function get_title();
|
||||
abstract public function is_active();
|
||||
|
||||
|
||||
public function get_categories() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
public function icon() {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
public function link() {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
public function load( $action = '' ) {
|
||||
}
|
||||
|
||||
|
||||
public function display( $action = '' ) {
|
||||
}
|
||||
|
||||
|
||||
public function admin_notice( $message = '' ) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Class for services that use OAuth.
|
||||
*
|
||||
* While this is not an abstract class, subclassing this class for
|
||||
* your aim is advised.
|
||||
*/
|
||||
class WPCF7_Service_OAuth2 extends WPCF7_Service {
|
||||
|
||||
protected $client_id = '';
|
||||
protected $client_secret = '';
|
||||
protected $access_token = '';
|
||||
protected $refresh_token = '';
|
||||
protected $authorization_endpoint = 'https://example.com/authorization';
|
||||
protected $token_endpoint = 'https://example.com/token';
|
||||
|
||||
|
||||
public function get_title() {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
public function is_active() {
|
||||
return ! empty( $this->refresh_token );
|
||||
}
|
||||
|
||||
|
||||
protected function save_data() {
|
||||
}
|
||||
|
||||
|
||||
protected function reset_data() {
|
||||
}
|
||||
|
||||
|
||||
protected function get_redirect_uri() {
|
||||
return admin_url();
|
||||
}
|
||||
|
||||
|
||||
protected function menu_page_url( $args = '' ) {
|
||||
return menu_page_url( 'wpcf7-integration', false );
|
||||
}
|
||||
|
||||
|
||||
public function load( $action = '' ) {
|
||||
if ( 'auth_redirect' === $action ) {
|
||||
$code = $_GET['code'] ?? '';
|
||||
|
||||
if ( $code ) {
|
||||
$this->request_token( $code );
|
||||
}
|
||||
|
||||
if ( ! empty( $this->access_token ) ) {
|
||||
$message = 'success';
|
||||
} else {
|
||||
$message = 'failed';
|
||||
}
|
||||
|
||||
wp_safe_redirect( $this->menu_page_url(
|
||||
array(
|
||||
'action' => 'setup',
|
||||
'message' => $message,
|
||||
)
|
||||
) );
|
||||
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function authorize( $scope = '' ) {
|
||||
$endpoint = add_query_arg(
|
||||
array(
|
||||
'response_type' => 'code',
|
||||
'client_id' => $this->client_id,
|
||||
'redirect_uri' => urlencode( $this->get_redirect_uri() ),
|
||||
'scope' => $scope,
|
||||
),
|
||||
$this->authorization_endpoint
|
||||
);
|
||||
|
||||
if ( wp_redirect( sanitize_url( $endpoint ) ) ) {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function get_http_authorization_header( $scheme = 'basic' ) {
|
||||
$scheme = strtolower( trim( $scheme ) );
|
||||
|
||||
switch ( $scheme ) {
|
||||
case 'bearer':
|
||||
return sprintf( 'Bearer %s', $this->access_token );
|
||||
case 'basic':
|
||||
default:
|
||||
return sprintf( 'Basic %s',
|
||||
base64_encode( $this->client_id . ':' . $this->client_secret )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function request_token( $authorization_code ) {
|
||||
$endpoint = add_query_arg(
|
||||
array(
|
||||
'code' => $authorization_code,
|
||||
'redirect_uri' => urlencode( $this->get_redirect_uri() ),
|
||||
'grant_type' => 'authorization_code',
|
||||
),
|
||||
$this->token_endpoint
|
||||
);
|
||||
|
||||
$request = array(
|
||||
'headers' => array(
|
||||
'Authorization' => $this->get_http_authorization_header( 'basic' ),
|
||||
),
|
||||
);
|
||||
|
||||
$response = wp_remote_post( sanitize_url( $endpoint ), $request );
|
||||
$response_code = (int) wp_remote_retrieve_response_code( $response );
|
||||
$response_body = wp_remote_retrieve_body( $response );
|
||||
$response_body = json_decode( $response_body, true );
|
||||
|
||||
if ( WP_DEBUG and 400 <= $response_code ) {
|
||||
$this->log( $endpoint, $request, $response );
|
||||
}
|
||||
|
||||
if ( 401 == $response_code ) { // Unauthorized
|
||||
$this->access_token = null;
|
||||
$this->refresh_token = null;
|
||||
} else {
|
||||
if ( isset( $response_body['access_token'] ) ) {
|
||||
$this->access_token = $response_body['access_token'];
|
||||
} else {
|
||||
$this->access_token = null;
|
||||
}
|
||||
|
||||
if ( isset( $response_body['refresh_token'] ) ) {
|
||||
$this->refresh_token = $response_body['refresh_token'];
|
||||
} else {
|
||||
$this->refresh_token = null;
|
||||
}
|
||||
}
|
||||
|
||||
$this->save_data();
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
protected function refresh_token() {
|
||||
$endpoint = add_query_arg(
|
||||
array(
|
||||
'refresh_token' => $this->refresh_token,
|
||||
'grant_type' => 'refresh_token',
|
||||
),
|
||||
$this->token_endpoint
|
||||
);
|
||||
|
||||
$request = array(
|
||||
'headers' => array(
|
||||
'Authorization' => $this->get_http_authorization_header( 'basic' ),
|
||||
),
|
||||
);
|
||||
|
||||
$response = wp_remote_post( sanitize_url( $endpoint ), $request );
|
||||
$response_code = (int) wp_remote_retrieve_response_code( $response );
|
||||
$response_body = wp_remote_retrieve_body( $response );
|
||||
$response_body = json_decode( $response_body, true );
|
||||
|
||||
if ( WP_DEBUG and 400 <= $response_code ) {
|
||||
$this->log( $endpoint, $request, $response );
|
||||
}
|
||||
|
||||
if ( 401 == $response_code ) { // Unauthorized
|
||||
$this->access_token = null;
|
||||
$this->refresh_token = null;
|
||||
} else {
|
||||
if ( isset( $response_body['access_token'] ) ) {
|
||||
$this->access_token = $response_body['access_token'];
|
||||
} else {
|
||||
$this->access_token = null;
|
||||
}
|
||||
|
||||
if ( isset( $response_body['refresh_token'] ) ) {
|
||||
$this->refresh_token = $response_body['refresh_token'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->save_data();
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
protected function remote_request( $url, $request = array() ) {
|
||||
static $refreshed = false;
|
||||
|
||||
$request = wp_parse_args( $request, array() );
|
||||
|
||||
$request['headers'] = array_merge(
|
||||
$request['headers'],
|
||||
array(
|
||||
'Authorization' => $this->get_http_authorization_header( 'bearer' ),
|
||||
)
|
||||
);
|
||||
|
||||
$response = wp_remote_request( sanitize_url( $url ), $request );
|
||||
|
||||
if ( 401 === wp_remote_retrieve_response_code( $response )
|
||||
and ! $refreshed ) {
|
||||
$this->refresh_token();
|
||||
$refreshed = true;
|
||||
|
||||
$response = $this->remote_request( $url, $request );
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
protected function log( $url, $request, $response ) {
|
||||
wpcf7_log_remote_request( $url, $request, $response );
|
||||
}
|
||||
|
||||
}
|
||||