summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2019-05-22 00:54:36 -0400
committerYury German <blueknight@gentoo.org>2019-05-22 00:54:36 -0400
commit1885405d20bcfdcd83b39d93c90d1af4b4424ce0 (patch)
tree6a42a05a30ab0b79fca246a1c1a00688a03ed98b
parentUpdating of Plugins and Themes (diff)
downloadblogs-gentoo-1885405d20bcfdcd83b39d93c90d1af4b4424ce0.tar.gz
blogs-gentoo-1885405d20bcfdcd83b39d93c90d1af4b4424ce0.tar.bz2
blogs-gentoo-1885405d20bcfdcd83b39d93c90d1af4b4424ce0.zip
Deleting plugins for update
Signed-off-by: Yury German <blueknight@gentoo.org>
-rw-r--r--plugins/akismet/.htaccess34
-rw-r--r--plugins/akismet/LICENSE.txt339
-rw-r--r--plugins/akismet/_inc/akismet.css625
-rw-r--r--plugins/akismet/_inc/akismet.js308
-rw-r--r--plugins/akismet/_inc/form.js30
-rw-r--r--plugins/akismet/_inc/img/logo-full-2x.pngbin5052 -> 0 bytes
-rw-r--r--plugins/akismet/akismet.php66
-rw-r--r--plugins/akismet/class.akismet-admin.php1244
-rw-r--r--plugins/akismet/class.akismet-cli.php185
-rw-r--r--plugins/akismet/class.akismet-rest-api.php366
-rw-r--r--plugins/akismet/class.akismet-widget.php114
-rw-r--r--plugins/akismet/class.akismet.php1423
-rw-r--r--plugins/akismet/index.php2
-rw-r--r--plugins/akismet/readme.txt466
-rw-r--r--plugins/akismet/views/config.php242
-rw-r--r--plugins/akismet/views/get.php12
-rw-r--r--plugins/akismet/views/notice.php141
-rw-r--r--plugins/akismet/views/start.php102
-rw-r--r--plugins/akismet/views/stats.php11
-rw-r--r--plugins/akismet/wrapper.php214
-rw-r--r--plugins/google-authenticator/LICENSE339
-rw-r--r--plugins/google-authenticator/base32.php82
-rw-r--r--plugins/google-authenticator/google-authenticator.php1007
-rw-r--r--plugins/google-authenticator/jquery.qrcode.min.js28
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-da_DK.mobin2736 -> 0 bytes
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-da_DK.po113
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-de_DE.mobin2565 -> 0 bytes
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-de_DE.po119
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-es_ES.mobin2749 -> 0 bytes
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-es_ES.po131
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-fr_FR.mobin2635 -> 0 bytes
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-fr_FR.po133
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-it_IT.mobin3324 -> 0 bytes
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-it_IT.po143
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-nl_NL.mobin7309 -> 0 bytes
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-nl_NL.po317
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-pt_BR.mobin2971 -> 0 bytes
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-pt_BR.po123
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-zh_CN.mobin3026 -> 0 bytes
-rw-r--r--plugins/google-authenticator/lang/google-authenticator-zh_CN.po126
-rw-r--r--plugins/google-authenticator/lang/google-authenticator.pot260
-rw-r--r--plugins/google-authenticator/readme.txt194
-rw-r--r--plugins/google-authenticator/screenshot-1.jpgbin28821 -> 0 bytes
-rw-r--r--plugins/google-authenticator/screenshot-2.jpgbin101559 -> 0 bytes
-rw-r--r--plugins/google-authenticator/screenshot-3.jpgbin148800 -> 0 bytes
-rw-r--r--plugins/google-authenticator/screenshot-4.jpgbin64993 -> 0 bytes
-rw-r--r--plugins/google-authenticator/screenshot-5.jpgbin24141 -> 0 bytes
47 files changed, 0 insertions, 9039 deletions
diff --git a/plugins/akismet/.htaccess b/plugins/akismet/.htaccess
deleted file mode 100644
index 49d72d71..00000000
--- a/plugins/akismet/.htaccess
+++ /dev/null
@@ -1,34 +0,0 @@
-# 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\.js|akismet\.css)$">
- <IfModule !mod_authz_core.c>
- Allow from all
- </IfModule>
-
- <IfModule mod_authz_core.c>
- Require all granted
- </IfModule>
-</FilesMatch>
-
-# Akismet images
-<FilesMatch "^logo-full-2x\.png$">
- <IfModule !mod_authz_core.c>
- Allow from all
- </IfModule>
-
- <IfModule mod_authz_core.c>
- Require all granted
- </IfModule>
-</FilesMatch> \ No newline at end of file
diff --git a/plugins/akismet/LICENSE.txt b/plugins/akismet/LICENSE.txt
deleted file mode 100644
index d159169d..00000000
--- a/plugins/akismet/LICENSE.txt
+++ /dev/null
@@ -1,339 +0,0 @@
- 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.
diff --git a/plugins/akismet/_inc/akismet.css b/plugins/akismet/_inc/akismet.css
deleted file mode 100644
index bc56f061..00000000
--- a/plugins/akismet/_inc/akismet.css
+++ /dev/null
@@ -1,625 +0,0 @@
-.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-progress {
- display: none;
-}
-.checkforspam.checking .checkforspam-progress {
- padding-left: 1ex;
-}
-.checkforspam.button-disabled .checkforspam-progress {
- display: inline;
-}
-
-.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-alert {
- border: 1px solid #e5e5e5;
- padding: 0.4em 1em 1.4em 1em;
- border-radius: 3px;
- -webkit-border-radius: 3px;
- border-width: 1px;
- border-style: solid;
-}
-
-.akismet-alert h3.akismet-key-status {
- color: #fff;
- margin: 1em 0 0.5em 0;
-}
-
-.akismet-alert.akismet-critical {
- background-color: #993300;
-}
-
-.akismet-alert.akismet-active {
- background-color: #649316;
-}
-
-.akismet-alert p.akismet-key-status {
- font-size: 24px;
-}
-
-.akismet-alert p.akismet-description {
- color:#fff;
- font-size: 14px;
- margin: 0 0;
- font-style: normal;
-}
-
-.akismet-alert p.akismet-description a,
-.akismet-alert p.akismet-description a,
-.akismet-alert p.akismet-description a,
-.akismet-alert p.akismet-description a {
- color: #fff;
-}
-
-.akismet-new-snapshot {
- margin-top: 1em;
- padding: 1em;
- text-align: center;
- background: #fff;
-}
-
-.akismet-new-snapshot h3 {
- background: #f5f5f5;
- color: #888;
- font-size: 11px;
- margin: 0;
- padding: 3px;
-}
-
-.new-snapspot ul {
- font-size: 12px;
- width: 100%;
-}
-
-.akismet-new-snapshot ul li {
- color: #999;
- float: left;
- font-size: 11px;
- padding: 0 20px;
- text-transform: uppercase;
- width: 33%;
- box-sizing: border-box;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -ms-box-sizing: border-box;
-}
-
-.akismet-new-snapshot ul li:first-child,
-.akismet-new-snapshot ul li:nth-child(2) {
- border-right:1px dotted #ccc;
-}
-
-.akismet-new-snapshot ul li span {
- color: #52accc;
- 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 input[type=text] {
- width: 75%;
-}
-
-.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 {
- width:10.375rem;
- height:1.8125rem;
-}
-.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;
- margin: 0 auto 0.625rem auto;
- box-sizing: border-box;
- background: white;
- box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3;
-}
-
-.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-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;
-}
diff --git a/plugins/akismet/_inc/akismet.js b/plugins/akismet/_inc/akismet.js
deleted file mode 100644
index 6cb85e6c..00000000
--- a/plugins/akismet/_inc/akismet.js
+++ /dev/null
@@ -1,308 +0,0 @@
-jQuery( function ( $ ) {
- var mshotRemovalTimer = null;
- var mshotSecondTryTimer = null
- var mshotThirdTryTimer = null
-
- var mshotEnabledLinkSelector = 'a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type, td.comment p a';
-
- $('.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.
- $( '#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( mshotSecondTryTimer );
- clearTimeout( mshotThirdTryTimer );
-
- var thisHref = $( this ).attr( 'href' );
-
- var mShot = $( '<div class="akismet-mshot mshot-container"><div class="mshot-arrow"></div><img src="' + akismet_mshot_url( thisHref ) + '" width="450" height="338" class="mshot-image" /></div>' );
- mShot.data( 'link', this );
-
- 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
- } );
-
- // These retries appear to be superfluous if .mshot-image has already loaded, but it's because mShots
- // can return a "Generating thumbnail..." image if it doesn't have a thumbnail ready, so we need
- // to retry to see if we can get the newly generated thumbnail.
- mshotSecondTryTimer = setTimeout( function () {
- mShot.find( '.mshot-image' ).attr( 'src', akismet_mshot_url( thisHref, 2 ) );
- }, 6000 );
-
- mshotThirdTryTimer = setTimeout( function () {
- mShot.find( '.mshot-image' ).attr( 'src', akismet_mshot_url( thisHref, 3 ) );
- }, 12000 );
-
- $( 'body' ).append( mShot );
- } ).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( mshotSecondTryTimer );
- clearTimeout( mshotThirdTryTimer );
-
- $( '.akismet-mshot' ).remove();
- }, 200 );
- } ).on( 'mouseover', 'tr', function () {
- // When the mouse hovers over a comment row, begin preloading mshots for any links in the comment or the comment author.
- var linksToPreloadMshotsFor = $( this ).find( mshotEnabledLinkSelector );
-
- linksToPreloadMshotsFor.each( function () {
- // Don't attempt to preload an mshot for a single link twice. Browser caching should cover this, but in case of
- // race conditions, save a flag locally when we've begun trying to preload one.
- if ( ! $( this ).data( 'akismet-mshot-preloaded' ) ) {
- akismet_preload_mshot( $( this ).attr( 'href' ) );
- $( this ).data( 'akismet-mshot-preloaded', true );
- }
- } );
- } );
-
- $( '.checkforspam' ).click( function( e ) {
- 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' );
-
- // Update the label on the "Check for Spam" button to use the active "Checking for Spam" language.
- $( '.checkforspam .akismet-label' ).text( $( '.checkforspam' ).data( 'active-label' ) );
-
- akismet_check_for_spam(0, 100);
- });
-
- var spam_count = 0;
- var recheck_count = 0;
-
- function akismet_check_for_spam(offset, limit) {
- var check_for_spam_buttons = $( '.checkforspam' );
-
- // 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-progress' ).text( check_for_spam_buttons.data( 'progress-label-format' ).replace( '%1$s', percentage_complete ) );
-
- $.post(
- ajaxurl,
- {
- 'action': 'akismet_recheck_queue',
- 'offset': offset,
- 'limit': limit
- },
- function(result) {
- 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.wordpress.com/mshots/v1/' + encodeURIComponent( linkUrl ) + '?w=900';
-
- if ( retry ) {
- mshotUrl += '&r=' + encodeURIComponent( retry );
- }
-
- 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 );
- }
-
- /**
- * Sets the comment form privacy notice display to hide when one clicks Core's dismiss button on the related admin notice.
- */
- $( '#akismet-privacy-notice-admin-notice' ).on( 'click', '.notice-dismiss', function(){
- $.ajax({
- url: './options-general.php?page=akismet-key-config&akismet_comment_form_privacy_notice=hide',
- });
- });
-
- $( ".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" );
- }
- } );
- } );
-});
diff --git a/plugins/akismet/_inc/form.js b/plugins/akismet/_inc/form.js
deleted file mode 100644
index 3a5be8af..00000000
--- a/plugins/akismet/_inc/form.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var ak_js = document.getElementById( "ak_js" );
-
-if ( ! ak_js ) {
- ak_js = document.createElement( 'input' );
- ak_js.setAttribute( 'id', 'ak_js' );
- ak_js.setAttribute( 'name', 'ak_js' );
- ak_js.setAttribute( 'type', 'hidden' );
-}
-else {
- ak_js.parentNode.removeChild( ak_js );
-}
-
-ak_js.setAttribute( 'value', ( new Date() ).getTime() );
-
-var commentForm = document.getElementById( 'commentform' );
-
-if ( commentForm ) {
- commentForm.appendChild( ak_js );
-}
-else {
- var replyRowContainer = document.getElementById( 'replyrow' );
-
- if ( replyRowContainer ) {
- var children = replyRowContainer.getElementsByTagName( 'td' );
-
- if ( children.length > 0 ) {
- children[0].appendChild( ak_js );
- }
- }
-} \ No newline at end of file
diff --git a/plugins/akismet/_inc/img/logo-full-2x.png b/plugins/akismet/_inc/img/logo-full-2x.png
deleted file mode 100644
index 79545854..00000000
--- a/plugins/akismet/_inc/img/logo-full-2x.png
+++ /dev/null
Binary files differ
diff --git a/plugins/akismet/akismet.php b/plugins/akismet/akismet.php
deleted file mode 100644
index 49608e5a..00000000
--- a/plugins/akismet/akismet.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * @package Akismet
- */
-/*
-Plugin Name: Akismet Anti-Spam
-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>. It 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: 4.1.2
-Author: Automattic
-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-2015 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', '4.1.2' );
-define( 'AKISMET__MINIMUM_WP_VERSION', '4.0' );
-define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
-define( 'AKISMET_DELETE_LIMIT', 100000 );
-
-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' );
-}
diff --git a/plugins/akismet/class.akismet-admin.php b/plugins/akismet/class.akismet-admin.php
deleted file mode 100644
index f0766ebe..00000000
--- a/plugins/akismet/class.akismet-admin.php
+++ /dev/null
@@ -1,1244 +0,0 @@
-<?php
-
-class Akismet_Admin {
- const NONCE = 'akismet-update-key';
-
- private static $initiated = false;
- private static $notices = array();
- private static $allowed = array(
- 'a' => array(
- 'href' => true,
- 'title' => true,
- ),
- 'b' => array(),
- 'code' => array(),
- 'del' => array(
- 'datetime' => true,
- ),
- 'em' => array(),
- 'i' => array(),
- 'q' => array(
- 'cite' => true,
- ),
- 'strike' => array(),
- 'strong' => array(),
- );
-
- public static function init() {
- if ( ! self::$initiated ) {
- self::init_hooks();
- }
-
- if ( isset( $_POST['action'] ) && $_POST['action'] == 'enter-key' ) {
- self::enter_api_key();
- }
-
- if ( ! empty( $_GET['akismet_comment_form_privacy_notice'] ) && empty( $_GET['settings-updated']) ) {
- self::set_form_privacy_notice_option( $_GET['akismet_comment_form_privacy_notice'] );
- }
- }
-
- public static function init_hooks() {
- // The standalone stats page was removed in 3.0 for an all-in-one config and stats page.
- // Redirect any links that might have been bookmarked or in browser history.
- if ( isset( $_GET['page'] ) && 'akismet-stats-display' == $_GET['page'] ) {
- wp_safe_redirect( esc_url_raw( self::get_page_url( 'stats' ) ), 301 );
- die;
- }
-
- self::$initiated = true;
-
- add_action( 'admin_init', array( 'Akismet_Admin', 'admin_init' ) );
- add_action( 'admin_menu', array( 'Akismet_Admin', 'admin_menu' ), 5 ); # Priority 5, so it's called before Jetpack's admin_menu.
- add_action( 'admin_notices', array( 'Akismet_Admin', 'display_notice' ) );
- add_action( 'admin_enqueue_scripts', array( 'Akismet_Admin', 'load_resources' ) );
- add_action( 'activity_box_end', array( 'Akismet_Admin', 'dashboard_stats' ) );
- add_action( 'rightnow_end', array( 'Akismet_Admin', 'rightnow_stats' ) );
- add_action( 'manage_comments_nav', array( 'Akismet_Admin', 'check_for_spam_button' ) );
- add_action( 'admin_action_akismet_recheck_queue', array( 'Akismet_Admin', 'recheck_queue' ) );
- add_action( 'wp_ajax_akismet_recheck_queue', array( 'Akismet_Admin', 'recheck_queue' ) );
- add_action( 'wp_ajax_comment_author_deurl', array( 'Akismet_Admin', 'remove_comment_author_url' ) );
- add_action( 'wp_ajax_comment_author_reurl', array( 'Akismet_Admin', 'add_comment_author_url' ) );
- add_action( 'jetpack_auto_activate_akismet', array( 'Akismet_Admin', 'connect_jetpack_user' ) );
-
- add_filter( 'plugin_action_links', array( 'Akismet_Admin', 'plugin_action_links' ), 10, 2 );
- add_filter( 'comment_row_actions', array( 'Akismet_Admin', 'comment_row_action' ), 10, 2 );
-
- add_filter( 'plugin_action_links_'.plugin_basename( plugin_dir_path( __FILE__ ) . 'akismet.php'), array( 'Akismet_Admin', 'admin_plugin_settings_link' ) );
-
- add_filter( 'wxr_export_skip_commentmeta', array( 'Akismet_Admin', 'exclude_commentmeta_from_export' ), 10, 3 );
-
- add_filter( 'all_plugins', array( 'Akismet_Admin', 'modify_plugin_description' ) );
-
- if ( class_exists( 'Jetpack' ) ) {
- add_filter( 'akismet_comment_form_privacy_notice_url_display', array( 'Akismet_Admin', 'jetpack_comment_form_privacy_notice_url' ) );
- add_filter( 'akismet_comment_form_privacy_notice_url_hide', array( 'Akismet_Admin', 'jetpack_comment_form_privacy_notice_url' ) );
- }
-
- // priority=1 because we need ours to run before core's comment anonymizer runs, and that's registered at priority=10
- add_filter( 'wp_privacy_personal_data_erasers', array( 'Akismet_Admin', 'register_personal_data_eraser' ), 1 );
- }
-
- public static function admin_init() {
- load_plugin_textdomain( 'akismet' );
- add_meta_box( 'akismet-status', __('Comment History', 'akismet'), array( 'Akismet_Admin', 'comment_status_meta_box' ), 'comment', 'normal' );
-
- if ( function_exists( 'wp_add_privacy_policy_content' ) ) {
- wp_add_privacy_policy_content(
- __( 'Akismet', 'akismet' ),
- __( 'We collect information about visitors who comment on Sites that use our Akismet anti-spam service. The information we collect depends on how the User sets up Akismet for the Site, but typically includes the commenter\'s IP address, user agent, referrer, and Site URL (along with other information directly provided by the commenter such as their name, username, email address, and the comment itself).', 'akismet' )
- );
- }
- }
-
- public static function admin_menu() {
- if ( class_exists( 'Jetpack' ) )
- add_action( 'jetpack_admin_menu', array( 'Akismet_Admin', 'load_menu' ) );
- else
- self::load_menu();
- }
-
- public static function admin_head() {
- if ( !current_user_can( 'manage_options' ) )
- return;
- }
-
- public static function admin_plugin_settings_link( $links ) {
- $settings_link = '<a href="'.esc_url( self::get_page_url() ).'">'.__('Settings', 'akismet').'</a>';
- array_unshift( $links, $settings_link );
- return $links;
- }
-
- public static function load_menu() {
- if ( class_exists( 'Jetpack' ) ) {
- $hook = add_submenu_page( 'jetpack', __( 'Akismet Anti-Spam' , 'akismet'), __( 'Akismet Anti-Spam' , 'akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );
- }
- else {
- $hook = add_options_page( __('Akismet Anti-Spam', 'akismet'), __('Akismet Anti-Spam', 'akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );
- }
-
- if ( $hook ) {
- add_action( "load-$hook", array( 'Akismet_Admin', 'admin_help' ) );
- }
- }
-
- public static function load_resources() {
- global $hook_suffix;
-
- if ( in_array( $hook_suffix, apply_filters( 'akismet_admin_page_hook_suffixes', array(
- 'index.php', # dashboard
- 'edit-comments.php',
- 'comment.php',
- 'post.php',
- 'settings_page_akismet-key-config',
- 'jetpack_page_akismet-key-config',
- 'plugins.php',
- ) ) ) ) {
- wp_register_style( 'akismet.css', plugin_dir_url( __FILE__ ) . '_inc/akismet.css', array(), AKISMET_VERSION );
- wp_enqueue_style( 'akismet.css');
-
- wp_register_script( 'akismet.js', plugin_dir_url( __FILE__ ) . '_inc/akismet.js', array('jquery'), AKISMET_VERSION );
- wp_enqueue_script( 'akismet.js' );
-
- $inline_js = array(
- 'comment_author_url_nonce' => wp_create_nonce( 'comment_author_url_nonce' ),
- 'strings' => array(
- 'Remove this URL' => __( 'Remove this URL' , 'akismet'),
- 'Removing...' => __( 'Removing...' , 'akismet'),
- 'URL removed' => __( 'URL removed' , 'akismet'),
- '(undo)' => __( '(undo)' , 'akismet'),
- 'Re-adding...' => __( 'Re-adding...' , 'akismet'),
- )
- );
-
- if ( isset( $_GET['akismet_recheck'] ) && wp_verify_nonce( $_GET['akismet_recheck'], 'akismet_recheck' ) ) {
- $inline_js['start_recheck'] = true;
- }
-
- wp_localize_script( 'akismet.js', 'WPAkismet', $inline_js );
- }
- }
-
- /**
- * Add help to the Akismet page
- *
- * @return false if not the Akismet page
- */
- public static function admin_help() {
- $current_screen = get_current_screen();
-
- // Screen Content
- if ( current_user_can( 'manage_options' ) ) {
- if ( !Akismet::get_api_key() || ( isset( $_GET['view'] ) && $_GET['view'] == 'start' ) ) {
- //setup page
- $current_screen->add_help_tab(
- array(
- 'id' => 'overview',
- 'title' => __( 'Overview' , 'akismet'),
- 'content' =>
- '<p><strong>' . esc_html__( 'Akismet Setup' , 'akismet') . '</strong></p>' .
- '<p>' . esc_html__( 'Akismet filters out spam, so you can focus on more important things.' , 'akismet') . '</p>' .
- '<p>' . esc_html__( 'On this page, you are able to set up the Akismet plugin.' , 'akismet') . '</p>',
- )
- );
-
- $current_screen->add_help_tab(
- array(
- 'id' => 'setup-signup',
- 'title' => __( 'New to Akismet' , 'akismet'),
- 'content' =>
- '<p><strong>' . esc_html__( 'Akismet Setup' , 'akismet') . '</strong></p>' .
- '<p>' . esc_html__( 'You need to enter an API key to activate the Akismet service on your site.' , 'akismet') . '</p>' .
- '<p>' . sprintf( __( 'Sign up for an account on %s to get an API Key.' , 'akismet'), '<a href="https://akismet.com/plugin-signup/" target="_blank">Akismet.com</a>' ) . '</p>',
- )
- );
-
- $current_screen->add_help_tab(
- array(
- 'id' => 'setup-manual',
- 'title' => __( 'Enter an API Key' , 'akismet'),
- 'content' =>
- '<p><strong>' . esc_html__( 'Akismet Setup' , 'akismet') . '</strong></p>' .
- '<p>' . esc_html__( 'If you already have an API key' , 'akismet') . '</p>' .
- '<ol>' .
- '<li>' . esc_html__( 'Copy and paste the API key into the text field.' , 'akismet') . '</li>' .
- '<li>' . esc_html__( 'Click the Use this Key button.' , 'akismet') . '</li>' .
- '</ol>',
- )
- );
- }
- elseif ( isset( $_GET['view'] ) && $_GET['view'] == 'stats' ) {
- //stats page
- $current_screen->add_help_tab(
- array(
- 'id' => 'overview',
- 'title' => __( 'Overview' , 'akismet'),
- 'content' =>
- '<p><strong>' . esc_html__( 'Akismet Stats' , 'akismet') . '</strong></p>' .
- '<p>' . esc_html__( 'Akismet filters out spam, so you can focus on more important things.' , 'akismet') . '</p>' .
- '<p>' . esc_html__( 'On this page, you are able to view stats on spam filtered on your site.' , 'akismet') . '</p>',
- )
- );
- }
- else {
- //configuration page
- $current_screen->add_help_tab(
- array(
- 'id' => 'overview',
- 'title' => __( 'Overview' , 'akismet'),
- 'content' =>
- '<p><strong>' . esc_html__( 'Akismet Configuration' , 'akismet') . '</strong></p>' .
- '<p>' . esc_html__( 'Akismet filters out spam, so you can focus on more important things.' , 'akismet') . '</p>' .
- '<p>' . esc_html__( 'On this page, you are able to update your Akismet settings and view spam stats.' , 'akismet') . '</p>',
- )
- );
-
- $current_screen->add_help_tab(
- array(
- 'id' => 'settings',
- 'title' => __( 'Settings' , 'akismet'),
- 'content' =>
- '<p><strong>' . esc_html__( 'Akismet Configuration' , 'akismet') . '</strong></p>' .
- ( Akismet::predefined_api_key() ? '' : '<p><strong>' . esc_html__( 'API Key' , 'akismet') . '</strong> - ' . esc_html__( 'Enter/remove an API key.' , 'akismet') . '</p>' ) .
- '<p><strong>' . esc_html__( 'Comments' , 'akismet') . '</strong> - ' . esc_html__( 'Show the number of approved comments beside each comment author in the comments list page.' , 'akismet') . '</p>' .
- '<p><strong>' . esc_html__( 'Strictness' , 'akismet') . '</strong> - ' . esc_html__( 'Choose to either discard the worst spam automatically or to always put all spam in spam folder.' , 'akismet') . '</p>',
- )
- );
-
- if ( ! Akismet::predefined_api_key() ) {
- $current_screen->add_help_tab(
- array(
- 'id' => 'account',
- 'title' => __( 'Account' , 'akismet'),
- 'content' =>
- '<p><strong>' . esc_html__( 'Akismet Configuration' , 'akismet') . '</strong></p>' .
- '<p><strong>' . esc_html__( 'Subscription Type' , 'akismet') . '</strong> - ' . esc_html__( 'The Akismet subscription plan' , 'akismet') . '</p>' .
- '<p><strong>' . esc_html__( 'Status' , 'akismet') . '</strong> - ' . esc_html__( 'The subscription status - active, cancelled or suspended' , 'akismet') . '</p>',
- )
- );
- }
- }
- }
-
- // Help Sidebar
- $current_screen->set_help_sidebar(
- '<p><strong>' . esc_html__( 'For more information:' , 'akismet') . '</strong></p>' .
- '<p><a href="https://akismet.com/faq/" target="_blank">' . esc_html__( 'Akismet FAQ' , 'akismet') . '</a></p>' .
- '<p><a href="https://akismet.com/support/" target="_blank">' . esc_html__( 'Akismet Support' , 'akismet') . '</a></p>'
- );
- }
-
- public static function enter_api_key() {
- if ( ! current_user_can( 'manage_options' ) ) {
- die( __( 'Cheatin&#8217; uh?', 'akismet' ) );
- }
-
- if ( !wp_verify_nonce( $_POST['_wpnonce'], self::NONCE ) )
- return false;
-
- foreach( array( 'akismet_strictness', 'akismet_show_user_comments_approved' ) as $option ) {
- update_option( $option, isset( $_POST[$option] ) && (int) $_POST[$option] == 1 ? '1' : '0' );
- }
-
- if ( ! empty( $_POST['akismet_comment_form_privacy_notice'] ) ) {
- self::set_form_privacy_notice_option( $_POST['akismet_comment_form_privacy_notice'] );
- } else {
- self::set_form_privacy_notice_option( 'hide' );
- }
-
- if ( Akismet::predefined_api_key() ) {
- return false; //shouldn't have option to save key if already defined
- }
-
- $new_key = preg_replace( '/[^a-f0-9]/i', '', $_POST['key'] );
- $old_key = Akismet::get_api_key();
-
- if ( empty( $new_key ) ) {
- if ( !empty( $old_key ) ) {
- delete_option( 'wordpress_api_key' );
- self::$notices[] = 'new-key-empty';
- }
- }
- elseif ( $new_key != $old_key ) {
- self::save_key( $new_key );
- }
-
- return true;
- }
-
- public static function save_key( $api_key ) {
- $key_status = Akismet::verify_key( $api_key );
-
- if ( $key_status == 'valid' ) {
- $akismet_user = self::get_akismet_user( $api_key );
-
- if ( $akismet_user ) {
- if ( in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub' ) ) )
- update_option( 'wordpress_api_key', $api_key );
-
- if ( $akismet_user->status == 'active' )
- self::$notices['status'] = 'new-key-valid';
- elseif ( $akismet_user->status == 'notice' )
- self::$notices['status'] = $akismet_user;
- else
- self::$notices['status'] = $akismet_user->status;
- }
- else
- self::$notices['status'] = 'new-key-invalid';
- }
- elseif ( in_array( $key_status, array( 'invalid', 'failed' ) ) )
- self::$notices['status'] = 'new-key-'.$key_status;
- }
-
- public static function dashboard_stats() {
- if ( did_action( 'rightnow_end' ) ) {
- return; // We already displayed this info in the "Right Now" section
- }
-
- if ( !$count = get_option('akismet_spam_count') )
- return;
-
- global $submenu;
-
- echo '<h3>' . esc_html( _x( 'Spam', 'comments' , 'akismet') ) . '</h3>';
-
- echo '<p>'.sprintf( _n(
- '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comment</a>.',
- '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comments</a>.',
- $count
- , 'akismet'), 'https://akismet.com/wordpress/', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n($count) ).'</p>';
- }
-
- // WP 2.5+
- public static function rightnow_stats() {
- if ( $count = get_option('akismet_spam_count') ) {
- $intro = sprintf( _n(
- '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comment already. ',
- '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comments already. ',
- $count
- , 'akismet'), 'https://akismet.com/wordpress/', number_format_i18n( $count ) );
- } else {
- $intro = sprintf( __('<a href="%s">Akismet</a> blocks spam from getting to your blog. ', 'akismet'), 'https://akismet.com/wordpress/' );
- }
-
- $link = add_query_arg( array( 'comment_status' => 'spam' ), admin_url( 'edit-comments.php' ) );
-
- if ( $queue_count = self::get_spam_count() ) {
- $queue_text = sprintf( _n(
- 'There&#8217;s <a href="%2$s">%1$s comment</a> in your spam queue right now.',
- 'There are <a href="%2$s">%1$s comments</a> in your spam queue right now.',
- $queue_count
- , 'akismet'), number_format_i18n( $queue_count ), esc_url( $link ) );
- } else {
- $queue_text = sprintf( __( "There&#8217;s nothing in your <a href='%s'>spam queue</a> at the moment." , 'akismet'), esc_url( $link ) );
- }
-
- $text = $intro . '<br />' . $queue_text;
- echo "<p class='akismet-right-now'>$text</p>\n";
- }
-
- public static function check_for_spam_button( $comment_status ) {
- // The "Check for Spam" button should only appear when the page might be showing
- // a comment with comment_approved=0, which means an un-trashed, un-spammed,
- // not-yet-moderated comment.
- if ( 'all' != $comment_status && 'moderated' != $comment_status ) {
- return;
- }
-
- $link = add_query_arg( array( 'action' => 'akismet_recheck_queue' ), admin_url( 'admin.php' ) );
-
- $comments_count = wp_count_comments();
-
- echo '</div>';
- echo '<div class="alignleft actions">';
- echo '<a
- class="button-secondary checkforspam' . ( $comments_count->moderated == 0 ? ' button-disabled' : '' ) . '"
- href="' . esc_url( $link ) . '"
- data-active-label="' . esc_attr( __( 'Checking for Spam', 'akismet' ) ) . '"
- data-progress-label-format="' . esc_attr( __( '(%1$s%)', 'akismet' ) ) . '"
- data-success-url="' . esc_attr( remove_query_arg( 'akismet_recheck', add_query_arg( array( 'akismet_recheck_complete' => 1, 'recheck_count' => urlencode( '__recheck_count__' ), 'spam_count' => urlencode( '__spam_count__' ) ) ) ) ) . '"
- data-pending-comment-count="' . esc_attr( $comments_count->moderated ) . '"
- >';
- echo '<span class="akismet-label">' . esc_html__('Check for Spam', 'akismet') . '</span>';
- echo '<span class="checkforspam-progress"></span>';
- echo '</a>';
- echo '<span class="checkforspam-spinner"></span>';
-
- }
-
- public static function recheck_queue() {
- global $wpdb;
-
- Akismet::fix_scheduled_recheck();
-
- if ( ! ( isset( $_GET['recheckqueue'] ) || ( isset( $_REQUEST['action'] ) && 'akismet_recheck_queue' == $_REQUEST['action'] ) ) ) {
- return;
- }
-
- $result_counts = self::recheck_queue_portion( empty( $_POST['offset'] ) ? 0 : $_POST['offset'], empty( $_POST['limit'] ) ? 100 : $_POST['limit'] );
-
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
- wp_send_json( array(
- 'counts' => $result_counts,
- ));
- }
- else {
- $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url( 'edit-comments.php' );
- wp_safe_redirect( $redirect_to );
- exit;
- }
- }
-
- public static function recheck_queue_portion( $start = 0, $limit = 100 ) {
- global $wpdb;
-
- $paginate = '';
-
- if ( $limit <= 0 ) {
- $limit = 100;
- }
-
- if ( $start < 0 ) {
- $start = 0;
- }
-
- $moderation = $wpdb->get_col( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_approved = '0' LIMIT %d OFFSET %d", $limit, $start ) );
-
- $result_counts = array(
- 'processed' => count( $moderation ),
- 'spam' => 0,
- 'ham' => 0,
- 'error' => 0,
- );
-
- foreach ( $moderation as $comment_id ) {
- $api_response = Akismet::recheck_comment( $comment_id, 'recheck_queue' );
-
- if ( 'true' === $api_response ) {
- ++$result_counts['spam'];
- }
- elseif ( 'false' === $api_response ) {
- ++$result_counts['ham'];
- }
- else {
- ++$result_counts['error'];
- }
- }
-
- return $result_counts;
- }
-
- // Adds an 'x' link next to author URLs, clicking will remove the author URL and show an undo link
- public static function remove_comment_author_url() {
- if ( !empty( $_POST['id'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) {
- $comment_id = intval( $_POST['id'] );
- $comment = get_comment( $comment_id, ARRAY_A );
- if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) {
- $comment['comment_author_url'] = '';
- do_action( 'comment_remove_author_url' );
- print( wp_update_comment( $comment ) );
- die();
- }
- }
- }
-
- public static function add_comment_author_url() {
- if ( !empty( $_POST['id'] ) && !empty( $_POST['url'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) {
- $comment_id = intval( $_POST['id'] );
- $comment = get_comment( $comment_id, ARRAY_A );
- if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) {
- $comment['comment_author_url'] = esc_url( $_POST['url'] );
- do_action( 'comment_add_author_url' );
- print( wp_update_comment( $comment ) );
- die();
- }
- }
- }
-
- public static function comment_row_action( $a, $comment ) {
- $akismet_result = get_comment_meta( $comment->comment_ID, 'akismet_result', true );
- $akismet_error = get_comment_meta( $comment->comment_ID, 'akismet_error', true );
- $user_result = get_comment_meta( $comment->comment_ID, 'akismet_user_result', true);
- $comment_status = wp_get_comment_status( $comment->comment_ID );
- $desc = null;
- if ( $akismet_error ) {
- $desc = __( 'Awaiting spam check' , 'akismet');
- } elseif ( !$user_result || $user_result == $akismet_result ) {
- // Show the original Akismet result if the user hasn't overridden it, or if their decision was the same
- if ( $akismet_result == 'true' && $comment_status != 'spam' && $comment_status != 'trash' )
- $desc = __( 'Flagged as spam by Akismet' , 'akismet');
- elseif ( $akismet_result == 'false' && $comment_status == 'spam' )
- $desc = __( 'Cleared by Akismet' , 'akismet');
- } else {
- $who = get_comment_meta( $comment->comment_ID, 'akismet_user', true );
- if ( $user_result == 'true' )
- $desc = sprintf( __('Flagged as spam by %s', 'akismet'), $who );
- else
- $desc = sprintf( __('Un-spammed by %s', 'akismet'), $who );
- }
-
- // add a History item to the hover links, just after Edit
- if ( $akismet_result ) {
- $b = array();
- foreach ( $a as $k => $item ) {
- $b[ $k ] = $item;
- if (
- $k == 'edit'
- || $k == 'unspam'
- ) {
- $b['history'] = '<a href="comment.php?action=editcomment&amp;c='.$comment->comment_ID.'#akismet-status" title="'. esc_attr__( 'View comment history' , 'akismet') . '"> '. esc_html__('History', 'akismet') . '</a>';
- }
- }
-
- $a = $b;
- }
-
- if ( $desc )
- echo '<span class="akismet-status" commentid="'.$comment->comment_ID.'"><a href="comment.php?action=editcomment&amp;c='.$comment->comment_ID.'#akismet-status" title="' . esc_attr__( 'View comment history' , 'akismet') . '">'.esc_html( $desc ).'</a></span>';
-
- $show_user_comments_option = get_option( 'akismet_show_user_comments_approved' );
-
- if ( $show_user_comments_option === false ) {
- // Default to active if the user hasn't made a decision.
- $show_user_comments_option = '1';
- }
-
- $show_user_comments = apply_filters( 'akismet_show_user_comments_approved', $show_user_comments_option );
- $show_user_comments = $show_user_comments === 'false' ? false : $show_user_comments; //option used to be saved as 'false' / 'true'
-
- if ( $show_user_comments ) {
- $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url );
- $comment_count = intval( $comment_count );
- echo '<span class="akismet-user-comment-count" commentid="'.$comment->comment_ID.'" style="display:none;"><br><span class="akismet-user-comment-counts">'. sprintf( esc_html( _n( '%s approved', '%s approved', $comment_count , 'akismet') ), number_format_i18n( $comment_count ) ) . '</span></span>';
- }
-
- return $a;
- }
-
- public static function comment_status_meta_box( $comment ) {
- $history = Akismet::get_comment_history( $comment->comment_ID );
-
- if ( $history ) {
- echo '<div class="akismet-history" style="margin: 13px;">';
-
- foreach ( $history as $row ) {
- $time = date( 'D d M Y @ h:i:m a', $row['time'] ) . ' GMT';
-
- $message = '';
-
- if ( ! empty( $row['message'] ) ) {
- // Old versions of Akismet stored the message as a literal string in the commentmeta.
- // New versions don't do that for two reasons:
- // 1) Save space.
- // 2) The message can be translated into the current language of the blog, not stuck
- // in the language of the blog when the comment was made.
- $message = $row['message'];
- }
-
- // If possible, use a current translation.
- switch ( $row['event'] ) {
- case 'recheck-spam';
- $message = __( 'Akismet re-checked and caught this comment as spam.', 'akismet' );
- break;
- case 'check-spam':
- $message = __( 'Akismet caught this comment as spam.', 'akismet' );
- break;
- case 'recheck-ham':
- $message = __( 'Akismet re-checked and cleared this comment.', 'akismet' );
- break;
- case 'check-ham':
- $message = __( 'Akismet cleared this comment.', 'akismet' );
- break;
- case 'wp-blacklisted':
- $message = __( 'Comment was caught by wp_blacklist_check.', 'akismet' );
- break;
- case 'report-spam':
- if ( isset( $row['user'] ) ) {
- $message = sprintf( __( '%s reported this comment as spam.', 'akismet' ), $row['user'] );
- }
- else if ( ! $message ) {
- $message = __( 'This comment was reported as spam.', 'akismet' );
- }
- break;
- case 'report-ham':
- if ( isset( $row['user'] ) ) {
- $message = sprintf( __( '%s reported this comment as not spam.', 'akismet' ), $row['user'] );
- }
- else if ( ! $message ) {
- $message = __( 'This comment was reported as not spam.', 'akismet' );
- }
- break;
- case 'cron-retry-spam':
- $message = __( 'Akismet caught this comment as spam during an automatic retry.' , 'akismet');
- break;
- case 'cron-retry-ham':
- $message = __( 'Akismet cleared this comment during an automatic retry.', 'akismet');
- break;
- case 'check-error':
- if ( isset( $row['meta'], $row['meta']['response'] ) ) {
- $message = sprintf( __( 'Akismet was unable to check this comment (response: %s) but will automatically retry later.', 'akismet'), $row['meta']['response'] );
- }
- break;
- case 'recheck-error':
- if ( isset( $row['meta'], $row['meta']['response'] ) ) {
- $message = sprintf( __( 'Akismet was unable to recheck this comment (response: %s).', 'akismet'), $row['meta']['response'] );
- }
- break;
- default:
- if ( preg_match( '/^status-changed/', $row['event'] ) ) {
- // Half of these used to be saved without the dash after 'status-changed'.
- // See https://plugins.trac.wordpress.org/changeset/1150658/akismet/trunk
- $new_status = preg_replace( '/^status-changed-?/', '', $row['event'] );
- $message = sprintf( __( 'Comment status was changed to %s', 'akismet' ), $new_status );
- }
- else if ( preg_match( '/^status-/', $row['event'] ) ) {
- $new_status = preg_replace( '/^status-/', '', $row['event'] );
-
- if ( isset( $row['user'] ) ) {
- $message = sprintf( __( '%1$s changed the comment status to %2$s.', 'akismet' ), $row['user'], $new_status );
- }
- }
- break;
-
- }
-
- echo '<div style="margin-bottom: 13px;">';
- echo '<span style="color: #999;" alt="' . $time . '" title="' . $time . '">' . sprintf( esc_html__('%s ago', 'akismet'), human_time_diff( $row['time'] ) ) . '</span>';
- echo ' - ';
- echo esc_html( $message );
- echo '</div>';
- }
-
- echo '</div>';
- }
- }
-
- public static function plugin_action_links( $links, $file ) {
- if ( $file == plugin_basename( plugin_dir_url( __FILE__ ) . '/akismet.php' ) ) {
- $links[] = '<a href="' . esc_url( self::get_page_url() ) . '">'.esc_html__( 'Settings' , 'akismet').'</a>';
- }
-
- return $links;
- }
-
- // Total spam in queue
- // get_option( 'akismet_spam_count' ) is the total caught ever
- public static function get_spam_count( $type = false ) {
- global $wpdb;
-
- if ( !$type ) { // total
- $count = wp_cache_get( 'akismet_spam_count', 'widget' );
- if ( false === $count ) {
- $count = wp_count_comments();
- $count = $count->spam;
- wp_cache_set( 'akismet_spam_count', $count, 'widget', 3600 );
- }
- return $count;
- } elseif ( 'comments' == $type || 'comment' == $type ) { // comments
- $type = '';
- }
-
- return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_approved = 'spam' AND comment_type = %s", $type ) );
- }
-
- // Check connectivity between the WordPress blog and Akismet's servers.
- // Returns an associative array of server IP addresses, where the key is the IP address, and value is true (available) or false (unable to connect).
- public static function check_server_ip_connectivity() {
-
- $servers = $ips = array();
-
- // Some web hosts may disable this function
- if ( function_exists('gethostbynamel') ) {
-
- $ips = gethostbynamel( 'rest.akismet.com' );
- if ( $ips && is_array($ips) && count($ips) ) {
- $api_key = Akismet::get_api_key();
-
- foreach ( $ips as $ip ) {
- $response = Akismet::verify_key( $api_key, $ip );
- // even if the key is invalid, at least we know we have connectivity
- if ( $response == 'valid' || $response == 'invalid' )
- $servers[$ip] = 'connected';
- else
- $servers[$ip] = $response ? $response : 'unable to connect';
- }
- }
- }
-
- return $servers;
- }
-
- // Simpler connectivity check
- public static function check_server_connectivity($cache_timeout = 86400) {
-
- $debug = array();
- $debug[ 'PHP_VERSION' ] = PHP_VERSION;
- $debug[ 'WORDPRESS_VERSION' ] = $GLOBALS['wp_version'];
- $debug[ 'AKISMET_VERSION' ] = AKISMET_VERSION;
- $debug[ 'AKISMET__PLUGIN_DIR' ] = AKISMET__PLUGIN_DIR;
- $debug[ 'SITE_URL' ] = site_url();
- $debug[ 'HOME_URL' ] = home_url();
-
- $servers = get_option('akismet_available_servers');
- if ( (time() - get_option('akismet_connectivity_time') < $cache_timeout) && $servers !== false ) {
- $servers = self::check_server_ip_connectivity();
- update_option('akismet_available_servers', $servers);
- update_option('akismet_connectivity_time', time());
- }
-
- if ( wp_http_supports( array( 'ssl' ) ) ) {
- $response = wp_remote_get( 'https://rest.akismet.com/1.1/test' );
- }
- else {
- $response = wp_remote_get( 'http://rest.akismet.com/1.1/test' );
- }
-
- $debug[ 'gethostbynamel' ] = function_exists('gethostbynamel') ? 'exists' : 'not here';
- $debug[ 'Servers' ] = $servers;
- $debug[ 'Test Connection' ] = $response;
-
- Akismet::log( $debug );
-
- if ( $response && 'connected' == wp_remote_retrieve_body( $response ) )
- return true;
-
- return false;
- }
-
- // Check the server connectivity and store the available servers in an option.
- public static function get_server_connectivity($cache_timeout = 86400) {
- return self::check_server_connectivity( $cache_timeout );
- }
-
- /**
- * Find out whether any comments in the Pending queue have not yet been checked by Akismet.
- *
- * @return bool
- */
- public static function are_any_comments_waiting_to_be_checked() {
- return !! get_comments( array(
- // Exclude comments that are not pending. This would happen if someone manually approved or spammed a comment
- // that was waiting to be checked. The akismet_error meta entry will eventually be removed by the cron recheck job.
- 'status' => 'hold',
-
- // This is the commentmeta that is saved when a comment couldn't be checked.
- 'meta_key' => 'akismet_error',
-
- // We only need to know whether at least one comment is waiting for a check.
- 'number' => 1,
- ) );
- }
-
- public static function get_page_url( $page = 'config' ) {
-
- $args = array( 'page' => 'akismet-key-config' );
-
- if ( $page == 'stats' )
- $args = array( 'page' => 'akismet-key-config', 'view' => 'stats' );
- elseif ( $page == 'delete_key' )
- $args = array( 'page' => 'akismet-key-config', 'view' => 'start', 'action' => 'delete-key', '_wpnonce' => wp_create_nonce( self::NONCE ) );
-
- $url = add_query_arg( $args, class_exists( 'Jetpack' ) ? admin_url( 'admin.php' ) : admin_url( 'options-general.php' ) );
-
- return $url;
- }
-
- public static function get_akismet_user( $api_key ) {
- $akismet_user = false;
-
- $subscription_verification = Akismet::http_post( Akismet::build_query( array( 'key' => $api_key, 'blog' => get_option( 'home' ) ) ), 'get-subscription' );
-
- if ( ! empty( $subscription_verification[1] ) ) {
- if ( 'invalid' !== $subscription_verification[1] ) {
- $akismet_user = json_decode( $subscription_verification[1] );
- }
- }
-
- return $akismet_user;
- }
-
- public static function get_stats( $api_key ) {
- $stat_totals = array();
-
- foreach( array( '6-months', 'all' ) as $interval ) {
- $response = Akismet::http_post( Akismet::build_query( array( 'blog' => get_option( 'home' ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' );
-
- if ( ! empty( $response[1] ) ) {
- $stat_totals[$interval] = json_decode( $response[1] );
- }
- }
-
- return $stat_totals;
- }
-
- public static function verify_wpcom_key( $api_key, $user_id, $extra = array() ) {
- $akismet_account = Akismet::http_post( Akismet::build_query( array_merge( array(
- 'user_id' => $user_id,
- 'api_key' => $api_key,
- 'get_account_type' => 'true'
- ), $extra ) ), 'verify-wpcom-key' );
-
- if ( ! empty( $akismet_account[1] ) )
- $akismet_account = json_decode( $akismet_account[1] );
-
- Akismet::log( compact( 'akismet_account' ) );
-
- return $akismet_account;
- }
-
- public static function connect_jetpack_user() {
-
- if ( $jetpack_user = self::get_jetpack_user() ) {
- if ( isset( $jetpack_user['user_id'] ) && isset( $jetpack_user['api_key'] ) ) {
- $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'], array( 'action' => 'connect_jetpack_user' ) );
-
- if ( is_object( $akismet_user ) ) {
- self::save_key( $akismet_user->api_key );
- return in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub' ) );
- }
- }
- }
-
- return false;
- }
-
- public static function display_alert() {
- Akismet::view( 'notice', array(
- 'type' => 'alert',
- 'code' => (int) get_option( 'akismet_alert_code' ),
- 'msg' => get_option( 'akismet_alert_msg' )
- ) );
- }
-
- public static function display_privacy_notice_control_warning() {
- if ( !current_user_can( 'manage_options' ) )
- return;
- Akismet::view( 'notice', array(
- 'type' => 'privacy',
- ) );
- }
-
- public static function display_spam_check_warning() {
- Akismet::fix_scheduled_recheck();
-
- if ( wp_next_scheduled('akismet_schedule_cron_recheck') > time() && self::are_any_comments_waiting_to_be_checked() ) {
- $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.', 'akismet'), esc_url( self::get_page_url() ) ) );
- Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text ) );
- }
- }
-
- public static function display_api_key_warning() {
- Akismet::view( 'notice', array( 'type' => 'plugin' ) );
- }
-
- public static function display_page() {
- if ( !Akismet::get_api_key() || ( isset( $_GET['view'] ) && $_GET['view'] == 'start' ) )
- self::display_start_page();
- elseif ( isset( $_GET['view'] ) && $_GET['view'] == 'stats' )
- self::display_stats_page();
- else
- self::display_configuration_page();
- }
-
- public static function display_start_page() {
- if ( isset( $_GET['action'] ) ) {
- if ( $_GET['action'] == 'delete-key' ) {
- if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], self::NONCE ) )
- delete_option( 'wordpress_api_key' );
- }
- }
-
- if ( $api_key = Akismet::get_api_key() && ( empty( self::$notices['status'] ) || 'existing-key-invalid' != self::$notices['status'] ) ) {
- self::display_configuration_page();
- return;
- }
-
- //the user can choose to auto connect their API key by clicking a button on the akismet done page
- //if jetpack, get verified api key by using connected wpcom user id
- //if no jetpack, get verified api key by using an akismet token
-
- $akismet_user = false;
-
- if ( isset( $_GET['token'] ) && preg_match('/^(\d+)-[0-9a-f]{20}$/', $_GET['token'] ) )
- $akismet_user = self::verify_wpcom_key( '', '', array( 'token' => $_GET['token'] ) );
- elseif ( $jetpack_user = self::get_jetpack_user() )
- $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'] );
-
- if ( isset( $_GET['action'] ) ) {
- if ( $_GET['action'] == 'save-key' ) {
- if ( is_object( $akismet_user ) ) {
- self::save_key( $akismet_user->api_key );
- self::display_configuration_page();
- return;
- }
- }
- }
-
- Akismet::view( 'start', compact( 'akismet_user' ) );
-
- /*
- // To see all variants when testing.
- $akismet_user->status = 'no-sub';
- Akismet::view( 'start', compact( 'akismet_user' ) );
- $akismet_user->status = 'cancelled';
- Akismet::view( 'start', compact( 'akismet_user' ) );
- $akismet_user->status = 'suspended';
- Akismet::view( 'start', compact( 'akismet_user' ) );
- $akismet_user->status = 'other';
- Akismet::view( 'start', compact( 'akismet_user' ) );
- $akismet_user = false;
- */
- }
-
- public static function display_stats_page() {
- Akismet::view( 'stats' );
- }
-
- public static function display_configuration_page() {
- $api_key = Akismet::get_api_key();
- $akismet_user = self::get_akismet_user( $api_key );
-
- if ( ! $akismet_user ) {
- // This could happen if the user's key became invalid after it was previously valid and successfully set up.
- self::$notices['status'] = 'existing-key-invalid';
- self::display_start_page();
- return;
- }
-
- $stat_totals = self::get_stats( $api_key );
-
- // If unset, create the new strictness option using the old discard option to determine its default.
- // If the old option wasn't set, default to discarding the blatant spam.
- if ( get_option( 'akismet_strictness' ) === false ) {
- add_option( 'akismet_strictness', ( get_option( 'akismet_discard_month' ) === 'false' ? '0' : '1' ) );
- }
-
- // Sync the local "Total spam blocked" count with the authoritative count from the server.
- if ( isset( $stat_totals['all'], $stat_totals['all']->spam ) ) {
- update_option( 'akismet_spam_count', $stat_totals['all']->spam );
- }
-
- $notices = array();
-
- if ( empty( self::$notices ) ) {
- if ( ! empty( $stat_totals['all'] ) && isset( $stat_totals['all']->time_saved ) && $akismet_user->status == 'active' && $akismet_user->account_type == 'free-api-key' ) {
-
- $time_saved = false;
-
- if ( $stat_totals['all']->time_saved > 1800 ) {
- $total_in_minutes = round( $stat_totals['all']->time_saved / 60 );
- $total_in_hours = round( $total_in_minutes / 60 );
- $total_in_days = round( $total_in_hours / 8 );
- $cleaning_up = __( 'Cleaning up spam takes time.' , 'akismet');
-
- if ( $total_in_days > 1 )
- $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %s day!', 'Akismet has saved you %s days!', $total_in_days, 'akismet' ), number_format_i18n( $total_in_days ) );
- elseif ( $total_in_hours > 1 )
- $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %d hour!', 'Akismet has saved you %d hours!', $total_in_hours, 'akismet' ), $total_in_hours );
- elseif ( $total_in_minutes >= 30 )
- $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %d minute!', 'Akismet has saved you %d minutes!', $total_in_minutes, 'akismet' ), $total_in_minutes );
- }
-
- $notices[] = array( 'type' => 'active-notice', 'time_saved' => $time_saved );
- }
-
- if ( !empty( $akismet_user->limit_reached ) && in_array( $akismet_user->limit_reached, array( 'yellow', 'red' ) ) ) {
- $notices[] = array( 'type' => 'limit-reached', 'level' => $akismet_user->limit_reached );
- }
- }
-
- if ( !isset( self::$notices['status'] ) && in_array( $akismet_user->status, array( 'cancelled', 'suspended', 'missing', 'no-sub' ) ) ) {
- $notices[] = array( 'type' => $akismet_user->status );
- }
-
- if ( false === get_option( 'akismet_comment_form_privacy_notice' ) ) {
- $notices[] = array( 'type' => 'privacy' );
- }
-
- /*
- // To see all variants when testing.
- $notices[] = array( 'type' => 'active-notice', 'time_saved' => 'Cleaning up spam takes time. Akismet has saved you 1 minute!' );
- $notices[] = array( 'type' => 'plugin' );
- $notices[] = array( 'type' => 'spam-check', 'link_text' => 'Link text.' );
- $notices[] = array( 'type' => 'notice', 'notice_header' => 'This is the notice header.', 'notice_text' => 'This is the notice text.' );
- $notices[] = array( 'type' => 'missing-functions' );
- $notices[] = array( 'type' => 'servers-be-down' );
- $notices[] = array( 'type' => 'active-dunning' );
- $notices[] = array( 'type' => 'cancelled' );
- $notices[] = array( 'type' => 'suspended' );
- $notices[] = array( 'type' => 'missing' );
- $notices[] = array( 'type' => 'no-sub' );
- $notices[] = array( 'type' => 'new-key-valid' );
- $notices[] = array( 'type' => 'new-key-invalid' );
- $notices[] = array( 'type' => 'existing-key-invalid' );
- $notices[] = array( 'type' => 'new-key-failed' );
- $notices[] = array( 'type' => 'limit-reached', 'level' => 'yellow' );
- $notices[] = array( 'type' => 'limit-reached', 'level' => 'red' );
- */
-
- Akismet::log( compact( 'stat_totals', 'akismet_user' ) );
- Akismet::view( 'config', compact( 'api_key', 'akismet_user', 'stat_totals', 'notices' ) );
- }
-
- public static function display_notice() {
- global $hook_suffix;
-
- if ( in_array( $hook_suffix, array( 'jetpack_page_akismet-key-config', 'settings_page_akismet-key-config' ) ) ) {
- // This page manages the notices and puts them inline where they make sense.
- return;
- }
-
- if ( in_array( $hook_suffix, array( 'edit-comments.php' ) ) && (int) get_option( 'akismet_alert_code' ) > 0 ) {
- Akismet::verify_key( Akismet::get_api_key() ); //verify that the key is still in alert state
-
- if ( get_option( 'akismet_alert_code' ) > 0 )
- self::display_alert();
- }
- elseif ( $hook_suffix == 'plugins.php' && !Akismet::get_api_key() ) {
- self::display_api_key_warning();
- }
- elseif ( $hook_suffix == 'edit-comments.php' && wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) {
- self::display_spam_check_warning();
- }
- else if ( isset( $_GET['akismet_recheck_complete'] ) ) {
- $recheck_count = (int) $_GET['recheck_count'];
- $spam_count = (int) $_GET['spam_count'];
-
- if ( $recheck_count === 0 ) {
- $message = __( 'There were no comments to check. Akismet will only check comments in the Pending queue.', 'akismet' );
- }
- else {
- $message = sprintf( _n( 'Akismet checked %s comment.', 'Akismet checked %s comments.', $recheck_count, 'akismet' ), number_format( $recheck_count ) );
- $message .= ' ';
-
- if ( $spam_count === 0 ) {
- $message .= __( 'No comments were caught as spam.', 'akismet' );
- }
- else {
- $message .= sprintf( _n( '%s comment was caught as spam.', '%s comments were caught as spam.', $spam_count, 'akismet' ), number_format( $spam_count ) );
- }
- }
-
- echo '<div class="notice notice-success"><p>' . esc_html( $message ) . '</p></div>';
- }
-
- $akismet_comment_form_privacy_notice_option = get_option( 'akismet_comment_form_privacy_notice' );
- if ( ! in_array( $akismet_comment_form_privacy_notice_option, array( 'hide', 'display' ) ) ) {
- $api_key = Akismet::get_api_key();
- if ( ! empty( $api_key ) ) {
- self::display_privacy_notice_control_warning();
- }
- }
- }
-
- public static function display_status() {
- if ( ! self::get_server_connectivity() ) {
- Akismet::view( 'notice', array( 'type' => 'servers-be-down' ) );
- }
- else if ( ! empty( self::$notices ) ) {
- foreach ( self::$notices as $index => $type ) {
- if ( is_object( $type ) ) {
- $notice_header = $notice_text = '';
-
- if ( property_exists( $type, 'notice_header' ) ) {
- $notice_header = wp_kses( $type->notice_header, self::$allowed );
- }
-
- if ( property_exists( $type, 'notice_text' ) ) {
- $notice_text = wp_kses( $type->notice_text, self::$allowed );
- }
-
- if ( property_exists( $type, 'status' ) ) {
- $type = wp_kses( $type->status, self::$allowed );
- Akismet::view( 'notice', compact( 'type', 'notice_header', 'notice_text' ) );
-
- unset( self::$notices[ $index ] );
- }
- }
- else {
- Akismet::view( 'notice', compact( 'type' ) );
-
- unset( self::$notices[ $index ] );
- }
- }
- }
- }
-
- private static function get_jetpack_user() {
- if ( !class_exists('Jetpack') )
- return false;
-
- Jetpack::load_xml_rpc_client();
- $xml = new Jetpack_IXR_ClientMulticall( array( 'user_id' => get_current_user_id() ) );
-
- $xml->addCall( 'wpcom.getUserID' );
- $xml->addCall( 'akismet.getAPIKey' );
- $xml->query();
-
- Akismet::log( compact( 'xml' ) );
-
- if ( !$xml->isError() ) {
- $responses = $xml->getResponse();
- if ( count( $responses ) > 1 ) {
- // Due to a quirk in how Jetpack does multi-calls, the response order
- // can't be trusted to match the call order. It's a good thing our
- // return values can be mostly differentiated from each other.
- $first_response_value = array_shift( $responses[0] );
- $second_response_value = array_shift( $responses[1] );
-
- // If WPCOM ever reaches 100 billion users, this will fail. :-)
- if ( preg_match( '/^[a-f0-9]{12}$/i', $first_response_value ) ) {
- $api_key = $first_response_value;
- $user_id = (int) $second_response_value;
- }
- else {
- $api_key = $second_response_value;
- $user_id = (int) $first_response_value;
- }
-
- return compact( 'api_key', 'user_id' );
- }
- }
- return false;
- }
-
- /**
- * Some commentmeta isn't useful in an export file. Suppress it (when supported).
- *
- * @param bool $exclude
- * @param string $key The meta key
- * @param object $meta The meta object
- * @return bool Whether to exclude this meta entry from the export.
- */
- public static function exclude_commentmeta_from_export( $exclude, $key, $meta ) {
- if ( in_array( $key, array( 'akismet_as_submitted', 'akismet_rechecking', 'akismet_delayed_moderation_email' ) ) ) {
- return true;
- }
-
- return $exclude;
- }
-
- /**
- * When Akismet is active, remove the "Activate Akismet" step from the plugin description.
- */
- public static function modify_plugin_description( $all_plugins ) {
- if ( isset( $all_plugins['akismet/akismet.php'] ) ) {
- if ( Akismet::get_api_key() ) {
- $all_plugins['akismet/akismet.php']['Description'] = __( 'Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Your site is fully configured and being protected, even while you sleep.', 'akismet' );
- }
- else {
- $all_plugins['akismet/akismet.php']['Description'] = __( 'Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started, just go to <a href="admin.php?page=akismet-key-config">your Akismet Settings page</a> to set up your API key.', 'akismet' );
- }
- }
-
- return $all_plugins;
- }
-
- private static function set_form_privacy_notice_option( $state ) {
- if ( in_array( $state, array( 'display', 'hide' ) ) ) {
- update_option( 'akismet_comment_form_privacy_notice', $state );
- }
- }
-
- public static function jetpack_comment_form_privacy_notice_url( $url ) {
- return str_replace( 'options-general.php', 'admin.php', $url );
- }
-
- public static function register_personal_data_eraser( $erasers ) {
- $erasers['akismet'] = array(
- 'eraser_friendly_name' => __( 'Akismet', 'akismet' ),
- 'callback' => array( 'Akismet_Admin', 'erase_personal_data' ),
- );
-
- return $erasers;
- }
-
- /**
- * When a user requests that their personal data be removed, Akismet has a duty to discard
- * any personal data we store outside of the comment itself. Right now, that is limited
- * to the copy of the comment we store in the akismet_as_submitted commentmeta.
- *
- * FWIW, this information would be automatically deleted after 15 days.
- *
- * @param $email_address string The email address of the user who has requested erasure.
- * @param $page int This function can (and will) be called multiple times to prevent timeouts,
- * so this argument is used for pagination.
- * @return array
- * @see https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-eraser-to-your-plugin/
- */
- public static function erase_personal_data( $email_address, $page = 1 ) {
- $items_removed = false;
-
- $number = 50;
- $page = (int) $page;
-
- $comments = get_comments(
- array(
- 'author_email' => $email_address,
- 'number' => $number,
- 'paged' => $page,
- 'order_by' => 'comment_ID',
- 'order' => 'ASC',
- )
- );
-
- foreach ( (array) $comments as $comment ) {
- $comment_as_submitted = get_comment_meta( $comment->comment_ID, 'akismet_as_submitted', true );
-
- if ( $comment_as_submitted ) {
- delete_comment_meta( $comment->comment_ID, 'akismet_as_submitted' );
- $items_removed = true;
- }
- }
-
- // Tell core if we have more comments to work on still
- $done = count( $comments ) < $number;
-
- return array(
- 'items_removed' => $items_removed,
- 'items_retained' => false, // always false in this example
- 'messages' => array(), // no messages in this example
- 'done' => $done,
- );
- }
-}
diff --git a/plugins/akismet/class.akismet-cli.php b/plugins/akismet/class.akismet-cli.php
deleted file mode 100644
index 9cbe7a92..00000000
--- a/plugins/akismet/class.akismet-cli.php
+++ /dev/null
@@ -1,185 +0,0 @@
-<?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;
- }
-
- $response = Akismet::http_post(
- Akismet::build_query( array(
- 'blog' => get_option( 'home' ),
- 'key' => $api_key,
- 'from' => $interval,
- ) ),
- '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 ) ) );
- }
- }
-} \ No newline at end of file
diff --git a/plugins/akismet/class.akismet-rest-api.php b/plugins/akismet/class.akismet-rest-api.php
deleted file mode 100644
index bf71998b..00000000
--- a/plugins/akismet/class.akismet-rest-api.php
+++ /dev/null
@@ -1,366 +0,0 @@
-<?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' ),
- ),
- ),
- )
- ) );
- }
-
- /**
- * 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();
-
- $response = Akismet::http_post( Akismet::build_query( array( 'blog' => get_option( 'home' ), 'key' => $api_key, 'from' => $interval ) ), '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 ) {
- $response = Akismet::http_post(
- Akismet::build_query(
- array(
- 'key' => $key,
- 'blog' => get_option( 'home' )
- )
- ),
- '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 );
- }
-}
diff --git a/plugins/akismet/class.akismet-widget.php b/plugins/akismet/class.akismet-widget.php
deleted file mode 100644
index 55b0f35c..00000000
--- a/plugins/akismet/class.akismet-widget.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?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['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" title=""><?php printf( _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 ) ); ?></a>
- </div>
-
-<?php
- echo $args['after_widget'];
- }
-}
-
-function akismet_register_widgets() {
- register_widget( 'Akismet_Widget' );
-}
-
-add_action( 'widgets_init', 'akismet_register_widgets' );
diff --git a/plugins/akismet/class.akismet.php b/plugins/akismet/class.akismet.php
deleted file mode 100644
index f24fd63d..00000000
--- a/plugins/akismet/class.akismet.php
+++ /dev/null
@@ -1,1423 +0,0 @@
-<?php
-
-class Akismet {
- const API_HOST = 'rest.akismet.com';
- const API_PORT = 80;
- const MAX_DELAY_BEFORE_MODERATION_EMAIL = 86400; // One day in seconds
-
- private static $last_comment = '';
- private static $initiated = false;
- private static $prevent_moderation_email_for_these_comments = array();
- private static $last_comment_result = null;
- private static $comment_as_submitted_allowed_keys = array( 'blog' => '', 'blog_charset' => '', 'blog_lang' => '', 'blog_ua' => '', 'comment_agent' => '', 'comment_author' => '', 'comment_author_IP' => '', 'comment_author_email' => '', 'comment_author_url' => '', 'comment_content' => '', 'comment_date_gmt' => '', 'comment_tags' => '', 'comment_type' => '', 'guid' => '', 'is_test' => '', 'permalink' => '', 'reporter' => '', 'site_domain' => '', 'submit_referer' => '', 'submit_uri' => '', 'user_ID' => '', 'user_agent' => '', 'user_id' => '', 'user_ip' => '' );
- private static $is_rest_api_call = false;
-
- public static function init() {
- if ( ! self::$initiated ) {
- self::init_hooks();
- }
- }
-
- /**
- * Initializes WordPress hooks
- */
- private static function init_hooks() {
- self::$initiated = true;
-
- add_action( 'wp_insert_comment', array( 'Akismet', 'auto_check_update_meta' ), 10, 2 );
- add_filter( 'preprocess_comment', array( 'Akismet', 'auto_check_comment' ), 1 );
- add_filter( 'rest_pre_insert_comment', array( 'Akismet', 'rest_auto_check_comment' ), 1 );
-
- add_action( 'akismet_scheduled_delete', array( 'Akismet', 'delete_old_comments' ) );
- add_action( 'akismet_scheduled_delete', array( 'Akismet', 'delete_old_comments_meta' ) );
- add_action( 'akismet_scheduled_delete', array( 'Akismet', 'delete_orphaned_commentmeta' ) );
- add_action( 'akismet_schedule_cron_recheck', array( 'Akismet', 'cron_recheck' ) );
-
- add_action( 'comment_form', array( 'Akismet', 'add_comment_nonce' ), 1 );
-
- add_action( 'admin_head-edit-comments.php', array( 'Akismet', 'load_form_js' ) );
- add_action( 'comment_form', array( 'Akismet', 'load_form_js' ) );
- add_action( 'comment_form', array( 'Akismet', 'inject_ak_js' ) );
- add_filter( 'script_loader_tag', array( 'Akismet', 'set_form_js_async' ), 10, 3 );
-
- add_filter( 'comment_moderation_recipients', array( 'Akismet', 'disable_moderation_emails_if_unreachable' ), 1000, 2 );
- add_filter( 'pre_comment_approved', array( 'Akismet', 'last_comment_status' ), 10, 2 );
-
- add_action( 'transition_comment_status', array( 'Akismet', 'transition_comment_status' ), 10, 3 );
-
- // Run this early in the pingback call, before doing a remote fetch of the source uri
- add_action( 'xmlrpc_call', array( 'Akismet', 'pre_check_pingback' ) );
-
- // Jetpack compatibility
- add_filter( 'jetpack_options_whitelist', array( 'Akismet', 'add_to_jetpack_options_whitelist' ) );
- add_action( 'update_option_wordpress_api_key', array( 'Akismet', 'updated_option' ), 10, 2 );
- add_action( 'add_option_wordpress_api_key', array( 'Akismet', 'added_option' ), 10, 2 );
-
- add_action( 'comment_form_after', array( 'Akismet', 'display_comment_form_privacy_notice' ) );
- }
-
- public static function get_api_key() {
- return apply_filters( 'akismet_get_api_key', defined('WPCOM_API_KEY') ? constant('WPCOM_API_KEY') : get_option('wordpress_api_key') );
- }
-
- public static function check_key_status( $key, $ip = null ) {
- return self::http_post( Akismet::build_query( array( 'key' => $key, 'blog' => get_option( 'home' ) ) ), 'verify-key', $ip );
- }
-
- public static function verify_key( $key, $ip = null ) {
- // Shortcut for obviously invalid keys.
- if ( strlen( $key ) != 12 ) {
- return 'invalid';
- }
-
- $response = self::check_key_status( $key, $ip );
-
- if ( $response[1] != 'valid' && $response[1] != 'invalid' )
- return 'failed';
-
- return $response[1];
- }
-
- public static function deactivate_key( $key ) {
- $response = self::http_post( Akismet::build_query( array( 'key' => $key, 'blog' => get_option( 'home' ) ) ), 'deactivate' );
-
- if ( $response[1] != 'deactivated' )
- return 'failed';
-
- return $response[1];
- }
-
- /**
- * Add the akismet option to the Jetpack options management whitelist.
- *
- * @param array $options The list of whitelisted option names.
- * @return array The updated whitelist
- */
- public static function add_to_jetpack_options_whitelist( $options ) {
- $options[] = 'wordpress_api_key';
- return $options;
- }
-
- /**
- * When the akismet option is updated, run the registration call.
- *
- * This should only be run when the option is updated from the Jetpack/WP.com
- * API call, and only if the new key is different than the old key.
- *
- * @param mixed $old_value The old option value.
- * @param mixed $value The new option value.
- */
- public static function updated_option( $old_value, $value ) {
- // Not an API call
- if ( ! class_exists( 'WPCOM_JSON_API_Update_Option_Endpoint' ) ) {
- return;
- }
- // Only run the registration if the old key is different.
- if ( $old_value !== $value ) {
- self::verify_key( $value );
- }
- }
-
- /**
- * Treat the creation of an API key the same as updating the API key to a new value.
- *
- * @param mixed $option_name Will always be "wordpress_api_key", until something else hooks in here.
- * @param mixed $value The option value.
- */
- public static function added_option( $option_name, $value ) {
- if ( 'wordpress_api_key' === $option_name ) {
- return self::updated_option( '', $value );
- }
- }
-
- public static function rest_auto_check_comment( $commentdata ) {
- self::$is_rest_api_call = true;
-
- return self::auto_check_comment( $commentdata );
- }
-
- public static function auto_check_comment( $commentdata ) {
- self::$last_comment_result = null;
-
- $comment = $commentdata;
-
- $comment['user_ip'] = self::get_ip_address();
- $comment['user_agent'] = self::get_user_agent();
- $comment['referrer'] = self::get_referer();
- $comment['blog'] = get_option( 'home' );
- $comment['blog_lang'] = get_locale();
- $comment['blog_charset'] = get_option('blog_charset');
- $comment['permalink'] = get_permalink( $comment['comment_post_ID'] );
-
- if ( ! empty( $comment['user_ID'] ) ) {
- $comment['user_role'] = Akismet::get_user_roles( $comment['user_ID'] );
- }
-
- /** See filter documentation in init_hooks(). */
- $akismet_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) );
- $comment['akismet_comment_nonce'] = 'inactive';
- if ( $akismet_nonce_option == 'true' || $akismet_nonce_option == '' ) {
- $comment['akismet_comment_nonce'] = 'failed';
- if ( isset( $_POST['akismet_comment_nonce'] ) && wp_verify_nonce( $_POST['akismet_comment_nonce'], 'akismet_comment_nonce_' . $comment['comment_post_ID'] ) )
- $comment['akismet_comment_nonce'] = 'passed';
-
- // comment reply in wp-admin
- if ( isset( $_POST['_ajax_nonce-replyto-comment'] ) && check_ajax_referer( 'replyto-comment', '_ajax_nonce-replyto-comment' ) )
- $comment['akismet_comment_nonce'] = 'passed';
-
- }
-
- if ( self::is_test_mode() )
- $comment['is_test'] = 'true';
-
- foreach( $_POST as $key => $value ) {
- if ( is_string( $value ) )
- $comment["POST_{$key}"] = $value;
- }
-
- foreach ( $_SERVER as $key => $value ) {
- if ( ! is_string( $value ) ) {
- continue;
- }
-
- if ( preg_match( "/^HTTP_COOKIE/", $key ) ) {
- continue;
- }
-
- // Send any potentially useful $_SERVER vars, but avoid sending junk we don't need.
- if ( preg_match( "/^(HTTP_|REMOTE_ADDR|REQUEST_URI|DOCUMENT_URI)/", $key ) ) {
- $comment[ "$key" ] = $value;
- }
- }
-
- $post = get_post( $comment['comment_post_ID'] );
-
- if ( ! is_null( $post ) ) {
- // $post can technically be null, although in the past, it's always been an indicator of another plugin interfering.
- $comment[ 'comment_post_modified_gmt' ] = $post->post_modified_gmt;
- }
-
- $response = self::http_post( Akismet::build_query( $comment ), 'comment-check' );
-
- do_action( 'akismet_comment_check_response', $response );
-
- $commentdata['comment_as_submitted'] = array_intersect_key( $comment, self::$comment_as_submitted_allowed_keys );
- $commentdata['akismet_result'] = $response[1];
-
- if ( isset( $response[0]['x-akismet-pro-tip'] ) )
- $commentdata['akismet_pro_tip'] = $response[0]['x-akismet-pro-tip'];
-
- if ( isset( $response[0]['x-akismet-error'] ) ) {
- // An error occurred that we anticipated (like a suspended key) and want the user to act on.
- // Send to moderation.
- self::$last_comment_result = '0';
- }
- else if ( 'true' == $response[1] ) {
- // akismet_spam_count will be incremented later by comment_is_spam()
- self::$last_comment_result = 'spam';
-
- $discard = ( isset( $commentdata['akismet_pro_tip'] ) && $commentdata['akismet_pro_tip'] === 'discard' && self::allow_discard() );
-
- do_action( 'akismet_spam_caught', $discard );
-
- if ( $discard ) {
- // The spam is obvious, so we're bailing out early.
- // akismet_result_spam() won't be called so bump the counter here
- if ( $incr = apply_filters( 'akismet_spam_count_incr', 1 ) ) {
- update_option( 'akismet_spam_count', get_option( 'akismet_spam_count' ) + $incr );
- }
-
- if ( self::$is_rest_api_call ) {
- return new WP_Error( 'akismet_rest_comment_discarded', __( 'Comment discarded.', 'akismet' ) );
- }
- else {
- // Redirect back to the previous page, or failing that, the post permalink, or failing that, the homepage of the blog.
- $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : ( $post ? get_permalink( $post ) : home_url() );
- wp_safe_redirect( esc_url_raw( $redirect_to ) );
- die();
- }
- }
- else if ( self::$is_rest_api_call ) {
- // The way the REST API structures its calls, we can set the comment_approved value right away.
- $commentdata['comment_approved'] = 'spam';
- }
- }
-
- // if the response is neither true nor false, hold the comment for moderation and schedule a recheck
- if ( 'true' != $response[1] && 'false' != $response[1] ) {
- if ( !current_user_can('moderate_comments') ) {
- // Comment status should be moderated
- self::$last_comment_result = '0';
- }
-
- if ( ! wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) {
- wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
- do_action( 'akismet_scheduled_recheck', 'invalid-response-' . $response[1] );
- }
-
- self::$prevent_moderation_email_for_these_comments[] = $commentdata;
- }
-
- // Delete old comments daily
- if ( ! wp_next_scheduled( 'akismet_scheduled_delete' ) ) {
- wp_schedule_event( time(), 'daily', 'akismet_scheduled_delete' );
- }
-
- self::set_last_comment( $commentdata );
- self::fix_scheduled_recheck();
-
- return $commentdata;
- }
-
- public static function get_last_comment() {
- return self::$last_comment;
- }
-
- public static function set_last_comment( $comment ) {
- if ( is_null( $comment ) ) {
- self::$last_comment = null;
- }
- else {
- // We filter it here so that it matches the filtered comment data that we'll have to compare against later.
- // wp_filter_comment expects comment_author_IP
- self::$last_comment = wp_filter_comment(
- array_merge(
- array( 'comment_author_IP' => self::get_ip_address() ),
- $comment
- )
- );
- }
- }
-
- // this fires on wp_insert_comment. we can't update comment_meta when auto_check_comment() runs
- // because we don't know the comment ID at that point.
- public static function auto_check_update_meta( $id, $comment ) {
- // wp_insert_comment() might be called in other contexts, so make sure this is the same comment
- // as was checked by auto_check_comment
- if ( is_object( $comment ) && !empty( self::$last_comment ) && is_array( self::$last_comment ) ) {
- if ( self::matches_last_comment( $comment ) ) {
-
- load_plugin_textdomain( 'akismet' );
-
- // normal result: true or false
- if ( self::$last_comment['akismet_result'] == 'true' ) {
- update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' );
- self::update_comment_history( $comment->comment_ID, '', 'check-spam' );
- if ( $comment->comment_approved != 'spam' )
- self::update_comment_history(
- $comment->comment_ID,
- '',
- 'status-changed-'.$comment->comment_approved
- );
- }
- elseif ( self::$last_comment['akismet_result'] == 'false' ) {
- update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' );
- self::update_comment_history( $comment->comment_ID, '', 'check-ham' );
- // Status could be spam or trash, depending on the WP version and whether this change applies:
- // https://core.trac.wordpress.org/changeset/34726
- if ( $comment->comment_approved == 'spam' || $comment->comment_approved == 'trash' ) {
- if ( wp_blacklist_check($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent) )
- self::update_comment_history( $comment->comment_ID, '', 'wp-blacklisted' );
- else
- self::update_comment_history( $comment->comment_ID, '', 'status-changed-'.$comment->comment_approved );
- }
- } // abnormal result: error
- else {
- update_comment_meta( $comment->comment_ID, 'akismet_error', time() );
- self::update_comment_history(
- $comment->comment_ID,
- '',
- 'check-error',
- array( 'response' => substr( self::$last_comment['akismet_result'], 0, 50 ) )
- );
- }
-
- // record the complete original data as submitted for checking
- if ( isset( self::$last_comment['comment_as_submitted'] ) )
- update_comment_meta( $comment->comment_ID, 'akismet_as_submitted', self::$last_comment['comment_as_submitted'] );
-
- if ( isset( self::$last_comment['akismet_pro_tip'] ) )
- update_comment_meta( $comment->comment_ID, 'akismet_pro_tip', self::$last_comment['akismet_pro_tip'] );
- }
- }
- }
-
- public static function delete_old_comments() {
- global $wpdb;
-
- /**
- * Determines how many comments will be deleted in each batch.
- *
- * @param int The default, as defined by AKISMET_DELETE_LIMIT.
- */
- $delete_limit = apply_filters( 'akismet_delete_comment_limit', defined( 'AKISMET_DELETE_LIMIT' ) ? AKISMET_DELETE_LIMIT : 10000 );
- $delete_limit = max( 1, intval( $delete_limit ) );
-
- /**
- * Determines how many days a comment will be left in the Spam queue before being deleted.
- *
- * @param int The default number of days.
- */
- $delete_interval = apply_filters( 'akismet_delete_comment_interval', 15 );
- $delete_interval = max( 1, intval( $delete_interval ) );
-
- while ( $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_id FROM {$wpdb->comments} WHERE DATE_SUB(NOW(), INTERVAL %d DAY) > comment_date_gmt AND comment_approved = 'spam' LIMIT %d", $delete_interval, $delete_limit ) ) ) {
- if ( empty( $comment_ids ) )
- return;
-
- $wpdb->queries = array();
-
- foreach ( $comment_ids as $comment_id ) {
- do_action( 'delete_comment', $comment_id );
- do_action( 'akismet_batch_delete_count', __FUNCTION__ );
- }
-
- // Prepared as strings since comment_id is an unsigned BIGINT, and using %d will constrain the value to the maximum signed BIGINT.
- $format_string = implode( ", ", array_fill( 0, count( $comment_ids ), '%s' ) );
-
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->comments} WHERE comment_id IN ( " . $format_string . " )", $comment_ids ) );
- $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->commentmeta} WHERE comment_id IN ( " . $format_string . " )", $comment_ids ) );
-
- clean_comment_cache( $comment_ids );
- do_action( 'akismet_delete_comment_batch', count( $comment_ids ) );
- }
-
- if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->comments ) ) // lucky number
- $wpdb->query("OPTIMIZE TABLE {$wpdb->comments}");
- }
-
- public static function delete_old_comments_meta() {
- global $wpdb;
-
- $interval = apply_filters( 'akismet_delete_commentmeta_interval', 15 );
-
- # enforce a minimum of 1 day
- $interval = absint( $interval );
- if ( $interval < 1 )
- $interval = 1;
-
- // akismet_as_submitted meta values are large, so expire them
- // after $interval days regardless of the comment status
- while ( $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT m.comment_id FROM {$wpdb->commentmeta} as m INNER JOIN {$wpdb->comments} as c USING(comment_id) WHERE m.meta_key = 'akismet_as_submitted' AND DATE_SUB(NOW(), INTERVAL %d DAY) > c.comment_date_gmt LIMIT 10000", $interval ) ) ) {
- if ( empty( $comment_ids ) )
- return;
-
- $wpdb->queries = array();
-
- foreach ( $comment_ids as $comment_id ) {
- delete_comment_meta( $comment_id, 'akismet_as_submitted' );
- do_action( 'akismet_batch_delete_count', __FUNCTION__ );
- }
-
- do_action( 'akismet_delete_commentmeta_batch', count( $comment_ids ) );
- }
-
- if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->commentmeta ) ) // lucky number
- $wpdb->query("OPTIMIZE TABLE {$wpdb->commentmeta}");
- }
-
- // Clear out comments meta that no longer have corresponding comments in the database
- public static function delete_orphaned_commentmeta() {
- global $wpdb;
-
- $last_meta_id = 0;
- $start_time = isset( $_SERVER['REQUEST_TIME_FLOAT'] ) ? $_SERVER['REQUEST_TIME_FLOAT'] : microtime( true );
- $max_exec_time = max( ini_get('max_execution_time') - 5, 3 );
-
- while ( $commentmeta_results = $wpdb->get_results( $wpdb->prepare( "SELECT m.meta_id, m.comment_id, m.meta_key FROM {$wpdb->commentmeta} as m LEFT JOIN {$wpdb->comments} as c USING(comment_id) WHERE c.comment_id IS NULL AND m.meta_id > %d ORDER BY m.meta_id LIMIT 1000", $last_meta_id ) ) ) {
- if ( empty( $commentmeta_results ) )
- return;
-
- $wpdb->queries = array();
-
- $commentmeta_deleted = 0;
-
- foreach ( $commentmeta_results as $commentmeta ) {
- if ( 'akismet_' == substr( $commentmeta->meta_key, 0, 8 ) ) {
- delete_comment_meta( $commentmeta->comment_id, $commentmeta->meta_key );
- do_action( 'akismet_batch_delete_count', __FUNCTION__ );
- $commentmeta_deleted++;
- }
-
- $last_meta_id = $commentmeta->meta_id;
- }
-
- do_action( 'akismet_delete_commentmeta_batch', $commentmeta_deleted );
-
- // If we're getting close to max_execution_time, quit for this round.
- if ( microtime(true) - $start_time > $max_exec_time )
- return;
- }
-
- if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->commentmeta ) ) // lucky number
- $wpdb->query("OPTIMIZE TABLE {$wpdb->commentmeta}");
- }
-
- // how many approved comments does this author have?
- public static function get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {
- global $wpdb;
-
- if ( !empty( $user_id ) )
- return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->comments} WHERE user_id = %d AND comment_approved = 1", $user_id ) );
-
- if ( !empty( $comment_author_email ) )
- return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->comments} WHERE comment_author_email = %s AND comment_author = %s AND comment_author_url = %s AND comment_approved = 1", $comment_author_email, $comment_author, $comment_author_url ) );
-
- return 0;
- }
-
- // get the full comment history for a given comment, as an array in reverse chronological order
- public static function get_comment_history( $comment_id ) {
- $history = get_comment_meta( $comment_id, 'akismet_history', false );
- usort( $history, array( 'Akismet', '_cmp_time' ) );
- return $history;
- }
-
- /**
- * Log an event for a given comment, storing it in comment_meta.
- *
- * @param int $comment_id The ID of the relevant comment.
- * @param string $message The string description of the event. No longer used.
- * @param string $event The event code.
- * @param array $meta Metadata about the history entry. e.g., the user that reported or changed the status of a given comment.
- */
- public static function update_comment_history( $comment_id, $message, $event=null, $meta=null ) {
- global $current_user;
-
- $user = '';
-
- $event = array(
- 'time' => self::_get_microtime(),
- 'event' => $event,
- );
-
- if ( is_object( $current_user ) && isset( $current_user->user_login ) ) {
- $event['user'] = $current_user->user_login;
- }
-
- if ( ! empty( $meta ) ) {
- $event['meta'] = $meta;
- }
-
- // $unique = false so as to allow multiple values per comment
- $r = add_comment_meta( $comment_id, 'akismet_history', $event, false );
- }
-
- public static function check_db_comment( $id, $recheck_reason = 'recheck_queue' ) {
- global $wpdb;
-
- $c = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $id ), ARRAY_A );
-
- if ( ! $c ) {
- return new WP_Error( 'invalid-comment-id', __( 'Comment not found.', 'akismet' ) );
- }
-
- $c['user_ip'] = $c['comment_author_IP'];
- $c['user_agent'] = $c['comment_agent'];
- $c['referrer'] = '';
- $c['blog'] = get_option( 'home' );
- $c['blog_lang'] = get_locale();
- $c['blog_charset'] = get_option('blog_charset');
- $c['permalink'] = get_permalink($c['comment_post_ID']);
- $c['recheck_reason'] = $recheck_reason;
-
- $c['user_role'] = '';
- if ( ! empty( $c['user_ID'] ) ) {
- $c['user_role'] = Akismet::get_user_roles( $c['user_ID'] );
- }
-
- if ( self::is_test_mode() )
- $c['is_test'] = 'true';
-
- $response = self::http_post( Akismet::build_query( $c ), 'comment-check' );
-
- if ( ! empty( $response[1] ) ) {
- return $response[1];
- }
-
- return false;
- }
-
- public static function recheck_comment( $id, $recheck_reason = 'recheck_queue' ) {
- add_comment_meta( $id, 'akismet_rechecking', true );
-
- $api_response = self::check_db_comment( $id, $recheck_reason );
-
- delete_comment_meta( $id, 'akismet_rechecking' );
-
- if ( is_wp_error( $api_response ) ) {
- // Invalid comment ID.
- }
- else if ( 'true' === $api_response ) {
- wp_set_comment_status( $id, 'spam' );
- update_comment_meta( $id, 'akismet_result', 'true' );
- delete_comment_meta( $id, 'akismet_error' );
- delete_comment_meta( $id, 'akismet_delayed_moderation_email' );
- Akismet::update_comment_history( $id, '', 'recheck-spam' );
- }
- elseif ( 'false' === $api_response ) {
- update_comment_meta( $id, 'akismet_result', 'false' );
- delete_comment_meta( $id, 'akismet_error' );
- delete_comment_meta( $id, 'akismet_delayed_moderation_email' );
- Akismet::update_comment_history( $id, '', 'recheck-ham' );
- }
- else {
- // abnormal result: error
- update_comment_meta( $id, 'akismet_result', 'error' );
- Akismet::update_comment_history(
- $id,
- '',
- 'recheck-error',
- array( 'response' => substr( $api_response, 0, 50 ) )
- );
- }
-
- return $api_response;
- }
-
- public static function transition_comment_status( $new_status, $old_status, $comment ) {
-
- if ( $new_status == $old_status )
- return;
-
- if ( 'spam' === $new_status || 'spam' === $old_status ) {
- // Clear the cache of the "X comments in your spam queue" count on the dashboard.
- wp_cache_delete( 'akismet_spam_count', 'widget' );
- }
-
- # we don't need to record a history item for deleted comments
- if ( $new_status == 'delete' )
- return;
-
- if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) && !current_user_can( 'moderate_comments' ) )
- return;
-
- if ( defined('WP_IMPORTING') && WP_IMPORTING == true )
- return;
-
- // if this is present, it means the status has been changed by a re-check, not an explicit user action
- if ( get_comment_meta( $comment->comment_ID, 'akismet_rechecking' ) )
- return;
-
- // Assumption alert:
- // We want to submit comments to Akismet only when a moderator explicitly spams or approves it - not if the status
- // is changed automatically by another plugin. Unfortunately WordPress doesn't provide an unambiguous way to
- // determine why the transition_comment_status action was triggered. And there are several different ways by which
- // to spam and unspam comments: bulk actions, ajax, links in moderation emails, the dashboard, and perhaps others.
- // We'll assume that this is an explicit user action if certain POST/GET variables exist.
- if (
- // status=spam: Marking as spam via the REST API or...
- // status=unspam: I'm not sure. Maybe this used to be used instead of status=approved? Or the UI for removing from spam but not approving has been since removed?...
- // status=approved: Unspamming via the REST API (Calypso) or...
- ( isset( $_POST['status'] ) && in_array( $_POST['status'], array( 'spam', 'unspam', 'approved', ) ) )
- // spam=1: Clicking "Spam" underneath a comment in wp-admin and allowing the AJAX request to happen.
- || ( isset( $_POST['spam'] ) && (int) $_POST['spam'] == 1 )
- // unspam=1: Clicking "Not Spam" underneath a comment in wp-admin and allowing the AJAX request to happen. Or, clicking "Undo" after marking something as spam.
- || ( isset( $_POST['unspam'] ) && (int) $_POST['unspam'] == 1 )
- // comment_status=spam/unspam: It's unclear where this is happening.
- || ( isset( $_POST['comment_status'] ) && in_array( $_POST['comment_status'], array( 'spam', 'unspam' ) ) )
- // action=spam: Choosing "Mark as Spam" from the Bulk Actions dropdown in wp-admin (or the "Spam it" link in notification emails).
- // action=unspam: Choosing "Not Spam" from the Bulk Actions dropdown in wp-admin.
- // action=spamcomment: Following the "Spam" link below a comment in wp-admin (not allowing AJAX request to happen).
- // action=unspamcomment: Following the "Not Spam" link below a comment in wp-admin (not allowing AJAX request to happen).
- || ( isset( $_GET['action'] ) && in_array( $_GET['action'], array( 'spam', 'unspam', 'spamcomment', 'unspamcomment', ) ) )
- // action=editedcomment: Editing a comment via wp-admin (and possibly changing its status).
- || ( isset( $_POST['action'] ) && in_array( $_POST['action'], array( 'editedcomment' ) ) )
- // for=jetpack: Moderation via the WordPress app, Calypso, anything powered by the Jetpack connection.
- || ( isset( $_GET['for'] ) && ( 'jetpack' == $_GET['for'] ) && ( ! defined( 'IS_WPCOM' ) || ! IS_WPCOM ) )
- // Certain WordPress.com API requests
- || ( defined( 'REST_API_REQUEST' ) && REST_API_REQUEST )
- // WordPress.org REST API requests
- || ( defined( 'REST_REQUEST' ) && REST_REQUEST )
- ) {
- if ( $new_status == 'spam' && ( $old_status == 'approved' || $old_status == 'unapproved' || !$old_status ) ) {
- return self::submit_spam_comment( $comment->comment_ID );
- } elseif ( $old_status == 'spam' && ( $new_status == 'approved' || $new_status == 'unapproved' ) ) {
- return self::submit_nonspam_comment( $comment->comment_ID );
- }
- }
-
- self::update_comment_history( $comment->comment_ID, '', 'status-' . $new_status );
- }
-
- public static function submit_spam_comment( $comment_id ) {
- global $wpdb, $current_user, $current_site;
-
- $comment_id = (int) $comment_id;
-
- $comment = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $comment_id ) );
-
- if ( !$comment ) // it was deleted
- return;
-
- if ( 'spam' != $comment->comment_approved )
- return;
-
- // use the original version stored in comment_meta if available
- $as_submitted = self::sanitize_comment_as_submitted( get_comment_meta( $comment_id, 'akismet_as_submitted', true ) );
-
- if ( $as_submitted && is_array( $as_submitted ) && isset( $as_submitted['comment_content'] ) )
- $comment = (object) array_merge( (array)$comment, $as_submitted );
-
- $comment->blog = get_option( 'home' );
- $comment->blog_lang = get_locale();
- $comment->blog_charset = get_option('blog_charset');
- $comment->permalink = get_permalink($comment->comment_post_ID);
-
- if ( is_object($current_user) )
- $comment->reporter = $current_user->user_login;
-
- if ( is_object($current_site) )
- $comment->site_domain = $current_site->domain;
-
- $comment->user_role = '';
- if ( ! empty( $comment->user_ID ) ) {
- $comment->user_role = Akismet::get_user_roles( $comment->user_ID );
- }
-
- if ( self::is_test_mode() )
- $comment->is_test = 'true';
-
- $post = get_post( $comment->comment_post_ID );
-
- if ( ! is_null( $post ) ) {
- $comment->comment_post_modified_gmt = $post->post_modified_gmt;
- }
-
- $response = Akismet::http_post( Akismet::build_query( $comment ), 'submit-spam' );
- if ( $comment->reporter ) {
- self::update_comment_history( $comment_id, '', 'report-spam' );
- update_comment_meta( $comment_id, 'akismet_user_result', 'true' );
- update_comment_meta( $comment_id, 'akismet_user', $comment->reporter );
- }
-
- do_action('akismet_submit_spam_comment', $comment_id, $response[1]);
- }
-
- public static function submit_nonspam_comment( $comment_id ) {
- global $wpdb, $current_user, $current_site;
-
- $comment_id = (int) $comment_id;
-
- $comment = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_ID = %d", $comment_id ) );
- if ( !$comment ) // it was deleted
- return;
-
- // use the original version stored in comment_meta if available
- $as_submitted = self::sanitize_comment_as_submitted( get_comment_meta( $comment_id, 'akismet_as_submitted', true ) );
-
- if ( $as_submitted && is_array($as_submitted) && isset($as_submitted['comment_content']) )
- $comment = (object) array_merge( (array)$comment, $as_submitted );
-
- $comment->blog = get_option( 'home' );
- $comment->blog_lang = get_locale();
- $comment->blog_charset = get_option('blog_charset');
- $comment->permalink = get_permalink( $comment->comment_post_ID );
- $comment->user_role = '';
-
- if ( is_object($current_user) )
- $comment->reporter = $current_user->user_login;
-
- if ( is_object($current_site) )
- $comment->site_domain = $current_site->domain;
-
- if ( ! empty( $comment->user_ID ) ) {
- $comment->user_role = Akismet::get_user_roles( $comment->user_ID );
- }
-
- if ( Akismet::is_test_mode() )
- $comment->is_test = 'true';
-
- $post = get_post( $comment->comment_post_ID );
-
- if ( ! is_null( $post ) ) {
- $comment->comment_post_modified_gmt = $post->post_modified_gmt;
- }
-
- $response = self::http_post( Akismet::build_query( $comment ), 'submit-ham' );
- if ( $comment->reporter ) {
- self::update_comment_history( $comment_id, '', 'report-ham' );
- update_comment_meta( $comment_id, 'akismet_user_result', 'false' );
- update_comment_meta( $comment_id, 'akismet_user', $comment->reporter );
- }
-
- do_action('akismet_submit_nonspam_comment', $comment_id, $response[1]);
- }
-
- public static function cron_recheck() {
- global $wpdb;
-
- $api_key = self::get_api_key();
-
- $status = self::verify_key( $api_key );
- if ( get_option( 'akismet_alert_code' ) || $status == 'invalid' ) {
- // since there is currently a problem with the key, reschedule a check for 6 hours hence
- wp_schedule_single_event( time() + 21600, 'akismet_schedule_cron_recheck' );
- do_action( 'akismet_scheduled_recheck', 'key-problem-' . get_option( 'akismet_alert_code' ) . '-' . $status );
- return false;
- }
-
- delete_option('akismet_available_servers');
-
- $comment_errors = $wpdb->get_col( "SELECT comment_id FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error' LIMIT 100" );
-
- load_plugin_textdomain( 'akismet' );
-
- foreach ( (array) $comment_errors as $comment_id ) {
- // if the comment no longer exists, or is too old, remove the meta entry from the queue to avoid getting stuck
- $comment = get_comment( $comment_id );
-
- if (
- ! $comment // Comment has been deleted
- || strtotime( $comment->comment_date_gmt ) < strtotime( "-15 days" ) // Comment is too old.
- || $comment->comment_approved !== "0" // Comment is no longer in the Pending queue
- ) {
- delete_comment_meta( $comment_id, 'akismet_error' );
- delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' );
- continue;
- }
-
- add_comment_meta( $comment_id, 'akismet_rechecking', true );
- $status = self::check_db_comment( $comment_id, 'retry' );
-
- $event = '';
- if ( $status == 'true' ) {
- $event = 'cron-retry-spam';
- } elseif ( $status == 'false' ) {
- $event = 'cron-retry-ham';
- }
-
- // If we got back a legit response then update the comment history
- // other wise just bail now and try again later. No point in
- // re-trying all the comments once we hit one failure.
- if ( !empty( $event ) ) {
- delete_comment_meta( $comment_id, 'akismet_error' );
- self::update_comment_history( $comment_id, '', $event );
- update_comment_meta( $comment_id, 'akismet_result', $status );
- // make sure the comment status is still pending. if it isn't, that means the user has already moved it elsewhere.
- $comment = get_comment( $comment_id );
- if ( $comment && 'unapproved' == wp_get_comment_status( $comment_id ) ) {
- if ( $status == 'true' ) {
- wp_spam_comment( $comment_id );
- } elseif ( $status == 'false' ) {
- // comment is good, but it's still in the pending queue. depending on the moderation settings
- // we may need to change it to approved.
- if ( check_comment($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent, $comment->comment_type) )
- wp_set_comment_status( $comment_id, 1 );
- else if ( get_comment_meta( $comment_id, 'akismet_delayed_moderation_email', true ) )
- wp_notify_moderator( $comment_id );
- }
- }
-
- delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' );
- } else {
- // If this comment has been pending moderation for longer than MAX_DELAY_BEFORE_MODERATION_EMAIL,
- // send a moderation email now.
- if ( ( intval( gmdate( 'U' ) ) - strtotime( $comment->comment_date_gmt ) ) < self::MAX_DELAY_BEFORE_MODERATION_EMAIL ) {
- delete_comment_meta( $comment_id, 'akismet_delayed_moderation_email' );
- wp_notify_moderator( $comment_id );
- }
-
- delete_comment_meta( $comment_id, 'akismet_rechecking' );
- wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
- do_action( 'akismet_scheduled_recheck', 'check-db-comment-' . $status );
- return;
- }
- delete_comment_meta( $comment_id, 'akismet_rechecking' );
- }
-
- $remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" );
- if ( $remaining && !wp_next_scheduled('akismet_schedule_cron_recheck') ) {
- wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
- do_action( 'akismet_scheduled_recheck', 'remaining' );
- }
- }
-
- public static function fix_scheduled_recheck() {
- $future_check = wp_next_scheduled( 'akismet_schedule_cron_recheck' );
- if ( !$future_check ) {
- return;
- }
-
- if ( get_option( 'akismet_alert_code' ) > 0 ) {
- return;
- }
-
- $check_range = time() + 1200;
- if ( $future_check > $check_range ) {
- wp_clear_scheduled_hook( 'akismet_schedule_cron_recheck' );
- wp_schedule_single_event( time() + 300, 'akismet_schedule_cron_recheck' );
- do_action( 'akismet_scheduled_recheck', 'fix-scheduled-recheck' );
- }
- }
-
- public static function add_comment_nonce( $post_id ) {
- /**
- * To disable the Akismet comment nonce, add a filter for the 'akismet_comment_nonce' tag
- * and return any string value that is not 'true' or '' (empty string).
- *
- * Don't return boolean false, because that implies that the 'akismet_comment_nonce' option
- * has not been set and that Akismet should just choose the default behavior for that
- * situation.
- */
- $akismet_comment_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) );
-
- if ( $akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '' ) {
- echo '<p style="display: none;">';
- wp_nonce_field( 'akismet_comment_nonce_' . $post_id, 'akismet_comment_nonce', FALSE );
- echo '</p>';
- }
- }
-
- public static function is_test_mode() {
- return defined('AKISMET_TEST_MODE') && AKISMET_TEST_MODE;
- }
-
- public static function allow_discard() {
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
- return false;
- if ( is_user_logged_in() )
- return false;
-
- return ( get_option( 'akismet_strictness' ) === '1' );
- }
-
- public static function get_ip_address() {
- return isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : null;
- }
-
- /**
- * Do these two comments, without checking the comment_ID, "match"?
- *
- * @param mixed $comment1 A comment object or array.
- * @param mixed $comment2 A comment object or array.
- * @return bool Whether the two comments should be treated as the same comment.
- */
- private static function comments_match( $comment1, $comment2 ) {
- $comment1 = (array) $comment1;
- $comment2 = (array) $comment2;
-
- // Set default values for these strings that we check in order to simplify
- // the checks and avoid PHP warnings.
- if ( ! isset( $comment1['comment_author'] ) ) {
- $comment1['comment_author'] = '';
- }
-
- if ( ! isset( $comment2['comment_author'] ) ) {
- $comment2['comment_author'] = '';
- }
-
- if ( ! isset( $comment1['comment_author_email'] ) ) {
- $comment1['comment_author_email'] = '';
- }
-
- if ( ! isset( $comment2['comment_author_email'] ) ) {
- $comment2['comment_author_email'] = '';
- }
-
- $comments_match = (
- isset( $comment1['comment_post_ID'], $comment2['comment_post_ID'] )
- && intval( $comment1['comment_post_ID'] ) == intval( $comment2['comment_post_ID'] )
- && (
- // The comment author length max is 255 characters, limited by the TINYTEXT column type.
- // If the comment author includes multibyte characters right around the 255-byte mark, they
- // may be stripped when the author is saved in the DB, so a 300+ char author may turn into
- // a 253-char author when it's saved, not 255 exactly. The longest possible character is
- // theoretically 6 bytes, so we'll only look at the first 248 bytes to be safe.
- substr( $comment1['comment_author'], 0, 248 ) == substr( $comment2['comment_author'], 0, 248 )
- || substr( stripslashes( $comment1['comment_author'] ), 0, 248 ) == substr( $comment2['comment_author'], 0, 248 )
- || substr( $comment1['comment_author'], 0, 248 ) == substr( stripslashes( $comment2['comment_author'] ), 0, 248 )
- // Certain long comment author names will be truncated to nothing, depending on their encoding.
- || ( ! $comment1['comment_author'] && strlen( $comment2['comment_author'] ) > 248 )
- || ( ! $comment2['comment_author'] && strlen( $comment1['comment_author'] ) > 248 )
- )
- && (
- // The email max length is 100 characters, limited by the VARCHAR(100) column type.
- // Same argument as above for only looking at the first 93 characters.
- substr( $comment1['comment_author_email'], 0, 93 ) == substr( $comment2['comment_author_email'], 0, 93 )
- || substr( stripslashes( $comment1['comment_author_email'] ), 0, 93 ) == substr( $comment2['comment_author_email'], 0, 93 )
- || substr( $comment1['comment_author_email'], 0, 93 ) == substr( stripslashes( $comment2['comment_author_email'] ), 0, 93 )
- // Very long emails can be truncated and then stripped if the [0:100] substring isn't a valid address.
- || ( ! $comment1['comment_author_email'] && strlen( $comment2['comment_author_email'] ) > 100 )
- || ( ! $comment2['comment_author_email'] && strlen( $comment1['comment_author_email'] ) > 100 )
- )
- );
-
- return $comments_match;
- }
-
- // Does the supplied comment match the details of the one most recently stored in self::$last_comment?
- public static function matches_last_comment( $comment ) {
- return self::comments_match( self::$last_comment, $comment );
- }
-
- private static function get_user_agent() {
- return isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : null;
- }
-
- private static function get_referer() {
- return isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : null;
- }
-
- // return a comma-separated list of role names for the given user
- public static function get_user_roles( $user_id ) {
- $roles = false;
-
- if ( !class_exists('WP_User') )
- return false;
-
- if ( $user_id > 0 ) {
- $comment_user = new WP_User( $user_id );
- if ( isset( $comment_user->roles ) )
- $roles = join( ',', $comment_user->roles );
- }
-
- if ( is_multisite() && is_super_admin( $user_id ) ) {
- if ( empty( $roles ) ) {
- $roles = 'super_admin';
- } else {
- $comment_user->roles[] = 'super_admin';
- $roles = join( ',', $comment_user->roles );
- }
- }
-
- return $roles;
- }
-
- // filter handler used to return a spam result to pre_comment_approved
- public static function last_comment_status( $approved, $comment ) {
- if ( is_null( self::$last_comment_result ) ) {
- // We didn't have reason to store the result of the last check.
- return $approved;
- }
-
- // Only do this if it's the correct comment
- if ( ! self::matches_last_comment( $comment ) ) {
- self::log( "comment_is_spam mismatched comment, returning unaltered $approved" );
- return $approved;
- }
-
- if ( 'trash' === $approved ) {
- // If the last comment we checked has had its approval set to 'trash',
- // then it failed the comment blacklist check. Let that blacklist override
- // the spam check, since users have the (valid) expectation that when
- // they fill out their blacklists, comments that match it will always
- // end up in the trash.
- return $approved;
- }
-
- // bump the counter here instead of when the filter is added to reduce the possibility of overcounting
- if ( $incr = apply_filters('akismet_spam_count_incr', 1) )
- update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr );
-
- return self::$last_comment_result;
- }
-
- /**
- * If Akismet is temporarily unreachable, we don't want to "spam" the blogger with
- * moderation emails for comments that will be automatically cleared or spammed on
- * the next retry.
- *
- * For comments that will be rechecked later, empty the list of email addresses that
- * the moderation email would be sent to.
- *
- * @param array $emails An array of email addresses that the moderation email will be sent to.
- * @param int $comment_id The ID of the relevant comment.
- * @return array An array of email addresses that the moderation email will be sent to.
- */
- public static function disable_moderation_emails_if_unreachable( $emails, $comment_id ) {
- if ( ! empty( self::$prevent_moderation_email_for_these_comments ) && ! empty( $emails ) ) {
- $comment = get_comment( $comment_id );
-
- foreach ( self::$prevent_moderation_email_for_these_comments as $possible_match ) {
- if ( self::comments_match( $possible_match, $comment ) ) {
- update_comment_meta( $comment_id, 'akismet_delayed_moderation_email', true );
- return array();
- }
- }
- }
-
- return $emails;
- }
-
- public static function _cmp_time( $a, $b ) {
- return $a['time'] > $b['time'] ? -1 : 1;
- }
-
- public static function _get_microtime() {
- $mtime = explode( ' ', microtime() );
- return $mtime[1] + $mtime[0];
- }
-
- /**
- * Make a POST request to the Akismet API.
- *
- * @param string $request The body of the request.
- * @param string $path The path for the request.
- * @param string $ip The specific IP address to hit.
- * @return array A two-member array consisting of the headers and the response body, both empty in the case of a failure.
- */
- public static function http_post( $request, $path, $ip=null ) {
-
- $akismet_ua = sprintf( 'WordPress/%s | Akismet/%s', $GLOBALS['wp_version'], constant( 'AKISMET_VERSION' ) );
- $akismet_ua = apply_filters( 'akismet_ua', $akismet_ua );
-
- $content_length = strlen( $request );
-
- $api_key = self::get_api_key();
- $host = self::API_HOST;
-
- if ( !empty( $api_key ) )
- $host = $api_key.'.'.$host;
-
- $http_host = $host;
- // use a specific IP if provided
- // needed by Akismet_Admin::check_server_connectivity()
- if ( $ip && long2ip( ip2long( $ip ) ) ) {
- $http_host = $ip;
- }
-
- $http_args = array(
- 'body' => $request,
- 'headers' => array(
- 'Content-Type' => 'application/x-www-form-urlencoded; charset=' . get_option( 'blog_charset' ),
- 'Host' => $host,
- 'User-Agent' => $akismet_ua,
- ),
- 'httpversion' => '1.0',
- 'timeout' => 15
- );
-
- $akismet_url = $http_akismet_url = "http://{$http_host}/1.1/{$path}";
-
- /**
- * Try SSL first; if that fails, try without it and don't try it again for a while.
- */
-
- $ssl = $ssl_failed = false;
-
- // Check if SSL requests were disabled fewer than X hours ago.
- $ssl_disabled = get_option( 'akismet_ssl_disabled' );
-
- if ( $ssl_disabled && $ssl_disabled < ( time() - 60 * 60 * 24 ) ) { // 24 hours
- $ssl_disabled = false;
- delete_option( 'akismet_ssl_disabled' );
- }
- else if ( $ssl_disabled ) {
- do_action( 'akismet_ssl_disabled' );
- }
-
- if ( ! $ssl_disabled && ( $ssl = wp_http_supports( array( 'ssl' ) ) ) ) {
- $akismet_url = set_url_scheme( $akismet_url, 'https' );
-
- do_action( 'akismet_https_request_pre' );
- }
-
- $response = wp_remote_post( $akismet_url, $http_args );
-
- Akismet::log( compact( 'akismet_url', 'http_args', 'response' ) );
-
- if ( $ssl && is_wp_error( $response ) ) {
- do_action( 'akismet_https_request_failure', $response );
-
- // Intermittent connection problems may cause the first HTTPS
- // request to fail and subsequent HTTP requests to succeed randomly.
- // Retry the HTTPS request once before disabling SSL for a time.
- $response = wp_remote_post( $akismet_url, $http_args );
-
- Akismet::log( compact( 'akismet_url', 'http_args', 'response' ) );
-
- if ( is_wp_error( $response ) ) {
- $ssl_failed = true;
-
- do_action( 'akismet_https_request_failure', $response );
-
- do_action( 'akismet_http_request_pre' );
-
- // Try the request again without SSL.
- $response = wp_remote_post( $http_akismet_url, $http_args );
-
- Akismet::log( compact( 'http_akismet_url', 'http_args', 'response' ) );
- }
- }
-
- if ( is_wp_error( $response ) ) {
- do_action( 'akismet_request_failure', $response );
-
- return array( '', '' );
- }
-
- if ( $ssl_failed ) {
- // The request failed when using SSL but succeeded without it. Disable SSL for future requests.
- update_option( 'akismet_ssl_disabled', time() );
-
- do_action( 'akismet_https_disabled' );
- }
-
- $simplified_response = array( $response['headers'], $response['body'] );
-
- self::update_alert( $simplified_response );
-
- return $simplified_response;
- }
-
- // given a response from an API call like check_key_status(), update the alert code options if an alert is present.
- public static function update_alert( $response ) {
- $code = $msg = null;
- if ( isset( $response[0]['x-akismet-alert-code'] ) ) {
- $code = $response[0]['x-akismet-alert-code'];
- $msg = $response[0]['x-akismet-alert-msg'];
- }
-
- // only call update_option() if the value has changed
- if ( $code != get_option( 'akismet_alert_code' ) ) {
- if ( ! $code ) {
- delete_option( 'akismet_alert_code' );
- delete_option( 'akismet_alert_msg' );
- }
- else {
- update_option( 'akismet_alert_code', $code );
- update_option( 'akismet_alert_msg', $msg );
- }
- }
- }
-
- public static function load_form_js() {
- if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) {
- return;
- }
-
- wp_register_script( 'akismet-form', plugin_dir_url( __FILE__ ) . '_inc/form.js', array(), AKISMET_VERSION, true );
- wp_enqueue_script( 'akismet-form' );
- }
-
- /**
- * Mark form.js as async. Because nothing depends on it, it can run at any time
- * after it's loaded, and the browser won't have to wait for it to load to continue
- * parsing the rest of the page.
- */
- public static function set_form_js_async( $tag, $handle, $src ) {
- if ( 'akismet-form' !== $handle ) {
- return $tag;
- }
-
- return preg_replace( '/^<script /i', '<script async="async" ', $tag );
- }
-
- public static function inject_ak_js( $fields ) {
- echo '<p style="display: none;">';
- echo '<input type="hidden" id="ak_js" name="ak_js" value="' . mt_rand( 0, 250 ) . '"/>';
- echo '</p>';
- }
-
- private static function bail_on_activation( $message, $deactivate = true ) {
-?>
-<!doctype html>
-<html>
-<head>
-<meta charset="<?php bloginfo( 'charset' ); ?>" />
-<style>
-* {
- text-align: center;
- margin: 0;
- padding: 0;
- font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
-}
-p {
- margin-top: 1em;
- font-size: 18px;
-}
-</style>
-</head>
-<body>
-<p><?php echo esc_html( $message ); ?></p>
-</body>
-</html>
-<?php
- if ( $deactivate ) {
- $plugins = get_option( 'active_plugins' );
- $akismet = plugin_basename( AKISMET__PLUGIN_DIR . 'akismet.php' );
- $update = false;
- foreach ( $plugins as $i => $plugin ) {
- if ( $plugin === $akismet ) {
- $plugins[$i] = false;
- $update = true;
- }
- }
-
- if ( $update ) {
- update_option( 'active_plugins', array_filter( $plugins ) );
- }
- }
- exit;
- }
-
- public static function view( $name, array $args = array() ) {
- $args = apply_filters( 'akismet_view_arguments', $args, $name );
-
- foreach ( $args AS $key => $val ) {
- $$key = $val;
- }
-
- load_plugin_textdomain( 'akismet' );
-
- $file = AKISMET__PLUGIN_DIR . 'views/'. $name . '.php';
-
- include( $file );
- }
-
- /**
- * Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
- * @static
- */
- public static function plugin_activation() {
- if ( version_compare( $GLOBALS['wp_version'], AKISMET__MINIMUM_WP_VERSION, '<' ) ) {
- load_plugin_textdomain( 'akismet' );
-
- $message = '<strong>'.sprintf(esc_html__( 'Akismet %s requires WordPress %s or higher.' , 'akismet'), AKISMET_VERSION, AKISMET__MINIMUM_WP_VERSION ).'</strong> '.sprintf(__('Please <a href="%1$s">upgrade WordPress</a> to a current version, or <a href="%2$s">downgrade to version 2.4 of the Akismet plugin</a>.', 'akismet'), 'https://codex.wordpress.org/Upgrading_WordPress', 'https://wordpress.org/extend/plugins/akismet/download/');
-
- Akismet::bail_on_activation( $message );
- }
- }
-
- /**
- * Removes all connection options
- * @static
- */
- public static function plugin_deactivation( ) {
- self::deactivate_key( self::get_api_key() );
-
- // Remove any scheduled cron jobs.
- $akismet_cron_events = array(
- 'akismet_schedule_cron_recheck',
- 'akismet_scheduled_delete',
- );
-
- foreach ( $akismet_cron_events as $akismet_cron_event ) {
- $timestamp = wp_next_scheduled( $akismet_cron_event );
-
- if ( $timestamp ) {
- wp_unschedule_event( $timestamp, $akismet_cron_event );
- }
- }
- }
-
- /**
- * Essentially a copy of WP's build_query but one that doesn't expect pre-urlencoded values.
- *
- * @param array $args An array of key => value pairs
- * @return string A string ready for use as a URL query string.
- */
- public static function build_query( $args ) {
- return _http_build_query( $args, '', '&' );
- }
-
- /**
- * Log debugging info to the error log.
- *
- * Enabled when WP_DEBUG_LOG is enabled (and WP_DEBUG, since according to
- * core, "WP_DEBUG_DISPLAY and WP_DEBUG_LOG perform no function unless
- * WP_DEBUG is true), but can be disabled via the akismet_debug_log filter.
- *
- * @param mixed $akismet_debug The data to log.
- */
- public static function log( $akismet_debug ) {
- if ( apply_filters( 'akismet_debug_log', defined( 'WP_DEBUG' ) && WP_DEBUG && defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG && defined( 'AKISMET_DEBUG' ) && AKISMET_DEBUG ) ) {
- error_log( print_r( compact( 'akismet_debug' ), true ) );
- }
- }
-
- public static function pre_check_pingback( $method ) {
- if ( $method !== 'pingback.ping' )
- return;
-
- global $wp_xmlrpc_server;
-
- if ( !is_object( $wp_xmlrpc_server ) )
- return false;
-
- // Lame: tightly coupled with the IXR class.
- $args = $wp_xmlrpc_server->message->params;
-
- if ( !empty( $args[1] ) ) {
- $post_id = url_to_postid( $args[1] );
-
- // If pingbacks aren't open on this post, we'll still check whether this request is part of a potential DDOS,
- // but indicate to the server that pingbacks are indeed closed so we don't include this request in the user's stats,
- // since the user has already done their part by disabling pingbacks.
- $pingbacks_closed = false;
-
- $post = get_post( $post_id );
-
- if ( ! $post || ! pings_open( $post ) ) {
- $pingbacks_closed = true;
- }
-
- $comment = array(
- 'comment_author_url' => $args[0],
- 'comment_post_ID' => $post_id,
- 'comment_author' => '',
- 'comment_author_email' => '',
- 'comment_content' => '',
- 'comment_type' => 'pingback',
- 'akismet_pre_check' => '1',
- 'comment_pingback_target' => $args[1],
- 'pingbacks_closed' => $pingbacks_closed ? '1' : '0',
- );
-
- $comment = Akismet::auto_check_comment( $comment );
-
- if ( isset( $comment['akismet_result'] ) && 'true' == $comment['akismet_result'] ) {
- // Lame: tightly coupled with the IXR classes. Unfortunately the action provides no context and no way to return anything.
- $wp_xmlrpc_server->error( new IXR_Error( 0, 'Invalid discovery target' ) );
- }
- }
- }
-
- /**
- * Ensure that we are loading expected scalar values from akismet_as_submitted commentmeta.
- *
- * @param mixed $meta_value
- * @return mixed
- */
- private static function sanitize_comment_as_submitted( $meta_value ) {
- if ( empty( $meta_value ) ) {
- return $meta_value;
- }
-
- $meta_value = (array) $meta_value;
-
- foreach ( $meta_value as $key => $value ) {
- if ( ! isset( self::$comment_as_submitted_allowed_keys[$key] ) || ! is_scalar( $value ) ) {
- unset( $meta_value[$key] );
- }
- }
-
- return $meta_value;
- }
-
- public static function predefined_api_key() {
- if ( defined( 'WPCOM_API_KEY' ) ) {
- return true;
- }
-
- return apply_filters( 'akismet_predefined_api_key', false );
- }
-
- /**
- * Controls the display of a privacy related notice underneath the comment form using the `akismet_comment_form_privacy_notice` option and filter respectively.
- * Default is top not display the notice, leaving the choice to site admins, or integrators.
- */
- public static function display_comment_form_privacy_notice() {
- if ( 'display' !== apply_filters( 'akismet_comment_form_privacy_notice', get_option( 'akismet_comment_form_privacy_notice', 'hide' ) ) ) {
- return;
- }
- echo apply_filters(
- 'akismet_comment_form_privacy_notice_markup',
- '<p class="akismet_comment_form_privacy_notice">' . sprintf(
- __( 'This site uses Akismet to reduce spam. <a href="%s" target="_blank" rel="nofollow noopener">Learn how your comment data is processed</a>.', 'akismet' ),
- 'https://akismet.com/privacy/'
- ) . '</p>'
- );
- }
-}
diff --git a/plugins/akismet/index.php b/plugins/akismet/index.php
deleted file mode 100644
index cf879a5e..00000000
--- a/plugins/akismet/index.php
+++ /dev/null
@@ -1,2 +0,0 @@
-<?php
-# Silence is golden. \ No newline at end of file
diff --git a/plugins/akismet/readme.txt b/plugins/akismet/readme.txt
deleted file mode 100644
index 15526e9a..00000000
--- a/plugins/akismet/readme.txt
+++ /dev/null
@@ -1,466 +0,0 @@
-=== Akismet Anti-Spam ===
-Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer, stephdau
-Tags: akismet, comments, spam, antispam, anti-spam, anti spam, comment moderation, comment spam, contact form spam, spam comments
-Requires at least: 4.0
-Tested up to: 5.2
-Stable tag: 4.1.2
-License: GPLv2 or later
-
-Akismet checks your comments and contact form submissions against our global database of spam to protect you and your site from malicious content.
-
-== Description ==
-
-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 need an [Akismet.com API key](https://akismet.com/get/) to use it. 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, then enter your [Akismet.com API key](https://akismet.com/get/).
-
-1, 2, 3: You're done!
-
-== Changelog ==
-
-= 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
diff --git a/plugins/akismet/views/config.php b/plugins/akismet/views/config.php
deleted file mode 100644
index 6bbcd6d4..00000000
--- a/plugins/akismet/views/config.php
+++ /dev/null
@@ -1,242 +0,0 @@
-<div id="akismet-plugin-container">
- <div class="akismet-masthead">
- <div class="akismet-masthead__inside-container">
- <div class="akismet-masthead__logo-container">
- <img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />
- </div>
- </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 } ?>
- <?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?>
- <div class="akismet-card">
- <div class="akismet-section-header">
- <div class="akismet-section-header__label">
- <span><?php esc_html_e( 'Statistics' , 'akismet'); ?></span>
- </div>
- <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>
-
- <div class="akismet-new-snapshot">
- <iframe allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php printf( '//akismet.com/web/1.0/snapshot.php?blog=%s&api_key=%s&height=200&locale=%s', urlencode( get_option( 'home' ) ), Akismet::get_api_key(), get_locale() );?>"></iframe>
- <ul>
- <li>
- <h3><?php esc_html_e( 'Past six months' , 'akismet');?></h3>
- <span><?php echo number_format( $stat_totals['6-months']->spam );?></span>
- <?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?>
- </li>
- <li>
- <h3><?php esc_html_e( 'All time' , 'akismet');?></h3>
- <span><?php echo number_format( $stat_totals['all']->spam );?></span>
- <?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?>
- </li>
- <li>
- <h3><?php esc_html_e( 'Accuracy' , 'akismet');?></h3>
- <span><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span>
- <?php printf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ); ?>
- |
- <?php printf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ); ?>
- </li>
- </ul>
- </div>
- </div>
- <?php endif;?>
-
- <?php if ( $akismet_user ):?>
- <div class="akismet-card">
- <div class="akismet-section-header">
- <div class="akismet-section-header__label">
- <span><?php esc_html_e( 'Settings' , 'akismet'); ?></span>
- </div>
- </div>
-
- <div class="inside">
- <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST">
- <table cellspacing="0" class="akismet-settings">
- <tbody>
- <?php if ( ! Akismet::predefined_api_key() ) { ?>
- <tr>
- <th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
- <td width="5%"/>
- <td align="left">
- <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>
- </td>
- </tr>
- <?php } ?>
- <?php if ( isset( $_GET['ssl_status'] ) ) { ?>
- <tr>
- <th align="left" scope="row"><?php esc_html_e( 'SSL Status', 'akismet' ); ?></th>
- <td></td>
- <td align="left">
- <p>
- <?php
-
- if ( ! wp_http_supports( array( 'ssl' ) ) ) {
- ?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?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 {
- $ssl_disabled = get_option( 'akismet_ssl_disabled' );
-
- if ( $ssl_disabled ) {
- ?><b><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></b> <?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 {
- ?><b><?php esc_html_e( 'Enabled.', 'akismet' ); ?></b> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?><?php
- }
- }
-
- ?>
- </p>
- </td>
- </tr>
- <?php } ?>
- <tr>
- <th align="left" scope="row"><?php esc_html_e('Comments', 'akismet');?></th>
- <td></td>
- <td align="left">
- <p>
- <label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' , 'akismet'); ?>">
- <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 ) ) );
-
- ?>
- />
- <?php esc_html_e( 'Show the number of approved comments beside each comment author', 'akismet' ); ?>
- </label>
- </p>
- </td>
- </tr>
- <tr>
- <th class="strictness" align="left" scope="row"><?php esc_html_e('Strictness', 'akismet'); ?></th>
- <td></td>
- <td align="left">
- <fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness', 'akismet'); ?></span></legend>
- <p><label for="akismet_strictness_1"><input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked('1', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Silently discard the worst and most pervasive spam so I never see it.', 'akismet'); ?></label></p>
- <p><label for="akismet_strictness_0"><input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked('0', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Always put spam in the Spam folder for review.', 'akismet'); ?></label></p>
- </fieldset>
- <span class="akismet-note"><strong><?php esc_html_e('Note:', 'akismet');?></strong>
- <?php
-
- $delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) );
-
- printf(
- _n(
- 'Spam in the <a href="%1$s">spam folder</a> older than 1 day is deleted automatically.',
- 'Spam in the <a href="%1$s">spam folder</a> older than %2$d days is deleted automatically.',
- $delete_interval,
- 'akismet'
- ),
- admin_url( 'edit-comments.php?comment_status=spam' ),
- $delete_interval
- );
-
- ?>
- </td>
- </tr>
- <tr>
- <th class="comment-form-privacy-notice" align="left" scope="row"><?php esc_html_e('Privacy', 'akismet'); ?></th>
- <td></td>
- <td align="left">
- <fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet privacy notice', 'akismet'); ?></span></legend>
- <p><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')); ?> /> <?php esc_html_e('Display a privacy notice under your comment forms.', 'akismet'); ?></label></p>
- <p><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') ) ? checked('hide', get_option('akismet_comment_form_privacy_notice'), false) : 'checked="checked"'; ?> /> <?php esc_html_e('Do not display privacy notice.', 'akismet'); ?></label></p>
- </fieldset>
- <span class="akismet-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. This feature is disabled by default, however, you can turn it on above.', 'akismet' );?></span>
- </td>
- </tr>
- </tbody>
- </table>
- <div class="akismet-card-actions">
- <?php if ( ! Akismet::predefined_api_key() ) { ?>
- <div id="delete-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 } ?>
- <?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 class="clear"></div>
- </div>
- </form>
- </div>
- </div>
-
- <?php if ( ! Akismet::predefined_api_key() ) { ?>
- <div class="akismet-card">
- <div class="akismet-section-header">
- <div class="akismet-section-header__label">
- <span><?php esc_html_e( 'Account' , 'akismet'); ?></span>
- </div>
- </div>
-
- <div class="inside">
- <table cellspacing="0" border="0" class="akismet-settings">
- <tbody>
- <tr>
- <th scope="row" align="left"><?php esc_html_e( 'Subscription Type' , 'akismet');?></th>
- <td width="5%"/>
- <td align="left">
- <p><?php echo esc_html( $akismet_user->account_name ); ?></p>
- </td>
- </tr>
- <tr>
- <th scope="row" align="left"><?php esc_html_e( 'Status' , 'akismet');?></th>
- <td width="5%"/>
- <td align="left">
- <p><?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; ?></p>
- </td>
- </tr>
- <?php if ( $akismet_user->next_billing_date ) : ?>
- <tr>
- <th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' , 'akismet');?></th>
- <td width="5%"/>
- <td align="left">
- <p><?php echo date( 'F j, Y', $akismet_user->next_billing_date ); ?></p>
- </td>
- </tr>
- <?php endif; ?>
- </tbody>
- </table>
- <div class="akismet-card-actions">
- <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 class="clear"></div>
- </div>
- </div>
- </div>
- <?php } ?>
- <?php endif;?>
- </div>
-</div>
diff --git a/plugins/akismet/views/get.php b/plugins/akismet/views/get.php
deleted file mode 100644
index b1abe0eb..00000000
--- a/plugins/akismet/views/get.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-//phpcs:disable VariableAnalysis
-// There are "undefined" variables here because they're defined in the code that includes this file as a template.
-
-?>
-<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'; ?>"/>
- <input type="submit" class="<?php echo isset( $classes ) && count( $classes ) > 0 ? implode( ' ', $classes ) : 'akismet-button';?>" value="<?php echo esc_attr( $text ); ?>"/>
-</form> \ No newline at end of file
diff --git a/plugins/akismet/views/notice.php b/plugins/akismet/views/notice.php
deleted file mode 100644
index 7f70fc12..00000000
--- a/plugins/akismet/views/notice.php
+++ /dev/null
@@ -1,141 +0,0 @@
-<?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 _e('<strong>Almost done</strong> - configure Akismet and say goodbye to spam', 'akismet');?></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 $link_text; ?></p>
- <?php } ?>
-</div>
-<?php elseif ( $type == 'alert' ) :?>
-<div class='error'>
- <p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', 'akismet' ), $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/' . $code . '">https://akismet.com/errors/' . $code . '</a>' );
-
- ?>
- </p>
-</div>
-<?php elseif ( $type == 'notice' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status failed"><?php echo $notice_header; ?></h3>
- <p class="akismet-description">
- <?php echo $notice_text; ?>
- </p>
-</div>
-<?php elseif ( $type == 'missing-functions' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status failed"><?php esc_html_e('Network functions are disabled.', 'akismet'); ?></h3>
- <p class="akismet-description"><?php printf( __('Your web host or server administrator has disabled PHP&#8217;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&#8217;s system requirements</a>.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
-</div>
-<?php elseif ( $type == 'servers-be-down' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status failed"><?php esc_html_e("Your site can&#8217;t connect to the Akismet servers.", 'akismet'); ?></h3>
- <p class="akismet-description"><?php printf( __('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'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
-</div>
-<?php elseif ( $type == 'active-dunning' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status"><?php esc_html_e("Please update your payment information.", 'akismet'); ?></h3>
- <p class="akismet-description"><?php printf( __('We cannot process your payment. Please <a href="%s" target="_blank">update your payment details</a>.', 'akismet'), 'https://akismet.com/account/'); ?></p>
-</div>
-<?php elseif ( $type == 'cancelled' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status"><?php esc_html_e("Your Akismet plan has been cancelled.", 'akismet'); ?></h3>
- <p class="akismet-description"><?php printf( __('Please visit your <a href="%s" target="_blank">Akismet account page</a> to reactivate your subscription.', 'akismet'), 'https://akismet.com/account/'); ?></p>
-</div>
-<?php elseif ( $type == 'suspended' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status failed"><?php esc_html_e("Your Akismet subscription is suspended.", 'akismet'); ?></h3>
- <p class="akismet-description"><?php printf( __('Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.', 'akismet'), 'https://akismet.com/contact/'); ?></p>
-</div>
-<?php elseif ( $type == 'active-notice' && $time_saved ) :?>
-<div class="akismet-alert akismet-active">
- <h3 class="akismet-key-status"><?php echo esc_html( $time_saved ); ?></h3>
- <p class="akismet-description"><?php printf( __('You can help us fight spam and upgrade your account by <a href="%s" target="_blank">contributing a token amount</a>.', 'akismet'), 'https://akismet.com/account/upgrade/'); ?></p>
-</div>
-<?php elseif ( $type == 'missing' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status failed"><?php esc_html_e( 'There is a problem with your API key.', 'akismet'); ?></h3>
- <p class="akismet-description"><?php printf( __('Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.', 'akismet'), 'https://akismet.com/contact/'); ?></p>
-</div>
-<?php elseif ( $type == 'no-sub' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status failed"><?php esc_html_e( 'You don&#8217;t have an Akismet plan.', 'akismet'); ?></h3>
- <p class="akismet-description">
- <?php printf( __( 'In 2012, Akismet began using subscription plans for all accounts (even free ones). A plan has not been assigned to your account, and we&#8217;d appreciate it if you&#8217;d <a href="%s" target="_blank">sign into your account</a> and choose one.', 'akismet'), 'https://akismet.com/account/upgrade/' ); ?>
- <br /><br />
- <?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/' ); ?>
- </p>
-</div>
-<?php elseif ( $type == 'new-key-valid' ) :
- 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 akismet-active">
- <h3 class="akismet-key-status"><?php esc_html_e( 'Akismet is now protecting your site from spam. Happy blogging!', 'akismet' ); ?></h3>
- <?php if ( $check_pending_link ) { ?>
- <p class="akismet-description"><?php printf( __( 'Would you like to <a href="%s">check pending comments</a>?', 'akismet' ), esc_url( $check_pending_link ) ); ?></p>
- <?php } ?>
-</div>
-<?php elseif ( $type == 'new-key-invalid' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status"><?php esc_html_e( 'The key you entered is invalid. Please double-check it.' , 'akismet'); ?></h3>
-</div>
-<?php elseif ( $type == 'existing-key-invalid' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status"><?php esc_html_e( 'Your API key is no longer valid. Please enter a new key or contact support@akismet.com.' , 'akismet'); ?></h3>
-</div>
-<?php elseif ( $type == 'new-key-failed' ) :?>
-<div class="akismet-alert akismet-critical">
- <h3 class="akismet-key-status"><?php esc_html_e( 'The API key you entered could not be verified.' , 'akismet'); ?></h3>
- <p class="akismet-description"><?php printf( __('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/'); ?></p>
-</div>
-<?php elseif ( $type == 'limit-reached' && in_array( $level, array( 'yellow', 'red' ) ) ) :?>
-<div class="akismet-alert akismet-critical">
- <?php if ( $level == 'yellow' ): ?>
- <h3 class="akismet-key-status failed"><?php esc_html_e( 'You&#8217;re using your Akismet key on more sites than your Pro subscription allows.', 'akismet' ); ?></h3>
- <p class="akismet-description">
- <?php printf( __( 'Your Pro subscription allows the use of Akismet on only one site. Please <a href="%s" target="_blank">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites.', 'akismet' ), 'https://docs.akismet.com/billing/add-more-sites/' ); ?>
- <br /><br />
- <?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/'); ?>
- </p>
- <?php elseif ( $level == 'red' ): ?>
- <h3 class="akismet-key-status failed"><?php esc_html_e( 'You&#8217;re using Akismet on far too many sites for your Pro subscription.', 'akismet' ); ?></h3>
- <p class="akismet-description">
- <?php printf( __( 'To continue your service, <a href="%s" target="_blank">upgrade to an Enterprise subscription</a>, which covers an unlimited number of sites.', 'akismet'), 'https://akismet.com/account/upgrade/' ); ?>
- <br /><br />
- <?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/'); ?>
- </p>
- <?php endif; ?>
-</div>
-<?php elseif ( $type == 'privacy' ) :?>
-<div class="notice notice-warning is-dismissible" id="akismet-privacy-notice-admin-notice">
- <p><strong><?php esc_html_e( 'Akismet & Privacy.', 'akismet' );?></strong></p>
- <p><?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. This feature is disabled by default, however, you can turn it on below.', 'akismet' ); ?></p>
- <p><?php printf( __(' Please <a href="%s">enable</a> or <a href="%s">disable</a> this feature. <a href="%s" id="akismet-privacy-notice-control-notice-info-link" target="_blank">More information</a>.', 'akismet' ), admin_url( apply_filters( 'akismet_comment_form_privacy_notice_url_display', 'options-general.php?page=akismet-key-config&akismet_comment_form_privacy_notice=display' ) ), admin_url( apply_filters( 'akismet_comment_form_privacy_notice_url_hide', 'options-general.php?page=akismet-key-config&akismet_comment_form_privacy_notice=hide' ) ), 'https://akismet.com/privacy/' ); ?></p>
-</div>
-<?php endif;?>
diff --git a/plugins/akismet/views/start.php b/plugins/akismet/views/start.php
deleted file mode 100644
index 0ec35fdb..00000000
--- a/plugins/akismet/views/start.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<div id="akismet-plugin-container">
- <div class="akismet-masthead">
- <div class="akismet-masthead__inside-container">
- <div class="akismet-masthead__logo-container">
- <img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />
- </div>
- </div>
- </div>
- <div class="akismet-lower">
- <?php Akismet_Admin::display_status(); ?>
-
- <div class="akismet-box">
- <h2><?php esc_html_e( 'Eliminate spam from your site', 'akismet' ); ?></h2>
- <p><?php esc_html_e( 'Select one of the options below to get started.', 'akismet' ); ?></p>
- </div>
- <div class="akismet-boxes">
- <?php if ( ! Akismet::predefined_api_key() ) { ?>
- <?php if ( $akismet_user && in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub', 'missing', 'cancelled', 'suspended' ) ) ) { ?>
- <?php if ( in_array( $akismet_user->status, array( 'no-sub', 'missing' ) ) ) { ?>
- <div class="akismet-box">
- <h3><?php esc_html_e( 'Connect via Jetpack', 'akismet' ); ?></h3>
- <p><?php esc_html_e( 'Use your Jetpack connection to activate 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 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>
- </div>
- <?php } elseif ( $akismet_user->status == 'cancelled' ) { ?>
- <div class="akismet-box">
- <h3><?php esc_html_e( 'Connect via Jetpack', 'akismet' ); ?></h3>
- <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( 'Reactivate Akismet' , 'akismet' ); ?>"/>
- </form>
- <p><?php echo esc_html( sprintf( __( 'Your subscription for %s is cancelled.' , 'akismet' ), $akismet_user->user_email ) ); ?></p>
- </div>
- <?php } elseif ( $akismet_user->status == 'suspended' ) { ?>
- <div class="centered akismet-box">
- <h3><?php esc_html_e( 'Connected via Jetpack' , 'akismet' ); ?></h3>
- <p class="akismet-alert-text"><?php echo esc_html( sprintf( __( 'Your subscription for %s is suspended.' , 'akismet' ), $akismet_user->user_email ) ); ?></p>
- <p><?php esc_html_e( 'No worries! Get in touch and we&#8217;ll sort this out.', 'akismet' ); ?></p>
- <p><a href="https://akismet.com/contact" class="akismet-button akismet-is-primary"><?php esc_html_e( 'Contact Akismet support' , 'akismet' ); ?></a></p>
- </div>
- <?php } else { // ask do they want to use akismet account found using jetpack wpcom connection ?>
- <div class="akismet-box">
- <h3><?php esc_html_e( 'Connect via Jetpack', 'akismet' ); ?></h3>
- <p><?php esc_html_e( 'Use your Jetpack connection to activate 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 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>
- </div>
- <?php } ?>
- <div class="akismet-box">
- <h3><?php esc_html_e( 'Or sign up with a different email address', 'akismet' ); ?></h3>
- <div class="akismet-right">
- <?php Akismet::view( 'get', array( 'text' => __( 'Sign up with a different email address' , 'akismet' ), 'classes' => array( 'akismet-button' ) ) ); ?>
- </div>
- <p><?php esc_html_e( 'Choose this option to use Akismet independently of your Jetpack connection.', 'akismet' ); ?></p>
- </div>
- <?php } else { ?>
- <div class="akismet-box">
- <h3><?php esc_html_e( 'Activate Akismet' , 'akismet' );?></h3>
- <div class="akismet-right">
- <?php Akismet::view( 'get', array( 'text' => __( 'Get your API key' , 'akismet' ), 'classes' => array( 'akismet-button', 'akismet-is-primary' ) ) ); ?>
- </div>
- <p><?php esc_html_e( 'Log in or sign up now.', 'akismet' ); ?></p>
- </div>
- <?php } ?>
- <div class="akismet-box">
- <h3><?php esc_html_e( 'Or enter an API key', 'akismet' ); ?></h3>
- <p><?php esc_html_e( 'Already have your key? Enter it here.', 'akismet' ); ?> <a href="https://docs.akismet.com/getting-started/api-key/" target="_blank"><?php esc_html_e( '(What is an API key?)', 'akismet' ); ?></a></p>
- <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">
- <p style="width: 100%; display: flex; flex-wrap: nowrap; box-sizing: border-box;">
- <input id="key" name="key" type="text" size="15" value="" class="regular-text code" style="flex-grow: 1; margin-right: 1rem;">
- <input type="submit" name="submit" id="submit" class="akismet-button" value="<?php esc_attr_e( 'Connect with API key', 'akismet' );?>">
- </p>
- </form>
- </div>
- <?php } else { ?>
- <div class="akismet-box">
- <h2><?php esc_html_e( 'Manual Configuration', 'akismet' ); ?></h2>
- <p><?php 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>
- <?php } ?>
- </div>
- </div>
-</div> \ No newline at end of file
diff --git a/plugins/akismet/views/stats.php b/plugins/akismet/views/stats.php
deleted file mode 100644
index 2302c11a..00000000
--- a/plugins/akismet/views/stats.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<div id="akismet-plugin-container">
- <div class="akismet-masthead">
- <div class="akismet-masthead__inside-container">
- <a href="<?php echo esc_url( Akismet_Admin::get_page_url() );?>" class="akismet-right"><?php esc_html_e( 'Akismet Settings' , 'akismet' ); ?></a>
- <div class="akismet-masthead__logo-container">
- <img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />
- </div>
- </div>
- </div>
- <iframe src="<?php echo esc_url( sprintf( '//akismet.com/web/1.0/user-stats.php?blog=%s&api_key=%s&locale=%s', urlencode( get_option( 'home' ) ), Akismet::get_api_key(), get_locale() ) ); ?>" width="100%" height="2500px" frameborder="0"></iframe>
-</div> \ No newline at end of file
diff --git a/plugins/akismet/wrapper.php b/plugins/akismet/wrapper.php
deleted file mode 100644
index 2dfe8705..00000000
--- a/plugins/akismet/wrapper.php
+++ /dev/null
@@ -1,214 +0,0 @@
-<?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 );
-} \ No newline at end of file
diff --git a/plugins/google-authenticator/LICENSE b/plugins/google-authenticator/LICENSE
deleted file mode 100644
index d159169d..00000000
--- a/plugins/google-authenticator/LICENSE
+++ /dev/null
@@ -1,339 +0,0 @@
- 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.
diff --git a/plugins/google-authenticator/base32.php b/plugins/google-authenticator/base32.php
deleted file mode 100644
index 91bd93e9..00000000
--- a/plugins/google-authenticator/base32.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-
-/**
- * Encode in Base32 based on RFC 4648.
- * Requires 20% more space than base64
- * Great for case-insensitive filesystems like Windows and URL's (except for = char which can be excluded using the pad option for urls)
- *
- * @package default
- * @author Bryan Ruiz
- **/
-class Base32 {
-
- private static $map = array(
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7
- 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15
- 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23
- 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31
- '=' // padding char
- );
-
- private static $flippedMap = array(
- 'A'=>'0', 'B'=>'1', 'C'=>'2', 'D'=>'3', 'E'=>'4', 'F'=>'5', 'G'=>'6', 'H'=>'7',
- 'I'=>'8', 'J'=>'9', 'K'=>'10', 'L'=>'11', 'M'=>'12', 'N'=>'13', 'O'=>'14', 'P'=>'15',
- 'Q'=>'16', 'R'=>'17', 'S'=>'18', 'T'=>'19', 'U'=>'20', 'V'=>'21', 'W'=>'22', 'X'=>'23',
- 'Y'=>'24', 'Z'=>'25', '2'=>'26', '3'=>'27', '4'=>'28', '5'=>'29', '6'=>'30', '7'=>'31'
- );
-
- /**
- * Use padding false when encoding for urls
- *
- * @return base32 encoded string
- * @author Bryan Ruiz
- **/
- public static function encode($input, $padding = true) {
- if(empty($input)) return "";
- $input = str_split($input);
- $binaryString = "";
- for($i = 0; $i < count($input); $i++) {
- $binaryString .= str_pad(base_convert(ord($input[$i]), 10, 2), 8, '0', STR_PAD_LEFT);
- }
- $fiveBitBinaryArray = str_split($binaryString, 5);
- $base32 = "";
- $i=0;
- while($i < count($fiveBitBinaryArray)) {
- $base32 .= self::$map[base_convert(str_pad($fiveBitBinaryArray[$i], 5,'0'), 2, 10)];
- $i++;
- }
- if($padding && ($x = strlen($binaryString) % 40) != 0) {
- if($x == 8) $base32 .= str_repeat(self::$map[32], 6);
- else if($x == 16) $base32 .= str_repeat(self::$map[32], 4);
- else if($x == 24) $base32 .= str_repeat(self::$map[32], 3);
- else if($x == 32) $base32 .= self::$map[32];
- }
- return $base32;
- }
-
- public static function decode($input) {
- if(empty($input)) return;
- $paddingCharCount = substr_count($input, self::$map[32]);
- $allowedValues = array(6,4,3,1,0);
- if(!in_array($paddingCharCount, $allowedValues)) return false;
- for($i=0; $i<4; $i++){
- if($paddingCharCount == $allowedValues[$i] &&
- substr($input, -($allowedValues[$i])) != str_repeat(self::$map[32], $allowedValues[$i])) return false;
- }
- $input = str_replace('=','', $input);
- $input = str_split($input);
- $binaryString = "";
- for($i=0; $i < count($input); $i = $i+8) {
- $x = "";
- if(!in_array($input[$i], self::$map)) return false;
- for($j=0; $j < 8; $j++) {
- $x .= str_pad(base_convert(@self::$flippedMap[@$input[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);
- }
- $eightBits = str_split($x, 8);
- for($z = 0; $z < count($eightBits); $z++) {
- $binaryString .= ( ($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48 ) ? $y:"";
- }
- }
- return $binaryString;
- }
-} \ No newline at end of file
diff --git a/plugins/google-authenticator/google-authenticator.php b/plugins/google-authenticator/google-authenticator.php
deleted file mode 100644
index 5d5f8601..00000000
--- a/plugins/google-authenticator/google-authenticator.php
+++ /dev/null
@@ -1,1007 +0,0 @@
-<?php
-/*
-Plugin Name: Google Authenticator
-Plugin URI: https://github.com/ivankruchkoff/google-authenticator
-Description: Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry app as One Time Password generator.
-Author: Ivan Kruchkoff
-Version: 0.52
-Author URI: https://github.com/ivankruchkoff
-Compatibility: WordPress 5.2
-Text Domain: google-authenticator
-Domain Path: /lang
-
-----------------------------------------------------------------------------
-
-
- Thanks to Fabio Zumbi for Portuguese translation.
- Thanks to Guido Schalkx for the Dutch translation.
- Thanks to Henrik Schack for creating / maintaining versions 0.20 to 0.48
- Thanks to Ivan Kruchkoff for his UX improvements in user signup.
- Thanks to Bryan Ruiz for his Base32 encode/decode class, found at php.net.
- Thanks to Tobias Bäthge for his major code rewrite and German translation.
- Thanks to Pascal de Bruijn for his relaxed mode idea.
- Thanks to Daniel Werl for his usability tips.
- Thanks to Dion Hulse for his bugfixes.
- Thanks to Aldo Latino for his Italian translation.
- Thanks to Kaijia Feng for his Simplified Chinese translation.
- Thanks to Ian Dunn for fixing some depricated function calls.
- Thanks to Kimmo Suominen for fixing the iPhone description issue.
- Thanks to Alex Concha for some security tips.
- Thanks to Sébastien Prunier for his Spanish and French translations.
-
-----------------------------------------------------------------------------
-
- Versions from 0.49 onwards
- Copyright 2019 Ivan Kruchkoff
-
- Versions up to and including 0.48
- Copyright 2013 Henrik Schack (email : henrik@schack.dk)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-class GoogleAuthenticator {
-
-static $instance; // to store a reference to the plugin, allows other plugins to remove actions
-const SETUP_PAGE = 'google_authenticator_user_page';
-protected $error_message = null;
-
-/**
- * Constructor, entry point of the plugin
- */
-function __construct() {
- self::$instance = $this;
- add_action( 'init', array( $this, 'init' ) );
-}
-
-/**
- * Initialization, Hooks, and localization
- */
-function init() {
- if ( ! class_exists( 'Base32' ) ) {
- require_once( 'base32.php' );
- }
-
- if ( ! $this->is_two_screen_signin_enabled() ) {
- add_action( 'login_form', array( $this, 'loginform' ) );
- add_action( 'login_footer', array( $this, 'loginfooter' ) );
- }
-
- add_filter( 'authenticate', array( $this, 'check_otp' ), 50, 3 );
-
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
- add_action( 'wp_ajax_GoogleAuthenticator_action', array( $this, 'ajax_callback' ) );
- }
-
- add_action( 'personal_options_update', array( $this, 'personal_options_update' ) );
- add_action( 'profile_personal_options', array( $this, 'profile_personal_options' ) );
- add_action( 'edit_user_profile', array( $this, 'edit_user_profile' ) );
- add_action( 'edit_user_profile_update', array( $this, 'edit_user_profile_update' ) );
-
- add_action( 'admin_enqueue_scripts', array( $this, 'add_qrcode_script' ) );
- add_action( 'admin_menu', array ( $this, 'add_pages' ) );
- add_action( 'network_admin_menu', array ( $this, 'add_pages' ) );
- add_action( 'current_screen', array ( $this, 'redirect_if_setup_required' ) );
- add_action( 'admin_notices', array ( $this, 'successful_signup_message' ) );
- add_action( 'load-admin_page_google_authenticator_user_page', array( $this, 'save_submitted_setup_page' ) );
-
- load_plugin_textdomain( 'google-authenticator', false, basename( dirname( __FILE__ ) ) . '/lang' );
-}
-
-/**
- * Whether we show Google Auth code on the login screen, or after the user has entered their username and password.
- *
- * If it's on a separate screen, it means username / passwords can still be bruteforced, but logins can't occur without 2fa
- *
- * @return bool
- */
-function is_two_screen_signin_enabled() {
- $two_screen_mfa = is_multisite() ? get_site_option( 'googleauthenticator_two_screen_signin' ) : get_option( 'googleauthenticator_two_screen_signin' );
- return !! $two_screen_mfa;
-}
-
-/**
- * Check the verification code entered by the user.
- */
-
-function verify( $secretkey, $thistry, $relaxedmode, $lasttimeslot ) {
- // Did the user enter 6 digits ?
- if ( strlen( $thistry ) != 6) {
- return false;
- } else {
- $thistry = intval ( $thistry );
- }
- // If user is running in relaxed mode, we allow more time drifting
- // ±4 min, as opposed to ± 30 seconds in normal mode.
- if ( $relaxedmode == 'enabled' ) {
- $firstcount = -8;
- $lastcount = 8;
- } else {
- $firstcount = -1;
- $lastcount = 1;
- }
-
- $tm = floor( time() / 30 );
-
- $secretkey=Base32::decode($secretkey);
- // Keys from 30 seconds before and after are valid aswell.
- for ($i=$firstcount; $i<=$lastcount; $i++) {
- // Pack time into binary string
- $time=chr(0).chr(0).chr(0).chr(0).pack('N*',$tm+$i);
- // Hash it with users secret key
- $hm = hash_hmac( 'SHA1', $time, $secretkey, true );
- // Use last nipple of result as index/offset
- $offset = ord(substr($hm,-1)) & 0x0F;
- // grab 4 bytes of the result
- $hashpart=substr($hm,$offset,4);
- // Unpak binary value
- $value=unpack("N",$hashpart);
- $value=$value[1];
- // Only 32 bits
- $value = $value & 0x7FFFFFFF;
- $value = $value % 1000000;
- if ( $value === $thistry ) {
- // Check for replay (Man-in-the-middle) attack.
- // Since this is not Star Trek, time can only move forward,
- // meaning current login attempt has to be in the future compared to
- // last successful login.
- if ( $lasttimeslot >= ($tm+$i) ) {
- error_log("Google Authenticator plugin: Man-in-the-middle attack detected (Could also be 2 legit login attempts within the same 30 second period)");
- return false;
- }
- // Return timeslot in which login happened.
- return $tm+$i;
- }
- }
- return false;
-}
-
-/**
- * Create a new random secret for the Google Authenticator app.
- * 16 characters, randomly chosen from the allowed Base32 characters
- * equals 10 bytes = 80 bits, as 256^10 = 32^16 = 2^80
- */
-function create_secret() {
- $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'; // allowed characters in Base32
- $secret = '';
- for ( $i = 0; $i < 16; $i++ ) {
- $secret .= substr( $chars, wp_rand( 0, strlen( $chars ) - 1 ), 1 );
- }
- return $secret;
-}
-
-/**
- * Add the script to generate QR codes.
- */
-function add_qrcode_script() {
- wp_enqueue_script('jquery');
- wp_register_script('qrcode_script', plugins_url('jquery.qrcode.min.js', __FILE__),array("jquery"));
- wp_enqueue_script('qrcode_script');
-}
-
-/**
- * Add 2fa pages to menus
- */
-function add_pages() {
- // No menu entry for this page
- add_submenu_page( null, esc_html__( 'Google Authenticator', 'google-authenticator' ), null, 'read', self::SETUP_PAGE, array( $this, 'user_setup_page' ) );
-
- // Site admin screen
- add_submenu_page( 'options-general.php', esc_html__( 'Google Authenticator', 'google-authenticator' ), esc_html__( 'Google Authenticator', 'google-authenticator' ), 'manage_options', 'google_authenticator', array( $this, 'admin_setup_page' ) );
-
- // Network admin screen
- add_submenu_page( 'settings.php', esc_html__( 'Google Authenticator', 'google-authenticator' ), esc_html__( 'Google Authenticator', 'google-authenticator' ), 'manage_network_options', 'google_authenticator', array( $this, 'network_admin_setup_page' ) );
-}
-
-/**
- * Determine if a user needs to setup authy 2fa
- * @return bool
- */
-function user_needs_to_setup_google_authenticator() {
- $user = wp_get_current_user();
- $enabled = trim(get_user_option( 'googleauthenticator_enabled', $user->ID ) ) === 'enabled';
- if ( $enabled ) {
- return false;
- }
-
- $must_signup = false;
- $user_role = $user->roles[0];
- $check_single_site_admin_options = true;
-
- if ( is_multisite() ) {
- $roles = get_site_option( 'googleauthenticator_mandatory_mfa_roles', array() );
- if ( in_array( $user_role, $roles ) ) {
- $must_signup = true;
- }
- $check_single_site_admin_options = '1' !== get_site_option( 'googleauthenticator_network_only' ) ;
- }
-
- if ( ! $must_signup && $check_single_site_admin_options ) {
- $roles = get_option( 'googleauthenticator_mandatory_mfa_roles', array() );
- if ( in_array( $user_role, $roles ) ) {
- $must_signup = true;
- }
-
- }
-
- return apply_filters( 'google_authenticator_needs_setup', $must_signup, $user );
-}
-
-/**
- * Send users to the signup page if they must signup.
- */
-function redirect_if_setup_required() {
- if ( $this->user_needs_to_setup_google_authenticator() ) {
- $screen = get_current_screen();
- $pagename = 'admin_page_' . self::SETUP_PAGE;
- if ( is_a( $screen, 'WP_Screen') && in_array( $screen->id, array( $pagename, 'profile' ) ) ) {
- return;
- }
-
- // Some check against super admin so they can enable/disable the plugin.
- $location = admin_url( 'admin.php?page=' . self::SETUP_PAGE );
- wp_redirect( $location);
- exit;
- }
-}
-
-/**
- * Save the GA secret if valid totp is provided
- * @return void
- */
-function save_submitted_setup_page() {
- $this->error_message = null; // Reset a previous error message if it was set
- $user = wp_get_current_user();
- $secret = empty( $_POST['GA_secret'] ) ? false : sanitize_text_field( $_POST['GA_secret']);
- $otp = empty( $_POST['GA_otp_code'] ) ? false : sanitize_text_field( $_POST['GA_otp_code']);
- if ( ! strlen( $secret ) || ! strlen( $otp ) ) {
- return;
- }
- $relaxed_mode = trim( get_user_option( 'googleauthenticator_relaxedmode', $user->ID ) );
- $relaxed_mode = 'enabled' === $relaxed_mode ? 'enabled' : 'disabled';
- if ( $timeslot = $this->verify( $secret, $otp, $relaxed_mode, '' ) ) {
- update_user_option( $user->ID, 'googleauthenticator_lasttimeslot', $timeslot, true );
- update_user_option( $user->ID, 'googleauthenticator_secret', $secret, true );
- update_user_option( $user->ID, 'googleauthenticator_enabled', 'enabled', true );
- $location = admin_url( 'index.php?googleauthenticator=enabled' );
- wp_redirect( $location );
- exit;
- };
-
- $this->error_message = new WP_Error( 'invalid-otp', esc_html__( "OTP code doesn't match supplied secret, please check you've configured Authenticator correctly.", 'google-authenticator' ) );
-}
-
-/**
- * Show the user a success message after we redirect them following successful google authenticator setup
- */
-function successful_signup_message() {
- if ( ! empty( $_GET['googleauthenticator'] ) && 'enabled' === $_GET['googleauthenticator'] ) : ?>
- <div class="updated notice">
- <p><?php esc_html_e( 'Congratulations, you have successfully enabled Google Authenticator for your account', 'google-authenticator' ); ?></p>
- </div>
-
- <?php endif;
-}
-
-/**
- * Callback function to render the google authenticator setup page
- */
-function user_setup_page() {
- $user = wp_get_current_user();
- $enabled = trim(get_user_option( 'googleauthenticator_enabled', $user->ID ) ) === 'enabled';
- if ( $enabled ) {
- $location = admin_url( 'index.php' );
- wp_redirect( $location );
- exit;
- }
- $error = $this->error_message;
-
- $app_links = array(
- array(
- 'text' => __( 'iOS: Authy', 'google-authenticator' ),
- 'link' => 'https://itunes.apple.com/app/authy/id494168017',
- ),
- array(
- 'text' => __( 'iOS: Google Authenticator', 'google-authenticator' ),
- 'link' => 'https://itunes.apple.com/app/google-authenticator/id388497605',
- ),
- array(
- 'text' => __( 'Android: Authy', 'google-authenticator' ),
- 'link' => 'https://play.google.com/store/apps/details?id=com.authy.authy',
- ),
- array(
- 'text' => __( 'Android: Google Authenticator', 'google-authenticator' ),
- 'link' => 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2',
- ),
- array(
- 'text' => __( 'Windows Phone', 'google-authenticator' ),
- 'link' => 'https://www.microsoft.com/store/p/authenticator/9nblggh08h54',
- ),
- array(
- 'text' => __( 'Chrome Browser', 'google-authenticator' ),
- 'link' => 'https://chrome.google.com/webstore/detail/authy-chrome-extension/fhgenkpocbhhddlgkjnfghpjanffonno',
- ),
- array(
- 'text' => __( 'Desktop', 'google-authenticator' ),
- 'link' => 'https://authy.com/download/',
- ),
-
- );
-
- ?>
- <div class="wrap">
- <h1><?php esc_html_e( 'Google Authenticator Settings', 'google-authenticator' ); ?></h1>
- <?php if (is_wp_error( $error ) ): ?>
- <div class="error notice"><p><?php esc_html_e( $error->get_error_message() ); ?></p></div>
- <?php endif; ?>
- <p><?php echo esc_html__( "If you haven't already done so, please install the Authy or Google Authenticator app on your mobile device from the App Store:", 'google-authenticator' ); ?></p>
- <ul>
- <?php foreach( $app_links as $app_link ): ?>
- <li><a href="<?php echo esc_url( $app_link[ 'link' ] ); ?>"><?php echo esc_html( $app_link[ 'text' ] ); ?></a></li>
- <?php endforeach; ?>
- </ul>
- <p><?php echo esc_html__( 'The easiest way to enable your account is to add an account by scanning the QR code using the app.', 'google-authenticator' ); ?></p>
- <p>
- <?php echo esc_html__( "An account can also be added by typing in the secret. After you've added your account to the App, please type the code you see on the screen into the Authenticator Code field and press the Verify Authenticator Code button.", 'google-authenticator' ); ?>
- </p>
- <p>
- <?php echo esc_html__( 'If the account setup was successful, you will be logged out, and will need to login again using your Username, Password and Authenticator code generated using the App on your mobile device.', 'google-authenticator' ); ?>
- </p>
- <form method="post">
- <?php $this->profile_personal_options( array(
- 'show_active' => false,
- 'show_relaxed_mode' => false,
- 'show_description' => false,
- 'show_secret_qr' => true,
- 'show_secret_buttons' => false,
- 'show_authenticator_code' => true,
- 'show_app_password' => false,
- )); ?>
- </form>
- </div>
- <?php
-}
-
-/**
- * Save site / network wide settings
- * @param $is_network
- */
-function save_submitted_admin_setup_page( $is_network ) {
- $nonce = filter_input( INPUT_POST, 'googleauthenticator', FILTER_SANITIZE_STRING );
- if ( wp_verify_nonce( $nonce, 'googleauthenticator' ) ) {
- if ( $is_network ) {
- $network_settings_only = array_key_exists( 'network_settings_only', $_POST );
- if ( current_user_can( 'manage_network_options' ) ) {
- update_site_option( 'googleauthenticator_network_only', $network_settings_only );
- }
- }
- $two_screen_mfa = array_key_exists( 'two_screen_approach', $_POST ) && 'true' === $_POST[ 'two_screen_approach' ];
- if ( is_multisite() && $is_network ) {
- if ( current_user_can( 'manage_network_options' ) ) {
- update_site_option( 'googleauthenticator_two_screen_signin', $two_screen_mfa );
- }
- } elseif ( ! $is_network ) {
- if ( current_user_can( 'manage_options' ) ) {
- update_option( 'googleauthenticator_two_screen_signin', $two_screen_mfa );
- }
- }
- $roles = isset( $_POST['roles'] ) ? (array) $_POST['roles'] : array();
- $roles = array_map( 'sanitize_text_field', $roles );
-
- if ( $is_network ) {
- if ( current_user_can( 'manage_network_options' ) ) {
- update_site_option( 'googleauthenticator_mandatory_mfa_roles', $roles );
- }
- } else {
- if ( current_user_can( 'manage_options' ) ) {
- update_option( 'googleauthenticator_mandatory_mfa_roles', $roles );
- }
- }
- return true;
- }
-}
-
-/**
- * Callback function to render the google authenticator setup page
- */
-function common_admin_setup_page( $is_network = false ) {
- if ( $is_network ) {
- $site_ids = get_sites( 'fields=ids' );
- $roles = get_editable_roles();
- foreach( $site_ids as $site_id ) {
- switch_to_blog( $site_id );
- $roles = array_merge( $roles, get_editable_roles() );
- restore_current_blog();
- }
- $edit_enabled = true;
- } else {
- $roles = get_editable_roles();
- $edit_enabled = is_multisite() ? boolval( get_site_option( 'googleauthenticator_network_only') ) : true;
- }
- $is_updated = $this->save_submitted_admin_setup_page( $is_network );
- ?>
- <div class="wrap">
- <h1><?php esc_html_e( 'Google Authenticator Settings', 'google-authenticator' ); ?></h1>
- <?php if ( $is_updated ): ?>
- <?php if ( $is_network ): ?>
- <div class="notice notice-success is-dismissible"><p><?php esc_html_e( 'Successfullly saved your settings for the network', 'google-authenticator' ); ?></p></div>
- <?php else: ?>
- <div class="notice notice-success is-dismissible"><p><?php esc_html_e( 'Successfullly saved your settings for the site', 'google-authenticator' ); ?></p></div>
- <?php endif; ?>
- <?php endif; ?>
- <form method="post">
- <?php if ( $is_network ): ?>
- <h2><?php esc_html_e( 'Network Settings', 'google-authenticator' ); ?></h2>
- <p>
- <label>
- <input name="network_settings_only" type="checkbox" value="true" <?php checked( get_site_option( 'googleauthenticator_network_only' ) ); ?>>
- <?php esc_html_e( 'Only use network-wide settings, ignoring site settings.', 'google-authenticator' ); ?>
- </label>
- </p>
- <?php endif; ?>
- <?php if ( is_multisite() && $is_network || ! is_multisite() ): ?>
- <?php $two_screen_mfa = is_multisite() ? get_site_option( 'googleauthenticator_two_screen_signin' ) : get_option( 'googleauthenticator_two_screen_signin' ); ?>
- <h2><?php esc_html_e( 'Two Screen Signin', 'google-authenticator' ); ?></h2>
- <p>
- <label>
- <input name="two_screen_approach" type="checkbox" value="true" <?php checked( $two_screen_mfa ); ?>>
- <?php esc_html_e( 'Ask for authenticator code on secondary login screen', 'google-authenticator' ); ?>
- </label>
- </p>
- <?php endif; ?>
- <h2><?php esc_html_e( 'Roles requiring Google Authenticator Enabled', 'google-authenticator' ); ?></h2>
- <?php foreach ($roles as $role_key => $role) {
- $this->show_role_checkbox( $role_key, $role, $is_network );
- }
- if ( $edit_enabled ) {
- wp_nonce_field( 'googleauthenticator', 'googleauthenticator' );
- submit_button();
- } else {
- esc_html_e( 'Network-wide settings in effect, only a super admin can modify them.', 'google-authenticator' );
- if ( current_user_can( 'manage_network' ) ) :?>
- <a href="<?php echo network_admin_url( 'settings.php?page=google_authenticator' ) ?>"><?php esc_html_e( 'Change network wide Google Authenticator settings', 'google-authenticator' ); ?></a>
- <?php endif;
- }
- ?>
-
- </form>
- </div>
- <?php
-}
-
-/**
- * Render a checkbox for a role
- * @param $role_key
- * @param $role
- * @param $is_network
- */
-function show_role_checkbox( $role_key, $role, $is_network ) {
- $network_roles = get_site_option( 'googleauthenticator_mandatory_mfa_roles', array() );
- $network_only = is_multisite() && boolval( get_site_option( 'googleauthenticator_network_only' ) );
- $roles = get_option( 'googleauthenticator_mandatory_mfa_roles', array() );
- if ( $network_only ) {
- $checked = in_array( $role_key, $network_roles );
- } else {
- $checked = in_array( $role_key, array_merge( $roles, $network_roles ) );
- }
-
- /**
- * Criteria under which permission field can be readonly.
- * 1. Site must be a multisite AND
- * Either
- * a. googleauthenticator_network_only network option is set via /wp-admin/network/settings.php?page=google_authenticator
- *
- * OR
- * b. the network option for this role is set via /wp-admin/network/settings.php?page=google_authenticator
- */
- $readonly = is_multisite() && ( ( ! $is_network && $network_only ) || ( ! $is_network && in_array( $role_key, $network_roles ) && ! in_array( $role_key, $roles ) ) );
- $readonly_label = '';
-
- if ( $readonly ) {
- if ( current_user_can( 'manage_network' ) ) {
- $readonly_label = __( "Sorry, you can't disable checks for this role as it's enabled at the network level.", 'google-authenticator' );
- } else {
- $readonly_label = sprintf( __( 'Sorry, this role is enabled at the network level and can only be disabled via the <a href="%s">network settings</a>', 'google-authenticator' ), network_admin_url( 'settings.php?page=google_authenticator' ) );
- }
- }
-
- $readonly = $readonly ? ' readonly="readonly"' : '';
- ?>
- <p><label><input name="roles[]" type="checkbox"<?php echo esc_html( $readonly ) . checked( $checked, true, false ); ?>value="<?php esc_attr_e( $role_key ); ?>"><strong><?php esc_html_e( $role[ 'name' ] ); ?></strong></label> <?php echo $readonly_label; ?></p>
- <?php
-}
-
-/**
- * Admin setup screen
- */
-function admin_setup_page() {
- $this->common_admin_setup_page();
-
-}
-
-/**
- * Network admin setup screen
- */
-function network_admin_setup_page() {
- $this->common_admin_setup_page( true );
-}
-/**
- * Add verification code field to login form.
- */
-function loginform() {
- echo "\t<p>\n";
- echo "\t\t<label title=\"".__('If you don\'t have Google Authenticator enabled for your WordPress account, leave this field empty.','google-authenticator')."\">".__('Google Authenticator code','google-authenticator')."<span id=\"google-auth-info\"></span><br />\n";
- echo "\t\t<input type=\"text\" name=\"googleotp\" id=\"googleotp\" class=\"input\" value=\"\" size=\"20\" style=\"ime-mode: inactive;\" autocomplete=\"off\" /></label>\n";
- echo "\t</p>\n";
-}
-
-/**
- * Disable autocomplete on Google Authenticator code input field.
- */
-function loginfooter() {
- echo "\n<script type=\"text/javascript\">\n";
- echo "\ttry{\n";
- echo "\t\tdocument.getElementById('user_email').setAttribute('autocomplete','off');\n";
- echo "\t} catch(e){}\n";
- echo "</script>\n";
-}
-
-/**
- * Login form handling.
- * Check Google Authenticator verification code, if user has been setup to do so.
- * @param wordpressuser / WP_Error
- * @return user/loginstatus
- */
-function check_otp( $user, $username = '', $password = '' ) {
- // Store result of loginprocess, so far.
- $userstate = $user;
-
- // Get information on user, we need this in case an app password has been enabled,
- // since the $user var only contain an error at this point in the login flow.
- if ( get_user_by( 'email', $username ) === false ) {
- $user = get_user_by( 'login', $username );
- } else {
- $user = get_user_by( 'email', $username );
- }
-
- // Does the user have the Google Authenticator enabled ?
- if ( isset( $user->ID ) && trim(get_user_option( 'googleauthenticator_enabled', $user->ID ) ) == 'enabled' ) {
-
- // Get the users secret
- $GA_secret = trim( get_user_option( 'googleauthenticator_secret', $user->ID ) );
-
- // Figure out if user is using relaxed mode ?
- $GA_relaxedmode = trim( get_user_option( 'googleauthenticator_relaxedmode', $user->ID ) );
-
- // Get the verification code entered by the user trying to login
- if ( !empty( $_POST['googleotp'] )) { // Prevent PHP notices when using app password login
- $otp = trim( $_POST[ 'googleotp' ] );
- } else {
- $otp = '';
- }
- // When was the last successful login performed ?
- $lasttimeslot = trim( get_user_option( 'googleauthenticator_lasttimeslot', $user->ID ) );
- // Valid code ?
- if ( $timeslot = $this->verify( $GA_secret, $otp, $GA_relaxedmode, $lasttimeslot ) ) {
- // Store the timeslot in which login was successful.
- update_user_option( $user->ID, 'googleauthenticator_lasttimeslot', $timeslot, true );
- return $userstate;
- } else {
- // No, lets see if an app password is enabled, and this is an XMLRPC / APP login ?
- if ( trim( get_user_option( 'googleauthenticator_pwdenabled', $user->ID ) ) == 'enabled' && ( defined('XMLRPC_REQUEST') || defined('APP_REQUEST') ) ) {
- $GA_passwords = json_decode( get_user_option( 'googleauthenticator_passwords', $user->ID ) );
- $passwordhash = trim($GA_passwords->{'password'} );
- $usersha1 = sha1( strtoupper( str_replace( ' ', '', $password ) ) );
- if ( $passwordhash == $usersha1 ) { // ToDo: Remove after some time when users have migrated to new format
- return new WP_User( $user->ID );
- // Try the new version based on thee wp_hash_password function
- } elseif (wp_check_password( strtoupper( str_replace( ' ', '', $password ) ), $passwordhash)) {
- return new WP_User( $user->ID );
- } else {
- // Wrong XMLRPC/APP password !
- return new WP_Error( 'invalid_google_authenticator_password', __( '<strong>ERROR</strong>: The Google Authenticator password is incorrect.', 'google-authenticator' ) );
- }
- } else {
- if ( ! $this->is_two_screen_signin_enabled() ) {
- return new WP_Error( 'invalid_google_authenticator_token', __( '<strong>ERROR</strong>: The Google Authenticator code is incorrect or has expired.', 'google-authenticator' ) );
- } else {
- wp_logout();
- $this->secondary_login_screen();
- exit;
- }
- }
- }
- }
- // Google Authenticator isn't enabled for this account,
- // just resume normal authentication.
- return $userstate;
-}
-
-function secondary_login_screen() {
- $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : admin_url();
- login_header( esc_html__('Secondary Login Screen', 'google-authenticator' ) );
- if ( array_key_exists( 'googleotp', $_REQUEST ) ) {
- if ( 0 === strlen( $_REQUEST[ 'googleotp'] ) ) {
- $error_message = __( '<strong>ERROR</strong>: The Google Authenticator code is missing.', 'google-authenticator' );
- } else {
- $error_message = __( '<strong>ERROR</strong>: The Google Authenticator code is incorrect or has expired.', 'google-authenticator' );
- }
- echo '<div id="login_error">' . $error_message . '</div>';
- }?>
- <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
- <input type="hidden" name="log" value="<?php echo esc_attr( $_REQUEST['log'] ); ?>" />
- <input type="hidden" name="pwd" value="<?php echo esc_attr( $_REQUEST['pwd'] ); ?>" />
- <input type="hidden" name="wp-submit" value="<?php echo esc_attr( $_REQUEST['wp-submit'] ); ?>" />
- <?php if ( array_key_exists( 'rememberme', $_REQUEST ) && 'forever' === $_REQUEST[ 'rememberme']): ?>
- <input name="rememberme" type="hidden" id="rememberme" value="forever" />
- <?php endif; ?>
- <?php $this->loginform(); ?>
- <p><?php esc_html_e( 'Please enter the Google Authenticator code using the app on your device.', 'google-authenticator' ); ?></p>
- <p class="submit">
- <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Log In'); ?>" />
- <input type="hidden" name="redirect_to" value="<?php echo esc_attr($redirect_to); ?>" />
- <input type="hidden" name="testcookie" value="1" />
- </p>
- </form>
- <?php
- login_footer();
-}
-
-
-/**
- * Extend personal profile page with Google Authenticator settings.
- */
-function profile_personal_options( $args = array() ) {
- $defaults = array(
- 'show_active' => true,
- 'show_relaxed_mode' => true,
- 'show_description' => true,
- 'show_secret_qr' => false,
- 'show_secret_buttons' => true,
- 'show_authenticator_code' => false,
- 'show_app_password' => true,
- );
-
- $args = wp_parse_args( $args, $defaults );
-
- $user = wp_get_current_user();
- $user_id = $user->ID;
-
- // If editing of Google Authenticator settings has been disabled, just return
- $GA_hidefromuser = trim( get_user_option( 'googleauthenticator_hidefromuser', $user_id ) );
- if ( $GA_hidefromuser == 'enabled') return;
-
- $GA_secret = trim( get_user_option( 'googleauthenticator_secret', $user_id ) );
- $GA_enabled = trim( get_user_option( 'googleauthenticator_enabled', $user_id ) );
- $GA_relaxedmode = trim( get_user_option( 'googleauthenticator_relaxedmode', $user_id ) );
- $GA_description = trim( get_user_option( 'googleauthenticator_description', $user_id ) );
- $GA_pwdenabled = trim( get_user_option( 'googleauthenticator_pwdenabled', $user_id ) );
- $GA_password = trim( get_user_option( 'googleauthenticator_passwords', $user_id ) );
-
- // We dont store the generated app password in cleartext so there is no point in trying
- // to show the user anything except from the fact that a password exists.
- if ( $GA_password != '' ) {
- $GA_password = "XXXX XXXX XXXX XXXX";
- }
-
- // In case the user has no secret ready (new install), we create one. or use the one they just posted
- if ( '' == $GA_secret ) {
- $GA_secret = array_key_exists( 'GA_secret', $_REQUEST ) ? sanitize_text_field( $_REQUEST[ 'GA_secret' ] ) : $this->create_secret();
- }
-
- if ( '' == $GA_description ) {
- // Super admins and users with accounts on more than one site get the network name as the helpful name,
- // everyone else gets the site that they're on
- if ( is_multisite() && ( 1 < count( get_blogs_of_user( $user_id ) || is_super_admin() ) ) ) {
- $GA_description = sanitize_text_field( get_blog_details( get_network()->id )->blogname );
- } else {
- $GA_description = sanitize_text_field( get_bloginfo( 'name' ) );
- }
- }
-
- echo "<h3>".__( 'Google Authenticator Settings', 'google-authenticator' )."</h3>\n";
-
- echo "<table class=\"form-table\">\n";
- echo "<tbody>\n";
-
- if ( $args['show_active'] ) {
- echo "<tr>\n";
- echo "<th scope=\"row\">".__( 'Active', 'google-authenticator' )."</th>\n";
- echo "<td>\n";
- echo "<input name=\"GA_enabled\" id=\"GA_enabled\" class=\"tog\" type=\"checkbox\"" . checked( $GA_enabled, 'enabled', false ) . "/>\n";
- echo "</td>\n";
- echo "</tr>\n";
- }
-
- if ( $args['show_relaxed_mode'] ) {
- echo "<tr>\n";
- echo "<th scope=\"row\">" . __( 'Relaxed mode', 'google-authenticator' ) . "</th>\n";
- echo "<td>\n";
- echo "<input name=\"GA_relaxedmode\" id=\"GA_relaxedmode\" class=\"tog\" type=\"checkbox\"" . checked( $GA_relaxedmode, 'enabled', false ) . "/><span class=\"description\">" . __( ' Relaxed mode allows for more time drifting on your phone clock (&#177;4 min).', 'google-authenticator' ) . "</span>\n";
- echo "</td>\n";
- echo "</tr>\n";
- }
-
- $show_description_style = $args['show_description'] ? '' : 'display:none';
- echo "<tr style=\"{$show_description_style}\">\n";
- echo "<th><label for=\"GA_description\">" . esc_html__( 'Description', 'google-authenticator' ) . "</label></th>\n";
- echo "<td><input name=\"GA_description\" id=\"GA_description\" value=\"{$GA_description}\" type=\"text\" size=\"25\" /><span class=\"description\">" . __( ' Description that you\'ll see in the Google Authenticator app on your phone.', 'google-authenticator' ) . "</span><br /></td>\n";
- echo "</tr>\n";
-
- echo "<tr>\n";
- echo "<th><label for=\"GA_secret\">".__('Secret','google-authenticator')."</label></th>\n";
- echo "<td>\n";
- echo "<input name=\"GA_secret\" id=\"GA_secret\" value=\"" . esc_attr( $GA_secret) . "\" readonly=\"readonly\" type=\"text\" size=\"25\" />";
- if ( $args['show_secret_buttons']) {
- echo "<input name=\"GA_newsecret\" id=\"GA_newsecret\" value=\"".__("Create new secret",'google-authenticator')."\" type=\"button\" class=\"button\" />";
- echo "<input name=\"show_qr\" id=\"show_qr\" value=\"".__("Show/Hide QR code",'google-authenticator')."\" type=\"button\" class=\"button\" onclick=\"ShowOrHideQRCode();\" />";
- }
- echo "</td>\n";
- echo "</tr>\n";
-
- echo "<tr>\n";
- echo "<th></th>\n";
-
- $qr_style = $args['show_secret_qr'] ? '' : 'display: none';
- echo "<td><div id=\"GA_QR_INFO\" style=\"{$qr_style}\" >";
- echo "<div id=\"GA_QRCODE\"/></div>";
-
- echo '<span class="description"><br/> ' . __( 'Scan this with the Google Authenticator app.', 'google-authenticator' ) . '</span>';
- echo "</div></td>\n";
- echo "</tr>\n";
- if ( $args['show_secret_qr']) : ?>
- <script>
- var qrcode="otpauth://totp/WordPress:"+escape(jQuery('#GA_description').val())+"?secret="+jQuery('#GA_secret').val()+"&issuer=WordPress";
- jQuery('#GA_QRCODE').qrcode(qrcode);
- </script>
- <?php endif;
-
- if ( $args['show_app_password']) {
- echo "<tr>\n";
- echo "<th scope=\"row\">".__( 'Enable App password', 'google-authenticator' )."</th>\n";
- echo "<td>\n";
- echo "<input name=\"GA_pwdenabled\" id=\"GA_pwdenabled\" class=\"tog\" type=\"checkbox\"" . checked( $GA_pwdenabled, 'enabled', false ) . "/><span class=\"description\">".__(' Enabling an App password will decrease your overall login security.','google-authenticator')."</span>\n";
- echo "</td>\n";
- echo "</tr>\n";
-
- echo "<tr>\n";
- echo "<th></th>\n";
- echo "<td>\n";
- echo "<input name=\"GA_password\" id=\"GA_password\" readonly=\"readonly\" value=\"".$GA_password."\" type=\"text\" size=\"25\" />";
- echo "<input name=\"GA_createpassword\" id=\"GA_createpassword\" value=\"".__("Create new password",'google-authenticator')."\" type=\"button\" class=\"button\" />";
- echo "<span class=\"description\" id=\"GA_passworddesc\"> ".__(' Password is not stored in cleartext, this is your only chance to see it.','google-authenticator')."</span>\n";
- echo "</td>\n";
- echo "</tr>\n";
- }
-
-
- if ( $args['show_authenticator_code']) {
- echo "<tr>\n";
- echo "<th><label for=\"GA_otp_code\">" . __( 'Authenticator Code', 'google-authenticator' ) . "</label></th>\n";
- echo "<td><input name=\"GA_otp_code\" id=\"GA_otp_code\" type=\"text\" size=\"25\" /><span class=\"description\">" . __( 'After adding the site to your google authy account, add your authenticator code here.', 'google-authenticator' ) . "</span><br /></td>\n";
- echo "</tr>\n";
- }
-
- echo "</tbody></table>\n";
- if ( $args['show_authenticator_code']) {
- submit_button( esc_html__( 'Verify Authenticator Code', 'google-authenticator' ) );
- }
- echo "<script type=\"text/javascript\">\n";
- echo "var GAnonce='".wp_create_nonce('GoogleAuthenticatoraction')."';\n";
-
- echo <<<ENDOFJS
- //Create new secret and display it
- jQuery('#GA_newsecret').bind('click', function() {
- // Remove existing QRCode
- jQuery('#GA_QRCODE').html("");
- var data=new Object();
- data['action'] = 'GoogleAuthenticator_action';
- data['nonce'] = GAnonce;
- jQuery.post(ajaxurl, data, function(response) {
- jQuery('#GA_secret').val(response['new-secret']);
- var qrcode="otpauth://totp/WordPress:"+escape(jQuery('#GA_description').val())+"?secret="+jQuery('#GA_secret').val()+"&issuer=WordPress";
- jQuery('#GA_QRCODE').qrcode(qrcode);
- jQuery('#GA_QR_INFO').show('slow');
- });
- });
-
- // If the user starts modifying the description, hide the qrcode
- jQuery('#GA_description').bind('focus blur change keyup', function() {
- // Only remove QR Code if it's visible
- if (jQuery('#GA_QR_INFO').is(':visible')) {
- jQuery('#GA_QR_INFO').hide('slow');
- jQuery('#GA_QRCODE').html("");
- }
- });
-
- // Create new app password
- jQuery('#GA_createpassword').bind('click',function() {
- var data=new Object();
- data['action'] = 'GoogleAuthenticator_action';
- data['nonce'] = GAnonce;
- data['save'] = 1;
- jQuery.post(ajaxurl, data, function(response) {
- jQuery('#GA_password').val(response['new-secret'].match(new RegExp(".{0,4}","g")).join(' '));
- jQuery('#GA_passworddesc').show();
- });
- });
-
- jQuery('#GA_enabled').bind('change',function() {
- GoogleAuthenticator_apppasswordcontrol();
- });
-
- jQuery(document).ready(function() {
- jQuery('#GA_passworddesc').hide();
- GoogleAuthenticator_apppasswordcontrol();
- });
-
- function GoogleAuthenticator_apppasswordcontrol() {
- if (jQuery('#GA_enabled').is(':checked')) {
- jQuery('#GA_pwdenabled').removeAttr('disabled');
- jQuery('#GA_createpassword').removeAttr('disabled');
- } else {
- jQuery('#GA_pwdenabled').removeAttr('checked')
- jQuery('#GA_pwdenabled').attr('disabled', true);
- jQuery('#GA_createpassword').attr('disabled', true);
- }
- }
-
- function ShowOrHideQRCode() {
- if (jQuery('#GA_QR_INFO').is(':hidden')) {
- var qrcode="otpauth://totp/WordPress:"+escape(jQuery('#GA_description').val())+"?secret="+jQuery('#GA_secret').val()+"&issuer=WordPress";
- jQuery('#GA_QRCODE').qrcode(qrcode);
- jQuery('#GA_QR_INFO').show('slow');
- } else {
- jQuery('#GA_QR_INFO').hide('slow');
- jQuery('#GA_QRCODE').html("");
- }
- }
-</script>
-ENDOFJS;
-}
-
-/**
- * Form handling of Google Authenticator options added to personal profile page (user editing his own profile)
- */
-function personal_options_update() {
- global $user_id;
-
- // If editing of Google Authenticator settings has been disabled, just return
- $GA_hidefromuser = trim( get_user_option( 'googleauthenticator_hidefromuser', $user_id ) );
- if ( $GA_hidefromuser == 'enabled') return;
-
-
- $GA_enabled = ! empty( $_POST['GA_enabled'] );
- $GA_description = trim( sanitize_text_field($_POST['GA_description'] ) );
- $GA_relaxedmode = ! empty( $_POST['GA_relaxedmode'] );
- $GA_secret = trim( $_POST['GA_secret'] );
- $GA_pwdenabled = ! empty( $_POST['GA_pwdenabled'] );
- $GA_password = str_replace(' ', '', trim( $_POST['GA_password'] ) );
-
- if ( ! $GA_enabled ) {
- $GA_enabled = 'disabled';
- } else {
- $GA_enabled = 'enabled';
- }
-
- if ( ! $GA_relaxedmode ) {
- $GA_relaxedmode = 'disabled';
- } else {
- $GA_relaxedmode = 'enabled';
- }
-
-
- if ( ! $GA_pwdenabled ) {
- $GA_pwdenabled = 'disabled';
- } else {
- $GA_pwdenabled = 'enabled';
- }
-
- // Only store password if a new one has been generated.
- if (strtoupper($GA_password) != 'XXXXXXXXXXXXXXXX' ) {
- // Store the password in a format that can be expanded easily later on if needed.
- $GA_password = array( 'appname' => 'Default', 'password' => wp_hash_password( $GA_password ) );
- update_user_option( $user_id, 'googleauthenticator_passwords', json_encode( $GA_password ), true );
- }
-
- update_user_option( $user_id, 'googleauthenticator_enabled', $GA_enabled, true );
- update_user_option( $user_id, 'googleauthenticator_description', $GA_description, true );
- update_user_option( $user_id, 'googleauthenticator_relaxedmode', $GA_relaxedmode, true );
- update_user_option( $user_id, 'googleauthenticator_secret', $GA_secret, true );
- update_user_option( $user_id, 'googleauthenticator_pwdenabled', $GA_pwdenabled, true );
-
-}
-
-/**
- * Extend profile page with ability to enable/disable Google Authenticator authentication requirement.
- * Used by an administrator when editing other users.
- */
-function edit_user_profile() {
- global $user_id;
- $GA_enabled = trim( get_user_option( 'googleauthenticator_enabled', $user_id ) );
- $GA_hidefromuser = trim( get_user_option( 'googleauthenticator_hidefromuser', $user_id ) );
- echo "<h3>".__('Google Authenticator Settings','google-authenticator')."</h3>\n";
- echo "<table class=\"form-table\">\n";
- echo "<tbody>\n";
-
- echo "<tr>\n";
- echo "<th scope=\"row\">".__('Hide settings from user','google-authenticator')."</th>\n";
- echo "<td>\n";
- echo "<div><input name=\"GA_hidefromuser\" id=\"GA_hidefromuser\" class=\"tog\" type=\"checkbox\"" . checked( $GA_hidefromuser, 'enabled', false ) . "/>\n";
- echo "</td>\n";
- echo "</tr>\n";
-
- echo "<tr>\n";
- echo "<th scope=\"row\">".__('Active','google-authenticator')."</th>\n";
- echo "<td>\n";
- echo "<div><input name=\"GA_enabled\" id=\"GA_enabled\" class=\"tog\" type=\"checkbox\"" . checked( $GA_enabled, 'enabled', false ) . "/>\n";
- echo "</td>\n";
- echo "</tr>\n";
-
- echo "</tbody>\n";
- echo "</table>\n";
-}
-
-/**
- * Form handling of Google Authenticator options on edit profile page (admin user editing other user)
- */
-function edit_user_profile_update() {
- global $user_id;
-
- $GA_enabled = ! empty( $_POST['GA_enabled'] );
- $GA_hidefromuser = ! empty( $_POST['GA_hidefromuser'] );
-
- if ( ! $GA_enabled ) {
- $GA_enabled = 'disabled';
- } else {
- $GA_enabled = 'enabled';
- }
-
- if ( ! $GA_hidefromuser ) {
- $GA_hidefromuser = 'disabled';
- } else {
- $GA_hidefromuser = 'enabled';
- }
-
- update_user_option( $user_id, 'googleauthenticator_enabled', $GA_enabled, true );
- update_user_option( $user_id, 'googleauthenticator_hidefromuser', $GA_hidefromuser, true );
-
-}
-
-
-/**
-* AJAX callback function used to generate new secret
-*/
-function ajax_callback() {
- global $user_id;
-
- // Some AJAX security.
- check_ajax_referer( 'GoogleAuthenticatoraction', 'nonce' );
-
- // Create new secret.
- $secret = $this->create_secret();
-
- $result = array( 'new-secret' => $secret );
- header( 'Content-Type: application/json' );
- echo json_encode( $result );
-
- // die() is required to return a proper result
- die();
-}
-
-} // end class
-
-$google_authenticator = new GoogleAuthenticator;
-
diff --git a/plugins/google-authenticator/jquery.qrcode.min.js b/plugins/google-authenticator/jquery.qrcode.min.js
deleted file mode 100644
index fe9680e6..00000000
--- a/plugins/google-authenticator/jquery.qrcode.min.js
+++ /dev/null
@@ -1,28 +0,0 @@
-(function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;d<a.length&&0==a[d];)d++;this.num=Array(a.length-d+c);for(var b=0;b<a.length-d;b++)this.num[b]=a[b+d]}function p(a,c){this.totalCount=a;this.dataCount=c}function t(){this.buffer=[];this.length=0}u.prototype={getLength:function(){return this.data.length},
-write:function(a){for(var c=0;c<this.data.length;c++)a.put(this.data.charCodeAt(c),8)}};o.prototype={addData:function(a){this.dataList.push(new u(a));this.dataCache=null},isDark:function(a,c){if(0>a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e<c.length;e++)b+=c[e].dataCount;
-for(e=0;e<this.dataList.length;e++)c=this.dataList[e],d.put(c.mode,4),d.put(c.getLength(),j.getLengthInBits(c.mode,a)),c.write(d);if(d.getLengthInBits()<=8*b)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17;this.modules=Array(this.moduleCount);for(var d=0;d<this.moduleCount;d++){this.modules[d]=Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[d][b]=null}this.setupPositionProbePattern(0,0);this.setupPositionProbePattern(this.moduleCount-
-7,0);this.setupPositionProbePattern(0,this.moduleCount-7);this.setupPositionAdjustPattern();this.setupTimingPattern();this.setupTypeInfo(a,c);7<=this.typeNumber&&this.setupTypeNumber(a);null==this.dataCache&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList));this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,c){for(var d=-1;7>=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]=
-0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>=b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=j.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c<this.modules.length;c++)for(var d=1*c,b=0;b<this.modules[c].length;b++){var e=1*b;this.modules[c][b]&&(a.beginFill(0,100),a.moveTo(e,d),a.lineTo(e+1,d),a.lineTo(e+1,d+1),a.lineTo(e,d+1),a.endFill())}return a},
-setupTimingPattern:function(){for(var a=8;a<this.moduleCount-8;a++)null==this.modules[a][6]&&(this.modules[a][6]=0==a%2);for(a=8;a<this.moduleCount-8;a++)null==this.modules[6][a]&&(this.modules[6][a]=0==a%2)},setupPositionAdjustPattern:function(){for(var a=j.getPatternPosition(this.typeNumber),c=0;c<a.length;c++)for(var d=0;d<a.length;d++){var b=a[c],e=a[d];if(null==this.modules[b][e])for(var f=-2;2>=f;f++)for(var i=-2;2>=i;i++)this.modules[b+f][e+i]=-2==f||2==f||-2==i||2==i||0==f&&0==i?!0:!1}},setupTypeNumber:function(a){for(var c=
-j.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=j.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount-
-b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,i=this.moduleCount-1;0<i;i-=2)for(6==i&&i--;;){for(var g=0;2>g;g++)if(null==this.modules[b][i-g]){var n=!1;f<a.length&&(n=1==(a[f]>>>e&1));j.getMask(c,b,i-g)&&(n=!n);this.modules[b][i-g]=n;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};o.PAD0=236;o.PAD1=17;o.createData=function(a,c,d){for(var c=p.getRSBlocks(a,
-c),b=new t,e=0;e<d.length;e++){var f=d[e];b.put(f.mode,4);b.put(f.getLength(),j.getLengthInBits(f.mode,a));f.write(b)}for(e=a=0;e<c.length;e++)a+=c[e].dataCount;if(b.getLengthInBits()>8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(o.PAD0,8);if(b.getLengthInBits()>=8*a)break;b.put(o.PAD1,8)}return o.createBytes(b,c)};o.createBytes=function(a,c){for(var d=
-0,b=0,e=0,f=Array(c.length),i=Array(c.length),g=0;g<c.length;g++){var n=c[g].dataCount,h=c[g].totalCount-n,b=Math.max(b,n),e=Math.max(e,h);f[g]=Array(n);for(var k=0;k<f[g].length;k++)f[g][k]=255&a.buffer[k+d];d+=n;k=j.getErrorCorrectPolynomial(h);n=(new q(f[g],k.getLength()-1)).mod(k);i[g]=Array(k.getLength()-1);for(k=0;k<i[g].length;k++)h=k+n.getLength()-i[g].length,i[g][k]=0<=h?n.get(h):0}for(k=g=0;k<c.length;k++)g+=c[k].totalCount;d=Array(g);for(k=n=0;k<b;k++)for(g=0;g<c.length;g++)k<f[g].length&&
-(d[n++]=f[g][k]);for(k=0;k<e;k++)for(g=0;g<c.length;g++)k<i[g].length&&(d[n++]=i[g][k]);return d};s=4;for(var j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,
-78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var c=a<<10;0<=j.getBCHDigit(c)-j.getBCHDigit(j.G15);)c^=j.G15<<j.getBCHDigit(c)-j.getBCHDigit(j.G15);return(a<<10|c)^j.G15_MASK},getBCHTypeNumber:function(a){for(var c=a<<12;0<=j.getBCHDigit(c)-
-j.getBCHDigit(j.G18);)c^=j.G18<<j.getBCHDigit(c)-j.getBCHDigit(j.G18);return a<<12|c},getBCHDigit:function(a){for(var c=0;0!=a;)c++,a>>>=1;return c},getPatternPosition:function(a){return j.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case 0:return 0==(c+d)%2;case 1:return 0==c%2;case 2:return 0==d%3;case 3:return 0==(c+d)%3;case 4:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case 5:return 0==c*d%2+c*d%3;case 6:return 0==(c*d%2+c*d%3)%2;case 7:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+
-a);}},getErrorCorrectPolynomial:function(a){for(var c=new q([1],0),d=0;d<a;d++)c=c.multiply(new q([1,l.gexp(d)],0));return c},getLengthInBits:function(a,c){if(1<=c&&10>c)switch(a){case 1:return 10;case 2:return 9;case s:return 8;case 8:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case 1:return 12;case 2:return 11;case s:return 16;case 8:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case 1:return 14;case 2:return 13;case s:return 16;case 8:return 12;default:throw Error("mode:"+
-a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b<c;b++)for(var e=0;e<c;e++){for(var f=0,i=a.isDark(b,e),g=-1;1>=g;g++)if(!(0>b+g||c<=b+g))for(var h=-1;1>=h;h++)0>e+h||c<=e+h||0==g&&0==h||i==a.isDark(b+g,e+h)&&f++;5<f&&(d+=3+f-5)}for(b=0;b<c-1;b++)for(e=0;e<c-1;e++)if(f=0,a.isDark(b,e)&&f++,a.isDark(b+1,e)&&f++,a.isDark(b,e+1)&&f++,a.isDark(b+1,e+1)&&f++,0==f||4==f)d+=3;for(b=0;b<c;b++)for(e=0;e<c-6;e++)a.isDark(b,e)&&!a.isDark(b,e+1)&&a.isDark(b,e+
-2)&&a.isDark(b,e+3)&&a.isDark(b,e+4)&&!a.isDark(b,e+5)&&a.isDark(b,e+6)&&(d+=40);for(e=0;e<c;e++)for(b=0;b<c-6;b++)a.isDark(b,e)&&!a.isDark(b+1,e)&&a.isDark(b+2,e)&&a.isDark(b+3,e)&&a.isDark(b+4,e)&&!a.isDark(b+5,e)&&a.isDark(b+6,e)&&(d+=40);for(e=f=0;e<c;e++)for(b=0;b<c;b++)a.isDark(b,e)&&f++;a=Math.abs(100*f/c/c-50)/5;return d+10*a}},l={glog:function(a){if(1>a)throw Error("glog("+a+")");return l.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return l.EXP_TABLE[a]},EXP_TABLE:Array(256),
-LOG_TABLE:Array(256)},m=0;8>m;m++)l.EXP_TABLE[m]=1<<m;for(m=8;256>m;m++)l.EXP_TABLE[m]=l.EXP_TABLE[m-4]^l.EXP_TABLE[m-5]^l.EXP_TABLE[m-6]^l.EXP_TABLE[m-8];for(m=0;255>m;m++)l.LOG_TABLE[l.EXP_TABLE[m]]=m;q.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var c=Array(this.getLength()+a.getLength()-1),d=0;d<this.getLength();d++)for(var b=0;b<a.getLength();b++)c[d+b]^=l.gexp(l.glog(this.get(d))+l.glog(a.get(b)));return new q(c,0)},mod:function(a){if(0>
-this.getLength()-a.getLength())return this;for(var c=l.glog(this.get(0))-l.glog(a.get(0)),d=Array(this.getLength()),b=0;b<this.getLength();b++)d[b]=this.get(b);for(b=0;b<a.getLength();b++)d[b]^=l.gexp(l.glog(a.get(b))+c);return(new q(d,0)).mod(a)}};p.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],
-[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,
-116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,
-43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,
-3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,
-55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,
-45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];p.getRSBlocks=function(a,c){var d=p.getRsBlockTable(a,c);if(void 0==d)throw Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel:"+c);for(var b=d.length/3,e=[],f=0;f<b;f++)for(var h=d[3*f+0],g=d[3*f+1],j=d[3*f+2],l=0;l<h;l++)e.push(new p(g,j));return e};p.getRsBlockTable=function(a,c){switch(c){case 1:return p.RS_BLOCK_TABLE[4*(a-1)+0];case 0:return p.RS_BLOCK_TABLE[4*(a-1)+1];case 3:return p.RS_BLOCK_TABLE[4*
-(a-1)+2];case 2:return p.RS_BLOCK_TABLE[4*(a-1)+3]}};t.prototype={get:function(a){return 1==(this.buffer[Math.floor(a/8)]>>>7-a%8&1)},put:function(a,c){for(var d=0;d<c;d++)this.putBit(1==(a>>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}};"string"===typeof h&&(h={text:h});h=r.extend({},{render:"canvas",width:256,height:256,typeNumber:-1,
-correctLevel:2,background:"#ffffff",foreground:"#000000"},h);return this.each(function(){var a;if("canvas"==h.render){a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();var c=document.createElement("canvas");c.width=h.width;c.height=h.height;for(var d=c.getContext("2d"),b=h.width/a.getModuleCount(),e=h.height/a.getModuleCount(),f=0;f<a.getModuleCount();f++)for(var i=0;i<a.getModuleCount();i++){d.fillStyle=a.isDark(f,i)?h.foreground:h.background;var g=Math.ceil((i+1)*b)-Math.floor(i*b),
-j=Math.ceil((f+1)*b)-Math.floor(f*b);d.fillRect(Math.round(i*b),Math.round(f*e),g,j)}}else{a=new o(h.typeNumber,h.correctLevel);a.addData(h.text);a.make();c=r("<table></table>").css("width",h.width+"px").css("height",h.height+"px").css("border","0px").css("border-collapse","collapse").css("background-color",h.background);d=h.width/a.getModuleCount();b=h.height/a.getModuleCount();for(e=0;e<a.getModuleCount();e++){f=r("<tr></tr>").css("height",b+"px").appendTo(c);for(i=0;i<a.getModuleCount();i++)r("<td></td>").css("width",
-d+"px").css("background-color",a.isDark(e,i)?h.foreground:h.background).appendTo(f)}}a=c;jQuery(a).appendTo(this)})}})(jQuery);
diff --git a/plugins/google-authenticator/lang/google-authenticator-da_DK.mo b/plugins/google-authenticator/lang/google-authenticator-da_DK.mo
deleted file mode 100644
index d4b4b1fd..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-da_DK.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/lang/google-authenticator-da_DK.po b/plugins/google-authenticator/lang/google-authenticator-da_DK.po
deleted file mode 100644
index 28fe9911..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-da_DK.po
+++ /dev/null
@@ -1,113 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator\n"
-"POT-Creation-Date: 2014-01-11 08:17+0100\n"
-"PO-Revision-Date: 2014-01-11 08:20+0100\n"
-"Last-Translator: Henrik Schack <henrik@schack.dk>\n"
-"Language-Team: \n"
-"Language: da\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.6.3\n"
-"X-Poedit-Basepath: ..\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
-"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
-"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Poedit-SearchPath-0: .\n"
-
-#: google-authenticator.php:166
-msgid ""
-"If you don't have Google Authenticator enabled for your WordPress account, "
-"leave this field empty."
-msgstr ""
-"Hvis ikke du har aktiveret Google Authenticator for din konto, så lad være "
-"med at skrive noget her."
-
-#: google-authenticator.php:166
-msgid "Google Authenticator code"
-msgstr "Google Authenticator kode"
-
-#: google-authenticator.php:231
-msgid "<strong>ERROR</strong>: The Google Authenticator password is incorrect."
-msgstr "<strong>ERROR</strong>: Google Authenticator kodeordet er forkert."
-
-#: google-authenticator.php:234
-msgid ""
-"<strong>ERROR</strong>: The Google Authenticator code is incorrect or has "
-"expired."
-msgstr ""
-"<strong>ERROR</strong>: Google Authenticator koden er forkert eller udløbet."
-
-#: google-authenticator.php:274
-msgid "WordPressBlog"
-msgstr "WordPressBlog"
-
-#: google-authenticator.php:277 google-authenticator.php:469
-msgid "Google Authenticator Settings"
-msgstr "Google Authenticator indstillinger"
-
-#: google-authenticator.php:282 google-authenticator.php:481
-msgid "Active"
-msgstr "Aktiv"
-
-#: google-authenticator.php:290
-msgid "Relaxed mode"
-msgstr "Afslappet tilstand"
-
-#: google-authenticator.php:292
-msgid ""
-" Relaxed mode allows for more time drifting on your phone clock (&#177;4 "
-"min)."
-msgstr ""
-"Afslappet tilstand tillader mere upræcis tid på din telefon (&#177;4 min)."
-
-#: google-authenticator.php:297
-msgid "Description"
-msgstr "Beskrivelse"
-
-#: google-authenticator.php:298
-msgid ""
-" Description that you'll see in the Google Authenticator app on your phone."
-msgstr "Beskrivelsen du vil se i Google Authenticator app'en på din telefon."
-
-#: google-authenticator.php:302
-msgid "Secret"
-msgstr "Hemmelig kode"
-
-#: google-authenticator.php:305
-msgid "Create new secret"
-msgstr "Opret ny hemmelig kode"
-
-#: google-authenticator.php:306
-msgid "Show/Hide QR code"
-msgstr "Vis/Gem QR kode"
-
-#: google-authenticator.php:315
-msgid "Scan this with the Google Authenticator app."
-msgstr "Scan dette med Google Authenticator app'en."
-
-#: google-authenticator.php:320
-msgid "Enable App password"
-msgstr "Aktiver app kodeord"
-
-#: google-authenticator.php:322
-msgid " Enabling an App password will decrease your overall login security."
-msgstr ""
-"Aktiverer du app kodeords featuren, påvirker det din sikkerhed generelt."
-
-#: google-authenticator.php:330
-msgid "Create new password"
-msgstr "Opret nyt kodeord"
-
-#: google-authenticator.php:331
-msgid ""
-" Password is not stored in cleartext, this is your only chance to see it."
-msgstr ""
-"Kodeordet gemmes ikke i klartekst, dette er din eneste chance for at se det."
-
-#: google-authenticator.php:474
-msgid "Hide settings from user"
-msgstr "Skjul indstillinger for bruger"
diff --git a/plugins/google-authenticator/lang/google-authenticator-de_DE.mo b/plugins/google-authenticator/lang/google-authenticator-de_DE.mo
deleted file mode 100644
index 3ac64c79..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-de_DE.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/lang/google-authenticator-de_DE.po b/plugins/google-authenticator/lang/google-authenticator-de_DE.po
deleted file mode 100644
index 66afca41..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-de_DE.po
+++ /dev/null
@@ -1,119 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator 0.30\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-authenticator\n"
-"POT-Creation-Date: 2011-05-17 19:38:36+00:00\n"
-"PO-Revision-Date: 2011-06-25 16:20+0100\n"
-"Last-Translator: Tobias Bäthge <wordpress@tobias.baethge.com>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Poedit-Language: \n"
-"X-Poedit-Country: \n"
-"X-Poedit-SourceCharset: utf-8\n"
-"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
-"X-Poedit-Basepath: \n"
-"X-Poedit-Bookmarks: \n"
-"X-Poedit-SearchPath-0: .\n"
-"X-Textdomain-Support: yes"
-
-#: google-authenticator.php:118
-#@ google-authenticator
-msgid "Google Authenticator code"
-msgstr "&quot;Google Authenticator&quot;-Code"
-
-#: google-authenticator.php:172
-#: google-authenticator.php:267
-#@ google-authenticator
-msgid "Active"
-msgstr "Aktivieren"
-
-#: google-authenticator.php:184
-#@ google-authenticator
-msgid "Description"
-msgstr "Beschreibung"
-
-#: google-authenticator.php:189
-#@ google-authenticator
-msgid "Secret"
-msgstr "Geheimschlüssel"
-
-#: google-authenticator.php:192
-#@ google-authenticator
-msgid "Create new secret"
-msgstr "Neuen Geheimschlüssel erzeugen"
-
-#: google-authenticator.php:193
-#@ google-authenticator
-msgid "Show/Hide QR code"
-msgstr "QR-Code anzeigen/verstecken"
-
-#. translators: plugin header field 'Name'
-#: google-authenticator.php:0
-#@ google-authenticator
-msgid "Google Authenticator"
-msgstr "Google Authenticator"
-
-#. translators: plugin header field 'PluginURI'
-#: google-authenticator.php:0
-#@ google-authenticator
-msgid "http://henrik.schack.dk/google-authenticator-for-wordpress"
-msgstr "http://henrik.schack.dk/google-authenticator-for-wordpress"
-
-#. translators: plugin header field 'Author'
-#: google-authenticator.php:0
-#@ google-authenticator
-msgid "Henrik Schack"
-msgstr "Henrik Schack"
-
-#. translators: plugin header field 'AuthorURI'
-#: google-authenticator.php:0
-#@ google-authenticator
-msgid "http://henrik.schack.dk/"
-msgstr "http://henrik.schack.dk/"
-
-#. translators: plugin header field 'Version'
-#: google-authenticator.php:0
-#@ google-authenticator
-msgid "0.30"
-msgstr "0.30"
-
-#: google-authenticator.php:143
-#@ google-authenticator
-msgid "<strong>ERROR</strong>: The Google Authenticator code is incorrect or has expired."
-msgstr "<strong>FEHLER</strong>: Der eingegebene &quot;Google Authenticator&quot;-Code ist falsch oder abgelaufen."
-
-#: google-authenticator.php:165
-#@ google-authenticator
-msgid "WordPress Blog"
-msgstr "WordPress-Blog"
-
-#: google-authenticator.php:167
-#: google-authenticator.php:263
-#@ google-authenticator
-msgid "Google Authenticator Settings"
-msgstr "Einstellungen zu Google Authenticator"
-
-#: google-authenticator.php:201
-#@ google-authenticator
-msgid "Scan this with the Google Authenticator app."
-msgstr "Scanne diesen QR-Code mit der &quot;Google Authenticator&quot;-App deines Smartphones."
-
-#: google-authenticator.php:118
-#@ google-authenticator
-msgid "If you don't have Google Authenticator enabled for your WordPress account, leave this field empty."
-msgstr "Falls die Nutzung von &quot;Google Authenticator&quot; für dieses WordPress-Konto nicht aktiviert ist, dieses Feld leer lassen."
-
-#: google-authenticator.php:185
-#@ google-authenticator
-msgid " Description that you'll see in the Google Authenticator app on your phone."
-msgstr "Beschreibung, die in der &quot;Google Authenticator&quot;-App auf dem Smartphone angezeigt wird."
-
-#. translators: plugin header field 'Description'
-#: google-authenticator.php:0
-#@ google-authenticator
-msgid "Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry app as One Time Password generator."
-msgstr "Zwei-Faktor-Authentifizierung für WordPress mit der &quot;Google Authenticator&quot;-App für Android/iPhone/Blackberry"
-
diff --git a/plugins/google-authenticator/lang/google-authenticator-es_ES.mo b/plugins/google-authenticator/lang/google-authenticator-es_ES.mo
deleted file mode 100644
index 5bf1304b..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-es_ES.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/lang/google-authenticator-es_ES.po b/plugins/google-authenticator/lang/google-authenticator-es_ES.po
deleted file mode 100644
index ce9ab6aa..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-es_ES.po
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright (C) 2010 Google Authenticator
-# This file is distributed under the same license as the Google Authenticator package.
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator 0.37\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-authenticator\n"
-"POT-Creation-Date: 2011-08-21 14:25:45+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2014-01-11 10:07+0100\n"
-"Last-Translator: \n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"X-Generator: Poedit 1.6.3\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"Language: es_ES\n"
-
-#: google-authenticator.php:131
-msgid ""
-"If you don't have Google Authenticator enabled for your WordPress account, "
-"leave this field empty."
-msgstr ""
-"Si no tiene Google Authenticator habilitado en su cuenta de WordPress, deje "
-"este campo vacío."
-
-#: google-authenticator.php:131
-msgid "Google Authenticator code"
-msgstr "Código Google Authenticator"
-
-#: google-authenticator.php:176
-msgid "<strong>ERROR</strong>: The Google Authenticator password is incorrect."
-msgstr "<strong>ERROR</strong>: El codigo es incorrecto."
-
-#: google-authenticator.php:179
-msgid ""
-"<strong>ERROR</strong>: The Google Authenticator code is incorrect or has "
-"expired."
-msgstr "<strong>ERROR</strong>: El código es incorrecto o caducado."
-
-#: google-authenticator.php:215
-msgid "WordPress Blog"
-msgstr "Blog de WordPress"
-
-#: google-authenticator.php:218 google-authenticator.php:392
-msgid "Google Authenticator Settings"
-msgstr "Opciones Google Authenticator"
-
-#: google-authenticator.php:223 google-authenticator.php:396
-msgid "Active"
-msgstr "Activar"
-
-#: google-authenticator.php:235
-msgid "Relaxed mode"
-msgstr "Modo relajado"
-
-#: google-authenticator.php:237
-msgid ""
-" Relaxed mode allows for more time drifting on your phone clock (&#177;4 "
-"min)."
-msgstr ""
-"El modo relajado permite tener más tiempo de reloj en su teléfono (&#177;4 "
-"min)."
-
-#: google-authenticator.php:242
-msgid "Description"
-msgstr "Descripción"
-
-#: google-authenticator.php:243
-msgid ""
-" Description that you'll see in the Google Authenticator app on your phone."
-msgstr ""
-"Descripción que se verá en la aplicación Google Authenticator en su teléfono."
-
-#: google-authenticator.php:247
-msgid "Secret"
-msgstr "Secreto"
-
-#: google-authenticator.php:250
-msgid "Create new secret"
-msgstr "Crear nueva clave secreta"
-
-#: google-authenticator.php:251
-msgid "Show/Hide QR code"
-msgstr "Mostar/Esconder QR Code"
-
-#: google-authenticator.php:259
-msgid "Scan this with the Google Authenticator app."
-msgstr "Escanear esto con la aplicación Google Authenticator."
-
-#: google-authenticator.php:264
-msgid "Enable App password"
-msgstr "Permitir contraseña de aplicación"
-
-#: google-authenticator.php:266
-msgid " Enabling an App password will decrease your overall login security."
-msgstr "Permitir una contraseña de aplicación disminuirá su seguridad global."
-
-#: google-authenticator.php:274
-msgid "Create new password"
-msgstr "Crear nueva contraseña"
-
-#: google-authenticator.php:275
-msgid ""
-" Password is not stored in cleartext, this is your only chance to see it."
-msgstr ""
-"La contraseña no está almacenada en formato de texto, es su única "
-"oportunidad de verla."
-
-#. Plugin Name of the plugin/theme
-msgid "Google Authenticator"
-msgstr ""
-
-#. Plugin URI of the plugin/theme
-msgid "http://henrik.schack.dk/google-authenticator-for-wordpress"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid ""
-"Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry "
-"app as One Time Password generator."
-msgstr ""
-"La autentificación en dos pasos por wordpress utiliza una app Android/iPhone/"
-"Blackberry como 'One Time Password generator.'"
-
-#. Author of the plugin/theme
-msgid "Henrik Schack"
-msgstr ""
-
-#. Author URI of the plugin/theme
-msgid "http://henrik.schack.dk/"
-msgstr ""
diff --git a/plugins/google-authenticator/lang/google-authenticator-fr_FR.mo b/plugins/google-authenticator/lang/google-authenticator-fr_FR.mo
deleted file mode 100644
index 000ac747..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-fr_FR.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/lang/google-authenticator-fr_FR.po b/plugins/google-authenticator/lang/google-authenticator-fr_FR.po
deleted file mode 100644
index 9dcbd951..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-fr_FR.po
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright (C) 2010 Google Authenticator
-# This file is distributed under the same license as the Google Authenticator package.
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator 0.37\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-authenticator\n"
-"POT-Creation-Date: 2011-08-21 14:25:45+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2014-01-11 10:15+0100\n"
-"Last-Translator: \n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"X-Generator: Poedit 1.6.3\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"Language: fr_FR\n"
-
-#: google-authenticator.php:131
-msgid ""
-"If you don't have Google Authenticator enabled for your WordPress account, "
-"leave this field empty."
-msgstr ""
-"Si vous n'avez pas activé Google ASuthenticator pour votre compte wordpress, "
-"laissez ce champ vide."
-
-#: google-authenticator.php:131
-msgid "Google Authenticator code"
-msgstr "Code Google Authenticator"
-
-#: google-authenticator.php:176
-msgid "<strong>ERROR</strong>: The Google Authenticator password is incorrect."
-msgstr "<strong>ERREUR</strong>: Le code Google Authenticator est incorrect."
-
-#: google-authenticator.php:179
-msgid ""
-"<strong>ERROR</strong>: The Google Authenticator code is incorrect or has "
-"expired."
-msgstr ""
-"<strong>ERREUR</strong>: Le code Google Authenticator est incorrect ou "
-"périmé."
-
-#: google-authenticator.php:215
-msgid "WordPress Blog"
-msgstr "Blog WordPress"
-
-#: google-authenticator.php:218 google-authenticator.php:392
-msgid "Google Authenticator Settings"
-msgstr "Réglages Google Authenticator"
-
-#: google-authenticator.php:223 google-authenticator.php:396
-msgid "Active"
-msgstr "Activer"
-
-#: google-authenticator.php:235
-msgid "Relaxed mode"
-msgstr "Mode relax"
-
-#: google-authenticator.php:237
-msgid ""
-" Relaxed mode allows for more time drifting on your phone clock (&#177;4 "
-"min)."
-msgstr ""
-"Le mode relax vous permet d'avoir plus de temps de latence sur le chrono de "
-"votre téléphone (&#177;4 min)."
-
-#: google-authenticator.php:242
-msgid "Description"
-msgstr "Description"
-
-#: google-authenticator.php:243
-msgid ""
-" Description that you'll see in the Google Authenticator app on your phone."
-msgstr ""
-"Voici la description que vous verrez dans l'app Gogogle Authentiator de "
-"votre téléphone."
-
-#: google-authenticator.php:247
-msgid "Secret"
-msgstr "Code secret"
-
-#: google-authenticator.php:250
-msgid "Create new secret"
-msgstr "Créer nouveau code secret"
-
-#: google-authenticator.php:251
-msgid "Show/Hide QR code"
-msgstr "Montrer/Cacher le QR Code"
-
-#: google-authenticator.php:259
-msgid "Scan this with the Google Authenticator app."
-msgstr "Scanner ceci avec votre app Google Authenticator"
-
-#: google-authenticator.php:264
-msgid "Enable App password"
-msgstr "Autoriser mot de passe de l'app"
-
-#: google-authenticator.php:266
-msgid " Enabling an App password will decrease your overall login security."
-msgstr ""
-"Autoriser un mot de passe d'app réduira votre sécurité globale de connexion."
-
-#: google-authenticator.php:274
-msgid "Create new password"
-msgstr "Créer nouveau mot de passe"
-
-#: google-authenticator.php:275
-msgid ""
-" Password is not stored in cleartext, this is your only chance to see it."
-msgstr ""
-"Le mot de passe n'est pas stocké en texte clair, c'est votre seule "
-"opportunité de le voir."
-
-#. Plugin Name of the plugin/theme
-msgid "Google Authenticator"
-msgstr "Google Authenticator"
-
-#. Plugin URI of the plugin/theme
-msgid "http://henrik.schack.dk/google-authenticator-for-wordpress"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid ""
-"Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry "
-"app as One Time Password generator."
-msgstr ""
-
-#. Author of the plugin/theme
-msgid "Henrik Schack"
-msgstr ""
-
-#. Author URI of the plugin/theme
-msgid "http://henrik.schack.dk/"
-msgstr ""
diff --git a/plugins/google-authenticator/lang/google-authenticator-it_IT.mo b/plugins/google-authenticator/lang/google-authenticator-it_IT.mo
deleted file mode 100644
index dae99aef..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-it_IT.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/lang/google-authenticator-it_IT.po b/plugins/google-authenticator/lang/google-authenticator-it_IT.po
deleted file mode 100644
index 361d5810..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-it_IT.po
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright (C) 2010 Google Authenticator
-# This file is distributed under the same license as the Google Authenticator package.
-# Aldo Latino <aldolat@gmail.com>, 2012, 2014.
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator 0.37\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-authenticator\n"
-"POT-Creation-Date: 2014-01-11 07:14:22+00:00\n"
-"PO-Revision-Date: 2014-01-12 21:24+0100\n"
-"Last-Translator: Aldo Latino <aldolat@gmail.com>\n"
-"Language-Team: Italian <kde-i18n-it@kde.org>\n"
-"Language: it\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Lokalize 1.5\n"
-
-#: google-authenticator.php:166
-msgid ""
-"If you don't have Google Authenticator enabled for your WordPress account, "
-"leave this field empty."
-msgstr ""
-"Se Google Authenticator non è attivo per il tuo account WordPress, lascia "
-"vuoto questo campo."
-
-#: google-authenticator.php:166
-msgid "Google Authenticator code"
-msgstr "Codice di Google Authenticator"
-
-#: google-authenticator.php:231
-msgid "<strong>ERROR</strong>: The Google Authenticator password is incorrect."
-msgstr ""
-"<strong>ERRORE</strong>: la password di Google Authenticator non è corretta.."
-
-#: google-authenticator.php:234
-msgid ""
-"<strong>ERROR</strong>: The Google Authenticator code is incorrect or has "
-"expired."
-msgstr ""
-"<strong>ERRORE</strong>: Il codice di Google Authenticator non è corretto o "
-"è scaduto."
-
-#: google-authenticator.php:274
-msgid "WordPressBlog"
-msgstr "WordPress Blog"
-
-#: google-authenticator.php:277 google-authenticator.php:469
-msgid "Google Authenticator Settings"
-msgstr "Impostazioni di Google Authenticator"
-
-#: google-authenticator.php:282 google-authenticator.php:481
-msgid "Active"
-msgstr "Attivo"
-
-#: google-authenticator.php:290
-msgid "Relaxed mode"
-msgstr "Modalità comoda"
-
-#: google-authenticator.php:292
-msgid ""
-" Relaxed mode allows for more time drifting on your phone clock (&#177;4 "
-"min)."
-msgstr ""
-" La modalità comoda permette uno scostamento di tempo più esteso rispetto "
-"all'orologio del telefono (&#177;4 min)."
-
-#: google-authenticator.php:297
-msgid "Description"
-msgstr "Descrizione"
-
-#: google-authenticator.php:298
-msgid ""
-" Description that you'll see in the Google Authenticator app on your phone."
-msgstr ""
-" La descrizione che si vede nell'app Google Authenticator sul telefono."
-
-#: google-authenticator.php:302
-msgid "Secret"
-msgstr "Chiave segreta"
-
-#: google-authenticator.php:305
-msgid "Create new secret"
-msgstr "Crea una nuova chiave segreta"
-
-#: google-authenticator.php:306
-msgid "Show/Hide QR code"
-msgstr "Mostra/nascondi il codice QR"
-
-#: google-authenticator.php:315
-msgid "Scan this with the Google Authenticator app."
-msgstr "Effettua la scansione con l'app Google Authenticator."
-
-#: google-authenticator.php:320
-msgid "Enable App password"
-msgstr "Abilita la password delle App"
-
-#: google-authenticator.php:322
-msgid " Enabling an App password will decrease your overall login security."
-msgstr ""
-" L'abilitazione della password delle App abbasserà il livello di sicurezza "
-"generale del login."
-
-#: google-authenticator.php:330
-msgid "Create new password"
-msgstr "Crea una nuova password"
-
-#: google-authenticator.php:331
-msgid ""
-" Password is not stored in cleartext, this is your only chance to see it."
-msgstr ""
-" La password non è conservata in chiaro: questo l'unico momento in cui la si "
-"può vedere."
-
-#: google-authenticator.php:474
-msgid "Hide settings from user"
-msgstr "Nascondi le impostazioni agli utenti"
-
-#. Plugin Name of the plugin/theme
-msgid "Google Authenticator"
-msgstr "Google Authenticator"
-
-#. Plugin URI of the plugin/theme
-msgid "http://henrik.schack.dk/google-authenticator-for-wordpress"
-msgstr "http://henrik.schack.dk/google-authenticator-for-wordpress"
-
-#. Description of the plugin/theme
-msgid ""
-"Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry "
-"app as One Time Password generator."
-msgstr ""
-"Autenticazione a due fattori per WordPress utilizzando un'app su Android/"
-"iPhone/Blackberry come generatore di Password usa-e-getta."
-
-#. Author of the plugin/theme
-msgid "Henrik Schack"
-msgstr "Henrik Schack"
-
-#. Author URI of the plugin/theme
-msgid "http://henrik.schack.dk/"
-msgstr "http://henrik.schack.dk/"
-
-
diff --git a/plugins/google-authenticator/lang/google-authenticator-nl_NL.mo b/plugins/google-authenticator/lang/google-authenticator-nl_NL.mo
deleted file mode 100644
index 0fbdcb13..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-nl_NL.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/lang/google-authenticator-nl_NL.po b/plugins/google-authenticator/lang/google-authenticator-nl_NL.po
deleted file mode 100644
index 2e0fc09b..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-nl_NL.po
+++ /dev/null
@@ -1,317 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator\n"
-"POT-Creation-Date: 2019-04-12 17:20+0200\n"
-"PO-Revision-Date: 2019-04-12 17:38+0200\n"
-"Last-Translator: \n"
-"Language-Team: \n"
-"Language: nl_NL\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 2.2.1\n"
-"X-Poedit-Basepath: ..\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
-"X-Poedit-WPHeader: google-authenticator.php\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
-"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
-"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
-"X-Poedit-SearchPath-0: .\n"
-"X-Poedit-SearchPathExcluded-0: *.js\n"
-
-#. Plugin Name of the plugin/theme
-#: google-authenticator.php:196 google-authenticator.php:199
-#: google-authenticator.php:202
-msgid "Google Authenticator"
-msgstr ""
-
-#: google-authenticator.php:280
-msgid ""
-"OTP code doesn't match supplied secret, please check you've configured "
-"Authenticator correctly."
-msgstr ""
-"OTP-code komt niet overeen met de opgegeven geheime code, controleer of je "
-"de Authenticator goed hebt ingesteld."
-
-#: google-authenticator.php:289
-msgid ""
-"Congratulations, you have successfully enabled Google Authenticator for your "
-"account"
-msgstr ""
-"Gefeliciteerd, je hebt Google Authenticator met succes ingeschakeld voor je "
-"account"
-
-#: google-authenticator.php:310
-msgid "iOS: Authy"
-msgstr ""
-
-#: google-authenticator.php:314
-msgid "iOS: Google Authenticator"
-msgstr ""
-
-#: google-authenticator.php:318
-msgid "Android: Authy"
-msgstr ""
-
-#: google-authenticator.php:322
-msgid "Android: Google Authenticator"
-msgstr ""
-
-#: google-authenticator.php:326
-msgid "Windows Phone"
-msgstr ""
-
-#: google-authenticator.php:330
-msgid "Chrome Browser"
-msgstr ""
-
-#: google-authenticator.php:334
-msgid "Desktop"
-msgstr ""
-
-#: google-authenticator.php:342 google-authenticator.php:433
-#: google-authenticator.php:715 google-authenticator.php:936
-msgid "Google Authenticator Settings"
-msgstr "Google Authenticator instellingen"
-
-#: google-authenticator.php:346
-msgid ""
-"If you haven't already done so, please install the Authy or Google "
-"Authenticator app on your mobile device from the App Store:"
-msgstr ""
-"Mocht je dit nog niet gedaan hebben, installeer dan de Authy of Google "
-"Authenticator app vanuit de App Store op je mobiele apparaat:"
-
-#: google-authenticator.php:352
-msgid ""
-"The easiest way to enable your account is to add an account by scanning the "
-"QR code using the app."
-msgstr ""
-"De makkelijkste manier om je account in te schakelen is een account toe te "
-"voegen door het scannen van de QR-code met de app."
-
-#: google-authenticator.php:354
-msgid ""
-"An account can also be added by typing in the secret. After you've added "
-"your account to the App, please type the code you see on the screen into the "
-"Authenticator Code field and press the Verify Authenticator Code button."
-msgstr ""
-"Een account kan ook worden toegevoegd door de geheim code in te typen. Nadat "
-"je je account hebt toegevoegd in de app, type je de code die je op het "
-"scherm ziet in het veld Authenticatiecode en druk je op de knop Verifieer "
-"authenticatiecode."
-
-#: google-authenticator.php:357
-msgid ""
-"If the account setup was successful, you will be logged out, and will need "
-"to login again using your Username, Password and Authenticator code "
-"generated using the App on your mobile device."
-msgstr ""
-"Als het instellen van het account is gelukt, wordt je uitgelogd en moet je "
-"opnieuw inloggen met je gebruikersnaam, wachtwoord en authenticatiecode die "
-"in de app op je mobiele apparaat wordt gegenereerd."
-
-#: google-authenticator.php:436
-msgid "Successfullly saved your settings for the network"
-msgstr "Instellingen succesvol opgeslagen voor het netwerk"
-
-#: google-authenticator.php:438
-msgid "Successfullly saved your settings for the site"
-msgstr "Instellingen succesvol opgeslagen voor de site"
-
-#: google-authenticator.php:443
-msgid "Network Settings"
-msgstr "Netwerk instellingen"
-
-#: google-authenticator.php:447
-msgid "Only use network-wide settings, ignoring site settings."
-msgstr ""
-"Gebruik alleen instellingen voor het hele netwerk en negeer de instellingen "
-"van de site."
-
-#: google-authenticator.php:453
-msgid "Two Screen Signin"
-msgstr "Aanmelden op twee schermen"
-
-#: google-authenticator.php:457
-msgid "Ask for authenticator code on secondary login screen"
-msgstr "Vraag naar de authenticatiecode op een secundair inlogscherm"
-
-#: google-authenticator.php:461
-msgid "Roles requiring Google Authenticator Enabled"
-msgstr "Rollen waarbij gebruik Google Authenticator is vereist"
-
-#: google-authenticator.php:469
-msgid "Network-wide settings in effect, only a super admin can modify them."
-msgstr ""
-"Netwerk brede instellingen zijn van kracht, alleen een super-beheerder kan "
-"deze wijzigen."
-
-#: google-authenticator.php:471
-msgid "Change network wide Google Authenticator settings"
-msgstr "Verander netwerk brede Google Authenticator instellingen"
-
-#: google-authenticator.php:511
-msgid ""
-"Sorry, you can't disable checks for this role as it's enabled at the network "
-"level."
-msgstr ""
-"Sorry, je kunt de controles voor deze rol niet uitschakelen omdat deze op "
-"het netwerkniveau is ingeschakeld."
-
-#: google-authenticator.php:513
-#, php-format
-msgid ""
-"Sorry, this role is enabled at the network level and can only be disabled "
-"via the <a href=\"%s\">network settings</a>"
-msgstr ""
-"Sorry, deze rol is ingeschakeld op netwerkniveau en kan alleen worden "
-"uitgeschakeld via de <a href=“%s”>netwerkinstellingen</a>"
-
-#: google-authenticator.php:542
-msgid ""
-"If you don't have Google Authenticator enabled for your WordPress account, "
-"leave this field empty."
-msgstr ""
-"Als Google Authenticator niet is ingeschakeld voor je WordPress-account, "
-"laat dit veld dan leeg."
-
-#: google-authenticator.php:542
-msgid "Google Authenticator code"
-msgstr "Google Authenticator-code"
-
-#: google-authenticator.php:615
-msgid "<strong>ERROR</strong>: The Google Authenticator password is incorrect."
-msgstr "<strong>ERROR</strong>: De Google Authenticator-wachtwoord is onjuist."
-
-#: google-authenticator.php:619 google-authenticator.php:640
-msgid ""
-"<strong>ERROR</strong>: The Google Authenticator code is incorrect or has "
-"expired."
-msgstr ""
-"<strong>ERROR</strong>: De Google Authenticator-code is onjuist of verlopen."
-
-#: google-authenticator.php:635
-msgid "Secondary Login Screen"
-msgstr "Secundair inlogscherm"
-
-#: google-authenticator.php:638
-msgid "<strong>ERROR</strong>: The Google Authenticator code is missing."
-msgstr "<strong>ERROR</strong>: De Google Authenticator-code ontbreekt."
-
-#: google-authenticator.php:652
-msgid ""
-"Please enter the Google Authenticator code using the app on your device."
-msgstr ""
-"Voer de Google Authenticator-code in met behulp van de app op je mobiele "
-"apparaat."
-
-#: google-authenticator.php:654
-msgid "Log In"
-msgstr "Inloggen"
-
-#: google-authenticator.php:722 google-authenticator.php:948
-msgid "Active"
-msgstr "Actief"
-
-#: google-authenticator.php:731
-msgid "Relaxed mode"
-msgstr "Ontspannen modus"
-
-#: google-authenticator.php:733
-msgid ""
-" Relaxed mode allows for more time drifting on your phone clock (&#177;4 "
-"min)."
-msgstr ""
-" Ontspannen modus geeft meer ruimte voor een afwijkende klok op je mobiele "
-"apparaat (&#177;4 min)."
-
-#: google-authenticator.php:740
-msgid "Description"
-msgstr "Omschrijving"
-
-#: google-authenticator.php:741
-msgid ""
-" Description that you'll see in the Google Authenticator app on your phone."
-msgstr ""
-" Omschrijving die je ziet in de Google Authenticator app op je mobiele "
-"apparaat."
-
-#: google-authenticator.php:745
-msgid "Secret"
-msgstr "Geheime code"
-
-#: google-authenticator.php:749
-msgid "Create new secret"
-msgstr "Nieuw geheime code maken"
-
-#: google-authenticator.php:750
-msgid "Show/Hide QR code"
-msgstr "Toon/verberg QR-code"
-
-#: google-authenticator.php:762
-msgid "Scan this with the Google Authenticator app."
-msgstr "Scan dit met de Google Authenticator-app."
-
-#: google-authenticator.php:774
-msgid "Enable App password"
-msgstr "Schakel in App-wachtwoord"
-
-#: google-authenticator.php:776
-msgid " Enabling an App password will decrease your overall login security."
-msgstr ""
-" Als je een App-wachtwoord inschakelt, wordt je totale inlog beveiliging "
-"minder."
-
-#: google-authenticator.php:784
-msgid "Create new password"
-msgstr "Nieuw wachtwoord maken"
-
-#: google-authenticator.php:785
-msgid ""
-" Password is not stored in cleartext, this is your only chance to see it."
-msgstr ""
-" Wachtwoord wordt niet als platte tekst opgeslagen, dit is je enige kans om "
-"het te zien."
-
-#: google-authenticator.php:793
-msgid "Authenticator Code"
-msgstr "Authenticatiecode"
-
-#: google-authenticator.php:794
-msgid ""
-"After adding the site to your google authy account, add your authenticator "
-"code here."
-msgstr ""
-"Na het toevoegen van de site aan je Google Authy-account, voeg je hier je "
-"authenticatiecode toe."
-
-#: google-authenticator.php:800
-msgid "Verify Authenticator Code"
-msgstr "Verifieer authenticatiecode"
-
-#: google-authenticator.php:941
-msgid "Hide settings from user"
-msgstr "Verberg gebruikers instellingen"
-
-#. Plugin URI of the plugin/theme
-msgid "https://github.com/ivankruchkoff/google-authenticator"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid ""
-"Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry "
-"app as One Time Password generator."
-msgstr ""
-"Twee-staps-authenticatie voor WordPress met behulp van de Android/iPhone/"
-"Blackberry app als eenmalig wachtwoord generator."
-
-#. Author of the plugin/theme
-msgid "Ivan Kruchkoff"
-msgstr ""
-
-#. Author URI of the plugin/theme
-msgid "https://github.com/ivankruchkoff"
-msgstr ""
diff --git a/plugins/google-authenticator/lang/google-authenticator-pt_BR.mo b/plugins/google-authenticator/lang/google-authenticator-pt_BR.mo
deleted file mode 100644
index e318239e..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-pt_BR.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/lang/google-authenticator-pt_BR.po b/plugins/google-authenticator/lang/google-authenticator-pt_BR.po
deleted file mode 100644
index 54c213fa..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-pt_BR.po
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (C) 2010 Google Authenticator
-# This file is distributed under the same license as the Google Authenticator package.
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator 0.37\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-authenticator\n"
-"POT-Creation-Date: 2011-08-21 14:25:45+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2014-01-11 10:07+0100\n"
-"Last-Translator: \n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"X-Generator: Poedit 1.6.3\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"Language: pt_BR\n"
-
-#: google-authenticator.php:131
-msgid ""
-"If you don't have Google Authenticator enabled for your WordPress account, "
-"leave this field empty."
-msgstr "Se você não tiver o Google Authenticator ativado para sua conta do WordPress, deixe este campo vazio."
-
-#: google-authenticator.php:131
-msgid "Google Authenticator code"
-msgstr "Código do Google Authenticator"
-
-#: google-authenticator.php:176
-msgid "<strong>ERROR</strong>: The Google Authenticator password is incorrect."
-msgstr "<strong>ERRO</strong>: a senha do Google Authenticator está incorreta."
-
-#: google-authenticator.php:179
-msgid ""
-"<strong>ERROR</strong>: The Google Authenticator code is incorrect or has "
-"expired."
-msgstr "<strong>ERRO</strong>: o código do Google Authenticator está incorreto ou expirou."
-
-#: google-authenticator.php:215
-msgid "WordPress Blog"
-msgstr "Blog WordPress"
-
-#: google-authenticator.php:218 google-authenticator.php:392
-msgid "Google Authenticator Settings"
-msgstr "Configurações do Google Authenticator"
-
-#: google-authenticator.php:223 google-authenticator.php:396
-msgid "Active"
-msgstr "Ativar"
-
-#: google-authenticator.php:235
-msgid "Relaxed mode"
-msgstr "Modo relaxado"
-
-#: google-authenticator.php:237
-msgid ""
-" Relaxed mode allows for more time drifting on your phone clock (&#177;4 "
-"min)."
-msgstr "O modo relaxado permite mais tempo à deriva no relógio do seu telefone (&#177;4 min)."
-
-#: google-authenticator.php:242
-msgid "Description"
-msgstr "Descrição"
-
-#: google-authenticator.php:243
-msgid ""
-" Description that you'll see in the Google Authenticator app on your phone."
-msgstr "Descrição que você verá no aplicativo Google Authenticator em seu telefone."
-
-#: google-authenticator.php:247
-msgid "Secret"
-msgstr "Secreto"
-
-#: google-authenticator.php:250
-msgid "Create new secret"
-msgstr "Crie um novo segredo"
-
-#: google-authenticator.php:251
-msgid "Show/Hide QR code"
-msgstr "Mostar/Esconder QR Code"
-
-#: google-authenticator.php:259
-msgid "Scan this with the Google Authenticator app."
-msgstr "Escaneie isso com o aplicativo Google Authenticator."
-
-#: google-authenticator.php:264
-msgid "Enable App password"
-msgstr "Ativar senha do aplicativo"
-
-#: google-authenticator.php:266
-msgid " Enabling an App password will decrease your overall login security."
-msgstr "Ativar uma senha de aplicativo diminuirá sua segurança geral de login."
-
-#: google-authenticator.php:274
-msgid "Create new password"
-msgstr "Crie uma nova senha"
-
-#: google-authenticator.php:275
-msgid ""
-" Password is not stored in cleartext, this is your only chance to see it."
-msgstr "A senha não é armazenada em texto puro, essa é sua única chance de vê-la."
-
-#. Plugin Name of the plugin/theme
-msgid "Google Authenticator"
-msgstr "Google Authenticator"
-
-#. Plugin URI of the plugin/theme
-msgid "http://henrik.schack.dk/google-authenticator-for-wordpress"
-msgstr "http://henrik.schack.dk/google-authenticator-for-wordpress"
-
-#. Description of the plugin/theme
-msgid ""
-"Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry "
-"app as One Time Password generator."
-msgstr "Autenticação de dois fatores para WordPress usando o aplicativo Android / iPhone / Blackberry como gerador de senha única."
-
-#. Author of the plugin/theme
-msgid "Henrik Schack"
-msgstr "Henrik Schack"
-
-#. Author URI of the plugin/theme
-msgid "http://henrik.schack.dk/"
-msgstr "http://henrik.schack.dk/"
-
diff --git a/plugins/google-authenticator/lang/google-authenticator-zh_CN.mo b/plugins/google-authenticator/lang/google-authenticator-zh_CN.mo
deleted file mode 100644
index cdf342ea..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-zh_CN.mo
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/lang/google-authenticator-zh_CN.po b/plugins/google-authenticator/lang/google-authenticator-zh_CN.po
deleted file mode 100644
index 8b6cb67e..00000000
--- a/plugins/google-authenticator/lang/google-authenticator-zh_CN.po
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright (C) 2010 Google Authenticator
-# This file is distributed under the same license as the Google Authenticator package.
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator 0.37\n"
-"Report-Msgid-Bugs-To: http://wordpress.org/tag/google-authenticator\n"
-"POT-Creation-Date: 2014-01-11 07:14:22+00:00\n"
-"PO-Revision-Date: 2014-01-13 13:48+0800\n"
-"Last-Translator: Kaijia Feng <fengkaijia@gmail.com>\n"
-"Language-Team: \n"
-"Language: zh_CN\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.5.5\n"
-
-#: google-authenticator.php:166
-msgid ""
-"If you don't have Google Authenticator enabled for your WordPress account, "
-"leave this field empty."
-msgstr "如果您的帐号没有启用Google Authenticator身份验证功能,请不必填写此栏。"
-
-#: google-authenticator.php:166
-msgid "Google Authenticator code"
-msgstr "Google Authenticator验证码"
-
-#: google-authenticator.php:231
-msgid "<strong>ERROR</strong>: The Google Authenticator password is incorrect."
-msgstr "<strong>错误</strong>:Google Authenticator验证码有误。"
-
-#: google-authenticator.php:234
-msgid ""
-"<strong>ERROR</strong>: The Google Authenticator code is incorrect or has "
-"expired."
-msgstr "<strong>错误</strong>:Google Authenticator验证码有误或者已经失效。"
-
-#: google-authenticator.php:274
-msgid "WordPressBlog"
-msgstr "WordPressBlog"
-
-#: google-authenticator.php:277 google-authenticator.php:469
-msgid "Google Authenticator Settings"
-msgstr "Google Authenticator设置"
-
-#: google-authenticator.php:282 google-authenticator.php:481
-msgid "Active"
-msgstr "启用"
-
-#: google-authenticator.php:290
-msgid "Relaxed mode"
-msgstr "宽松模式"
-
-#: google-authenticator.php:292
-msgid ""
-" Relaxed mode allows for more time drifting on your phone clock (&#177;4 "
-"min)."
-msgstr " 在宽松模式下你可以有更长的时间输入验证码(&#177;4分钟)。"
-
-#: google-authenticator.php:297
-msgid "Description"
-msgstr "描述"
-
-#: google-authenticator.php:298
-msgid ""
-" Description that you'll see in the Google Authenticator app on your phone."
-msgstr " 在Google Authenticator应用中显示的帐户描述。"
-
-#: google-authenticator.php:302
-msgid "Secret"
-msgstr "密钥"
-
-#: google-authenticator.php:305
-msgid "Create new secret"
-msgstr "创建新密钥"
-
-#: google-authenticator.php:306
-msgid "Show/Hide QR code"
-msgstr "显示/隐藏QR码"
-
-#: google-authenticator.php:315
-msgid "Scan this with the Google Authenticator app."
-msgstr "使用Google Authenticator应用扫描此图像。"
-
-#: google-authenticator.php:320
-msgid "Enable App password"
-msgstr "启用应用专用密码"
-
-#: google-authenticator.php:322
-msgid " Enabling an App password will decrease your overall login security."
-msgstr " 启用应用专用密码将会在总体上降低登录的安全性。"
-
-#: google-authenticator.php:330
-msgid "Create new password"
-msgstr "创建新密码"
-
-#: google-authenticator.php:331
-msgid ""
-" Password is not stored in cleartext, this is your only chance to see it."
-msgstr " 密码将不会明文储存,这将是你唯一一次看见密码。"
-
-#: google-authenticator.php:474
-msgid "Hide settings from user"
-msgstr "不对用户显示设置"
-
-#. Plugin Name of the plugin/theme
-msgid "Google Authenticator"
-msgstr "Google Authenticator"
-
-#. Plugin URI of the plugin/theme
-msgid "http://henrik.schack.dk/google-authenticator-for-wordpress"
-msgstr "http://henrik.schack.dk/google-authenticator-for-wordpress"
-
-#. Description of the plugin/theme
-msgid ""
-"Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry "
-"app as One Time Password generator."
-msgstr ""
-"使用Android/iPhone/Blackberry一次性密码生成应用为WordPress提供两步验证。"
-
-#. Author of the plugin/theme
-msgid "Henrik Schack"
-msgstr "Henrik Schack"
-
-#. Author URI of the plugin/theme
-msgid "http://henrik.schack.dk/"
-msgstr "http://henrik.schack.dk/"
diff --git a/plugins/google-authenticator/lang/google-authenticator.pot b/plugins/google-authenticator/lang/google-authenticator.pot
deleted file mode 100644
index a300d648..00000000
--- a/plugins/google-authenticator/lang/google-authenticator.pot
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright (C) 2017 Google Authenticator
-# This file is distributed under the same license as the Google Authenticator package.
-msgid ""
-msgstr ""
-"Project-Id-Version: Google Authenticator 0.49\n"
-"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/google-"
-"authenticator\n"
-"POT-Creation-Date: 2017-10-28 00:02:58+00:00\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-
-#. #-#-#-#-# google-authenticator.pot (Google Authenticator 0.49) #-#-#-#-#
-#. Plugin Name of the plugin/theme
-#: google-authenticator.php:190 google-authenticator.php:193
-msgid "Google Authenticator"
-msgstr ""
-
-#: google-authenticator.php:268
-msgid ""
-"OTP code doesn't match supplied secret, please check you've configured "
-"Authenticator correctly."
-msgstr ""
-
-#: google-authenticator.php:277
-msgid ""
-"Congratulations, you have successfully enabled Google Authenticator for your "
-"account "
-msgstr ""
-
-#: google-authenticator.php:298
-msgid "iOS: Authy"
-msgstr ""
-
-#: google-authenticator.php:302
-msgid "iOS: Google Authenticator"
-msgstr ""
-
-#: google-authenticator.php:306
-msgid "Android: Authy"
-msgstr ""
-
-#: google-authenticator.php:310
-msgid "Android: Google Authenticator"
-msgstr ""
-
-#: google-authenticator.php:314
-msgid "Windows Phone"
-msgstr ""
-
-#: google-authenticator.php:318
-msgid "Chrome Browser"
-msgstr ""
-
-#: google-authenticator.php:322
-msgid "Desktop"
-msgstr ""
-
-#: google-authenticator.php:330 google-authenticator.php:415
-#: google-authenticator.php:693 google-authenticator.php:914
-msgid "Google Authenticator Settings"
-msgstr ""
-
-#: google-authenticator.php:334
-msgid ""
-"If you haven't already done so, please install the Authy or Google "
-"Authenticator app on your mobile device from the App Store:"
-msgstr ""
-
-#: google-authenticator.php:340
-msgid ""
-"The easiest way to enable your account is to add an account by scanning the "
-"QR code using the app."
-msgstr ""
-
-#: google-authenticator.php:342
-msgid ""
-"An account can also be added by typing in the secret. After you've added "
-"your account to the App, please type the code you see on the screen into the "
-"Authenticator Code field and press the Verify Authenticator Code button."
-msgstr ""
-
-#: google-authenticator.php:345
-msgid ""
-"If the account setup was successful, you will be logged out, and will need "
-"to login again using your Username, Password and Authenticator code "
-"generated using the App on your mobile device."
-msgstr ""
-
-#: google-authenticator.php:417
-msgid "foo"
-msgstr ""
-
-#: google-authenticator.php:421
-msgid "Network Settings"
-msgstr ""
-
-#: google-authenticator.php:425
-msgid "Only use network-wide settings, ignoring site settings."
-msgstr ""
-
-#: google-authenticator.php:431
-msgid "Two Screen Signin"
-msgstr ""
-
-#: google-authenticator.php:435
-msgid "Ask for authenticator code on secondary login screen"
-msgstr ""
-
-#: google-authenticator.php:439
-msgid "Roles requiring Google Authenticator Enabled"
-msgstr ""
-
-#: google-authenticator.php:447
-msgid "Network-wide settings in effect, only a super admin can modify them."
-msgstr ""
-
-#: google-authenticator.php:449
-msgid "Change network wide Google Authenticator settings"
-msgstr ""
-
-#: google-authenticator.php:489
-msgid ""
-"Sorry, you can't disable checks for this role as it's enabled at the network "
-"level."
-msgstr ""
-
-#: google-authenticator.php:491
-msgid ""
-"Sorry, this role is enabled at the network level and can only be disabled "
-"via the <a href=\"%s\">network settings</a>"
-msgstr ""
-
-#: google-authenticator.php:520
-msgid ""
-"If you don't have Google Authenticator enabled for your WordPress account, "
-"leave this field empty."
-msgstr ""
-
-#: google-authenticator.php:520
-msgid "Google Authenticator code"
-msgstr ""
-
-#: google-authenticator.php:593
-msgid "<strong>ERROR</strong>: The Google Authenticator password is incorrect."
-msgstr ""
-
-#: google-authenticator.php:597 google-authenticator.php:618
-msgid ""
-"<strong>ERROR</strong>: The Google Authenticator code is incorrect or has "
-"expired."
-msgstr ""
-
-#: google-authenticator.php:616
-msgid "<strong>ERROR</strong>: The Google Authenticator code is missing."
-msgstr ""
-
-#: google-authenticator.php:630
-msgid ""
-"Please enter the Google Authenticator code using the app on your device."
-msgstr ""
-
-#: google-authenticator.php:632
-msgid "Log In"
-msgstr ""
-
-#: google-authenticator.php:700 google-authenticator.php:926
-msgid "Active"
-msgstr ""
-
-#: google-authenticator.php:709
-msgid "Relaxed mode"
-msgstr ""
-
-#: google-authenticator.php:711
-msgid ""
-" Relaxed mode allows for more time drifting on your phone clock (&#177;4 "
-"min)."
-msgstr ""
-
-#: google-authenticator.php:718
-msgid "Description"
-msgstr ""
-
-#: google-authenticator.php:719
-msgid ""
-" Description that you'll see in the Google Authenticator app on your phone."
-msgstr ""
-
-#: google-authenticator.php:723
-msgid "Secret"
-msgstr ""
-
-#: google-authenticator.php:727
-msgid "Create new secret"
-msgstr ""
-
-#: google-authenticator.php:728
-msgid "Show/Hide QR code"
-msgstr ""
-
-#: google-authenticator.php:740
-msgid "Scan this with the Google Authenticator app."
-msgstr ""
-
-#: google-authenticator.php:752
-msgid "Enable App password"
-msgstr ""
-
-#: google-authenticator.php:754
-msgid " Enabling an App password will decrease your overall login security."
-msgstr ""
-
-#: google-authenticator.php:762
-msgid "Create new password"
-msgstr ""
-
-#: google-authenticator.php:763
-msgid ""
-" Password is not stored in cleartext, this is your only chance to see it."
-msgstr ""
-
-#: google-authenticator.php:771
-msgid "Authenticator Code"
-msgstr ""
-
-#: google-authenticator.php:772
-msgid ""
-"After adding the site to your google authy account, add your authenticator "
-"code here."
-msgstr ""
-
-#: google-authenticator.php:778
-msgid "Verify Authenticator Code"
-msgstr ""
-
-#: google-authenticator.php:919
-msgid "Hide settings from user"
-msgstr ""
-
-#. Plugin URI of the plugin/theme
-msgid "http://henrik.schack.dk/google-authenticator-for-wordpress"
-msgstr ""
-
-#. Description of the plugin/theme
-msgid ""
-"Two-Factor Authentication for WordPress using the Android/iPhone/Blackberry "
-"app as One Time Password generator."
-msgstr ""
-
-#. Author of the plugin/theme
-msgid "Henrik Schack"
-msgstr ""
-
-#. Author URI of the plugin/theme
-msgid "http://henrik.schack.dk/"
-msgstr ""
diff --git a/plugins/google-authenticator/readme.txt b/plugins/google-authenticator/readme.txt
deleted file mode 100644
index a35ef72e..00000000
--- a/plugins/google-authenticator/readme.txt
+++ /dev/null
@@ -1,194 +0,0 @@
-=== Google Authenticator ===
-Contributors: ivankk
-Tags: authentication,otp,password,security,login,android,iphone,blackberry
-Requires at least: 4.5
-Tested up to: 5.2
-Stable tag: 0.52
-License: GPLv2 or later
-License URI: http://www.gnu.org/licenses/gpl-2.0.html
-
-Google Authenticator for your WordPress blog.
-
-== Description ==
-
-The Google Authenticator plugin for WordPress gives you two-factor authentication using the Google Authenticator app for Android/iPhone/Blackberry.
-
-If you are security aware, you may already have the Google Authenticator app installed on your smartphone, using it for two-factor authentication on Gmail/Dropbox/Lastpass/Amazon etc.
-
-The two-factor authentication requirement can be enabled on a per-user basis. You could enable it for your administrator account, but log in as usual with less privileged accounts.
-
-If You need to maintain your blog using an Android/iPhone app, or any other software using the XMLRPC interface, you can enable the App password feature in this plugin,
-but please note that enabling the App password feature will make your blog less secure.
-
-== Installation ==
-1. Make sure your webhost is capable of providing accurate time information for PHP/WordPress, ie. make sure a NTP daemon is running on the server.
-2. Install and activate the plugin.
-3. Enter a description on the Users -> Profile and Personal options page, in the Google Authenticator section.
-4. Scan the generated QR code with your phone, or enter the secret manually, remember to pick the time based one.
-You may also want to write down the secret on a piece of paper and store it in a safe place.
-5. Remember to hit the **Update profile** button at the bottom of the page before leaving the Personal options page.
-6. That's it, your WordPress blog is now a little more secure.
-
-== Frequently Asked Questions ==
-
-= Can I use Google Authenticator for WordPress with the Android/iPhone apps for WordPress? =
-
-Yes, you can enable the App password feature to make that possible, but notice that the XMLRPC interface isn't protected by two-factor authentication, only a long password.
-
-= I want to update the secret, should I just scan the new QR code after creating a new secret? =
-
-No, you'll have to delete the existing account from the Google Authenticator app on your smartphone before you scan the new QR code, that is unless you change the description as well.
-
-= I am unable to log in using this plugin, what's wrong ? =
-
-The Google Authenticator verification codes are time based, so it's crucial that the clock in your phone is accurate and in sync with the clock on the server where your WordPress installation is hosted.
-If you have an Android phone, you can use an app like [ClockSync](https://market.android.com/details?id=ru.org.amip.ClockSync) to set your clock in case your Cell provider doesn't provide accurate time information
-Another option is to enable "relaxed mode" in the settings for the plugin, this will enable more valid codes by allowing up to a 4 min. timedrift in each direction.
-
-= I have several users on my WordPress installation, is that a supported configuration ? =
-
-Yes, each user has his own Google Authenticator settings.
-
-= During installation I forgot the thing about making sure my webhost is capable of providing accurate time information, I'm now unable to login, please help. =
-
-If you have SSH or FTP access to your webhosting account, you can manually delete the plugin from your WordPress installation,
-just delete the wp-content/plugins/google-authenticator directory, and you'll be able to login using username/password again.
-
-= I don't own a Smartphone, isn't there another way to generate these secret codes ? =
-
-Yes, there is a webbased version here : https://gauth.apps.gbraad.nl/
-Github project here : https://github.com/gbraad/gauth
-
-= Can I create backupcodes ? =
-
-No, but if you're using an Android smartphone you can replace the Google Authenticator app with [Authenticator Plus](https://play.google.com/store/apps/details?id=com.mufri.authenticatorplus).
-It's a really nice app that can import your existing settings, sync between devices and backup/restore using your sd-card.
-It's not a free app, but it's well worth the money.
-
-= Any known incompatabilities ? =
-
-Yes, the Man-in-the-middle attack/replay detection code isn't compatible with the test/setup mode in the "Stop spammer registration plugin",
-please remember to remove the "Check credentials on all login attempts" checkmark before installing my plugin.
-
-
-
-== Screenshots ==
-
-1. The enhanced log-in box.
-2. Google Authenticator section on the Profile and Personal options page.
-3. QR code on the Profile and Personal options page.
-4. Google Authenticator app on Android
-
-== Changelog ==
-= 0.52 =
-* Add a Dutch translation
-* Add a Portuguese translation
-
-= 0.51 =
-* Fix a regression that broke app passwords
-
-= 0.50 =
-* New maintainer ivankk
-* Conditionally include base32 class
-
-= 0.49 =
-* More streamlined sign-up flow for users, configuration screen for admins.
-* Multisite support to either enable 2fa by role on a site, and/or on a network.
-* Added filter google_authenticator_needs_setup to determine if user needs to enable 2fa.
-* Added two part login process that can ask for 2fa code on a second login screen.
-* Fixed a security bug that continued check_otp even if authenticate had already returned an error.
-
-= 0.48 =
-* Security fix / compatability with WordPress 4.5
-
-= 0.47 =
-* Google chart API replaced with jquery-qrcode
-* QR codes now contain a heading saying WordPress (Feature request by Flemming Mahler)
-* Danish translation & updated .pot file.
-* Plugin now logs login attempts recognized as Man-in-the-middle attacks.
-
-= 0.46 =
-* Man-in-the-middle attack protection added.
-* Show warning before displaying the QR code.
-* FAQ updated.
-
-= 0.45 =
-* Spaces in the description field should now work on iPhones.
-* Some depricated function calls replaced.
-* Code inputfield easier to use for .jp users now.
-* Sanitize description field input.
-* App password hash function switched to one that doesn't have rainbow tables available.
-* PHP notices occurring during app password login removed.
-
-= 0.44 =
-* Installation/FAQ section updated.
-* Simplified Chinese translation by Kaijia Feng added.
-* Tabindex on loginpage removed, no longer needed, was used by older WordPress installations.
-* Inputfield renamed to "googleotp".
-* Defaultdescription changed to "WordPressBlog" to avoid trouble for iPhone users.
-* Compatibility with Ryan Hellyer's plugin http://geek.ryanhellyer.net/products/deactivate-google-authenticator/
-* Must enter all 6 code digits.
-
-= 0.43 =
-* It's now possible for an admin to hide the Google Authenticaator settings on a per-user basis. (Feature request by : Skate-O)
-
-= 0.42 =
-* Autocomplete disabled on code input field. (Feature request by : hiphopsmurf)
-
-= 0.41 =
-* Italian translation by Aldo Latino added.
-
-= 0.40 =
-* Bugfix, typo corrected and PHP notices removed. Thanks to Dion Hulse for his patch.
-
-= 0.39 =
-* Bugfix, Description was not saved to WordPress database when updating profile. Thanks to xxdesmus for noticing this.
-
-= 0.38 =
-* Usability fix, input field for codes changed from password to text type.
-
-= 0.37 =
-* The plugin now supports "relaxed mode" when authenticating. If selected, codes from 4 minutes before and 4 minutes after will work. 30 seconds before and after is still the default setting.
-
-= 0.36 =
-* Bugfix, now an App password can only be used for XMLRPC/APP-Request logins.
-
-= 0.35 =
-* Initial WordPress app support added (XMLRPC).
-
-= 0.30 =
-* Code cleanup
-* Changed generation of secret key, to no longer have requirement of SHA256 on the server
-* German translation
-
-= 0.20 =
-* Initial release
-
-
-== Credits ==
-
-Thanks to:
-
-[Fabio Zumbi](https://github.com/FabioZumbi12) for the Portuguese translation
-
-[Guido Schalkx](https://www.guidoschalkx.com/) for the Dutch translation.
-
-[Henrik.Schack](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=henrik%40schack%2edk&lc=US&item_name=Google%20Authenticator&item_number=Google%20Authenticator&no_shipping=0&no_note=1&tax=0&bn=PP%2dDonationsBF&charset=UTF%2d8) for writing/maintaining versions 0.20 through 0.48
-
-[Tobias Bäthge](http://tobias.baethge.com/) for his code rewrite and German translation.
-
-[Pascal de Bruijn](http://blog.pcode.nl/) for his "relaxed mode" idea.
-
-[Daniel Werl](http://technobabbl.es/) for his usability tips.
-
-[Dion Hulse](http://dd32.id.au/) for his bugfixes.
-
-[Aldo Latino](http://profiles.wordpress.org/users/aldolat/) for his Italian translation.
-
-[Kaijia Feng](http://www.kaijia.me/) for his Simplified Chinese translation.
-
-[Alex Concha](http://www.buayacorp.com/) for his security tips.
-
-[Jerome Etienne](http://jetienne.com/) for his jquery-qrcode plugin.
-
-[Sébastien Prunier](http://orizhial.com/) for his Spanish and French translation.
diff --git a/plugins/google-authenticator/screenshot-1.jpg b/plugins/google-authenticator/screenshot-1.jpg
deleted file mode 100644
index 252831f3..00000000
--- a/plugins/google-authenticator/screenshot-1.jpg
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/screenshot-2.jpg b/plugins/google-authenticator/screenshot-2.jpg
deleted file mode 100644
index 13bb25c2..00000000
--- a/plugins/google-authenticator/screenshot-2.jpg
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/screenshot-3.jpg b/plugins/google-authenticator/screenshot-3.jpg
deleted file mode 100644
index b74aeae5..00000000
--- a/plugins/google-authenticator/screenshot-3.jpg
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/screenshot-4.jpg b/plugins/google-authenticator/screenshot-4.jpg
deleted file mode 100644
index 804f3cad..00000000
--- a/plugins/google-authenticator/screenshot-4.jpg
+++ /dev/null
Binary files differ
diff --git a/plugins/google-authenticator/screenshot-5.jpg b/plugins/google-authenticator/screenshot-5.jpg
deleted file mode 100644
index 1b396294..00000000
--- a/plugins/google-authenticator/screenshot-5.jpg
+++ /dev/null
Binary files differ