shaarpm 6 years ago
commit
7e24481283
100 changed files with 22750 additions and 0 deletions
  1. 0 0
      wp-content/README.md
  2. 2 0
      wp-content/index.php
  3. 34 0
      wp-content/plugins/akismet/.htaccess
  4. 339 0
      wp-content/plugins/akismet/LICENSE.txt
  5. 586 0
      wp-content/plugins/akismet/_inc/akismet.css
  6. 276 0
      wp-content/plugins/akismet/_inc/akismet.js
  7. 30 0
      wp-content/plugins/akismet/_inc/form.js
  8. BIN
      wp-content/plugins/akismet/_inc/img/logo-full-2x.png
  9. 66 0
      wp-content/plugins/akismet/akismet.php
  10. 1131 0
      wp-content/plugins/akismet/class.akismet-admin.php
  11. 91 0
      wp-content/plugins/akismet/class.akismet-cli.php
  12. 271 0
      wp-content/plugins/akismet/class.akismet-rest-api.php
  13. 114 0
      wp-content/plugins/akismet/class.akismet-widget.php
  14. 1351 0
      wp-content/plugins/akismet/class.akismet.php
  15. 2 0
      wp-content/plugins/akismet/index.php
  16. 405 0
      wp-content/plugins/akismet/readme.txt
  17. 231 0
      wp-content/plugins/akismet/views/config.php
  18. 6 0
      wp-content/plugins/akismet/views/get.php
  19. 135 0
      wp-content/plugins/akismet/views/notice.php
  20. 102 0
      wp-content/plugins/akismet/views/start.php
  21. 11 0
      wp-content/plugins/akismet/views/stats.php
  22. 213 0
      wp-content/plugins/akismet/wrapper.php
  23. 632 0
      wp-content/plugins/contact-form-7/admin/admin.php
  24. 66 0
      wp-content/plugins/contact-form-7/admin/css/styles-rtl.css
  25. 424 0
      wp-content/plugins/contact-form-7/admin/css/styles.css
  26. 264 0
      wp-content/plugins/contact-form-7/admin/edit-contact-form.php
  27. 22 0
      wp-content/plugins/contact-form-7/admin/includes/admin-functions.php
  28. 222 0
      wp-content/plugins/contact-form-7/admin/includes/class-contact-forms-list-table.php
  29. 258 0
      wp-content/plugins/contact-form-7/admin/includes/editor.php
  30. 98 0
      wp-content/plugins/contact-form-7/admin/includes/help-tabs.php
  31. 78 0
      wp-content/plugins/contact-form-7/admin/includes/tag-generator.php
  32. 76 0
      wp-content/plugins/contact-form-7/admin/includes/welcome-panel.php
  33. 287 0
      wp-content/plugins/contact-form-7/admin/js/scripts.js
  34. 249 0
      wp-content/plugins/contact-form-7/admin/js/tag-generator.js
  35. BIN
      wp-content/plugins/contact-form-7/images/ajax-loader.gif
  36. 24 0
      wp-content/plugins/contact-form-7/includes/capabilities.php
  37. 610 0
      wp-content/plugins/contact-form-7/includes/config-validator.php
  38. 267 0
      wp-content/plugins/contact-form-7/includes/contact-form-functions.php
  39. 200 0
      wp-content/plugins/contact-form-7/includes/contact-form-template.php
  40. 920 0
      wp-content/plugins/contact-form-7/includes/contact-form.php
  41. 124 0
      wp-content/plugins/contact-form-7/includes/controller.php
  42. 12 0
      wp-content/plugins/contact-form-7/includes/css/styles-rtl.css
  43. 110 0
      wp-content/plugins/contact-form-7/includes/css/styles.css
  44. 345 0
      wp-content/plugins/contact-form-7/includes/form-tag.php
  45. 366 0
      wp-content/plugins/contact-form-7/includes/form-tags-manager.php
  46. 380 0
      wp-content/plugins/contact-form-7/includes/formatting.php
  47. 370 0
      wp-content/plugins/contact-form-7/includes/functions.php
  48. 135 0
      wp-content/plugins/contact-form-7/includes/integration.php
  49. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
  50. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
  51. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
  52. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
  53. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png
  54. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
  55. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
  56. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  57. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png
  58. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png
  59. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_454545_256x240.png
  60. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_888888_256x240.png
  61. BIN
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png
  62. 1225 0
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.css
  63. 7 0
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.min.css
  64. 410 0
      wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/theme.css
  65. 529 0
      wp-content/plugins/contact-form-7/includes/js/scripts.js
  66. 96 0
      wp-content/plugins/contact-form-7/includes/l10n.php
  67. 439 0
      wp-content/plugins/contact-form-7/includes/mail.php
  68. 78 0
      wp-content/plugins/contact-form-7/includes/pipe.php
  69. 323 0
      wp-content/plugins/contact-form-7/includes/rest-api.php
  70. 101 0
      wp-content/plugins/contact-form-7/includes/shortcodes.php
  71. 165 0
      wp-content/plugins/contact-form-7/includes/special-mail-tags.php
  72. 401 0
      wp-content/plugins/contact-form-7/includes/submission.php
  73. 81 0
      wp-content/plugins/contact-form-7/includes/upgrade.php
  74. 81 0
      wp-content/plugins/contact-form-7/includes/validation.php
  75. 4 0
      wp-content/plugins/contact-form-7/languages/readme.txt
  76. 358 0
      wp-content/plugins/contact-form-7/license.txt
  77. 281 0
      wp-content/plugins/contact-form-7/modules/acceptance.php
  78. 137 0
      wp-content/plugins/contact-form-7/modules/akismet.php
  79. 365 0
      wp-content/plugins/contact-form-7/modules/checkbox.php
  80. 64 0
      wp-content/plugins/contact-form-7/modules/count.php
  81. 224 0
      wp-content/plugins/contact-form-7/modules/date.php
  82. 452 0
      wp-content/plugins/contact-form-7/modules/file.php
  83. 264 0
      wp-content/plugins/contact-form-7/modules/flamingo.php
  84. 36 0
      wp-content/plugins/contact-form-7/modules/hidden.php
  85. 30 0
      wp-content/plugins/contact-form-7/modules/listo.php
  86. 232 0
      wp-content/plugins/contact-form-7/modules/number.php
  87. 235 0
      wp-content/plugins/contact-form-7/modules/quiz.php
  88. 646 0
      wp-content/plugins/contact-form-7/modules/really-simple-captcha.php
  89. 515 0
      wp-content/plugins/contact-form-7/modules/recaptcha.php
  90. 19 0
      wp-content/plugins/contact-form-7/modules/response.php
  91. 251 0
      wp-content/plugins/contact-form-7/modules/select.php
  92. 92 0
      wp-content/plugins/contact-form-7/modules/submit.php
  93. 319 0
      wp-content/plugins/contact-form-7/modules/text.php
  94. 193 0
      wp-content/plugins/contact-form-7/modules/textarea.php
  95. 87 0
      wp-content/plugins/contact-form-7/readme.txt
  96. 157 0
      wp-content/plugins/contact-form-7/settings.php
  97. 28 0
      wp-content/plugins/contact-form-7/uninstall.php
  98. 66 0
      wp-content/plugins/contact-form-7/wp-contact-form-7.php
  99. 1824 0
      wp-content/plugins/fusion-builder/assets/css/animations.css
  100. 0 0
      wp-content/plugins/fusion-builder/assets/css/animations.min.css

+ 0 - 0
wp-content/README.md


+ 2 - 0
wp-content/index.php

@@ -0,0 +1,2 @@
+<?php
+// Silence is golden. 

+ 34 - 0
wp-content/plugins/akismet/.htaccess

@@ -0,0 +1,34 @@
+# Only allow direct access to specific Web-available files.
+
+# Apache 2.2
+<IfModule !mod_authz_core.c>
+	Order Deny,Allow
+	Deny from all
+</IfModule>
+
+# Apache 2.4
+<IfModule mod_authz_core.c>
+	Require all denied
+</IfModule>
+
+# Akismet CSS and JS
+<FilesMatch "^(form\.js|akismet\.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>

+ 339 - 0
wp-content/plugins/akismet/LICENSE.txt

@@ -0,0 +1,339 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.

+ 586 - 0
wp-content/plugins/akismet/_inc/akismet.css

@@ -0,0 +1,586 @@
+.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 {
+	padding-left: 1ex;
+	display: none;
+}
+.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_activate {
+	min-width: 825px;
+	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;
+	z-index: 1;
+}
+
+.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 {
+	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;
+	z-index: 1000;
+}
+
+.akismet_activate .aa_description strong {
+	color: #FFF;
+	font-weight: normal;
+}
+
+.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-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;
+}

+ 276 - 0
wp-content/plugins/akismet/_inc/akismet.js

@@ -0,0 +1,276 @@
+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:not(.button-disabled)').click( function(e) {
+		e.preventDefault();
+
+		$('.checkforspam:not(.button-disabled)').addClass('button-disabled');
+		$('.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 );
+	}
+});

+ 30 - 0
wp-content/plugins/akismet/_inc/form.js

@@ -0,0 +1,30 @@
+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 );
+		}
+	}
+}

BIN
wp-content/plugins/akismet/_inc/img/logo-full-2x.png


+ 66 - 0
wp-content/plugins/akismet/akismet.php

@@ -0,0 +1,66 @@
+<?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.0.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.0.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' );
+}

File diff suppressed because it is too large
+ 1131 - 0
wp-content/plugins/akismet/class.akismet-admin.php


+ 91 - 0
wp-content/plugins/akismet/class.akismet-cli.php

@@ -0,0 +1,91 @@
+<?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'] ) ) );
+		}
+	}
+}

+ 271 - 0
wp-content/plugins/akismet/class.akismet-rest-api.php

@@ -0,0 +1,271 @@
+<?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' ),
+			)
+		) );
+	}
+
+	/**
+	 * 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 );
+	}
+
+	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' );
+	}
+
+	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 );
+	}
+}

+ 114 - 0
wp-content/plugins/akismet/class.akismet-widget.php

@@ -0,0 +1,114 @@
+<?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' );

File diff suppressed because it is too large
+ 1351 - 0
wp-content/plugins/akismet/class.akismet.php


+ 2 - 0
wp-content/plugins/akismet/index.php

@@ -0,0 +1,2 @@
+<?php
+# Silence is golden.

+ 405 - 0
wp-content/plugins/akismet/readme.txt

@@ -0,0 +1,405 @@
+=== Akismet Anti-Spam ===
+Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer
+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: 4.9.1
+Stable tag: 4.0.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.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

+ 231 - 0
wp-content/plugins/akismet/views/config.php

@@ -0,0 +1,231 @@
+<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>
+							</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-is-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>

+ 6 - 0
wp-content/plugins/akismet/views/get.php

@@ -0,0 +1,6 @@
+<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 akismet-is-primary';?>" value="<?php echo esc_attr( $text ); ?>"/>
+</form>

+ 135 - 0
wp-content/plugins/akismet/views/notice.php

@@ -0,0 +1,135 @@
+<?php if ( $type == 'plugin' ) :?>
+<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
+	<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 printf( __( '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 endif;?>

+ 102 - 0
wp-content/plugins/akismet/views/start.php

@@ -0,0 +1,102 @@
+<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>

+ 11 - 0
wp-content/plugins/akismet/views/stats.php

@@ -0,0 +1,11 @@
+<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>

+ 213 - 0
wp-content/plugins/akismet/wrapper.php

@@ -0,0 +1,213 @@
+<?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 ) {
+	return Akismet::pingback_forwarded_for( $r, $url );
+}
+function akismet_pre_check_pingback( $method ) {
+	return Akismet::pre_check_pingback( $method );
+}

+ 632 - 0
wp-content/plugins/contact-form-7/admin/admin.php

@@ -0,0 +1,632 @@
+<?php
+
+require_once WPCF7_PLUGIN_DIR . '/admin/includes/admin-functions.php';
+require_once WPCF7_PLUGIN_DIR . '/admin/includes/help-tabs.php';
+require_once WPCF7_PLUGIN_DIR . '/admin/includes/tag-generator.php';
+require_once WPCF7_PLUGIN_DIR . '/admin/includes/welcome-panel.php';
+
+add_action( 'admin_init', 'wpcf7_admin_init' );
+
+function wpcf7_admin_init() {
+	do_action( 'wpcf7_admin_init' );
+}
+
+add_action( 'admin_menu', 'wpcf7_admin_menu', 9 );
+
+function wpcf7_admin_menu() {
+	global $_wp_last_object_menu;
+
+	$_wp_last_object_menu++;
+
+	add_menu_page( __( 'Contact Form 7', 'contact-form-7' ),
+		__( 'Contact', 'contact-form-7' ),
+		'wpcf7_read_contact_forms', 'wpcf7',
+		'wpcf7_admin_management_page', 'dashicons-email',
+		$_wp_last_object_menu );
+
+	$edit = add_submenu_page( 'wpcf7',
+		__( 'Edit Contact Form', 'contact-form-7' ),
+		__( 'Contact Forms', 'contact-form-7' ),
+		'wpcf7_read_contact_forms', 'wpcf7',
+		'wpcf7_admin_management_page' );
+
+	add_action( 'load-' . $edit, 'wpcf7_load_contact_form_admin' );
+
+	$addnew = add_submenu_page( 'wpcf7',
+		__( 'Add New Contact Form', 'contact-form-7' ),
+		__( 'Add New', 'contact-form-7' ),
+		'wpcf7_edit_contact_forms', 'wpcf7-new',
+		'wpcf7_admin_add_new_page' );
+
+	add_action( 'load-' . $addnew, 'wpcf7_load_contact_form_admin' );
+
+	$integration = WPCF7_Integration::get_instance();
+
+	if ( $integration->service_exists() ) {
+		$integration = add_submenu_page( 'wpcf7',
+			__( 'Integration with Other Services', 'contact-form-7' ),
+			__( 'Integration', 'contact-form-7' ),
+			'wpcf7_manage_integration', 'wpcf7-integration',
+			'wpcf7_admin_integration_page' );
+
+		add_action( 'load-' . $integration, 'wpcf7_load_integration_page' );
+	}
+}
+
+add_filter( 'set-screen-option', 'wpcf7_set_screen_options', 10, 3 );
+
+function wpcf7_set_screen_options( $result, $option, $value ) {
+	$wpcf7_screens = array(
+		'cfseven_contact_forms_per_page' );
+
+	if ( in_array( $option, $wpcf7_screens ) ) {
+		$result = $value;
+	}
+
+	return $result;
+}
+
+function wpcf7_load_contact_form_admin() {
+	global $plugin_page;
+
+	$action = wpcf7_current_action();
+
+	if ( 'save' == $action ) {
+		$id = isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : '-1';
+		check_admin_referer( 'wpcf7-save-contact-form_' . $id );
+
+		if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
+			wp_die( __( 'You are not allowed to edit this item.', 'contact-form-7' ) );
+		}
+
+		$args = $_REQUEST;
+		$args['id'] = $id;
+
+		$args['title'] = isset( $_POST['post_title'] )
+			? $_POST['post_title'] : null;
+
+		$args['locale'] = isset( $_POST['wpcf7-locale'] )
+			? $_POST['wpcf7-locale'] : null;
+
+		$args['form'] = isset( $_POST['wpcf7-form'] )
+			? $_POST['wpcf7-form'] : '';
+
+		$args['mail'] = isset( $_POST['wpcf7-mail'] )
+			? wpcf7_sanitize_mail( $_POST['wpcf7-mail'] )
+			: array();
+
+		$args['mail_2'] = isset( $_POST['wpcf7-mail-2'] )
+			? wpcf7_sanitize_mail( $_POST['wpcf7-mail-2'] )
+			: array();
+
+		$args['messages'] = isset( $_POST['wpcf7-messages'] )
+			? $_POST['wpcf7-messages'] : array();
+
+		$args['additional_settings'] = isset( $_POST['wpcf7-additional-settings'] )
+			? $_POST['wpcf7-additional-settings'] : '';
+
+		$contact_form = wpcf7_save_contact_form( $args );
+
+		if ( $contact_form && wpcf7_validate_configuration() ) {
+			$config_validator = new WPCF7_ConfigValidator( $contact_form );
+			$config_validator->validate();
+			$config_validator->save();
+		}
+
+		$query = array(
+			'post' => $contact_form ? $contact_form->id() : 0,
+			'active-tab' => isset( $_POST['active-tab'] )
+				? (int) $_POST['active-tab'] : 0,
+		);
+
+		if ( ! $contact_form ) {
+			$query['message'] = 'failed';
+		} elseif ( -1 == $id ) {
+			$query['message'] = 'created';
+		} else {
+			$query['message'] = 'saved';
+		}
+
+		$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
+		wp_safe_redirect( $redirect_to );
+		exit();
+	}
+
+	if ( 'copy' == $action ) {
+		$id = empty( $_POST['post_ID'] )
+			? absint( $_REQUEST['post'] )
+			: absint( $_POST['post_ID'] );
+
+		check_admin_referer( 'wpcf7-copy-contact-form_' . $id );
+
+		if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
+			wp_die( __( 'You are not allowed to edit this item.', 'contact-form-7' ) );
+		}
+
+		$query = array();
+
+		if ( $contact_form = wpcf7_contact_form( $id ) ) {
+			$new_contact_form = $contact_form->copy();
+			$new_contact_form->save();
+
+			$query['post'] = $new_contact_form->id();
+			$query['message'] = 'created';
+		}
+
+		$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
+
+		wp_safe_redirect( $redirect_to );
+		exit();
+	}
+
+	if ( 'delete' == $action ) {
+		if ( ! empty( $_POST['post_ID'] ) ) {
+			check_admin_referer( 'wpcf7-delete-contact-form_' . $_POST['post_ID'] );
+		} elseif ( ! is_array( $_REQUEST['post'] ) ) {
+			check_admin_referer( 'wpcf7-delete-contact-form_' . $_REQUEST['post'] );
+		} else {
+			check_admin_referer( 'bulk-posts' );
+		}
+
+		$posts = empty( $_POST['post_ID'] )
+			? (array) $_REQUEST['post']
+			: (array) $_POST['post_ID'];
+
+		$deleted = 0;
+
+		foreach ( $posts as $post ) {
+			$post = WPCF7_ContactForm::get_instance( $post );
+
+			if ( empty( $post ) ) {
+				continue;
+			}
+
+			if ( ! current_user_can( 'wpcf7_delete_contact_form', $post->id() ) ) {
+				wp_die( __( 'You are not allowed to delete this item.', 'contact-form-7' ) );
+			}
+
+			if ( ! $post->delete() ) {
+				wp_die( __( 'Error in deleting.', 'contact-form-7' ) );
+			}
+
+			$deleted += 1;
+		}
+
+		$query = array();
+
+		if ( ! empty( $deleted ) ) {
+			$query['message'] = 'deleted';
+		}
+
+		$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
+
+		wp_safe_redirect( $redirect_to );
+		exit();
+	}
+
+	if ( 'validate' == $action && wpcf7_validate_configuration() ) {
+		if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {
+			check_admin_referer( 'wpcf7-bulk-validate' );
+
+			if ( ! current_user_can( 'wpcf7_edit_contact_forms' ) ) {
+				wp_die( __( "You are not allowed to validate configuration.", 'contact-form-7' ) );
+			}
+
+			$contact_forms = WPCF7_ContactForm::find();
+
+			$result = array(
+				'timestamp' => current_time( 'timestamp' ),
+				'version' => WPCF7_VERSION,
+				'count_valid' => 0,
+				'count_invalid' => 0,
+			);
+
+			foreach ( $contact_forms as $contact_form ) {
+				$config_validator = new WPCF7_ConfigValidator( $contact_form );
+				$config_validator->validate();
+				$config_validator->save();
+
+				if ( $config_validator->is_valid() ) {
+					$result['count_valid'] += 1;
+				} else {
+					$result['count_invalid'] += 1;
+				}
+			}
+
+			WPCF7::update_option( 'bulk_validate', $result );
+
+			$query = array(
+				'message' => 'validated',
+			);
+
+			$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
+			wp_safe_redirect( $redirect_to );
+			exit();
+		}
+	}
+
+	$_GET['post'] = isset( $_GET['post'] ) ? $_GET['post'] : '';
+
+	$post = null;
+
+	if ( 'wpcf7-new' == $plugin_page ) {
+		$post = WPCF7_ContactForm::get_template( array(
+			'locale' => isset( $_GET['locale'] ) ? $_GET['locale'] : null ) );
+	} elseif ( ! empty( $_GET['post'] ) ) {
+		$post = WPCF7_ContactForm::get_instance( $_GET['post'] );
+	}
+
+	$current_screen = get_current_screen();
+
+	$help_tabs = new WPCF7_Help_Tabs( $current_screen );
+
+	if ( $post && current_user_can( 'wpcf7_edit_contact_form', $post->id() ) ) {
+		$help_tabs->set_help_tabs( 'edit' );
+	} else {
+		$help_tabs->set_help_tabs( 'list' );
+
+		if ( ! class_exists( 'WPCF7_Contact_Form_List_Table' ) ) {
+			require_once WPCF7_PLUGIN_DIR . '/admin/includes/class-contact-forms-list-table.php';
+		}
+
+		add_filter( 'manage_' . $current_screen->id . '_columns',
+			array( 'WPCF7_Contact_Form_List_Table', 'define_columns' ) );
+
+		add_screen_option( 'per_page', array(
+			'default' => 20,
+			'option' => 'cfseven_contact_forms_per_page',
+		) );
+	}
+}
+
+add_action( 'admin_enqueue_scripts', 'wpcf7_admin_enqueue_scripts' );
+
+function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
+	if ( false === strpos( $hook_suffix, 'wpcf7' ) ) {
+		return;
+	}
+
+	wp_enqueue_style( 'contact-form-7-admin',
+		wpcf7_plugin_url( 'admin/css/styles.css' ),
+		array(), WPCF7_VERSION, 'all' );
+
+	if ( wpcf7_is_rtl() ) {
+		wp_enqueue_style( 'contact-form-7-admin-rtl',
+			wpcf7_plugin_url( 'admin/css/styles-rtl.css' ),
+			array(), WPCF7_VERSION, 'all' );
+	}
+
+	wp_enqueue_script( 'wpcf7-admin',
+		wpcf7_plugin_url( 'admin/js/scripts.js' ),
+		array( 'jquery', 'jquery-ui-tabs' ),
+		WPCF7_VERSION, true );
+
+	$args = array(
+		'apiSettings' => array(
+			'root' => esc_url_raw( rest_url( 'contact-form-7/v1' ) ),
+			'namespace' => 'contact-form-7/v1',
+			'nonce' => ( wp_installing() && ! is_multisite() )
+				? '' : wp_create_nonce( 'wp_rest' ),
+		),
+		'pluginUrl' => wpcf7_plugin_url(),
+		'saveAlert' => __(
+			"The changes you made will be lost if you navigate away from this page.",
+			'contact-form-7' ),
+		'activeTab' => isset( $_GET['active-tab'] )
+			? (int) $_GET['active-tab'] : 0,
+		'configValidator' => array(
+			'errors' => array(),
+			'howToCorrect' => __( "How to resolve?", 'contact-form-7' ),
+			'oneError' => __( '1 configuration error detected', 'contact-form-7' ),
+			'manyErrors' => __( '%d configuration errors detected', 'contact-form-7' ),
+			'oneErrorInTab' => __( '1 configuration error detected in this tab panel', 'contact-form-7' ),
+			'manyErrorsInTab' => __( '%d configuration errors detected in this tab panel', 'contact-form-7' ),
+			'docUrl' => WPCF7_ConfigValidator::get_doc_link(),
+			/* translators: screen reader text */
+			'iconAlt' => __( '(configuration error)', 'contact-form-7' ),
+		),
+	);
+
+	if ( ( $post = wpcf7_get_current_contact_form() )
+	&& current_user_can( 'wpcf7_edit_contact_form', $post->id() )
+	&& wpcf7_validate_configuration() ) {
+		$config_validator = new WPCF7_ConfigValidator( $post );
+		$config_validator->restore();
+		$args['configValidator']['errors'] =
+			$config_validator->collect_error_messages();
+	}
+
+	wp_localize_script( 'wpcf7-admin', 'wpcf7', $args );
+
+	add_thickbox();
+
+	wp_enqueue_script( 'wpcf7-admin-taggenerator',
+		wpcf7_plugin_url( 'admin/js/tag-generator.js' ),
+		array( 'jquery', 'thickbox', 'wpcf7-admin' ), WPCF7_VERSION, true );
+}
+
+function wpcf7_admin_management_page() {
+	if ( $post = wpcf7_get_current_contact_form() ) {
+		$post_id = $post->initial() ? -1 : $post->id();
+
+		require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php';
+		require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
+		return;
+	}
+
+	if ( 'validate' == wpcf7_current_action()
+	&& wpcf7_validate_configuration()
+	&& current_user_can( 'wpcf7_edit_contact_forms' ) ) {
+		wpcf7_admin_bulk_validate_page();
+		return;
+	}
+
+	$list_table = new WPCF7_Contact_Form_List_Table();
+	$list_table->prepare_items();
+
+?>
+<div class="wrap">
+
+<h1 class="wp-heading-inline"><?php
+	echo esc_html( __( 'Contact Forms', 'contact-form-7' ) );
+?></h1>
+
+<?php
+	if ( current_user_can( 'wpcf7_edit_contact_forms' ) ) {
+		echo sprintf( '<a href="%1$s" class="add-new-h2">%2$s</a>',
+			esc_url( menu_page_url( 'wpcf7-new', false ) ),
+			esc_html( __( 'Add New', 'contact-form-7' ) ) );
+	}
+
+	if ( ! empty( $_REQUEST['s'] ) ) {
+		echo sprintf( '<span class="subtitle">'
+			/* translators: %s: search keywords */
+			. __( 'Search results for &#8220;%s&#8221;', 'contact-form-7' )
+			. '</span>', esc_html( $_REQUEST['s'] ) );
+	}
+?>
+
+<hr class="wp-header-end">
+
+<?php do_action( 'wpcf7_admin_warnings' ); ?>
+<?php wpcf7_welcome_panel(); ?>
+<?php do_action( 'wpcf7_admin_notices' ); ?>
+
+<form method="get" action="">
+	<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />
+	<?php $list_table->search_box( __( 'Search Contact Forms', 'contact-form-7' ), 'wpcf7-contact' ); ?>
+	<?php $list_table->display(); ?>
+</form>
+
+</div>
+<?php
+}
+
+function wpcf7_admin_bulk_validate_page() {
+	$contact_forms = WPCF7_ContactForm::find();
+	$count = WPCF7_ContactForm::count();
+
+	$submit_text = sprintf(
+		/* translators: %s: number of contact forms */
+		_n(
+			"Validate %s Contact Form Now",
+			"Validate %s Contact Forms Now",
+			$count, 'contact-form-7' ),
+		number_format_i18n( $count ) );
+
+?>
+<div class="wrap">
+
+<h1><?php echo esc_html( __( 'Validate Configuration', 'contact-form-7' ) ); ?></h1>
+
+<form method="post" action="">
+	<input type="hidden" name="action" value="validate" />
+	<?php wp_nonce_field( 'wpcf7-bulk-validate' ); ?>
+	<p><input type="submit" class="button" value="<?php echo esc_attr( $submit_text ); ?>" /></p>
+</form>
+
+<?php echo wpcf7_link( __( 'https://contactform7.com/configuration-validator-faq/', 'contact-form-7' ), __( 'FAQ about Configuration Validator', 'contact-form-7' ) ); ?>
+
+</div>
+<?php
+}
+
+function wpcf7_admin_add_new_page() {
+	$post = wpcf7_get_current_contact_form();
+
+	if ( ! $post ) {
+		$post = WPCF7_ContactForm::get_template();
+	}
+
+	$post_id = -1;
+
+	require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php';
+	require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
+}
+
+function wpcf7_load_integration_page() {
+	$integration = WPCF7_Integration::get_instance();
+
+	if ( isset( $_REQUEST['service'] )
+	&& $integration->service_exists( $_REQUEST['service'] ) ) {
+		$service = $integration->get_service( $_REQUEST['service'] );
+		$service->load( wpcf7_current_action() );
+	}
+
+	$help_tabs = new WPCF7_Help_Tabs( get_current_screen() );
+	$help_tabs->set_help_tabs( 'integration' );
+}
+
+function wpcf7_admin_integration_page() {
+	$integration = WPCF7_Integration::get_instance();
+
+?>
+<div class="wrap">
+
+<h1><?php echo esc_html( __( 'Integration with Other Services', 'contact-form-7' ) ); ?></h1>
+
+<?php do_action( 'wpcf7_admin_warnings' ); ?>
+<?php do_action( 'wpcf7_admin_notices' ); ?>
+
+<?php
+	if ( isset( $_REQUEST['service'] )
+	&& $service = $integration->get_service( $_REQUEST['service'] ) ) {
+		$message = isset( $_REQUEST['message'] ) ? $_REQUEST['message'] : '';
+		$service->admin_notice( $message );
+		$integration->list_services( array( 'include' => $_REQUEST['service'] ) );
+	} else {
+		$integration->list_services();
+	}
+?>
+
+</div>
+<?php
+}
+
+/* Misc */
+
+add_action( 'wpcf7_admin_notices', 'wpcf7_admin_updated_message' );
+
+function wpcf7_admin_updated_message() {
+	if ( empty( $_REQUEST['message'] ) ) {
+		return;
+	}
+
+	if ( 'created' == $_REQUEST['message'] ) {
+		$updated_message = __( "Contact form created.", 'contact-form-7' );
+	} elseif ( 'saved' == $_REQUEST['message'] ) {
+		$updated_message = __( "Contact form saved.", 'contact-form-7' );
+	} elseif ( 'deleted' == $_REQUEST['message'] ) {
+		$updated_message = __( "Contact form deleted.", 'contact-form-7' );
+	}
+
+	if ( ! empty( $updated_message ) ) {
+		echo sprintf( '<div id="message" class="notice notice-success is-dismissible"><p>%s</p></div>', esc_html( $updated_message ) );
+		return;
+	}
+
+	if ( 'failed' == $_REQUEST['message'] ) {
+		$updated_message = __( "There was an error saving the contact form.",
+			'contact-form-7' );
+
+		echo sprintf( '<div id="message" class="notice notice-error is-dismissible"><p>%s</p></div>', esc_html( $updated_message ) );
+		return;
+	}
+
+	if ( 'validated' == $_REQUEST['message'] ) {
+		$bulk_validate = WPCF7::get_option( 'bulk_validate', array() );
+		$count_invalid = isset( $bulk_validate['count_invalid'] )
+			? absint( $bulk_validate['count_invalid'] ) : 0;
+
+		if ( $count_invalid ) {
+			$updated_message = sprintf(
+				/* translators: %s: number of contact forms */
+				_n(
+					"Configuration validation completed. %s invalid contact form was found.",
+					"Configuration validation completed. %s invalid contact forms were found.",
+					$count_invalid, 'contact-form-7' ),
+				number_format_i18n( $count_invalid ) );
+
+			echo sprintf( '<div id="message" class="notice notice-warning is-dismissible"><p>%s</p></div>', esc_html( $updated_message ) );
+		} else {
+			$updated_message = __( "Configuration validation completed. No invalid contact form was found.", 'contact-form-7' );
+
+			echo sprintf( '<div id="message" class="notice notice-success is-dismissible"><p>%s</p></div>', esc_html( $updated_message ) );
+		}
+
+		return;
+	}
+}
+
+add_filter( 'plugin_action_links', 'wpcf7_plugin_action_links', 10, 2 );
+
+function wpcf7_plugin_action_links( $links, $file ) {
+	if ( $file != WPCF7_PLUGIN_BASENAME ) {
+		return $links;
+	}
+
+	if ( ! current_user_can( 'wpcf7_read_contact_forms' ) ) {
+		return $links;
+	}
+
+	$settings_link = sprintf( '<a href="%1$s">%2$s</a>',
+		menu_page_url( 'wpcf7', false ),
+		esc_html( __( 'Settings', 'contact-form-7' ) ) );
+
+	array_unshift( $links, $settings_link );
+
+	return $links;
+}
+
+add_action( 'wpcf7_admin_warnings', 'wpcf7_old_wp_version_error' );
+
+function wpcf7_old_wp_version_error() {
+	$wp_version = get_bloginfo( 'version' );
+
+	if ( ! version_compare( $wp_version, WPCF7_REQUIRED_WP_VERSION, '<' ) ) {
+		return;
+	}
+
+?>
+<div class="notice notice-warning">
+<p><?php
+	/* translators: 1: version of Contact Form 7, 2: version of WordPress, 3: URL */
+	echo sprintf( __( '<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href="%3$s">update WordPress</a> first.', 'contact-form-7' ), WPCF7_VERSION, WPCF7_REQUIRED_WP_VERSION, admin_url( 'update-core.php' ) );
+?></p>
+</div>
+<?php
+}
+
+add_action( 'wpcf7_admin_warnings', 'wpcf7_not_allowed_to_edit' );
+
+function wpcf7_not_allowed_to_edit() {
+	if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
+		return;
+	}
+
+	$post_id = $contact_form->id();
+
+	if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
+		return;
+	}
+
+	$message = __( "You are not allowed to edit this contact form.",
+		'contact-form-7' );
+
+	echo sprintf(
+		'<div class="notice notice-warning"><p>%s</p></div>',
+		esc_html( $message ) );
+}
+
+add_action( 'wpcf7_admin_warnings', 'wpcf7_notice_bulk_validate_config', 5 );
+
+function wpcf7_notice_bulk_validate_config() {
+	if ( ! wpcf7_validate_configuration()
+	|| ! current_user_can( 'wpcf7_edit_contact_forms' ) ) {
+		return;
+	}
+
+	if ( isset( $_GET['page'] ) && 'wpcf7' == $_GET['page']
+	&& isset( $_GET['action'] ) && 'validate' == $_GET['action'] ) {
+		return;
+	}
+
+	$result = WPCF7::get_option( 'bulk_validate' );
+	$last_important_update = '4.9';
+
+	if ( ! empty( $result['version'] )
+	&& version_compare( $last_important_update, $result['version'], '<=' ) ) {
+		return;
+	}
+
+	$link = add_query_arg(
+		array( 'action' => 'validate' ),
+		menu_page_url( 'wpcf7', false ) );
+
+	$link = sprintf( '<a href="%s">%s</a>', $link, esc_html( __( 'Validate Contact Form 7 Configuration', 'contact-form-7' ) ) );
+
+	$message = __( "Misconfiguration leads to mail delivery failure or other troubles. Validate your contact forms now.", 'contact-form-7' );
+
+	echo sprintf( '<div class="notice notice-warning"><p>%s &raquo; %s</p></div>',
+		esc_html( $message ), $link );
+}

+ 66 - 0
wp-content/plugins/contact-form-7/admin/css/styles-rtl.css

@@ -0,0 +1,66 @@
+/*
+ * Tabs
+ */
+#contact-form-editor-tabs {
+	padding: 9px 10px 0 15px;
+}
+
+#contact-form-editor-tabs li a span.dashicons {
+	padding: 6px 4px 4px 0;
+}
+
+/*
+ * Form Tab
+ */
+.tag-generator-panel {
+	text-align: right;
+}
+
+.tag-generator-panel .control-box > fieldset legend {
+	border: 1px solid #dfdfdf;
+	border-right: 4px solid #00a0d2;
+}
+
+.tag-generator-panel .insert-box input.tag {
+	float: right;
+}
+
+.tag-generator-panel .insert-box .submitbox input[type="button"] {
+	float: left;
+}
+
+/*
+ * Mail Tab
+ */
+.contact-form-editor-box-mail span.mailtag {
+	margin: 0 4px 0 0;
+}
+
+/*
+ * Welcome Panel
+ */
+.welcome-panel .welcome-panel-column,
+.welcome-panel .welcome-panel-column:first-child {
+	padding: 0 0 0 2%;
+}
+
+/*
+ * Integration
+ */
+.card {
+	border-left: 1px solid #e5e5e5;
+	border-right: 4px solid #e5e5e5;
+}
+
+.card img.icon {
+	float: right;
+	margin: 8px -8px 8px 8px;
+}
+
+.card h2.title {
+	float: right;
+}
+
+.card .infobox {
+	float: left;
+}

+ 424 - 0
wp-content/plugins/contact-form-7/admin/css/styles.css

@@ -0,0 +1,424 @@
+#titlediv .inside p.description {
+	margin: 8px 2px 0;
+}
+
+#titlediv .inside p.description label {
+	cursor: pointer;
+}
+
+span.shortcode {
+	display: block;
+	margin: 2px 0;
+}
+
+span.shortcode.old {
+	background: #777;
+	color: #fff;
+}
+
+span.shortcode > input {
+	background: inherit;
+	color: inherit;
+	font-size: 12px;
+	border: none;
+	box-shadow: none;
+	padding: 4px 8px;
+	margin: 0;
+}
+
+#submitpost input.copy {
+	margin-bottom: 10px;
+}
+
+#submitpost input.delete {
+	padding: 0;
+	margin: 0;
+	border: none;
+	cursor: pointer;
+	background: inherit;
+	color: #a00;
+}
+
+#submitpost input.delete:hover {
+	color: #f00;
+}
+
+#submitpost input.delete:focus {
+	outline: thin dotted;
+}
+
+.postbox-container .postbox h3 {
+	border-bottom: 1px solid transparent;
+}
+
+.keyboard-interaction {
+	visibility: hidden;
+	color: #23282d;
+}
+
+div.config-error, span.config-error, ul.config-error {
+	color: #444;
+	font-style: normal;
+	font-size: 13px;
+}
+
+ul.config-error {
+	margin: 2px 0;
+}
+
+ul.config-error li {
+	list-style: none;
+	padding: 2px 2px;
+	margin: 0;
+}
+
+div.config-error span.dashicons,
+ul.config-error li span.dashicons {
+	color: #82878c;
+}
+
+[data-config-field][aria-invalid="true"] {
+	border-color: #d00;
+}
+
+/*
+ * Tabs
+ */
+#contact-form-editor-tabs {
+	border-bottom: 1px solid #aaa;
+	padding: 9px 15px 0 10px;
+	margin: 0;
+}
+
+#contact-form-editor-tabs li {
+	display: inline-block;
+	list-style: none;
+	border: 1px solid #ccc;
+	border-bottom: 1px solid #aaa;
+	padding: 0;
+	margin: 0 4px -1px;
+	background-color: #e4e4e4;
+}
+
+#contact-form-editor-tabs li:hover {
+	background-color: #fff;
+}
+
+#contact-form-editor-tabs li.ui-tabs-active,
+#contact-form-editor-tabs li.ui-tabs-active:hover {
+	border-top: 1px solid #aaa;
+	border-right: 1px solid #aaa;
+	border-left: 1px solid #aaa;
+	border-bottom: 1px solid #f5f5f5;
+	background-color: #f5f5f5;
+}
+
+#contact-form-editor-tabs li a {
+	padding: 6px 10px;
+	font-size: 14px;
+	font-weight: normal;
+	line-height: 30px;
+	color: #333;
+	text-decoration: none;
+}
+
+#contact-form-editor-tabs li.ui-tabs-active a {
+	color: #000;
+	font-size: 14px;
+	font-weight: bold;
+}
+
+#contact-form-editor-tabs li a:hover {
+	color: #000;
+}
+
+#contact-form-editor-tabs li a span.dashicons {
+	font-style: normal;
+	padding: 6px 0 4px 4px;
+	color: #82878c;
+}
+
+#contact-form-editor-tabs li a span.dashicons-warning,
+#contact-form-editor .contact-form-editor-panel > div.config-error span.dashicons-warning {
+	color: #ca4a1f;
+}
+
+#contact-form-editor .contact-form-editor-panel > div.config-error {
+	margin-bottom: 1.4em;
+}
+
+#contact-form-editor-tabs li.ui-tabs-active a span.dashicons {
+	display: none;
+}
+
+#contact-form-editor .contact-form-editor-panel h2 {
+	font-size: 18px;
+	font-weight: 400;
+	line-height: 24px;
+	margin: 8px 0;
+	padding: 0;
+}
+
+#contact-form-editor .contact-form-editor-panel {
+	background-color: #f5f5f5;
+	border: 1px solid #aaa;
+	border-top: none;
+	padding: 16px;
+}
+
+#contact-form-editor .form-table th {
+	width: 100px;
+}
+
+#contact-form-editor .contact-form-editor-panel fieldset legend {
+	line-height: 1.5;
+	margin: .6em 0 .4em;
+}
+
+/*
+ * Form Tab
+ */
+#tag-generator-list a.button {
+	font-size: 12px;
+	height: 26px;
+	line-height: 24px;
+	margin: 2px;
+	padding: 0 8px 1px;
+}
+
+.tag-generator-panel {
+	position: relative;
+	height: 495px;
+}
+
+.tag-generator-panel .control-box {
+	padding: 0;
+	margin: 0;
+	height: 380px;
+	overflow: auto;
+}
+
+.tag-generator-panel .control-box > fieldset legend {
+	border: 1px solid #dfdfdf;
+	border-left: 4px solid #00a0d2;
+	background: #f7fcfe;
+	padding: 4px 12px;
+	margin: 4px 0;
+	line-height: 1.4em;
+	width: 95%;
+}
+
+.tag-generator-panel table {
+	width: 100%;
+}
+
+.tag-generator-panel table.form-table th {
+	width: 120px;
+	padding: 4px 10px 4px 0;
+	font-size: 13px;
+}
+
+.tag-generator-panel table.form-table td {
+	padding: 4px 10px;
+	font-size: 13px;
+}
+
+.tag-generator-panel .control-box input.oneline {
+	width: 200px;
+}
+
+.tag-generator-panel .control-box input.large-text {
+	width: 400px;
+}
+
+.tag-generator-panel .control-box textarea.values {
+	width: 200px;
+	height: 6em;
+}
+
+.tag-generator-panel .control-box input[type="number"],
+.tag-generator-panel .control-box input[type="date"] {
+	width: 88px;
+}
+
+.tag-generator-panel .control-box table caption {
+	text-align: left;
+	font-size: 110%;
+	font-weight: bold;
+	color: #777;
+	margin: 10px 0 5px;
+}
+
+.tag-generator-panel .control-box table.form-table td label {
+	line-height: 1.1em;
+}
+
+.tag-generator-panel .control-box table.form-table td label .description {
+	line-height: 1.4em;
+}
+
+.tag-generator-panel .insert-box {
+	position: absolute;
+	left: -15px;
+	right: -15px;
+	bottom: -15px;
+	width: 100%;
+	height: 84px;
+	margin: 0;
+	padding: 8px 16px;
+	background-color: #fcfcfc;
+	border-top: 1px solid #dfdfdf;
+	overflow: auto;
+}
+
+.tag-generator-panel .insert-box input.tag {
+	width: 480px;
+	float: left;
+	background-color: transparent;
+	box-shadow: none;
+}
+
+.tag-generator-panel .insert-box .submitbox {
+	padding: 2px 4px;
+}
+
+.tag-generator-panel .insert-box .submitbox input[type="button"] {
+	float: right;
+}
+
+.tag-generator-panel .insert-box .description label {
+	cursor: text;
+}
+
+/*
+ * Mail Tab
+ */
+.contact-form-editor-box-mail span.mailtag {
+	display: inline-block;
+	margin: 0 0 0 4px;
+	padding: 1px 2px;
+	cursor: pointer;
+	color: #000;
+}
+
+.contact-form-editor-box-mail span.mailtag.used {
+	color: #666;
+}
+
+.contact-form-editor-box-mail span.mailtag.unused {
+	font-weight: bold;
+}
+
+/*
+ * Messages Tab
+ */
+#messages-panel p.description {
+	margin: 5px 0 10px;
+}
+
+/*
+ * List Table
+ */
+.fixed .column-title {
+	width: 38%;
+}
+
+.fixed .column-shortcode {
+	width: 38%;
+}
+
+.wp-list-table .config-error span.dashicons-warning {
+	color: #ca4a1f;
+}
+
+/*
+ * Welcome Panel
+ */
+.welcome-panel .welcome-panel-column,
+.welcome-panel .welcome-panel-column:first-child {
+	width: 48%;
+	padding: 0 2% 0 0;
+	margin: 0 0 1em 0;
+}
+
+@media screen and (max-width: 870px) {
+	.welcome-panel .welcome-panel-column,
+	.welcome-panel .welcome-panel-column:first-child {
+		display: block;
+		float: none;
+		width: 100%;
+	}
+}
+
+.welcome-panel h3 {
+	font-size: 16px;
+	font-weight: 600;
+	line-height: 2.1em;
+	margin: 1em 0 1.2em;
+}
+
+.welcome-panel h3 .dashicons {
+	position: relative;
+	top: -2px;
+	display: inline-block;
+	width: 60px;
+	color: #575757;
+	font-size: 40px;
+}
+
+.welcome-panel p a {
+	font-weight: bold;
+}
+
+.welcome-panel-close {
+	z-index: 2;
+}
+
+/*
+ * Integration
+ */
+.card {
+	background: #fff none repeat scroll 0 0;
+	border: 1px solid #e5e5e5;
+	border-left: 4px solid #e5e5e5;
+	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
+	margin-top: 20px;
+	max-width: 520px;
+	min-width: 255px;
+	padding: 0.7em 2em 1em;
+	position: relative;
+}
+
+.card.active {
+	border-color: #00a0d2;
+}
+
+.card img.icon {
+	float: left;
+	margin: 8px 8px 8px -8px;
+}
+
+.card h2.title {
+	float: left;
+	max-width: 240px;
+	font-size: 1.3em;
+	font-weight: 600;
+}
+
+.card .infobox {
+	float: right;
+	font-size: 13px;
+	color: #666;
+	margin: 2px 0 5px;
+	line-height: 1.5;
+	max-width: 240px;
+}
+
+.card .inside .form-table th {
+	padding: 15px 10px 15px 0;
+	width: 160px;
+}
+
+.card .inside .form-table td {
+	padding: 10px 10px;
+}

+ 264 - 0
wp-content/plugins/contact-form-7/admin/edit-contact-form.php

@@ -0,0 +1,264 @@
+<?php
+
+// don't load directly
+if ( ! defined( 'ABSPATH' ) ) {
+	die( '-1' );
+}
+
+function wpcf7_admin_save_button( $post_id ) {
+	static $button = '';
+
+	if ( ! empty( $button ) ) {
+		echo $button;
+		return;
+	}
+
+	$nonce = wp_create_nonce( 'wpcf7-save-contact-form_' . $post_id );
+
+	$onclick = sprintf(
+		"this.form._wpnonce.value = '%s';"
+		. " this.form.action.value = 'save';"
+		. " return true;",
+		$nonce );
+
+	$button = sprintf(
+		'<input type="submit" class="button-primary" name="wpcf7-save" value="%1$s" onclick="%2$s" />',
+		esc_attr( __( 'Save', 'contact-form-7' ) ),
+		$onclick );
+
+	echo $button;
+}
+
+?><div class="wrap">
+
+<h1 class="wp-heading-inline"><?php
+	if ( $post->initial() ) {
+		echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) );
+	} else {
+		echo esc_html( __( 'Edit Contact Form', 'contact-form-7' ) );
+	}
+?></h1>
+
+<?php
+	if ( ! $post->initial() && current_user_can( 'wpcf7_edit_contact_forms' ) ) {
+		echo sprintf( '<a href="%1$s" class="add-new-h2">%2$s</a>',
+			esc_url( menu_page_url( 'wpcf7-new', false ) ),
+			esc_html( __( 'Add New', 'contact-form-7' ) ) );
+	}
+?>
+
+<hr class="wp-header-end">
+
+<?php do_action( 'wpcf7_admin_warnings' ); ?>
+<?php do_action( 'wpcf7_admin_notices' ); ?>
+
+<?php
+if ( $post ) :
+
+	if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
+		$disabled = '';
+	} else {
+		$disabled = ' disabled="disabled"';
+	}
+?>
+
+<form method="post" action="<?php echo esc_url( add_query_arg( array( 'post' => $post_id ), menu_page_url( 'wpcf7', false ) ) ); ?>" id="wpcf7-admin-form-element"<?php do_action( 'wpcf7_post_edit_form_tag' ); ?>>
+<?php
+	if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
+		wp_nonce_field( 'wpcf7-save-contact-form_' . $post_id );
+	}
+?>
+<input type="hidden" id="post_ID" name="post_ID" value="<?php echo (int) $post_id; ?>" />
+<input type="hidden" id="wpcf7-locale" name="wpcf7-locale" value="<?php echo esc_attr( $post->locale() ); ?>" />
+<input type="hidden" id="hiddenaction" name="action" value="save" />
+<input type="hidden" id="active-tab" name="active-tab" value="<?php echo isset( $_GET['active-tab'] ) ? (int) $_GET['active-tab'] : '0'; ?>" />
+
+<div id="poststuff">
+<div id="post-body" class="metabox-holder columns-2">
+<div id="post-body-content">
+<div id="titlediv">
+<div id="titlewrap">
+	<label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo esc_html( __( 'Enter title here', 'contact-form-7' ) ); ?></label>
+<?php
+	$posttitle_atts = array(
+		'type' => 'text',
+		'name' => 'post_title',
+		'size' => 30,
+		'value' => $post->initial() ? '' : $post->title(),
+		'id' => 'title',
+		'spellcheck' => 'true',
+		'autocomplete' => 'off',
+		'disabled' =>
+			current_user_can( 'wpcf7_edit_contact_form', $post_id ) ? '' : 'disabled',
+	);
+
+	echo sprintf( '<input %s />', wpcf7_format_atts( $posttitle_atts ) );
+?>
+</div><!-- #titlewrap -->
+
+<div class="inside">
+<?php
+	if ( ! $post->initial() ) :
+?>
+	<p class="description">
+	<label for="wpcf7-shortcode"><?php echo esc_html( __( "Copy this shortcode and paste it into your post, page, or text widget content:", 'contact-form-7' ) ); ?></label>
+	<span class="shortcode wp-ui-highlight"><input type="text" id="wpcf7-shortcode" onfocus="this.select();" readonly="readonly" class="large-text code" value="<?php echo esc_attr( $post->shortcode() ); ?>" /></span>
+	</p>
+<?php
+		if ( $old_shortcode = $post->shortcode( array( 'use_old_format' => true ) ) ) :
+?>
+	<p class="description">
+	<label for="wpcf7-shortcode-old"><?php echo esc_html( __( "You can also use this old-style shortcode:", 'contact-form-7' ) ); ?></label>
+	<span class="shortcode old"><input type="text" id="wpcf7-shortcode-old" onfocus="this.select();" readonly="readonly" class="large-text code" value="<?php echo esc_attr( $old_shortcode ); ?>" /></span>
+	</p>
+<?php
+		endif;
+	endif;
+?>
+</div>
+</div><!-- #titlediv -->
+</div><!-- #post-body-content -->
+
+<div id="postbox-container-1" class="postbox-container">
+<?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) : ?>
+<div id="submitdiv" class="postbox">
+<h3><?php echo esc_html( __( 'Status', 'contact-form-7' ) ); ?></h3>
+<div class="inside">
+<div class="submitbox" id="submitpost">
+
+<div id="minor-publishing-actions">
+
+<div class="hidden">
+	<input type="submit" class="button-primary" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'contact-form-7' ) ); ?>" />
+</div>
+
+<?php
+	if ( ! $post->initial() ) :
+		$copy_nonce = wp_create_nonce( 'wpcf7-copy-contact-form_' . $post_id );
+?>
+	<input type="submit" name="wpcf7-copy" class="copy button" value="<?php echo esc_attr( __( 'Duplicate', 'contact-form-7' ) ); ?>" <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; this.form.action.value = 'copy'; return true;\""; ?> />
+<?php endif; ?>
+</div><!-- #minor-publishing-actions -->
+
+<div id="misc-publishing-actions">
+<?php do_action( 'wpcf7_admin_misc_pub_section', $post_id ); ?>
+</div><!-- #misc-publishing-actions -->
+
+<div id="major-publishing-actions">
+
+<?php
+	if ( ! $post->initial() ) :
+		$delete_nonce = wp_create_nonce( 'wpcf7-delete-contact-form_' . $post_id );
+?>
+<div id="delete-action">
+	<input type="submit" name="wpcf7-delete" class="delete submitdelete" value="<?php echo esc_attr( __( 'Delete', 'contact-form-7' ) ); ?>" <?php echo "onclick=\"if (confirm('" . esc_js( __( "You are about to delete this contact form.\n  'Cancel' to stop, 'OK' to delete.", 'contact-form-7' ) ) . "')) {this.form._wpnonce.value = '$delete_nonce'; this.form.action.value = 'delete'; return true;} return false;\""; ?> />
+</div><!-- #delete-action -->
+<?php endif; ?>
+
+<div id="publishing-action">
+	<span class="spinner"></span>
+	<?php wpcf7_admin_save_button( $post_id ); ?>
+</div>
+<div class="clear"></div>
+</div><!-- #major-publishing-actions -->
+</div><!-- #submitpost -->
+</div>
+</div><!-- #submitdiv -->
+<?php endif; ?>
+
+<div id="informationdiv" class="postbox">
+<h3><?php echo esc_html( __( 'Information', 'contact-form-7' ) ); ?></h3>
+<div class="inside">
+<ul>
+<li><?php echo wpcf7_link( __( 'https://contactform7.com/docs/', 'contact-form-7' ), __( 'Docs', 'contact-form-7' ) ); ?></li>
+<li><?php echo wpcf7_link( __( 'https://contactform7.com/faq/', 'contact-form-7' ), __( 'FAQ', 'contact-form-7' ) ); ?></li>
+<li><?php echo wpcf7_link( __( 'https://contactform7.com/support/', 'contact-form-7' ), __( 'Support', 'contact-form-7' ) ); ?></li>
+</ul>
+</div>
+</div><!-- #informationdiv -->
+
+</div><!-- #postbox-container-1 -->
+
+<div id="postbox-container-2" class="postbox-container">
+<div id="contact-form-editor">
+<div class="keyboard-interaction"><?php
+	echo sprintf(
+		/* translators: 1: ◀ ▶ dashicon, 2: screen reader text for the dashicon */
+		esc_html( __( '%1$s %2$s keys switch panels', 'contact-form-7' ) ),
+		'<span class="dashicons dashicons-leftright" aria-hidden="true"></span>',
+		sprintf(
+			'<span class="screen-reader-text">%s</span>',
+			/* translators: screen reader text */
+			esc_html( __( '(left and right arrow)', 'contact-form-7' ) )
+		)
+	);
+?></div>
+
+<?php
+
+	$editor = new WPCF7_Editor( $post );
+	$panels = array();
+
+	if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
+		$panels = array(
+			'form-panel' => array(
+				'title' => __( 'Form', 'contact-form-7' ),
+				'callback' => 'wpcf7_editor_panel_form',
+			),
+			'mail-panel' => array(
+				'title' => __( 'Mail', 'contact-form-7' ),
+				'callback' => 'wpcf7_editor_panel_mail',
+			),
+			'messages-panel' => array(
+				'title' => __( 'Messages', 'contact-form-7' ),
+				'callback' => 'wpcf7_editor_panel_messages',
+			),
+		);
+
+		$additional_settings = trim( $post->prop( 'additional_settings' ) );
+		$additional_settings = explode( "\n", $additional_settings );
+		$additional_settings = array_filter( $additional_settings );
+		$additional_settings = count( $additional_settings );
+
+		$panels['additional-settings-panel'] = array(
+			'title' => $additional_settings
+				/* translators: %d: number of additional settings */
+				? sprintf(
+					__( 'Additional Settings (%d)', 'contact-form-7' ),
+					$additional_settings )
+				: __( 'Additional Settings', 'contact-form-7' ),
+			'callback' => 'wpcf7_editor_panel_additional_settings',
+		);
+	}
+
+	$panels = apply_filters( 'wpcf7_editor_panels', $panels );
+
+	foreach ( $panels as $id => $panel ) {
+		$editor->add_panel( $id, $panel['title'], $panel['callback'] );
+	}
+
+	$editor->display();
+?>
+</div><!-- #contact-form-editor -->
+
+<?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) : ?>
+<p class="submit"><?php wpcf7_admin_save_button( $post_id ); ?></p>
+<?php endif; ?>
+
+</div><!-- #postbox-container-2 -->
+
+</div><!-- #post-body -->
+<br class="clear" />
+</div><!-- #poststuff -->
+</form>
+
+<?php endif; ?>
+
+</div><!-- .wrap -->
+
+<?php
+
+	$tag_generator = WPCF7_TagGenerator::get_instance();
+	$tag_generator->print_panels( $post );
+
+	do_action( 'wpcf7_admin_footer', $post );

+ 22 - 0
wp-content/plugins/contact-form-7/admin/includes/admin-functions.php

@@ -0,0 +1,22 @@
+<?php
+
+function wpcf7_current_action() {
+	if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
+		return $_REQUEST['action'];
+	}
+
+	if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
+		return $_REQUEST['action2'];
+	}
+
+	return false;
+}
+
+function wpcf7_admin_has_edit_cap() {
+	return current_user_can( 'wpcf7_edit_contact_forms' );
+}
+
+function wpcf7_add_tag_generator( $name, $title, $elm_id, $callback, $options = array() ) {
+	$tag_generator = WPCF7_TagGenerator::get_instance();
+	return $tag_generator->add( $name, $title, $callback, $options );
+}

+ 222 - 0
wp-content/plugins/contact-form-7/admin/includes/class-contact-forms-list-table.php

@@ -0,0 +1,222 @@
+<?php
+
+if ( ! class_exists( 'WP_List_Table' ) ) {
+	require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
+}
+
+class WPCF7_Contact_Form_List_Table extends WP_List_Table {
+
+	public static function define_columns() {
+		$columns = array(
+			'cb' => '<input type="checkbox" />',
+			'title' => __( 'Title', 'contact-form-7' ),
+			'shortcode' => __( 'Shortcode', 'contact-form-7' ),
+			'author' => __( 'Author', 'contact-form-7' ),
+			'date' => __( 'Date', 'contact-form-7' ),
+		);
+
+		return $columns;
+	}
+
+	function __construct() {
+		parent::__construct( array(
+			'singular' => 'post',
+			'plural' => 'posts',
+			'ajax' => false,
+		) );
+	}
+
+	function prepare_items() {
+		$current_screen = get_current_screen();
+		$per_page = $this->get_items_per_page( 'cfseven_contact_forms_per_page' );
+
+		$this->_column_headers = $this->get_column_info();
+
+		$args = array(
+			'posts_per_page' => $per_page,
+			'orderby' => 'title',
+			'order' => 'ASC',
+			'offset' => ( $this->get_pagenum() - 1 ) * $per_page,
+		);
+
+		if ( ! empty( $_REQUEST['s'] ) ) {
+			$args['s'] = $_REQUEST['s'];
+		}
+
+		if ( ! empty( $_REQUEST['orderby'] ) ) {
+			if ( 'title' == $_REQUEST['orderby'] ) {
+				$args['orderby'] = 'title';
+			} elseif ( 'author' == $_REQUEST['orderby'] ) {
+				$args['orderby'] = 'author';
+			} elseif ( 'date' == $_REQUEST['orderby'] ) {
+				$args['orderby'] = 'date';
+			}
+		}
+
+		if ( ! empty( $_REQUEST['order'] ) ) {
+			if ( 'asc' == strtolower( $_REQUEST['order'] ) ) {
+				$args['order'] = 'ASC';
+			} elseif ( 'desc' == strtolower( $_REQUEST['order'] ) ) {
+				$args['order'] = 'DESC';
+			}
+		}
+
+		$this->items = WPCF7_ContactForm::find( $args );
+
+		$total_items = WPCF7_ContactForm::count();
+		$total_pages = ceil( $total_items / $per_page );
+
+		$this->set_pagination_args( array(
+			'total_items' => $total_items,
+			'total_pages' => $total_pages,
+			'per_page' => $per_page,
+		) );
+	}
+
+	function get_columns() {
+		return get_column_headers( get_current_screen() );
+	}
+
+	function get_sortable_columns() {
+		$columns = array(
+			'title' => array( 'title', true ),
+			'author' => array( 'author', false ),
+			'date' => array( 'date', false ),
+		);
+
+		return $columns;
+	}
+
+	function get_bulk_actions() {
+		$actions = array(
+			'delete' => __( 'Delete', 'contact-form-7' ),
+		);
+
+		return $actions;
+	}
+
+	function column_default( $item, $column_name ) {
+		return '';
+	}
+
+	function column_cb( $item ) {
+		return sprintf(
+			'<input type="checkbox" name="%1$s[]" value="%2$s" />',
+			$this->_args['singular'],
+			$item->id() );
+	}
+
+	function column_title( $item ) {
+		$url = admin_url( 'admin.php?page=wpcf7&post=' . absint( $item->id() ) );
+		$edit_link = add_query_arg( array( 'action' => 'edit' ), $url );
+
+		$output = sprintf(
+			'<a class="row-title" href="%1$s" title="%2$s">%3$s</a>',
+			esc_url( $edit_link ),
+			/* translators: %s: title of contact form */
+			esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;', 'contact-form-7' ),
+				$item->title() ) ),
+			esc_html( $item->title() )
+		);
+
+		$output = sprintf( '<strong>%s</strong>', $output );
+
+		if ( wpcf7_validate_configuration()
+		&& current_user_can( 'wpcf7_edit_contact_form', $item->id() ) ) {
+			$config_validator = new WPCF7_ConfigValidator( $item );
+			$config_validator->restore();
+
+			if ( $count_errors = $config_validator->count_errors() ) {
+				$error_notice = sprintf(
+					/* translators: %s: number of errors detected */
+					_n(
+						'%s configuration error detected',
+						'%s configuration errors detected',
+						$count_errors, 'contact-form-7' ),
+					number_format_i18n( $count_errors ) );
+				$output .= sprintf(
+					'<div class="config-error"><span class="dashicons dashicons-warning" aria-hidden="true"></span> %s</div>',
+					$error_notice );
+			}
+		}
+
+		$actions = array(
+			'edit' => sprintf( '<a href="%1$s">%2$s</a>',
+				esc_url( $edit_link ),
+				esc_html( __( 'Edit', 'contact-form-7' ) ) ) );
+
+		if ( current_user_can( 'wpcf7_edit_contact_form', $item->id() ) ) {
+			$copy_link = wp_nonce_url(
+				add_query_arg( array( 'action' => 'copy' ), $url ),
+				'wpcf7-copy-contact-form_' . absint( $item->id() ) );
+
+			$actions = array_merge( $actions, array(
+				'copy' => sprintf( '<a href="%1$s">%2$s</a>',
+					esc_url( $copy_link ),
+					esc_html( __( 'Duplicate', 'contact-form-7' ) )
+				),
+			) );
+		}
+
+		$output .= $this->row_actions( $actions );
+
+		return $output;
+	}
+
+	function column_author( $item ) {
+		$post = get_post( $item->id() );
+
+		if ( ! $post ) {
+			return;
+		}
+
+		$author = get_userdata( $post->post_author );
+
+		if ( false === $author ) {
+			return;
+		}
+
+		return esc_html( $author->display_name );
+	}
+
+	function column_shortcode( $item ) {
+		$shortcodes = array( $item->shortcode() );
+
+		$output = '';
+
+		foreach ( $shortcodes as $shortcode ) {
+			$output .= "\n" . '<span class="shortcode"><input type="text"'
+				. ' onfocus="this.select();" readonly="readonly"'
+				. ' value="' . esc_attr( $shortcode ) . '"'
+				. ' class="large-text code" /></span>';
+		}
+
+		return trim( $output );
+	}
+
+	function column_date( $item ) {
+		$post = get_post( $item->id() );
+
+		if ( ! $post ) {
+			return;
+		}
+
+		$t_time = mysql2date( __( 'Y/m/d g:i:s A', 'contact-form-7' ),
+			$post->post_date, true );
+		$m_time = $post->post_date;
+		$time = mysql2date( 'G', $post->post_date )
+			- get_option( 'gmt_offset' ) * 3600;
+
+		$time_diff = time() - $time;
+
+		if ( $time_diff > 0 && $time_diff < 24*60*60 ) {
+			/* translators: %s: time since the creation of the contact form */
+			$h_time = sprintf(
+				__( '%s ago', 'contact-form-7' ), human_time_diff( $time ) );
+		} else {
+			$h_time = mysql2date( __( 'Y/m/d', 'contact-form-7' ), $m_time );
+		}
+
+		return '<abbr title="' . $t_time . '">' . $h_time . '</abbr>';
+	}
+}

+ 258 - 0
wp-content/plugins/contact-form-7/admin/includes/editor.php

@@ -0,0 +1,258 @@
+<?php
+
+class WPCF7_Editor {
+
+	private $contact_form;
+	private $panels = array();
+
+	public function __construct( WPCF7_ContactForm $contact_form ) {
+		$this->contact_form = $contact_form;
+	}
+
+	public function add_panel( $id, $title, $callback ) {
+		if ( wpcf7_is_name( $id ) ) {
+			$this->panels[$id] = array(
+				'title' => $title,
+				'callback' => $callback,
+			);
+		}
+	}
+
+	public function display() {
+		if ( empty( $this->panels ) ) {
+			return;
+		}
+
+		echo '<ul id="contact-form-editor-tabs">';
+
+		foreach ( $this->panels as $id => $panel ) {
+			echo sprintf( '<li id="%1$s-tab"><a href="#%1$s">%2$s</a></li>',
+				esc_attr( $id ), esc_html( $panel['title'] ) );
+		}
+
+		echo '</ul>';
+
+		foreach ( $this->panels as $id => $panel ) {
+			echo sprintf( '<div class="contact-form-editor-panel" id="%1$s">',
+				esc_attr( $id ) );
+
+			if ( is_callable( $panel['callback'] ) ) {
+				$this->notice( $id, $panel );
+				call_user_func( $panel['callback'], $this->contact_form );
+			}
+
+			echo '</div>';
+		}
+	}
+
+	public function notice( $id, $panel ) {
+		echo '<div class="config-error"></div>';
+	}
+}
+
+function wpcf7_editor_panel_form( $post ) {
+	$desc_link = wpcf7_link(
+		__( 'https://contactform7.com/editing-form-template/', 'contact-form-7' ),
+		__( 'Editing Form Template', 'contact-form-7' ) );
+	$description = __( "You can edit the form template here. For details, see %s.", 'contact-form-7' );
+	$description = sprintf( esc_html( $description ), $desc_link );
+?>
+
+<h2><?php echo esc_html( __( 'Form', 'contact-form-7' ) ); ?></h2>
+
+<fieldset>
+<legend><?php echo $description; ?></legend>
+
+<?php
+	$tag_generator = WPCF7_TagGenerator::get_instance();
+	$tag_generator->print_buttons();
+?>
+
+<textarea id="wpcf7-form" name="wpcf7-form" cols="100" rows="24" class="large-text code" data-config-field="form.body"><?php echo esc_textarea( $post->prop( 'form' ) ); ?></textarea>
+</fieldset>
+<?php
+}
+
+function wpcf7_editor_panel_mail( $post ) {
+	wpcf7_editor_box_mail( $post );
+
+	echo '<br class="clear" />';
+
+	wpcf7_editor_box_mail( $post, array(
+		'id' => 'wpcf7-mail-2',
+		'name' => 'mail_2',
+		'title' => __( 'Mail (2)', 'contact-form-7' ),
+		'use' => __( 'Use Mail (2)', 'contact-form-7' ),
+	) );
+}
+
+function wpcf7_editor_box_mail( $post, $args = '' ) {
+	$args = wp_parse_args( $args, array(
+		'id' => 'wpcf7-mail',
+		'name' => 'mail',
+		'title' => __( 'Mail', 'contact-form-7' ),
+		'use' => null,
+	) );
+
+	$id = esc_attr( $args['id'] );
+
+	$mail = wp_parse_args( $post->prop( $args['name'] ), array(
+		'active' => false,
+		'recipient' => '',
+		'sender' => '',
+		'subject' => '',
+		'body' => '',
+		'additional_headers' => '',
+		'attachments' => '',
+		'use_html' => false,
+		'exclude_blank' => false,
+	) );
+
+?>
+<div class="contact-form-editor-box-mail" id="<?php echo $id; ?>">
+<h2><?php echo esc_html( $args['title'] ); ?></h2>
+
+<?php
+	if ( ! empty( $args['use'] ) ) :
+?>
+<label for="<?php echo $id; ?>-active"><input type="checkbox" id="<?php echo $id; ?>-active" name="<?php echo $id; ?>[active]" class="toggle-form-table" value="1"<?php echo ( $mail['active'] ) ? ' checked="checked"' : ''; ?> /> <?php echo esc_html( $args['use'] ); ?></label>
+<p class="description"><?php echo esc_html( __( "Mail (2) is an additional mail template often used as an autoresponder.", 'contact-form-7' ) ); ?></p>
+<?php
+	endif;
+?>
+
+<fieldset>
+<legend>
+<?php
+	$desc_link = wpcf7_link(
+		__( 'https://contactform7.com/setting-up-mail/', 'contact-form-7' ),
+		__( 'Setting Up Mail', 'contact-form-7' ) );
+	$description = __( "You can edit the mail template here. For details, see %s.", 'contact-form-7' );
+	$description = sprintf( esc_html( $description ), $desc_link );
+	echo $description;
+	echo '<br />';
+
+	echo esc_html( __( "In the following fields, you can use these mail-tags:",
+		'contact-form-7' ) );
+	echo '<br />';
+	$post->suggest_mail_tags( $args['name'] );
+?>
+</legend>
+<table class="form-table">
+<tbody>
+	<tr>
+	<th scope="row">
+		<label for="<?php echo $id; ?>-recipient"><?php echo esc_html( __( 'To', 'contact-form-7' ) ); ?></label>
+	</th>
+	<td>
+		<input type="text" id="<?php echo $id; ?>-recipient" name="<?php echo $id; ?>[recipient]" class="large-text code" size="70" value="<?php echo esc_attr( $mail['recipient'] ); ?>" data-config-field="<?php echo sprintf( '%s.recipient', esc_attr( $args['name'] ) ); ?>" />
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row">
+		<label for="<?php echo $id; ?>-sender"><?php echo esc_html( __( 'From', 'contact-form-7' ) ); ?></label>
+	</th>
+	<td>
+		<input type="text" id="<?php echo $id; ?>-sender" name="<?php echo $id; ?>[sender]" class="large-text code" size="70" value="<?php echo esc_attr( $mail['sender'] ); ?>" data-config-field="<?php echo sprintf( '%s.sender', esc_attr( $args['name'] ) ); ?>" />
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row">
+		<label for="<?php echo $id; ?>-subject"><?php echo esc_html( __( 'Subject', 'contact-form-7' ) ); ?></label>
+	</th>
+	<td>
+		<input type="text" id="<?php echo $id; ?>-subject" name="<?php echo $id; ?>[subject]" class="large-text code" size="70" value="<?php echo esc_attr( $mail['subject'] ); ?>" data-config-field="<?php echo sprintf( '%s.subject', esc_attr( $args['name'] ) ); ?>" />
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row">
+		<label for="<?php echo $id; ?>-additional-headers"><?php echo esc_html( __( 'Additional Headers', 'contact-form-7' ) ); ?></label>
+	</th>
+	<td>
+		<textarea id="<?php echo $id; ?>-additional-headers" name="<?php echo $id; ?>[additional_headers]" cols="100" rows="4" class="large-text code" data-config-field="<?php echo sprintf( '%s.additional_headers', esc_attr( $args['name'] ) ); ?>"><?php echo esc_textarea( $mail['additional_headers'] ); ?></textarea>
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row">
+		<label for="<?php echo $id; ?>-body"><?php echo esc_html( __( 'Message Body', 'contact-form-7' ) ); ?></label>
+	</th>
+	<td>
+		<textarea id="<?php echo $id; ?>-body" name="<?php echo $id; ?>[body]" cols="100" rows="18" class="large-text code" data-config-field="<?php echo sprintf( '%s.body', esc_attr( $args['name'] ) ); ?>"><?php echo esc_textarea( $mail['body'] ); ?></textarea>
+
+		<p><label for="<?php echo $id; ?>-exclude-blank"><input type="checkbox" id="<?php echo $id; ?>-exclude-blank" name="<?php echo $id; ?>[exclude_blank]" value="1"<?php echo ( ! empty( $mail['exclude_blank'] ) ) ? ' checked="checked"' : ''; ?> /> <?php echo esc_html( __( 'Exclude lines with blank mail-tags from output', 'contact-form-7' ) ); ?></label></p>
+
+		<p><label for="<?php echo $id; ?>-use-html"><input type="checkbox" id="<?php echo $id; ?>-use-html" name="<?php echo $id; ?>[use_html]" value="1"<?php echo ( $mail['use_html'] ) ? ' checked="checked"' : ''; ?> /> <?php echo esc_html( __( 'Use HTML content type', 'contact-form-7' ) ); ?></label></p>
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row">
+		<label for="<?php echo $id; ?>-attachments"><?php echo esc_html( __( 'File Attachments', 'contact-form-7' ) ); ?></label>
+	</th>
+	<td>
+		<textarea id="<?php echo $id; ?>-attachments" name="<?php echo $id; ?>[attachments]" cols="100" rows="4" class="large-text code" data-config-field="<?php echo sprintf( '%s.attachments', esc_attr( $args['name'] ) ); ?>"><?php echo esc_textarea( $mail['attachments'] ); ?></textarea>
+	</td>
+	</tr>
+</tbody>
+</table>
+</fieldset>
+</div>
+<?php
+}
+
+function wpcf7_editor_panel_messages( $post ) {
+	$desc_link = wpcf7_link(
+		__( 'https://contactform7.com/editing-messages/', 'contact-form-7' ),
+		__( 'Editing Messages', 'contact-form-7' ) );
+	$description = __( "You can edit messages used in various situations here. For details, see %s.", 'contact-form-7' );
+	$description = sprintf( esc_html( $description ), $desc_link );
+
+	$messages = wpcf7_messages();
+
+	if ( isset( $messages['captcha_not_match'] )
+	&& ! wpcf7_use_really_simple_captcha() ) {
+		unset( $messages['captcha_not_match'] );
+	}
+
+?>
+<h2><?php echo esc_html( __( 'Messages', 'contact-form-7' ) ); ?></h2>
+<fieldset>
+<legend><?php echo $description; ?></legend>
+<?php
+
+	foreach ( $messages as $key => $arr ) {
+		$field_id = sprintf( 'wpcf7-message-%s', strtr( $key, '_', '-' ) );
+		$field_name = sprintf( 'wpcf7-messages[%s]', $key );
+
+?>
+<p class="description">
+<label for="<?php echo $field_id; ?>"><?php echo esc_html( $arr['description'] ); ?><br />
+<input type="text" id="<?php echo $field_id; ?>" name="<?php echo $field_name; ?>" class="large-text" size="70" value="<?php echo esc_attr( $post->message( $key, false ) ); ?>" data-config-field="<?php echo sprintf( 'messages.%s', esc_attr( $key ) ); ?>" />
+</label>
+</p>
+<?php
+	}
+?>
+</fieldset>
+<?php
+}
+
+function wpcf7_editor_panel_additional_settings( $post ) {
+	$desc_link = wpcf7_link(
+		__( 'https://contactform7.com/additional-settings/', 'contact-form-7' ),
+		__( 'Additional Settings', 'contact-form-7' ) );
+	$description = __( "You can add customization code snippets here. For details, see %s.", 'contact-form-7' );
+	$description = sprintf( esc_html( $description ), $desc_link );
+
+?>
+<h2><?php echo esc_html( __( 'Additional Settings', 'contact-form-7' ) ); ?></h2>
+<fieldset>
+<legend><?php echo $description; ?></legend>
+<textarea id="wpcf7-additional-settings" name="wpcf7-additional-settings" cols="100" rows="8" class="large-text" data-config-field="additional_settings.body"><?php echo esc_textarea( $post->prop( 'additional_settings' ) ); ?></textarea>
+</fieldset>
+<?php
+}

+ 98 - 0
wp-content/plugins/contact-form-7/admin/includes/help-tabs.php

@@ -0,0 +1,98 @@
+<?php
+
+class WPCF7_Help_Tabs {
+
+	private $screen;
+
+	public function __construct( WP_Screen $screen ) {
+		$this->screen = $screen;
+	}
+
+	public function set_help_tabs( $type ) {
+		switch ( $type ) {
+			case 'list':
+				$this->screen->add_help_tab( array(
+					'id' => 'list_overview',
+					'title' => __( 'Overview', 'contact-form-7' ),
+					'content' => $this->content( 'list_overview' ) ) );
+
+				$this->screen->add_help_tab( array(
+					'id' => 'list_available_actions',
+					'title' => __( 'Available Actions', 'contact-form-7' ),
+					'content' => $this->content( 'list_available_actions' ) ) );
+
+				$this->sidebar();
+
+				return;
+			case 'edit':
+				$this->screen->add_help_tab( array(
+					'id' => 'edit_overview',
+					'title' => __( 'Overview', 'contact-form-7' ),
+					'content' => $this->content( 'edit_overview' ) ) );
+
+				$this->screen->add_help_tab( array(
+					'id' => 'edit_form_tags',
+					'title' => __( 'Form-tags', 'contact-form-7' ),
+					'content' => $this->content( 'edit_form_tags' ) ) );
+
+				$this->screen->add_help_tab( array(
+					'id' => 'edit_mail_tags',
+					'title' => __( 'Mail-tags', 'contact-form-7' ),
+					'content' => $this->content( 'edit_mail_tags' ) ) );
+
+				$this->sidebar();
+
+				return;
+			case 'integration':
+				$this->screen->add_help_tab( array(
+					'id' => 'integration_overview',
+					'title' => __( 'Overview', 'contact-form-7' ),
+					'content' => $this->content( 'integration_overview' ) ) );
+
+				$this->sidebar();
+
+				return;
+		}
+	}
+
+	private function content( $name ) {
+		$content = array();
+
+		$content['list_overview'] = '<p>' . __( "On this screen, you can manage contact forms provided by Contact Form 7. You can manage an unlimited number of contact forms. Each contact form has a unique ID and Contact Form 7 shortcode ([contact-form-7 ...]). To insert a contact form into a post or a text widget, insert the shortcode into the target.", 'contact-form-7' ) . '</p>';
+
+		$content['list_available_actions'] = '<p>' . __( "Hovering over a row in the contact forms list will display action links that allow you to manage your contact form. You can perform the following actions:", 'contact-form-7' ) . '</p>';
+		$content['list_available_actions'] .= '<p>' . __( "<strong>Edit</strong> - Navigates to the editing screen for that contact form. You can also reach that screen by clicking on the contact form title.", 'contact-form-7' ) . '</p>';
+		$content['list_available_actions'] .= '<p>' . __( "<strong>Duplicate</strong> - Clones that contact form. A cloned contact form inherits all content from the original, but has a different ID.", 'contact-form-7' ) . '</p>';
+
+		$content['edit_overview'] = '<p>' . __( "On this screen, you can edit a contact form. A contact form is comprised of the following components:", 'contact-form-7' ) . '</p>';
+		$content['edit_overview'] .= '<p>' . __( "<strong>Title</strong> is the title of a contact form. This title is only used for labeling a contact form, and can be edited.", 'contact-form-7' ) . '</p>';
+		$content['edit_overview'] .= '<p>' . __( "<strong>Form</strong> is a content of HTML form. You can use arbitrary HTML, which is allowed inside a form element. You can also use Contact Form 7&#8217;s form-tags here.", 'contact-form-7' ) . '</p>';
+		$content['edit_overview'] .= '<p>' . __( "<strong>Mail</strong> manages a mail template (headers and message body) that this contact form will send when users submit it. You can use Contact Form 7&#8217;s mail-tags here.", 'contact-form-7' ) . '</p>';
+		$content['edit_overview'] .= '<p>' . __( "<strong>Mail (2)</strong> is an additional mail template that works similar to Mail. Mail (2) is different in that it is sent only when Mail has been sent successfully.", 'contact-form-7' ) . '</p>';
+		$content['edit_overview'] .= '<p>' . __( "In <strong>Messages</strong>, you can edit various types of messages used for this contact form. These messages are relatively short messages, like a validation error message you see when you leave a required field blank.", 'contact-form-7' ) . '</p>';
+		$content['edit_overview'] .= '<p>' . __( "<strong>Additional Settings</strong> provides a place where you can customize the behavior of this contact form by adding code snippets.", 'contact-form-7' ) . '</p>';
+
+		$content['edit_form_tags'] = '<p>' . __( "A form-tag is a short code enclosed in square brackets used in a form content. A form-tag generally represents an input field, and its components can be separated into four parts: type, name, options, and values. Contact Form 7 supports several types of form-tags including text fields, number fields, date fields, checkboxes, radio buttons, menus, file-uploading fields, CAPTCHAs, and quiz fields.", 'contact-form-7' ) . '</p>';
+		$content['edit_form_tags'] .= '<p>' . __( "While form-tags have a comparatively complex syntax, you don&#8217;t need to know the syntax to add form-tags because you can use the straightforward tag generator (<strong>Generate Tag</strong> button on this screen).", 'contact-form-7' ) . '</p>';
+
+		$content['edit_mail_tags'] = '<p>' . __( "A mail-tag is also a short code enclosed in square brackets that you can use in every Mail and Mail (2) field. A mail-tag represents a user input value through an input field of a corresponding form-tag.", 'contact-form-7' ) . '</p>';
+		$content['edit_mail_tags'] .= '<p>' . __( "There are also special mail-tags that have specific names, but don&#8217;t have corresponding form-tags. They are used to represent meta information of form submissions like the submitter&#8217;s IP address or the URL of the page.", 'contact-form-7' ) . '</p>';
+
+		$content['integration_overview'] = '<p>' . __( "On this screen, you can manage services that are available through Contact Form 7. Using API will allow you to collaborate with any services that are available.", 'contact-form-7' ) . '</p>';
+		$content['integration_overview'] .= '<p>' . __( "You may need to first sign up for an account with the service that you plan to use. When you do so, you would need to authorize Contact Form 7 to access the service with your account.", 'contact-form-7' ) . '</p>';
+		$content['integration_overview'] .= '<p>' . __( "Any information you provide will not be shared with service providers without your authorization.", 'contact-form-7' ) . '</p>';
+
+		if ( ! empty( $content[$name] ) ) {
+			return $content[$name];
+		}
+	}
+
+	public function sidebar() {
+		$content = '<p><strong>' . __( 'For more information:', 'contact-form-7' ) . '</strong></p>';
+		$content .= '<p>' . wpcf7_link( __( 'https://contactform7.com/docs/', 'contact-form-7' ), __( 'Docs', 'contact-form-7' ) ) . '</p>';
+		$content .= '<p>' . wpcf7_link( __( 'https://contactform7.com/faq/', 'contact-form-7' ), __( 'FAQ', 'contact-form-7' ) ) . '</p>';
+		$content .= '<p>' . wpcf7_link( __( 'https://contactform7.com/support/', 'contact-form-7' ), __( 'Support', 'contact-form-7' ) ) . '</p>';
+
+		$this->screen->set_help_sidebar( $content );
+	}
+}

+ 78 - 0
wp-content/plugins/contact-form-7/admin/includes/tag-generator.php

@@ -0,0 +1,78 @@
+<?php
+
+class WPCF7_TagGenerator {
+
+	private static $instance;
+
+	private $panels = array();
+
+	private function __construct() {}
+
+	public static function get_instance() {
+		if ( empty( self::$instance ) ) {
+			self::$instance = new self;
+		}
+
+		return self::$instance;
+	}
+
+	public function add( $id, $title, $callback, $options = array() ) {
+		$id = trim( $id );
+
+		if ( '' === $id || ! wpcf7_is_name( $id ) ) {
+			return false;
+		}
+
+		$this->panels[$id] = array(
+			'title' => $title,
+			'content' => 'tag-generator-panel-' . $id,
+			'options' => $options,
+			'callback' => $callback,
+		);
+
+		return true;
+	}
+
+	public function print_buttons() {
+		echo '<span id="tag-generator-list">';
+
+		foreach ( (array) $this->panels as $panel ) {
+			echo sprintf(
+				'<a href="#TB_inline?width=900&height=500&inlineId=%1$s" class="thickbox button" title="%2$s">%3$s</a>',
+				esc_attr( $panel['content'] ),
+				/* translators: %s: title of form-tag like 'email' or 'checkboxes' */
+				esc_attr( sprintf(
+					__( 'Form-tag Generator: %s', 'contact-form-7' ),
+					$panel['title'] ) ),
+				esc_html( $panel['title'] ) );
+		}
+
+		echo '</span>';
+	}
+
+	public function print_panels( WPCF7_ContactForm $contact_form ) {
+		foreach ( (array) $this->panels as $id => $panel ) {
+			$callback = $panel['callback'];
+
+			$options = wp_parse_args( $panel['options'], array() );
+			$options = array_merge( $options, array(
+				'id' => $id,
+				'title' => $panel['title'],
+				'content' => $panel['content'],
+			) );
+
+			if ( is_callable( $callback ) ) {
+				echo sprintf( '<div id="%s" class="hidden">',
+					esc_attr( $options['content'] ) );
+				echo sprintf(
+					'<form action="" class="tag-generator-panel" data-id="%s">',
+					$options['id'] );
+
+				call_user_func( $callback, $contact_form, $options );
+
+				echo '</form></div>';
+			}
+		}
+	}
+
+}

File diff suppressed because it is too large
+ 76 - 0
wp-content/plugins/contact-form-7/admin/includes/welcome-panel.php


+ 287 - 0
wp-content/plugins/contact-form-7/admin/js/scripts.js

@@ -0,0 +1,287 @@
+( function( $ ) {
+
+	'use strict';
+
+	if ( typeof wpcf7 === 'undefined' || wpcf7 === null ) {
+		return;
+	}
+
+	$( function() {
+		var welcomePanel = $( '#welcome-panel' );
+		var updateWelcomePanel;
+
+		updateWelcomePanel = function( visible ) {
+			$.post( ajaxurl, {
+				action: 'wpcf7-update-welcome-panel',
+				visible: visible,
+				welcomepanelnonce: $( '#welcomepanelnonce' ).val()
+			} );
+		};
+
+		$( 'a.welcome-panel-close', welcomePanel ).click( function( event ) {
+			event.preventDefault();
+			welcomePanel.addClass( 'hidden' );
+			updateWelcomePanel( 0 );
+		} );
+
+		$( '#contact-form-editor' ).tabs( {
+			active: wpcf7.activeTab,
+			activate: function( event, ui ) {
+				$( '#active-tab' ).val( ui.newTab.index() );
+			}
+		} );
+
+		$( '#contact-form-editor-tabs' ).focusin( function( event ) {
+			$( '#contact-form-editor .keyboard-interaction' ).css(
+				'visibility', 'visible' );
+		} ).focusout( function( event ) {
+			$( '#contact-form-editor .keyboard-interaction' ).css(
+				'visibility', 'hidden' );
+		} );
+
+		wpcf7.toggleMail2( 'input:checkbox.toggle-form-table' );
+
+		$( 'input:checkbox.toggle-form-table' ).click( function( event ) {
+			wpcf7.toggleMail2( this );
+		} );
+
+		if ( '' === $( '#title' ).val() ) {
+			$( '#title' ).focus();
+		}
+
+		wpcf7.titleHint();
+
+		$( '.contact-form-editor-box-mail span.mailtag' ).click( function( event ) {
+			var range = document.createRange();
+			range.selectNodeContents( this );
+			window.getSelection().addRange( range );
+		} );
+
+		wpcf7.updateConfigErrors();
+
+		$( '[data-config-field]' ).change( function() {
+			var postId = $( '#post_ID' ).val();
+
+			if ( ! postId || -1 == postId ) {
+				return;
+			}
+
+			var data = [];
+
+			$( this ).closest( 'form' ).find( '[data-config-field]' ).each( function() {
+				data.push( {
+					'name': $( this ).attr( 'name' ).replace( /^wpcf7-/, '' ).replace( /-/g, '_' ),
+					'value': $( this ).val()
+				} );
+			} );
+
+			data.push( { 'name': 'context', 'value': 'dry-run' } );
+
+			$.ajax( {
+				method: 'POST',
+				url: wpcf7.apiSettings.getRoute( '/contact-forms/' + postId ),
+				beforeSend: function( xhr ) {
+					xhr.setRequestHeader( 'X-WP-Nonce', wpcf7.apiSettings.nonce );
+				},
+				data: data
+			} ).done( function( response ) {
+				wpcf7.configValidator.errors = response.config_errors;
+				wpcf7.updateConfigErrors();
+			} );
+		} );
+
+		$( window ).on( 'beforeunload', function( event ) {
+			var changed = false;
+
+			$( '#wpcf7-admin-form-element :input[type!="hidden"]' ).each( function() {
+				if ( $( this ).is( ':checkbox, :radio' ) ) {
+					if ( this.defaultChecked != $( this ).is( ':checked' ) ) {
+						changed = true;
+					}
+				} else if ( $( this ).is( 'select' ) ) {
+					$( this ).find( 'option' ).each( function() {
+						if ( this.defaultSelected != $( this ).is( ':selected' ) ) {
+							changed = true;
+						}
+					} );
+				} else {
+					if ( this.defaultValue != $( this ).val() ) {
+						changed = true;
+					}
+				}
+			} );
+
+			if ( changed ) {
+				event.returnValue = wpcf7.saveAlert;
+				return wpcf7.saveAlert;
+			}
+		} );
+
+		$( '#wpcf7-admin-form-element' ).submit( function() {
+			if ( 'copy' != this.action.value ) {
+				$( window ).off( 'beforeunload' );
+			}
+
+			if ( 'save' == this.action.value ) {
+				$( '#publishing-action .spinner' ).addClass( 'is-active' );
+			}
+		} );
+	} );
+
+	wpcf7.toggleMail2 = function( checkbox ) {
+		var $checkbox = $( checkbox );
+		var $fieldset = $( 'fieldset',
+			$checkbox.closest( '.contact-form-editor-box-mail' ) );
+
+		if ( $checkbox.is( ':checked' ) ) {
+			$fieldset.removeClass( 'hidden' );
+		} else {
+			$fieldset.addClass( 'hidden' );
+		}
+	};
+
+	wpcf7.updateConfigErrors = function() {
+		var errors = wpcf7.configValidator.errors;
+		var errorCount = { total: 0 };
+
+		$( '[data-config-field]' ).each( function() {
+			$( this ).removeAttr( 'aria-invalid' );
+			$( this ).next( 'ul.config-error' ).remove();
+
+			var section = $( this ).attr( 'data-config-field' );
+
+			if ( errors[ section ] ) {
+				var $list = $( '<ul></ul>' ).attr( {
+					'role': 'alert',
+					'class': 'config-error'
+				} );
+
+				$.each( errors[ section ], function( i, val ) {
+					var $li = $( '<li></li>' ).append(
+						$( '<span class="dashicons dashicons-warning" aria-hidden="true"></span>' )
+					).append(
+						$( '<span class="screen-reader-text"></span>' ).text( wpcf7.configValidator.iconAlt )
+					).append( ' ' );
+
+					if ( val.link ) {
+						$li.append(
+							$( '<a></a>' ).attr( 'href', val.link ).text( val.message )
+						);
+					} else {
+						$li.text( val.message );
+					}
+
+					$li.appendTo( $list );
+
+					var tab = section
+						.replace( /^mail_\d+\./, 'mail.' ).replace( /\..*$/, '' );
+
+					if ( ! errorCount[ tab ] ) {
+						errorCount[ tab ] = 0;
+					}
+
+					errorCount[ tab ] += 1;
+
+					errorCount.total += 1;
+				} );
+
+				$( this ).after( $list ).attr( { 'aria-invalid': 'true' } );
+			}
+		} );
+
+		$( '#contact-form-editor-tabs > li' ).each( function() {
+			var $item = $( this );
+			$item.find( 'span.dashicons' ).remove();
+			var tab = $item.attr( 'id' ).replace( /-panel-tab$/, '' );
+
+			$.each( errors, function( key, val ) {
+				key = key.replace( /^mail_\d+\./, 'mail.' );
+
+				if ( key.replace( /\..*$/, '' ) == tab.replace( '-', '_' ) ) {
+					var $mark = $( '<span class="dashicons dashicons-warning" aria-hidden="true"></span>' );
+					$item.find( 'a.ui-tabs-anchor' ).first().append( $mark );
+					return false;
+				}
+			} );
+
+			var $tabPanelError = $( '#' + tab + '-panel > div.config-error:first' );
+			$tabPanelError.empty();
+
+			if ( errorCount[ tab.replace( '-', '_' ) ] ) {
+				$tabPanelError
+					.append( '<span class="dashicons dashicons-warning" aria-hidden="true"></span> ' );
+
+				if ( 1 < errorCount[ tab.replace( '-', '_' ) ] ) {
+					var manyErrorsInTab = wpcf7.configValidator.manyErrorsInTab
+						.replace( '%d', errorCount[ tab.replace( '-', '_' ) ] );
+					$tabPanelError.append( manyErrorsInTab );
+				} else {
+					$tabPanelError.append( wpcf7.configValidator.oneErrorInTab );
+				}
+			}
+		} );
+
+		$( '#misc-publishing-actions .misc-pub-section.config-error' ).remove();
+
+		if ( errorCount.total ) {
+			var $warning = $( '<div></div>' )
+				.addClass( 'misc-pub-section config-error' )
+				.append( '<span class="dashicons dashicons-warning" aria-hidden="true"></span> ' );
+
+			if ( 1 < errorCount.total ) {
+				$warning.append(
+					wpcf7.configValidator.manyErrors.replace( '%d', errorCount.total )
+				);
+			} else {
+				$warning.append( wpcf7.configValidator.oneError );
+			}
+
+			$warning.append( '<br />' ).append(
+				$( '<a></a>' )
+					.attr( 'href', wpcf7.configValidator.docUrl )
+					.text( wpcf7.configValidator.howToCorrect )
+			);
+
+			$( '#misc-publishing-actions' ).append( $warning );
+		}
+	};
+
+	/**
+	 * Copied from wptitlehint() in wp-admin/js/post.js
+	 */
+	wpcf7.titleHint = function() {
+		var $title = $( '#title' );
+		var $titleprompt = $( '#title-prompt-text' );
+
+		if ( '' === $title.val() ) {
+			$titleprompt.removeClass( 'screen-reader-text' );
+		}
+
+		$titleprompt.click( function() {
+			$( this ).addClass( 'screen-reader-text' );
+			$title.focus();
+		} );
+
+		$title.blur( function() {
+			if ( '' === $(this).val() ) {
+				$titleprompt.removeClass( 'screen-reader-text' );
+			}
+		} ).focus( function() {
+			$titleprompt.addClass( 'screen-reader-text' );
+		} ).keydown( function( e ) {
+			$titleprompt.addClass( 'screen-reader-text' );
+			$( this ).unbind( e );
+		} );
+	};
+
+	wpcf7.apiSettings.getRoute = function( path ) {
+		var url = wpcf7.apiSettings.root;
+
+		url = url.replace(
+			wpcf7.apiSettings.namespace,
+			wpcf7.apiSettings.namespace + path );
+
+		return url;
+	};
+
+} )( jQuery );

+ 249 - 0
wp-content/plugins/contact-form-7/admin/js/tag-generator.js

@@ -0,0 +1,249 @@
+( function( $ ) {
+
+	'use strict';
+
+	if ( typeof wpcf7 === 'undefined' || wpcf7 === null ) {
+		return;
+	}
+
+	wpcf7.taggen = {};
+
+	$( function() {
+		$( 'form.tag-generator-panel' ).each( function() {
+			wpcf7.taggen.update( $( this ) );
+		} );
+	} );
+
+	$( 'form.tag-generator-panel' ).submit( function() {
+		return false;
+	} );
+
+	$( 'form.tag-generator-panel .control-box :input' ).change( function() {
+		var $form = $( this ).closest( 'form.tag-generator-panel' );
+		wpcf7.taggen.normalize( $( this ) );
+		wpcf7.taggen.update( $form );
+	} );
+
+	$( 'input.insert-tag' ).click( function() {
+		var $form = $( this ).closest( 'form.tag-generator-panel' );
+		var tag = $form.find( 'input.tag' ).val();
+		wpcf7.taggen.insert( tag );
+		tb_remove(); // close thickbox
+		return false;
+	} );
+
+	wpcf7.taggen.update = function( $form ) {
+		var id = $form.attr( 'data-id' );
+		var name = '';
+		var name_fields = $form.find( 'input[name="name"]' );
+
+		if ( name_fields.length ) {
+			name = name_fields.val();
+
+			if ( '' === name ) {
+				name = id + '-' + Math.floor( Math.random() * 1000 );
+				name_fields.val( name );
+			}
+		}
+
+		if ( $.isFunction( wpcf7.taggen.update[ id ] ) ) {
+			return wpcf7.taggen.update[ id ].call( this, $form );
+		}
+
+		$form.find( 'input.tag' ).each( function() {
+			var tag_type = $( this ).attr( 'name' );
+
+			if ( $form.find( ':input[name="tagtype"]' ).length ) {
+				tag_type = $form.find( ':input[name="tagtype"]' ).val();
+			}
+
+			if ( $form.find( ':input[name="required"]' ).is( ':checked' ) ) {
+				tag_type += '*';
+			}
+
+			var components = wpcf7.taggen.compose( tag_type, $form );
+			$( this ).val( components );
+		} );
+
+		$form.find( 'span.mail-tag' ).text( '[' + name + ']' );
+
+		$form.find( 'input.mail-tag' ).each( function() {
+			$( this ).val( '[' + name + ']' );
+		} );
+	};
+
+	wpcf7.taggen.update.captcha = function( $form ) {
+		var captchac = wpcf7.taggen.compose( 'captchac', $form );
+		var captchar = wpcf7.taggen.compose( 'captchar', $form );
+
+		$form.find( 'input.tag' ).val( captchac + ' ' + captchar );
+	};
+
+	wpcf7.taggen.compose = function( tagType, $form ) {
+		var name = $form.find( 'input[name="name"]' ).val();
+		var scope = $form.find( '.scope.' + tagType );
+
+		if ( ! scope.length ) {
+			scope = $form;
+		}
+
+		var options = [];
+
+		scope.find( 'input.option' ).not( ':checkbox,:radio' ).each( function( i ) {
+			var val = $( this ).val();
+
+			if ( ! val ) {
+				return;
+			}
+
+			if ( $( this ).hasClass( 'filetype' ) ) {
+				val = val.split( /[,|\s]+/ ).join( '|' );
+			}
+
+			if ( $( this ).hasClass( 'color' ) ) {
+				val = '#' + val;
+			}
+
+			if ( 'class' == $( this ).attr( 'name' ) ) {
+				$.each( val.split( ' ' ), function( i, n ) {
+					options.push( 'class:' + n );
+				} );
+			} else {
+				options.push( $( this ).attr( 'name' ) + ':' + val );
+			}
+		} );
+
+		scope.find( 'input:checkbox.option' ).each( function( i ) {
+			if ( $( this ).is( ':checked' ) ) {
+				options.push( $( this ).attr( 'name' ) );
+			}
+		} );
+
+		scope.find( 'input:radio.option' ).each( function( i ) {
+			if ( $( this ).is( ':checked' ) && ! $( this ).hasClass( 'default' ) ) {
+				options.push( $( this ).attr( 'name' ) + ':' + $( this ).val() );
+			}
+		} );
+
+		if ( 'radio' == tagType ) {
+			options.push( 'default:1' );
+		}
+
+		options = ( options.length > 0 ) ? options.join( ' ' ) : '';
+
+		var value = '';
+
+		if ( scope.find( ':input[name="values"]' ).val() ) {
+			$.each(
+				scope.find( ':input[name="values"]' ).val().split( "\n" ),
+				function( i, n ) {
+					value += ' "' + n.replace( /["]/g, '&quot;' ) + '"';
+				}
+			);
+		}
+
+		var components = [];
+
+		$.each( [ tagType, name, options, value ], function( i, v ) {
+			v = $.trim( v );
+
+			if ( '' != v ) {
+				components.push( v );
+			}
+		} );
+
+		components = $.trim( components.join( ' ' ) );
+		components = '[' + components + ']';
+
+		var content = scope.find( ':input[name="content"]' ).val();
+		content = $.trim( content );
+
+		if ( content ) {
+			components += ' ' + content + ' [/' + tagType + ']';
+		}
+
+		return components;
+	};
+
+	wpcf7.taggen.normalize = function( $input ) {
+		var val = $input.val();
+
+		if ( $input.is( 'input[name="name"]' ) ) {
+			val = val.replace( /[^0-9a-zA-Z:._-]/g, '' ).replace( /^[^a-zA-Z]+/, '' );
+		}
+
+		if ( $input.is( '.numeric' ) ) {
+			val = val.replace( /[^0-9.-]/g, '' );
+		}
+
+		if ( $input.is( '.idvalue' ) ) {
+			val = val.replace( /[^-0-9a-zA-Z_]/g, '' );
+		}
+
+		if ( $input.is( '.classvalue' ) ) {
+			val = $.map( val.split( ' ' ), function( n ) {
+				return n.replace( /[^-0-9a-zA-Z_]/g, '' );
+			} ).join( ' ' );
+
+			val = $.trim( val.replace( /\s+/g, ' ' ) );
+		}
+
+		if ( $input.is( '.color' ) ) {
+			val = val.replace( /[^0-9a-fA-F]/g, '' );
+		}
+
+		if ( $input.is( '.filesize' ) ) {
+			val = val.replace( /[^0-9kKmMbB]/g, '' );
+		}
+
+		if ( $input.is( '.filetype' ) ) {
+			val = val.replace( /[^0-9a-zA-Z.,|\s]/g, '' );
+		}
+
+		if ( $input.is( '.date' ) ) {
+			// 'yyyy-mm-dd' ISO 8601 format
+			if ( ! val.match( /^\d{4}-\d{2}-\d{2}$/ ) ) {
+				val = '';
+			}
+		}
+
+		if ( $input.is( ':input[name="values"]' ) ) {
+			val = $.trim( val );
+		}
+
+		$input.val( val );
+
+		if ( $input.is( ':checkbox.exclusive' ) ) {
+			wpcf7.taggen.exclusiveCheckbox( $input );
+		}
+	};
+
+	wpcf7.taggen.exclusiveCheckbox = function( $cb ) {
+		if ( $cb.is( ':checked' ) ) {
+			$cb.siblings( ':checkbox.exclusive' ).prop( 'checked', false );
+		}
+	};
+
+	wpcf7.taggen.insert = function( content ) {
+		$( 'textarea#wpcf7-form' ).each( function() {
+			this.focus();
+
+			if ( document.selection ) { // IE
+				var selection = document.selection.createRange();
+				selection.text = content;
+			} else if ( this.selectionEnd || 0 === this.selectionEnd ) {
+				var val = $( this ).val();
+				var end = this.selectionEnd;
+				$( this ).val( val.substring( 0, end ) +
+					content + val.substring( end, val.length ) );
+				this.selectionStart = end + content.length;
+				this.selectionEnd = end + content.length;
+			} else {
+				$( this ).val( $( this ).val() + content );
+			}
+
+			this.focus();
+		} );
+	};
+
+} )( jQuery );

BIN
wp-content/plugins/contact-form-7/images/ajax-loader.gif


+ 24 - 0
wp-content/plugins/contact-form-7/includes/capabilities.php

@@ -0,0 +1,24 @@
+<?php
+
+add_filter( 'map_meta_cap', 'wpcf7_map_meta_cap', 10, 4 );
+
+function wpcf7_map_meta_cap( $caps, $cap, $user_id, $args ) {
+	$meta_caps = array(
+		'wpcf7_edit_contact_form' => WPCF7_ADMIN_READ_WRITE_CAPABILITY,
+		'wpcf7_edit_contact_forms' => WPCF7_ADMIN_READ_WRITE_CAPABILITY,
+		'wpcf7_read_contact_forms' => WPCF7_ADMIN_READ_CAPABILITY,
+		'wpcf7_delete_contact_form' => WPCF7_ADMIN_READ_WRITE_CAPABILITY,
+		'wpcf7_manage_integration' => 'manage_options',
+		'wpcf7_submit' => 'read',
+	);
+
+	$meta_caps = apply_filters( 'wpcf7_map_meta_cap', $meta_caps );
+
+	$caps = array_diff( $caps, array_keys( $meta_caps ) );
+
+	if ( isset( $meta_caps[$cap] ) ) {
+		$caps[] = $meta_caps[$cap];
+	}
+
+	return $caps;
+}

+ 610 - 0
wp-content/plugins/contact-form-7/includes/config-validator.php

@@ -0,0 +1,610 @@
+<?php
+
+class WPCF7_ConfigValidator {
+
+	const error = 100;
+	const error_maybe_empty = 101;
+	const error_invalid_mailbox_syntax = 102;
+	const error_email_not_in_site_domain = 103;
+	const error_html_in_message = 104;
+	const error_multiple_controls_in_label = 105;
+	const error_file_not_found = 106;
+	const error_unavailable_names = 107;
+	const error_invalid_mail_header = 108;
+	const error_deprecated_settings = 109;
+
+	public static function get_doc_link( $error_code = '' ) {
+		$url = __( 'https://contactform7.com/configuration-errors/',
+			'contact-form-7' );
+
+		if ( '' !== $error_code ) {
+			$error_code = strtr( $error_code, '_', '-' );
+
+			$url = sprintf( '%s/%s', untrailingslashit( $url ), $error_code );
+		}
+
+		return esc_url( $url );
+	}
+
+	private $contact_form;
+	private $errors = array();
+
+	public function __construct( WPCF7_ContactForm $contact_form ) {
+		$this->contact_form = $contact_form;
+	}
+
+	public function contact_form() {
+		return $this->contact_form;
+	}
+
+	public function is_valid() {
+		return ! $this->count_errors();
+	}
+
+	public function count_errors( $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'section' => '',
+			'code' => '',
+		) );
+
+		$count = 0;
+
+		foreach ( $this->errors as $key => $errors ) {
+			if ( preg_match( '/^mail_[0-9]+\.(.*)$/', $key, $matches ) ) {
+				$key = sprintf( 'mail.%s', $matches[1] );
+			}
+
+			if ( $args['section']
+			&& $key != $args['section']
+			&& preg_replace( '/\..*$/', '', $key, 1 ) != $args['section'] ) {
+				continue;
+			}
+
+			foreach ( $errors as $error ) {
+				if ( empty( $error ) ) {
+					continue;
+				}
+
+				if ( $args['code'] && $error['code'] != $args['code'] ) {
+					continue;
+				}
+
+				$count += 1;
+			}
+		}
+
+		return $count;
+	}
+
+	public function collect_error_messages() {
+		$error_messages = array();
+
+		foreach ( $this->errors as $section => $errors ) {
+			$error_messages[$section] = array();
+
+			foreach ( $errors as $error ) {
+				if ( empty( $error['args']['message'] ) ) {
+					$message = $this->get_default_message( $error['code'] );
+				} elseif ( empty( $error['args']['params'] ) ) {
+					$message = $error['args']['message'];
+				} else {
+					$message = $this->build_message(
+						$error['args']['message'],
+						$error['args']['params'] );
+				}
+
+				$link = '';
+
+				if ( ! empty( $error['args']['link'] ) ) {
+					$link = $error['args']['link'];
+				}
+
+				$error_messages[$section][] = array(
+					'message' => $message,
+					'link' => esc_url( $link ),
+				);
+			}
+		}
+
+		return $error_messages;
+	}
+
+	public function build_message( $message, $params = '' ) {
+		$params = wp_parse_args( $params, array() );
+
+		foreach ( $params as $key => $val ) {
+			if ( ! preg_match( '/^[0-9A-Za-z_]+$/', $key ) ) { // invalid key
+				continue;
+			}
+
+			$placeholder = '%' . $key . '%';
+
+			if ( false !== stripos( $message, $placeholder ) ) {
+				$message = str_ireplace( $placeholder, $val, $message );
+			}
+		}
+
+		return $message;
+	}
+
+	public function get_default_message( $code ) {
+		switch ( $code ) {
+			case self::error_maybe_empty:
+				return __( "There is a possible empty field.", 'contact-form-7' );
+			case self::error_invalid_mailbox_syntax:
+				return __( "Invalid mailbox syntax is used.", 'contact-form-7' );
+			case self::error_email_not_in_site_domain:
+				return __( "Sender email address does not belong to the site domain.", 'contact-form-7' );
+			case self::error_html_in_message:
+				return __( "HTML tags are used in a message.", 'contact-form-7' );
+			case self::error_multiple_controls_in_label:
+				return __( "Multiple form controls are in a single label element.", 'contact-form-7' );
+			case self::error_invalid_mail_header:
+				return __( "There are invalid mail header fields.", 'contact-form-7' );
+			case self::error_deprecated_settings:
+				return __( "Deprecated settings are used.", 'contact-form-7' );
+			default:
+				return '';
+		}
+	}
+
+	public function add_error( $section, $code, $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'message' => '',
+			'params' => array(),
+		) );
+
+		if ( ! isset( $this->errors[$section] ) ) {
+			$this->errors[$section] = array();
+		}
+
+		$this->errors[$section][] = array( 'code' => $code, 'args' => $args );
+
+		return true;
+	}
+
+	public function remove_error( $section, $code ) {
+		if ( empty( $this->errors[$section] ) ) {
+			return;
+		}
+
+		foreach ( (array) $this->errors[$section] as $key => $error ) {
+			if ( isset( $error['code'] ) && $error['code'] == $code ) {
+				unset( $this->errors[$section][$key] );
+			}
+		}
+	}
+
+	public function validate() {
+		$this->errors = array();
+
+		$this->validate_form();
+		$this->validate_mail( 'mail' );
+		$this->validate_mail( 'mail_2' );
+		$this->validate_messages();
+		$this->validate_additional_settings();
+
+		do_action( 'wpcf7_config_validator_validate', $this );
+
+		return $this->is_valid();
+	}
+
+	public function save() {
+		if ( $this->contact_form->initial() ) {
+			return;
+		}
+
+		delete_post_meta( $this->contact_form->id(), '_config_errors' );
+
+		if ( $this->errors ) {
+			update_post_meta( $this->contact_form->id(), '_config_errors',
+				$this->errors );
+		}
+	}
+
+	public function restore() {
+		$config_errors = get_post_meta(
+			$this->contact_form->id(), '_config_errors', true );
+
+		foreach ( (array) $config_errors as $section => $errors ) {
+			if ( empty( $errors ) ) {
+				continue;
+			}
+
+			if ( ! is_array( $errors ) ) { // for back-compat
+				$code = $errors;
+				$this->add_error( $section, $code );
+			} else {
+				foreach ( (array) $errors as $error ) {
+					if ( ! empty( $error['code'] ) ) {
+						$code = $error['code'];
+						$args = isset( $error['args'] ) ? $error['args'] : '';
+						$this->add_error( $section, $code, $args );
+					}
+				}
+			}
+		}
+	}
+
+	public function replace_mail_tags_with_minimum_input( $matches ) {
+		// allow [[foo]] syntax for escaping a tag
+		if ( $matches[1] == '[' && $matches[4] == ']' ) {
+			return substr( $matches[0], 1, -1 );
+		}
+
+		$tag = $matches[0];
+		$tagname = $matches[2];
+		$values = $matches[3];
+
+		$mail_tag = new WPCF7_MailTag( $tag, $tagname, $values );
+		$field_name = $mail_tag->field_name();
+
+		$example_email = 'example@example.com';
+		$example_text = 'example';
+		$example_blank = '';
+
+		$form_tags = $this->contact_form->scan_form_tags(
+			array( 'name' => $field_name ) );
+
+		if ( $form_tags ) {
+			$form_tag = new WPCF7_FormTag( $form_tags[0] );
+
+			$is_required = ( $form_tag->is_required() || 'radio' == $form_tag->type );
+
+			if ( ! $is_required ) {
+				return $example_blank;
+			}
+
+			if ( wpcf7_form_tag_supports( $form_tag->type, 'selectable-values' ) ) {
+				if ( $form_tag->pipes instanceof WPCF7_Pipes ) {
+					if ( $mail_tag->get_option( 'do_not_heat' ) ) {
+						$before_pipes = $form_tag->pipes->collect_befores();
+						$last_item = array_pop( $before_pipes );
+					} else {
+						$after_pipes = $form_tag->pipes->collect_afters();
+						$last_item = array_pop( $after_pipes );
+					}
+				} else {
+					$last_item = array_pop( $form_tag->values );
+				}
+
+				if ( $last_item && wpcf7_is_mailbox_list( $last_item ) ) {
+					return $example_email;
+				} else {
+					return $example_text;
+				}
+			}
+
+			if ( 'email' == $form_tag->basetype ) {
+				return $example_email;
+			} else {
+				return $example_text;
+			}
+
+		} else { // maybe special mail tag
+			// for back-compat
+			$field_name = preg_replace( '/^wpcf7\./', '_', $field_name );
+
+			if ( '_site_admin_email' == $field_name ) {
+				return get_bloginfo( 'admin_email', 'raw' );
+
+			} elseif ( '_user_agent' == $field_name ) {
+				return $example_text;
+
+			} elseif ( '_user_email' == $field_name ) {
+				return $this->contact_form->is_true( 'subscribers_only' )
+					? $example_email
+					: $example_blank;
+
+			} elseif ( '_user_' == substr( $field_name, 0, 6 ) ) {
+				return $this->contact_form->is_true( 'subscribers_only' )
+					? $example_text
+					: $example_blank;
+
+			} elseif ( '_' == substr( $field_name, 0, 1 ) ) {
+				return '_email' == substr( $field_name, -6 )
+					? $example_email
+					: $example_text;
+
+			}
+		}
+
+		return $tag;
+	}
+
+	public function validate_form() {
+		$section = 'form.body';
+		$form = $this->contact_form->prop( 'form' );
+		$this->detect_multiple_controls_in_label( $section, $form );
+		$this->detect_unavailable_names( $section, $form );
+	}
+
+	public function detect_multiple_controls_in_label( $section, $content ) {
+		$pattern = '%<label(?:[ \t\n]+.*?)?>(.+?)</label>%s';
+
+		if ( preg_match_all( $pattern, $content, $matches ) ) {
+			$form_tags_manager = WPCF7_FormTagsManager::get_instance();
+
+			foreach ( $matches[1] as $insidelabel ) {
+				$tags = $form_tags_manager->scan( $insidelabel );
+				$fields_count = 0;
+
+				foreach ( $tags as $tag ) {
+					$is_multiple_controls_container = wpcf7_form_tag_supports(
+						$tag->type, 'multiple-controls-container' );
+					$is_zero_controls_container = wpcf7_form_tag_supports(
+						$tag->type, 'zero-controls-container' );
+
+					if ( $is_multiple_controls_container ) {
+						$fields_count += count( $tag->values );
+
+						if ( $tag->has_option( 'free_text' ) ) {
+							$fields_count += 1;
+						}
+					} elseif ( $is_zero_controls_container ) {
+						$fields_count += 0;
+					} elseif ( ! empty( $tag->name ) ) {
+						$fields_count += 1;
+					}
+
+					if ( 1 < $fields_count ) {
+						return $this->add_error( $section,
+							self::error_multiple_controls_in_label, array(
+								'link' => self::get_doc_link( 'multiple_controls_in_label' ),
+							)
+						);
+					}
+				}
+			}
+		}
+
+		return false;
+	}
+
+	public function detect_unavailable_names( $section, $content ) {
+		$public_query_vars = array( 'm', 'p', 'posts', 'w', 'cat',
+			'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence',
+			'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order',
+			'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second',
+			'name', 'category_name', 'tag', 'feed', 'author_name', 'static',
+			'pagename', 'page_id', 'error', 'attachment', 'attachment_id',
+			'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term',
+			'cpage', 'post_type', 'embed' );
+
+		$form_tags_manager = WPCF7_FormTagsManager::get_instance();
+		$ng_named_tags = $form_tags_manager->filter( $content,
+			array( 'name' => $public_query_vars ) );
+
+		$ng_names = array();
+
+		foreach ( $ng_named_tags as $tag ) {
+			$ng_names[] = sprintf( '"%s"', $tag->name );
+		}
+
+		if ( $ng_names ) {
+			$ng_names = array_unique( $ng_names );
+
+			return $this->add_error( $section,
+				self::error_unavailable_names,
+				array(
+					'message' =>
+						/* translators: %names%: a list of form control names */
+						__( "Unavailable names (%names%) are used for form controls.", 'contact-form-7' ),
+					'params' => array( 'names' => implode( ', ', $ng_names ) ),
+					'link' => self::get_doc_link( 'unavailable_names' ),
+				)
+			);
+		}
+
+		return false;
+	}
+
+	public function validate_mail( $template = 'mail' ) {
+		$components = (array) $this->contact_form->prop( $template );
+
+		if ( ! $components ) {
+			return;
+		}
+
+		if ( 'mail' != $template && empty( $components['active'] ) ) {
+			return;
+		}
+
+		$components = wp_parse_args( $components, array(
+			'subject' => '',
+			'sender' => '',
+			'recipient' => '',
+			'additional_headers' => '',
+			'body' => '',
+			'attachments' => '',
+		) );
+
+		$callback = array( $this, 'replace_mail_tags_with_minimum_input' );
+
+		$subject = $components['subject'];
+		$subject = new WPCF7_MailTaggedText( $subject,
+			array( 'callback' => $callback ) );
+		$subject = $subject->replace_tags();
+		$subject = wpcf7_strip_newline( $subject );
+		$this->detect_maybe_empty( sprintf( '%s.subject', $template ), $subject );
+
+		$sender = $components['sender'];
+		$sender = new WPCF7_MailTaggedText( $sender,
+			array( 'callback' => $callback ) );
+		$sender = $sender->replace_tags();
+		$sender = wpcf7_strip_newline( $sender );
+
+		if ( ! $this->detect_invalid_mailbox_syntax( sprintf( '%s.sender', $template ), $sender )
+		&& ! wpcf7_is_email_in_site_domain( $sender ) ) {
+			$this->add_error( sprintf( '%s.sender', $template ),
+				self::error_email_not_in_site_domain, array(
+					'link' => self::get_doc_link( 'email_not_in_site_domain' ),
+				)
+			);
+		}
+
+		$recipient = $components['recipient'];
+		$recipient = new WPCF7_MailTaggedText( $recipient,
+			array( 'callback' => $callback ) );
+		$recipient = $recipient->replace_tags();
+		$recipient = wpcf7_strip_newline( $recipient );
+
+		$this->detect_invalid_mailbox_syntax(
+			sprintf( '%s.recipient', $template ), $recipient );
+
+		$additional_headers = $components['additional_headers'];
+		$additional_headers = new WPCF7_MailTaggedText( $additional_headers,
+			array( 'callback' => $callback ) );
+		$additional_headers = $additional_headers->replace_tags();
+		$additional_headers = explode( "\n", $additional_headers );
+		$mailbox_header_types = array( 'reply-to', 'cc', 'bcc' );
+		$invalid_mail_header_exists = false;
+
+		foreach ( $additional_headers as $header ) {
+			$header = trim( $header );
+
+			if ( '' === $header ) {
+				continue;
+			}
+
+			if ( ! preg_match( '/^([0-9A-Za-z-]+):(.*)$/', $header, $matches ) ) {
+				$invalid_mail_header_exists = true;
+			} else {
+				$header_name = $matches[1];
+				$header_value = trim( $matches[2] );
+
+				if ( in_array( strtolower( $header_name ), $mailbox_header_types ) ) {
+					$this->detect_invalid_mailbox_syntax(
+						sprintf( '%s.additional_headers', $template ),
+						$header_value, array(
+							'message' =>
+								__( "Invalid mailbox syntax is used in the %name% field.", 'contact-form-7' ),
+							'params' => array( 'name' => $header_name ) ) );
+				} elseif ( empty( $header_value ) ) {
+					$invalid_mail_header_exists = true;
+				}
+			}
+		}
+
+		if ( $invalid_mail_header_exists ) {
+			$this->add_error( sprintf( '%s.additional_headers', $template ),
+				self::error_invalid_mail_header, array(
+					'link' => self::get_doc_link( 'invalid_mail_header' ),
+				)
+			);
+		}
+
+		$body = $components['body'];
+		$body = new WPCF7_MailTaggedText( $body,
+			array( 'callback' => $callback ) );
+		$body = $body->replace_tags();
+		$this->detect_maybe_empty( sprintf( '%s.body', $template ), $body );
+
+		if ( '' !== $components['attachments'] ) {
+			foreach ( explode( "\n", $components['attachments'] ) as $line ) {
+				$line = trim( $line );
+
+				if ( '' === $line || '[' == substr( $line, 0, 1 ) ) {
+					continue;
+				}
+
+				$this->detect_file_not_found(
+					sprintf( '%s.attachments', $template ), $line );
+			}
+		}
+	}
+
+	public function detect_invalid_mailbox_syntax( $section, $content, $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'link' => self::get_doc_link( 'invalid_mailbox_syntax' ),
+			'message' => '',
+			'params' => array(),
+		) );
+
+		if ( ! wpcf7_is_mailbox_list( $content ) ) {
+			return $this->add_error( $section,
+				self::error_invalid_mailbox_syntax, $args );
+		}
+
+		return false;
+	}
+
+	public function detect_maybe_empty( $section, $content ) {
+		if ( '' === $content ) {
+			return $this->add_error( $section,
+				self::error_maybe_empty, array(
+					'link' => self::get_doc_link( 'maybe_empty' ),
+				)
+			);
+		}
+
+		return false;
+	}
+
+	public function detect_file_not_found( $section, $content ) {
+		$path = path_join( WP_CONTENT_DIR, $content );
+
+		if ( ! is_readable( $path ) || ! is_file( $path ) ) {
+			return $this->add_error( $section,
+				self::error_file_not_found,
+				array(
+					'message' =>
+						__( "Attachment file does not exist at %path%.", 'contact-form-7' ),
+					'params' => array( 'path' => $content ),
+					'link' => self::get_doc_link( 'file_not_found' ),
+				)
+			);
+		}
+
+		return false;
+	}
+
+	public function validate_messages() {
+		$messages = (array) $this->contact_form->prop( 'messages' );
+
+		if ( ! $messages ) {
+			return;
+		}
+
+		if ( isset( $messages['captcha_not_match'] )
+		&& ! wpcf7_use_really_simple_captcha() ) {
+			unset( $messages['captcha_not_match'] );
+		}
+
+		foreach ( $messages as $key => $message ) {
+			$section = sprintf( 'messages.%s', $key );
+			$this->detect_html_in_message( $section, $message );
+		}
+	}
+
+	public function detect_html_in_message( $section, $content ) {
+		$stripped = wp_strip_all_tags( $content );
+
+		if ( $stripped != $content ) {
+			return $this->add_error( $section,
+				self::error_html_in_message,
+				array(
+					'link' => self::get_doc_link( 'html_in_message' ),
+				)
+			);
+		}
+
+		return false;
+	}
+
+	public function validate_additional_settings() {
+		$deprecated_settings_used =
+			$this->contact_form->additional_setting( 'on_sent_ok' ) ||
+			$this->contact_form->additional_setting( 'on_submit' );
+
+		if ( $deprecated_settings_used ) {
+			return $this->add_error( 'additional_settings.body',
+				self::error_deprecated_settings,
+				array(
+					'link' => self::get_doc_link( 'deprecated_settings' ),
+				)
+			);
+		}
+	}
+
+}

+ 267 - 0
wp-content/plugins/contact-form-7/includes/contact-form-functions.php

@@ -0,0 +1,267 @@
+<?php
+
+function wpcf7_contact_form( $id ) {
+	return WPCF7_ContactForm::get_instance( $id );
+}
+
+function wpcf7_get_contact_form_by_old_id( $old_id ) {
+	global $wpdb;
+
+	$q = "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_old_cf7_unit_id'"
+		. $wpdb->prepare( " AND meta_value = %d", $old_id );
+
+	if ( $new_id = $wpdb->get_var( $q ) ) {
+		return wpcf7_contact_form( $new_id );
+	}
+}
+
+function wpcf7_get_contact_form_by_title( $title ) {
+	$page = get_page_by_title( $title, OBJECT, WPCF7_ContactForm::post_type );
+
+	if ( $page ) {
+		return wpcf7_contact_form( $page->ID );
+	}
+
+	return null;
+}
+
+function wpcf7_get_current_contact_form() {
+	if ( $current = WPCF7_ContactForm::get_current() ) {
+		return $current;
+	}
+}
+
+function wpcf7_is_posted() {
+	if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
+		return false;
+	}
+
+	return $contact_form->is_posted();
+}
+
+function wpcf7_get_hangover( $name, $default = null ) {
+	if ( ! wpcf7_is_posted() ) {
+		return $default;
+	}
+
+	$submission = WPCF7_Submission::get_instance();
+
+	if ( ! $submission || $submission->is( 'mail_sent' ) ) {
+		return $default;
+	}
+
+	return isset( $_POST[$name] ) ? wp_unslash( $_POST[$name] ) : $default;
+}
+
+function wpcf7_get_validation_error( $name ) {
+	if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
+		return '';
+	}
+
+	return $contact_form->validation_error( $name );
+}
+
+function wpcf7_get_message( $status ) {
+	if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
+		return '';
+	}
+
+	return $contact_form->message( $status );
+}
+
+function wpcf7_form_controls_class( $type, $default = '' ) {
+	$type = trim( $type );
+	$default = array_filter( explode( ' ', $default ) );
+
+	$classes = array_merge( array( 'wpcf7-form-control' ), $default );
+
+	$typebase = rtrim( $type, '*' );
+	$required = ( '*' == substr( $type, -1 ) );
+
+	$classes[] = 'wpcf7-' . $typebase;
+
+	if ( $required ) {
+		$classes[] = 'wpcf7-validates-as-required';
+	}
+
+	$classes = array_unique( $classes );
+
+	return implode( ' ', $classes );
+}
+
+function wpcf7_contact_form_tag_func( $atts, $content = null, $code = '' ) {
+	if ( is_feed() ) {
+		return '[contact-form-7]';
+	}
+
+	if ( 'contact-form-7' == $code ) {
+		$atts = shortcode_atts(
+			array(
+				'id' => 0,
+				'title' => '',
+				'html_id' => '',
+				'html_name' => '',
+				'html_class' => '',
+				'output' => 'form',
+			),
+			$atts, 'wpcf7'
+		);
+
+		$id = (int) $atts['id'];
+		$title = trim( $atts['title'] );
+
+		if ( ! $contact_form = wpcf7_contact_form( $id ) ) {
+			$contact_form = wpcf7_get_contact_form_by_title( $title );
+		}
+
+	} else {
+		if ( is_string( $atts ) ) {
+			$atts = explode( ' ', $atts, 2 );
+		}
+
+		$id = (int) array_shift( $atts );
+		$contact_form = wpcf7_get_contact_form_by_old_id( $id );
+	}
+
+	if ( ! $contact_form ) {
+		return '[contact-form-7 404 "Not Found"]';
+	}
+
+	return $contact_form->form_html( $atts );
+}
+
+function wpcf7_save_contact_form( $args = '', $context = 'save' ) {
+	$args = wp_parse_args( $args, array(
+		'id' => -1,
+		'title' => null,
+		'locale' => null,
+		'form' => null,
+		'mail' => null,
+		'mail_2' => null,
+		'messages' => null,
+		'additional_settings' => null,
+	) );
+
+	$args['id'] = (int) $args['id'];
+
+	if ( -1 == $args['id'] ) {
+		$contact_form = WPCF7_ContactForm::get_template();
+	} else {
+		$contact_form = wpcf7_contact_form( $args['id'] );
+	}
+
+	if ( empty( $contact_form ) ) {
+		return false;
+	}
+
+	if ( null !== $args['title'] ) {
+		$contact_form->set_title( $args['title'] );
+	}
+
+	if ( null !== $args['locale'] ) {
+		$contact_form->set_locale( $args['locale'] );
+	}
+
+	$properties = $contact_form->get_properties();
+
+	$properties['form'] = wpcf7_sanitize_form(
+		$args['form'], $properties['form'] );
+
+	$properties['mail'] = wpcf7_sanitize_mail(
+		$args['mail'], $properties['mail'] );
+
+	$properties['mail']['active'] = true;
+
+	$properties['mail_2'] = wpcf7_sanitize_mail(
+		$args['mail_2'], $properties['mail_2'] );
+
+	$properties['messages'] = wpcf7_sanitize_messages(
+		$args['messages'], $properties['messages'] );
+
+	$properties['additional_settings'] = wpcf7_sanitize_additional_settings(
+		$args['additional_settings'], $properties['additional_settings'] );
+
+	$contact_form->set_properties( $properties );
+
+	do_action( 'wpcf7_save_contact_form', $contact_form, $args, $context );
+
+	if ( 'save' == $context ) {
+		$contact_form->save();
+	}
+
+	return $contact_form;
+}
+
+function wpcf7_sanitize_form( $input, $default = '' ) {
+	if ( null === $input ) {
+		return $default;
+	}
+
+	$output = trim( $input );
+	return $output;
+}
+
+function wpcf7_sanitize_mail( $input, $defaults = array() ) {
+	$defaults = wp_parse_args( $defaults, array(
+		'active' => false,
+		'subject' => '',
+		'sender' => '',
+		'recipient' => '',
+		'body' => '',
+		'additional_headers' => '',
+		'attachments' => '',
+		'use_html' => false,
+		'exclude_blank' => false,
+	) );
+
+	$input = wp_parse_args( $input, $defaults );
+
+	$output = array();
+	$output['active'] = (bool) $input['active'];
+	$output['subject'] = trim( $input['subject'] );
+	$output['sender'] = trim( $input['sender'] );
+	$output['recipient'] = trim( $input['recipient'] );
+	$output['body'] = trim( $input['body'] );
+	$output['additional_headers'] = '';
+
+	$headers = str_replace( "\r\n", "\n", $input['additional_headers'] );
+	$headers = explode( "\n", $headers );
+
+	foreach ( $headers as $header ) {
+		$header = trim( $header );
+
+		if ( '' !== $header ) {
+			$output['additional_headers'] .= $header . "\n";
+		}
+	}
+
+	$output['additional_headers'] = trim( $output['additional_headers'] );
+	$output['attachments'] = trim( $input['attachments'] );
+	$output['use_html'] = (bool) $input['use_html'];
+	$output['exclude_blank'] = (bool) $input['exclude_blank'];
+
+	return $output;
+}
+
+function wpcf7_sanitize_messages( $input, $defaults = array() ) {
+	$output = array();
+
+	foreach ( wpcf7_messages() as $key => $val ) {
+		if ( isset( $input[$key] ) ) {
+			$output[$key] = trim( $input[$key] );
+		} elseif ( isset( $defaults[$key] ) ) {
+			$output[$key] = $defaults[$key];
+		}
+	}
+
+	return $output;
+}
+
+function wpcf7_sanitize_additional_settings( $input, $default = '' ) {
+	if ( null === $input ) {
+		return $default;
+	}
+
+	$output = trim( $input );
+	return $output;
+}

+ 200 - 0
wp-content/plugins/contact-form-7/includes/contact-form-template.php

@@ -0,0 +1,200 @@
+<?php
+
+class WPCF7_ContactFormTemplate {
+
+	public static function get_default( $prop = 'form' ) {
+		if ( 'form' == $prop ) {
+			$template = self::form();
+		} elseif ( 'mail' == $prop ) {
+			$template = self::mail();
+		} elseif ( 'mail_2' == $prop ) {
+			$template = self::mail_2();
+		} elseif ( 'messages' == $prop ) {
+			$template = self::messages();
+		} else {
+			$template = null;
+		}
+
+		return apply_filters( 'wpcf7_default_template', $template, $prop );
+	}
+
+	public static function form() {
+		$template = sprintf(
+			'
+<label> %2$s %1$s
+    [text* your-name] </label>
+
+<label> %3$s %1$s
+    [email* your-email] </label>
+
+<label> %4$s
+    [text your-subject] </label>
+
+<label> %5$s
+    [textarea your-message] </label>
+
+[submit "%6$s"]',
+			__( '(required)', 'contact-form-7' ),
+			__( 'Your Name', 'contact-form-7' ),
+			__( 'Your Email', 'contact-form-7' ),
+			__( 'Subject', 'contact-form-7' ),
+			__( 'Your Message', 'contact-form-7' ),
+			__( 'Send', 'contact-form-7' ) );
+
+		return trim( $template );
+	}
+
+	public static function mail() {
+		$template = array(
+			'subject' =>
+				/* translators: 1: blog name, 2: [your-subject] */
+				sprintf(
+					_x( '%1$s "%2$s"', 'mail subject', 'contact-form-7' ),
+					get_bloginfo( 'name' ), '[your-subject]' ),
+			'sender' => sprintf( '[your-name] <%s>', self::from_email() ),
+			'body' =>
+				/* translators: %s: [your-name] <[your-email]> */
+				sprintf( __( 'From: %s', 'contact-form-7' ),
+					'[your-name] <[your-email]>' ) . "\n"
+				/* translators: %s: [your-subject] */
+				. sprintf( __( 'Subject: %s', 'contact-form-7' ),
+					'[your-subject]' ) . "\n\n"
+				. __( 'Message Body:', 'contact-form-7' )
+					. "\n" . '[your-message]' . "\n\n"
+				. '-- ' . "\n"
+				/* translators: 1: blog name, 2: blog URL */
+				. sprintf(
+					__( 'This e-mail was sent from a contact form on %1$s (%2$s)', 'contact-form-7' ),
+					get_bloginfo( 'name' ),
+					get_bloginfo( 'url' ) ),
+			'recipient' => get_option( 'admin_email' ),
+			'additional_headers' => 'Reply-To: [your-email]',
+			'attachments' => '',
+			'use_html' => 0,
+			'exclude_blank' => 0,
+		);
+
+		return $template;
+	}
+
+	public static function mail_2() {
+		$template = array(
+			'active' => false,
+			'subject' =>
+				/* translators: 1: blog name, 2: [your-subject] */
+				sprintf(
+					_x( '%1$s "%2$s"', 'mail subject', 'contact-form-7' ),
+					get_bloginfo( 'name' ), '[your-subject]' ),
+			'sender' => sprintf( '%s <%s>',
+				get_bloginfo( 'name' ), self::from_email() ),
+			'body' =>
+				__( 'Message Body:', 'contact-form-7' )
+					. "\n" . '[your-message]' . "\n\n"
+				. '-- ' . "\n"
+				/* translators: 1: blog name, 2: blog URL */
+				. sprintf(
+					__( 'This e-mail was sent from a contact form on %1$s (%2$s)', 'contact-form-7' ),
+					get_bloginfo( 'name' ),
+					get_bloginfo( 'url' ) ),
+			'recipient' => '[your-email]',
+			'additional_headers' => sprintf( 'Reply-To: %s',
+				get_option( 'admin_email' ) ),
+			'attachments' => '',
+			'use_html' => 0,
+			'exclude_blank' => 0,
+		);
+
+		return $template;
+	}
+
+	public static function from_email() {
+		$admin_email = get_option( 'admin_email' );
+		$sitename = strtolower( $_SERVER['SERVER_NAME'] );
+
+		if ( wpcf7_is_localhost() ) {
+			return $admin_email;
+		}
+
+		if ( substr( $sitename, 0, 4 ) == 'www.' ) {
+			$sitename = substr( $sitename, 4 );
+		}
+
+		if ( strpbrk( $admin_email, '@' ) == '@' . $sitename ) {
+			return $admin_email;
+		}
+
+		return 'wordpress@' . $sitename;
+	}
+
+	public static function messages() {
+		$messages = array();
+
+		foreach ( wpcf7_messages() as $key => $arr ) {
+			$messages[$key] = $arr['default'];
+		}
+
+		return $messages;
+	}
+}
+
+function wpcf7_messages() {
+	$messages = array(
+		'mail_sent_ok' => array(
+			'description'
+				=> __( "Sender's message was sent successfully", 'contact-form-7' ),
+			'default'
+				=> __( "Thank you for your message. It has been sent.", 'contact-form-7' ),
+		),
+
+		'mail_sent_ng' => array(
+			'description'
+				=> __( "Sender's message failed to send", 'contact-form-7' ),
+			'default'
+				=> __( "There was an error trying to send your message. Please try again later.", 'contact-form-7' ),
+		),
+
+		'validation_error' => array(
+			'description'
+				=> __( "Validation errors occurred", 'contact-form-7' ),
+			'default'
+				=> __( "One or more fields have an error. Please check and try again.", 'contact-form-7' ),
+		),
+
+		'spam' => array(
+			'description'
+				=> __( "Submission was referred to as spam", 'contact-form-7' ),
+			'default'
+				=> __( "There was an error trying to send your message. Please try again later.", 'contact-form-7' ),
+		),
+
+		'accept_terms' => array(
+			'description'
+				=> __( "There are terms that the sender must accept", 'contact-form-7' ),
+			'default'
+				=> __( "You must accept the terms and conditions before sending your message.", 'contact-form-7' ),
+		),
+
+		'invalid_required' => array(
+			'description'
+				=> __( "There is a field that the sender must fill in", 'contact-form-7' ),
+			'default'
+				=> __( "The field is required.", 'contact-form-7' ),
+		),
+
+		'invalid_too_long' => array(
+			'description'
+				=> __( "There is a field with input that is longer than the maximum allowed length", 'contact-form-7' ),
+			'default'
+				=> __( "The field is too long.", 'contact-form-7' ),
+		),
+
+		'invalid_too_short' => array(
+			'description'
+				=> __( "There is a field with input that is shorter than the minimum allowed length", 'contact-form-7' ),
+			'default'
+				=> __( "The field is too short.", 'contact-form-7' ),
+		)
+	);
+
+	return apply_filters( 'wpcf7_messages', $messages );
+}

+ 920 - 0
wp-content/plugins/contact-form-7/includes/contact-form.php

@@ -0,0 +1,920 @@
+<?php
+
+class WPCF7_ContactForm {
+
+	const post_type = 'wpcf7_contact_form';
+
+	private static $found_items = 0;
+	private static $current = null;
+
+	private $id;
+	private $name;
+	private $title;
+	private $locale;
+	private $properties = array();
+	private $unit_tag;
+	private $responses_count = 0;
+	private $scanned_form_tags;
+	private $shortcode_atts = array();
+
+	public static function count() {
+		return self::$found_items;
+	}
+
+	public static function get_current() {
+		return self::$current;
+	}
+
+	public static function register_post_type() {
+		register_post_type( self::post_type, array(
+			'labels' => array(
+				'name' => __( 'Contact Forms', 'contact-form-7' ),
+				'singular_name' => __( 'Contact Form', 'contact-form-7' ),
+			),
+			'rewrite' => false,
+			'query_var' => false,
+		) );
+	}
+
+	public static function find( $args = '' ) {
+		$defaults = array(
+			'post_status' => 'any',
+			'posts_per_page' => -1,
+			'offset' => 0,
+			'orderby' => 'ID',
+			'order' => 'ASC',
+		);
+
+		$args = wp_parse_args( $args, $defaults );
+
+		$args['post_type'] = self::post_type;
+
+		$q = new WP_Query();
+		$posts = $q->query( $args );
+
+		self::$found_items = $q->found_posts;
+
+		$objs = array();
+
+		foreach ( (array) $posts as $post ) {
+			$objs[] = new self( $post );
+		}
+
+		return $objs;
+	}
+
+	public static function get_template( $args = '' ) {
+		global $l10n;
+
+		$defaults = array( 'locale' => null, 'title' => '' );
+		$args = wp_parse_args( $args, $defaults );
+
+		$locale = $args['locale'];
+		$title = $args['title'];
+
+		if ( $locale ) {
+			$mo_orig = $l10n['contact-form-7'];
+			wpcf7_load_textdomain( $locale );
+		}
+
+		self::$current = $contact_form = new self;
+		$contact_form->title =
+			( $title ? $title : __( 'Untitled', 'contact-form-7' ) );
+		$contact_form->locale = ( $locale ? $locale : get_locale() );
+
+		$properties = $contact_form->get_properties();
+
+		foreach ( $properties as $key => $value ) {
+			$properties[$key] = WPCF7_ContactFormTemplate::get_default( $key );
+		}
+
+		$contact_form->properties = $properties;
+
+		$contact_form = apply_filters( 'wpcf7_contact_form_default_pack',
+			$contact_form, $args );
+
+		if ( isset( $mo_orig ) ) {
+			$l10n['contact-form-7'] = $mo_orig;
+		}
+
+		return $contact_form;
+	}
+
+	public static function get_instance( $post ) {
+		$post = get_post( $post );
+
+		if ( ! $post || self::post_type != get_post_type( $post ) ) {
+			return false;
+		}
+
+		return self::$current = new self( $post );
+	}
+
+	private static function get_unit_tag( $id = 0 ) {
+		static $global_count = 0;
+
+		$global_count += 1;
+
+		if ( in_the_loop() ) {
+			$unit_tag = sprintf( 'wpcf7-f%1$d-p%2$d-o%3$d',
+				absint( $id ), get_the_ID(), $global_count );
+		} else {
+			$unit_tag = sprintf( 'wpcf7-f%1$d-o%2$d',
+				absint( $id ), $global_count );
+		}
+
+		return $unit_tag;
+	}
+
+	private function __construct( $post = null ) {
+		$post = get_post( $post );
+
+		if ( $post && self::post_type == get_post_type( $post ) ) {
+			$this->id = $post->ID;
+			$this->name = $post->post_name;
+			$this->title = $post->post_title;
+			$this->locale = get_post_meta( $post->ID, '_locale', true );
+
+			$properties = $this->get_properties();
+
+			foreach ( $properties as $key => $value ) {
+				if ( metadata_exists( 'post', $post->ID, '_' . $key ) ) {
+					$properties[$key] = get_post_meta( $post->ID, '_' . $key, true );
+				} elseif ( metadata_exists( 'post', $post->ID, $key ) ) {
+					$properties[$key] = get_post_meta( $post->ID, $key, true );
+				}
+			}
+
+			$this->properties = $properties;
+			$this->upgrade();
+		}
+
+		do_action( 'wpcf7_contact_form', $this );
+	}
+
+	public function __get( $name ) {
+		$message = __( '<code>%1$s</code> property of a <code>WPCF7_ContactForm</code> object is <strong>no longer accessible</strong>. Use <code>%2$s</code> method instead.', 'contact-form-7' );
+
+		if ( 'id' == $name ) {
+			if ( WP_DEBUG ) {
+				trigger_error( sprintf( $message, 'id', 'id()' ) );
+			}
+
+			return $this->id;
+		} elseif ( 'title' == $name ) {
+			if ( WP_DEBUG ) {
+				trigger_error( sprintf( $message, 'title', 'title()' ) );
+			}
+
+			return $this->title;
+		} elseif ( $prop = $this->prop( $name ) ) {
+			if ( WP_DEBUG ) {
+				trigger_error(
+					sprintf( $message, $name, 'prop(\'' . $name . '\')' ) );
+			}
+
+			return $prop;
+		}
+	}
+
+	public function initial() {
+		return empty( $this->id );
+	}
+
+	public function prop( $name ) {
+		$props = $this->get_properties();
+		return isset( $props[$name] ) ? $props[$name] : null;
+	}
+
+	public function get_properties() {
+		$properties = (array) $this->properties;
+
+		$properties = wp_parse_args( $properties, array(
+			'form' => '',
+			'mail' => array(),
+			'mail_2' => array(),
+			'messages' => array(),
+			'additional_settings' => '',
+		) );
+
+		$properties = (array) apply_filters( 'wpcf7_contact_form_properties',
+			$properties, $this );
+
+		return $properties;
+	}
+
+	public function set_properties( $properties ) {
+		$defaults = $this->get_properties();
+
+		$properties = wp_parse_args( $properties, $defaults );
+		$properties = array_intersect_key( $properties, $defaults );
+
+		$this->properties = $properties;
+	}
+
+	public function id() {
+		return $this->id;
+	}
+
+	public function name() {
+		return $this->name;
+	}
+
+	public function title() {
+		return $this->title;
+	}
+
+	public function set_title( $title ) {
+		$title = strip_tags( $title );
+		$title = trim( $title );
+
+		if ( '' === $title ) {
+			$title = __( 'Untitled', 'contact-form-7' );
+		}
+
+		$this->title = $title;
+	}
+
+	public function locale() {
+		if ( wpcf7_is_valid_locale( $this->locale ) ) {
+			return $this->locale;
+		} else {
+			return '';
+		}
+	}
+
+	public function set_locale( $locale ) {
+		$locale = trim( $locale );
+
+		if ( wpcf7_is_valid_locale( $locale ) ) {
+			$this->locale = $locale;
+		} else {
+			$this->locale = 'en_US';
+		}
+	}
+
+	public function shortcode_attr( $name ) {
+		if ( isset( $this->shortcode_atts[$name] ) ) {
+			return (string) $this->shortcode_atts[$name];
+		}
+	}
+
+	// Return true if this form is the same one as currently POSTed.
+	public function is_posted() {
+		if ( ! WPCF7_Submission::get_instance() ) {
+			return false;
+		}
+
+		if ( empty( $_POST['_wpcf7_unit_tag'] ) ) {
+			return false;
+		}
+
+		return $this->unit_tag == $_POST['_wpcf7_unit_tag'];
+	}
+
+	/* Generating Form HTML */
+
+	public function form_html( $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'html_id' => '',
+			'html_name' => '',
+			'html_class' => '',
+			'output' => 'form',
+		) );
+
+		$this->shortcode_atts = $args;
+
+		if ( 'raw_form' == $args['output'] ) {
+			return '<pre class="wpcf7-raw-form"><code>'
+				. esc_html( $this->prop( 'form' ) ) . '</code></pre>';
+		}
+
+		if ( $this->is_true( 'subscribers_only' )
+		&& ! current_user_can( 'wpcf7_submit', $this->id() ) ) {
+			$notice = __(
+				"This contact form is available only for logged in users.",
+				'contact-form-7' );
+			$notice = sprintf(
+				'<p class="wpcf7-subscribers-only">%s</p>',
+				esc_html( $notice ) );
+
+			return apply_filters( 'wpcf7_subscribers_only_notice', $notice, $this );
+		}
+
+		$this->unit_tag = self::get_unit_tag( $this->id );
+
+		$lang_tag = str_replace( '_', '-', $this->locale );
+
+		if ( preg_match( '/^([a-z]+-[a-z]+)-/i', $lang_tag, $matches ) ) {
+			$lang_tag = $matches[1];
+		}
+
+		$html = sprintf( '<div %s>',
+			wpcf7_format_atts( array(
+				'role' => 'form',
+				'class' => 'wpcf7',
+				'id' => $this->unit_tag,
+				( get_option( 'html_type' ) == 'text/html' ) ? 'lang' : 'xml:lang'
+					=> $lang_tag,
+				'dir' => wpcf7_is_rtl( $this->locale ) ? 'rtl' : 'ltr',
+			) )
+		);
+
+		$html .= "\n" . $this->screen_reader_response() . "\n";
+
+		$url = wpcf7_get_request_uri();
+
+		if ( $frag = strstr( $url, '#' ) ) {
+			$url = substr( $url, 0, -strlen( $frag ) );
+		}
+
+		$url .= '#' . $this->unit_tag;
+
+		$url = apply_filters( 'wpcf7_form_action_url', $url );
+
+		$id_attr = apply_filters( 'wpcf7_form_id_attr',
+			preg_replace( '/[^A-Za-z0-9:._-]/', '', $args['html_id'] ) );
+
+		$name_attr = apply_filters( 'wpcf7_form_name_attr',
+			preg_replace( '/[^A-Za-z0-9:._-]/', '', $args['html_name'] ) );
+
+		$class = 'wpcf7-form';
+
+		if ( $this->is_posted() ) {
+			$submission = WPCF7_Submission::get_instance();
+
+			switch ( $submission->get_status() ) {
+				case 'validation_failed':
+					$class .= ' invalid';
+					break;
+				case 'acceptance_missing':
+					$class .= ' unaccepted';
+					break;
+				case 'spam':
+					$class .= ' spam';
+					break;
+				case 'aborted':
+					$class .= ' aborted';
+					break;
+				case 'mail_sent':
+					$class .= ' sent';
+					break;
+				case 'mail_failed':
+					$class .= ' failed';
+					break;
+				default:
+					$class .= sprintf( ' custom-%s',
+						preg_replace( '/[^0-9a-z]+/i', '-', $submission->get_status() )
+					);
+			}
+		}
+
+		if ( $args['html_class'] ) {
+			$class .= ' ' . $args['html_class'];
+		}
+
+		if ( $this->in_demo_mode() ) {
+			$class .= ' demo';
+		}
+
+		$class = explode( ' ', $class );
+		$class = array_map( 'sanitize_html_class', $class );
+		$class = array_filter( $class );
+		$class = array_unique( $class );
+		$class = implode( ' ', $class );
+		$class = apply_filters( 'wpcf7_form_class_attr', $class );
+
+		$enctype = apply_filters( 'wpcf7_form_enctype', '' );
+		$autocomplete = apply_filters( 'wpcf7_form_autocomplete', '' );
+
+		$novalidate = apply_filters( 'wpcf7_form_novalidate',
+			wpcf7_support_html5() );
+
+		$atts = array(
+			'action' => esc_url( $url ),
+			'method' => 'post',
+			'class' => $class,
+			'enctype' => wpcf7_enctype_value( $enctype ),
+			'autocomplete' => $autocomplete,
+			'novalidate' => $novalidate ? 'novalidate' : '',
+		);
+
+		if ( '' !== $id_attr ) {
+			$atts['id'] = $id_attr;
+		}
+
+		if ( '' !== $name_attr ) {
+			$atts['name'] = $name_attr;
+		}
+
+		$atts = wpcf7_format_atts( $atts );
+
+		$html .= sprintf( '<form %s>', $atts ) . "\n";
+		$html .= $this->form_hidden_fields();
+		$html .= $this->form_elements();
+
+		if ( ! $this->responses_count ) {
+			$html .= $this->form_response_output();
+		}
+
+		$html .= '</form>';
+		$html .= '</div>';
+
+		return $html;
+	}
+
+	private function form_hidden_fields() {
+		$hidden_fields = array(
+			'_wpcf7' => $this->id(),
+			'_wpcf7_version' => WPCF7_VERSION,
+			'_wpcf7_locale' => $this->locale(),
+			'_wpcf7_unit_tag' => $this->unit_tag,
+			'_wpcf7_container_post' => 0,
+		);
+
+		if ( in_the_loop() ) {
+			$hidden_fields['_wpcf7_container_post'] = (int) get_the_ID();
+		}
+
+		if ( $this->nonce_is_active() ) {
+			$hidden_fields['_wpnonce'] = wpcf7_create_nonce();
+		}
+
+		$hidden_fields += (array) apply_filters(
+			'wpcf7_form_hidden_fields', array() );
+
+		$content = '';
+
+		foreach ( $hidden_fields as $name => $value ) {
+			$content .= sprintf(
+				'<input type="hidden" name="%1$s" value="%2$s" />',
+				esc_attr( $name ), esc_attr( $value ) ) . "\n";
+		}
+
+		return '<div style="display: none;">' . "\n" . $content . '</div>' . "\n";
+	}
+
+	public function form_response_output() {
+		$class = 'wpcf7-response-output';
+		$role = '';
+		$content = '';
+
+		if ( $this->is_posted() ) { // Post response output for non-AJAX
+			$role = 'alert';
+
+			$submission = WPCF7_Submission::get_instance();
+			$content = $submission->get_response();
+
+			switch ( $submission->get_status() ) {
+				case 'validation_failed':
+					$class .= ' wpcf7-validation-errors';
+					break;
+				case 'acceptance_missing':
+					$class .= ' wpcf7-acceptance-missing';
+					break;
+				case 'spam':
+					$class .= ' wpcf7-spam-blocked';
+					break;
+				case 'aborted':
+					$class .= ' wpcf7-aborted';
+					break;
+				case 'mail_sent':
+					$class .= ' wpcf7-mail-sent-ok';
+					break;
+				case 'mail_failed':
+					$class .= ' wpcf7-mail-sent-ng';
+					break;
+				default:
+					$class .= sprintf( ' wpcf7-custom-%s',
+						preg_replace( '/[^0-9a-z]+/i', '-', $submission->get_status() )
+					);
+			}
+		} else {
+			$class .= ' wpcf7-display-none';
+		}
+
+		$atts = array(
+			'class' => trim( $class ),
+			'role' => trim( $role ),
+		);
+
+		$atts = wpcf7_format_atts( $atts );
+
+		$output = sprintf( '<div %1$s>%2$s</div>',
+			$atts, esc_html( $content ) );
+
+		$output = apply_filters( 'wpcf7_form_response_output',
+			$output, $class, $content, $this );
+
+		$this->responses_count += 1;
+
+		return $output;
+	}
+
+	public function screen_reader_response() {
+		$class = 'screen-reader-response';
+		$role = '';
+		$content = '';
+
+		if ( $this->is_posted() ) { // Post response output for non-AJAX
+			$role = 'alert';
+
+			$submission = WPCF7_Submission::get_instance();
+
+			if ( $response = $submission->get_response() ) {
+				$content = esc_html( $response );
+			}
+
+			if ( $invalid_fields = $submission->get_invalid_fields() ) {
+				$content .= "\n" . '<ul>' . "\n";
+
+				foreach ( (array) $invalid_fields as $name => $field ) {
+					if ( $field['idref'] ) {
+						$link = sprintf( '<a href="#%1$s">%2$s</a>',
+							esc_attr( $field['idref'] ),
+							esc_html( $field['reason'] ) );
+						$content .= sprintf( '<li>%s</li>', $link );
+					} else {
+						$content .= sprintf( '<li>%s</li>',
+							esc_html( $field['reason'] ) );
+					}
+
+					$content .= "\n";
+				}
+
+				$content .= '</ul>' . "\n";
+			}
+		}
+
+		$atts = array(
+			'class' => trim( $class ),
+			'role' => trim( $role ) );
+
+		$atts = wpcf7_format_atts( $atts );
+
+		$output = sprintf( '<div %1$s>%2$s</div>',
+			$atts, $content );
+
+		return $output;
+	}
+
+	public function validation_error( $name ) {
+		$error = '';
+
+		if ( $this->is_posted() ) {
+			$submission = WPCF7_Submission::get_instance();
+
+			if ( $invalid_field = $submission->get_invalid_field( $name ) ) {
+				$error = trim( $invalid_field['reason'] );
+			}
+		}
+
+		if ( ! $error ) {
+			return $error;
+		}
+
+		$error = sprintf(
+			'<span role="alert" class="wpcf7-not-valid-tip">%s</span>',
+			esc_html( $error ) );
+
+		return apply_filters( 'wpcf7_validation_error', $error, $name, $this );
+	}
+
+	/* Form Elements */
+
+	public function replace_all_form_tags() {
+		$manager = WPCF7_FormTagsManager::get_instance();
+		$form = $this->prop( 'form' );
+
+		if ( wpcf7_autop_or_not() ) {
+			$form = $manager->normalize( $form );
+			$form = wpcf7_autop( $form );
+		}
+
+		$form = $manager->replace_all( $form );
+		$this->scanned_form_tags = $manager->get_scanned_tags();
+
+		return $form;
+	}
+
+	public function form_do_shortcode() {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_ContactForm::replace_all_form_tags' );
+
+		return $this->replace_all_form_tags();
+	}
+
+	public function scan_form_tags( $cond = null ) {
+		$manager = WPCF7_FormTagsManager::get_instance();
+
+		if ( empty( $this->scanned_form_tags ) ) {
+			$this->scanned_form_tags = $manager->scan( $this->prop( 'form' ) );
+		}
+
+		$tags = $this->scanned_form_tags;
+
+		return $manager->filter( $tags, $cond );
+	}
+
+	public function form_scan_shortcode( $cond = null ) {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_ContactForm::scan_form_tags' );
+
+		return $this->scan_form_tags( $cond );
+	}
+
+	public function form_elements() {
+		return apply_filters( 'wpcf7_form_elements',
+			$this->replace_all_form_tags() );
+	}
+
+	public function collect_mail_tags( $args = '' ) {
+		$manager = WPCF7_FormTagsManager::get_instance();
+
+		$args = wp_parse_args( $args, array(
+			'include' => array(),
+			'exclude' => $manager->collect_tag_types( 'not-for-mail' ),
+		) );
+
+		$tags = $this->scan_form_tags();
+		$mailtags = array();
+
+		foreach ( (array) $tags as $tag ) {
+			$type = $tag->basetype;
+
+			if ( empty( $type ) ) {
+				continue;
+			} elseif ( ! empty( $args['include'] ) ) {
+				if ( ! in_array( $type, $args['include'] ) ) {
+					continue;
+				}
+			} elseif ( ! empty( $args['exclude'] ) ) {
+				if ( in_array( $type, $args['exclude'] ) ) {
+					continue;
+				}
+			}
+
+			$mailtags[] = $tag->name;
+		}
+
+		$mailtags = array_unique( array_filter( $mailtags ) );
+
+		return apply_filters( 'wpcf7_collect_mail_tags', $mailtags, $args, $this );
+	}
+
+	public function suggest_mail_tags( $for = 'mail' ) {
+		$mail = wp_parse_args( $this->prop( $for ),
+			array(
+				'active' => false,
+				'recipient' => '',
+				'sender' => '',
+				'subject' => '',
+				'body' => '',
+				'additional_headers' => '',
+				'attachments' => '',
+				'use_html' => false,
+				'exclude_blank' => false,
+			)
+		);
+
+		$mail = array_filter( $mail );
+
+		foreach ( (array) $this->collect_mail_tags() as $mail_tag ) {
+			$pattern = sprintf( '/\[(_[a-z]+_)?%s([ \t]+[^]]+)?\]/',
+				preg_quote( $mail_tag, '/' ) );
+			$used = preg_grep( $pattern, $mail );
+
+			echo sprintf(
+				'<span class="%1$s">[%2$s]</span>',
+				'mailtag code ' . ( $used ? 'used' : 'unused' ),
+				esc_html( $mail_tag ) );
+		}
+	}
+
+	public function submit( $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'skip_mail' =>
+				( $this->in_demo_mode()
+				|| $this->is_true( 'skip_mail' )
+				|| ! empty( $this->skip_mail ) ),
+		) );
+
+		if ( $this->is_true( 'subscribers_only' )
+		&& ! current_user_can( 'wpcf7_submit', $this->id() ) ) {
+			$result = array(
+				'contact_form_id' => $this->id(),
+				'status' => 'error',
+				'message' => __(
+					"This contact form is available only for logged in users.",
+					'contact-form-7' ),
+			);
+
+			return $result;
+		}
+
+		$submission = WPCF7_Submission::get_instance( $this, array(
+			'skip_mail' => $args['skip_mail'],
+		) );
+
+		$result = array(
+			'contact_form_id' => $this->id(),
+			'status' => $submission->get_status(),
+			'message' => $submission->get_response(),
+			'demo_mode' => $this->in_demo_mode(),
+		);
+
+		if ( $submission->is( 'validation_failed' ) ) {
+			$result['invalid_fields'] = $submission->get_invalid_fields();
+		}
+
+		do_action( 'wpcf7_submit', $this, $result );
+
+		return $result;
+	}
+
+	/* Message */
+
+	public function message( $status, $filter = true ) {
+		$messages = $this->prop( 'messages' );
+		$message = isset( $messages[$status] ) ? $messages[$status] : '';
+
+		if ( $filter ) {
+			$message = $this->filter_message( $message, $status );
+		}
+
+		return $message;
+	}
+
+	public function filter_message( $message, $status = '' ) {
+		$message = wp_strip_all_tags( $message );
+		$message = wpcf7_mail_replace_tags( $message, array( 'html' => true ) );
+		$message = apply_filters( 'wpcf7_display_message', $message, $status );
+
+		return $message;
+	}
+
+	/* Additional settings */
+
+	public function additional_setting( $name, $max = 1 ) {
+		$settings = (array) explode( "\n", $this->prop( 'additional_settings' ) );
+
+		$pattern = '/^([a-zA-Z0-9_]+)[\t ]*:(.*)$/';
+		$count = 0;
+		$values = array();
+
+		foreach ( $settings as $setting ) {
+			if ( preg_match( $pattern, $setting, $matches ) ) {
+				if ( $matches[1] != $name ) {
+					continue;
+				}
+
+				if ( ! $max || $count < (int) $max ) {
+					$values[] = trim( $matches[2] );
+					$count += 1;
+				}
+			}
+		}
+
+		return $values;
+	}
+
+	public function is_true( $name ) {
+		$settings = $this->additional_setting( $name, false );
+
+		foreach ( $settings as $setting ) {
+			if ( in_array( $setting, array( 'on', 'true', '1' ) ) ) {
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	public function in_demo_mode() {
+		return $this->is_true( 'demo_mode' );
+	}
+
+	public function nonce_is_active() {
+		$is_active = WPCF7_VERIFY_NONCE;
+
+		if ( $this->is_true( 'subscribers_only' ) ) {
+			$is_active = true;
+		}
+
+		return (bool) apply_filters( 'wpcf7_verify_nonce', $is_active, $this );
+	}
+
+	/* Upgrade */
+
+	private function upgrade() {
+		$mail = $this->prop( 'mail' );
+
+		if ( is_array( $mail ) && ! isset( $mail['recipient'] ) ) {
+			$mail['recipient'] = get_option( 'admin_email' );
+		}
+
+		$this->properties['mail'] = $mail;
+
+		$messages = $this->prop( 'messages' );
+
+		if ( is_array( $messages ) ) {
+			foreach ( wpcf7_messages() as $key => $arr ) {
+				if ( ! isset( $messages[$key] ) ) {
+					$messages[$key] = $arr['default'];
+				}
+			}
+		}
+
+		$this->properties['messages'] = $messages;
+	}
+
+	/* Save */
+
+	public function save() {
+		$props = $this->get_properties();
+
+		$post_content = implode( "\n", wpcf7_array_flatten( $props ) );
+
+		if ( $this->initial() ) {
+			$post_id = wp_insert_post( array(
+				'post_type' => self::post_type,
+				'post_status' => 'publish',
+				'post_title' => $this->title,
+				'post_content' => trim( $post_content ),
+			) );
+		} else {
+			$post_id = wp_update_post( array(
+				'ID' => (int) $this->id,
+				'post_status' => 'publish',
+				'post_title' => $this->title,
+				'post_content' => trim( $post_content ),
+			) );
+		}
+
+		if ( $post_id ) {
+			foreach ( $props as $prop => $value ) {
+				update_post_meta( $post_id, '_' . $prop,
+					wpcf7_normalize_newline_deep( $value ) );
+			}
+
+			if ( wpcf7_is_valid_locale( $this->locale ) ) {
+				update_post_meta( $post_id, '_locale', $this->locale );
+			}
+
+			if ( $this->initial() ) {
+				$this->id = $post_id;
+				do_action( 'wpcf7_after_create', $this );
+			} else {
+				do_action( 'wpcf7_after_update', $this );
+			}
+
+			do_action( 'wpcf7_after_save', $this );
+		}
+
+		return $post_id;
+	}
+
+	public function copy() {
+		$new = new self;
+		$new->title = $this->title . '_copy';
+		$new->locale = $this->locale;
+		$new->properties = $this->properties;
+
+		return apply_filters( 'wpcf7_copy', $new, $this );
+	}
+
+	public function delete() {
+		if ( $this->initial() ) {
+			return;
+		}
+
+		if ( wp_delete_post( $this->id, true ) ) {
+			$this->id = 0;
+			return true;
+		}
+
+		return false;
+	}
+
+	public function shortcode( $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'use_old_format' => false ) );
+
+		$title = str_replace( array( '"', '[', ']' ), '', $this->title );
+
+		if ( $args['use_old_format'] ) {
+			$old_unit_id = (int) get_post_meta( $this->id, '_old_cf7_unit_id', true );
+
+			if ( $old_unit_id ) {
+				$shortcode = sprintf( '[contact-form %1$d "%2$s"]', $old_unit_id, $title );
+			} else {
+				$shortcode = '';
+			}
+		} else {
+			$shortcode = sprintf( '[contact-form-7 id="%1$d" title="%2$s"]',
+				$this->id, $title );
+		}
+
+		return apply_filters( 'wpcf7_contact_form_shortcode', $shortcode, $args, $this );
+	}
+}

+ 124 - 0
wp-content/plugins/contact-form-7/includes/controller.php

@@ -0,0 +1,124 @@
+<?php
+
+add_action( 'parse_request', 'wpcf7_control_init', 20 );
+
+function wpcf7_control_init() {
+	if ( WPCF7_Submission::is_restful() ) {
+		return;
+	}
+
+	if ( isset( $_POST['_wpcf7'] ) ) {
+		$contact_form = wpcf7_contact_form( (int) $_POST['_wpcf7'] );
+
+		if ( $contact_form ) {
+			$contact_form->submit();
+		}
+	}
+}
+
+add_filter( 'widget_text', 'wpcf7_widget_text_filter', 9 );
+
+function wpcf7_widget_text_filter( $content ) {
+	$pattern = '/\[[\r\n\t ]*contact-form(-7)?[\r\n\t ].*?\]/';
+
+	if ( ! preg_match( $pattern, $content ) ) {
+		return $content;
+	}
+
+	$content = do_shortcode( $content );
+
+	return $content;
+}
+
+add_action( 'wp_enqueue_scripts', 'wpcf7_do_enqueue_scripts' );
+
+function wpcf7_do_enqueue_scripts() {
+	if ( wpcf7_load_js() ) {
+		wpcf7_enqueue_scripts();
+	}
+
+	if ( wpcf7_load_css() ) {
+		wpcf7_enqueue_styles();
+	}
+}
+
+function wpcf7_enqueue_scripts() {
+	$in_footer = true;
+
+	if ( 'header' === wpcf7_load_js() ) {
+		$in_footer = false;
+	}
+
+	wp_enqueue_script( 'contact-form-7',
+		wpcf7_plugin_url( 'includes/js/scripts.js' ),
+		array( 'jquery' ), WPCF7_VERSION, $in_footer );
+
+	$wpcf7 = array(
+		'apiSettings' => array(
+			'root' => esc_url_raw( rest_url( 'contact-form-7/v1' ) ),
+			'namespace' => 'contact-form-7/v1',
+		),
+		'recaptcha' => array(
+			'messages' => array(
+				'empty' =>
+					__( 'Please verify that you are not a robot.', 'contact-form-7' ),
+			),
+		),
+	);
+
+	if ( defined( 'WP_CACHE' ) && WP_CACHE ) {
+		$wpcf7['cached'] = 1;
+	}
+
+	if ( wpcf7_support_html5_fallback() ) {
+		$wpcf7['jqueryUi'] = 1;
+	}
+
+	wp_localize_script( 'contact-form-7', 'wpcf7', $wpcf7 );
+
+	do_action( 'wpcf7_enqueue_scripts' );
+}
+
+function wpcf7_script_is() {
+	return wp_script_is( 'contact-form-7' );
+}
+
+function wpcf7_enqueue_styles() {
+	wp_enqueue_style( 'contact-form-7',
+		wpcf7_plugin_url( 'includes/css/styles.css' ),
+		array(), WPCF7_VERSION, 'all' );
+
+	if ( wpcf7_is_rtl() ) {
+		wp_enqueue_style( 'contact-form-7-rtl',
+			wpcf7_plugin_url( 'includes/css/styles-rtl.css' ),
+			array(), WPCF7_VERSION, 'all' );
+	}
+
+	do_action( 'wpcf7_enqueue_styles' );
+}
+
+function wpcf7_style_is() {
+	return wp_style_is( 'contact-form-7' );
+}
+
+/* HTML5 Fallback */
+
+add_action( 'wp_enqueue_scripts', 'wpcf7_html5_fallback', 20 );
+
+function wpcf7_html5_fallback() {
+	if ( ! wpcf7_support_html5_fallback() ) {
+		return;
+	}
+
+	if ( wpcf7_script_is() ) {
+		wp_enqueue_script( 'jquery-ui-datepicker' );
+		wp_enqueue_script( 'jquery-ui-spinner' );
+	}
+
+	if ( wpcf7_style_is() ) {
+		wp_enqueue_style( 'jquery-ui-smoothness',
+			wpcf7_plugin_url(
+				'includes/js/jquery-ui/themes/smoothness/jquery-ui.min.css' ),
+			array(), '1.11.4', 'screen' );
+	}
+}

+ 12 - 0
wp-content/plugins/contact-form-7/includes/css/styles-rtl.css

@@ -0,0 +1,12 @@
+span.wpcf7-not-valid-tip {
+	direction: rtl;
+}
+
+.use-floating-validation-tip span.wpcf7-not-valid-tip {
+	left: auto;
+	right: 20%;
+}
+
+span.wpcf7-list-item {
+	margin: 0 1em 0 0;
+}

+ 110 - 0
wp-content/plugins/contact-form-7/includes/css/styles.css

@@ -0,0 +1,110 @@
+div.wpcf7 {
+	margin: 0;
+	padding: 0;
+}
+
+div.wpcf7 .screen-reader-response {
+	position: absolute;
+	overflow: hidden;
+	clip: rect(1px, 1px, 1px, 1px);
+	height: 1px;
+	width: 1px;
+	margin: 0;
+	padding: 0;
+	border: 0;
+}
+
+div.wpcf7-response-output {
+	margin: 2em 0.5em 1em;
+	padding: 0.2em 1em;
+	border: 2px solid #ff0000;
+}
+
+div.wpcf7-mail-sent-ok {
+	border: 2px solid #398f14;
+}
+
+div.wpcf7-mail-sent-ng,
+div.wpcf7-aborted {
+	border: 2px solid #ff0000;
+}
+
+div.wpcf7-spam-blocked {
+	border: 2px solid #ffa500;
+}
+
+div.wpcf7-validation-errors,
+div.wpcf7-acceptance-missing {
+	border: 2px solid #f7e700;
+}
+
+.wpcf7-form-control-wrap {
+	position: relative;
+}
+
+span.wpcf7-not-valid-tip {
+	color: #f00;
+	font-size: 1em;
+	font-weight: normal;
+	display: block;
+}
+
+.use-floating-validation-tip span.wpcf7-not-valid-tip {
+	position: absolute;
+	top: 20%;
+	left: 20%;
+	z-index: 100;
+	border: 1px solid #ff0000;
+	background: #fff;
+	padding: .2em .8em;
+}
+
+span.wpcf7-list-item {
+	display: inline-block;
+	margin: 0 0 0 1em;
+}
+
+span.wpcf7-list-item-label::before,
+span.wpcf7-list-item-label::after {
+	content: " ";
+}
+
+.wpcf7-display-none {
+	display: none;
+}
+
+div.wpcf7 .ajax-loader {
+	visibility: hidden;
+	display: inline-block;
+	background-image: url('../../images/ajax-loader.gif');
+	width: 16px;
+	height: 16px;
+	border: none;
+	padding: 0;
+	margin: 0 0 0 4px;
+	vertical-align: middle;
+}
+
+div.wpcf7 .ajax-loader.is-active {
+	visibility: visible;
+}
+
+div.wpcf7 div.ajax-error {
+	display: none;
+}
+
+div.wpcf7 .placeheld {
+	color: #888;
+}
+
+div.wpcf7 .wpcf7-recaptcha iframe {
+	margin-bottom: 0;
+}
+
+div.wpcf7 input[type="file"] {
+	cursor: pointer;
+}
+
+div.wpcf7 input[type="file"]:disabled {
+	cursor: default;
+}

+ 345 - 0
wp-content/plugins/contact-form-7/includes/form-tag.php

@@ -0,0 +1,345 @@
+<?php
+
+class WPCF7_FormTag implements ArrayAccess {
+
+	public $type;
+	public $basetype;
+	public $name = '';
+	public $options = array();
+	public $raw_values = array();
+	public $values = array();
+	public $pipes;
+	public $labels = array();
+	public $attr = '';
+	public $content = '';
+
+	public function __construct( $tag = array() ) {
+		if ( is_array( $tag ) || $tag instanceof self ) {
+			foreach ( $tag as $key => $value ) {
+				if ( property_exists( __CLASS__, $key ) ) {
+					$this->{$key} = $value;
+				}
+			}
+		}
+	}
+
+	public function is_required() {
+		return ( '*' == substr( $this->type, -1 ) );
+	}
+
+	public function has_option( $opt ) {
+		$pattern = sprintf( '/^%s(:.+)?$/i', preg_quote( $opt, '/' ) );
+		return (bool) preg_grep( $pattern, $this->options );
+	}
+
+	public function get_option( $opt, $pattern = '', $single = false ) {
+		$preset_patterns = array(
+			'date' => '([0-9]{4}-[0-9]{2}-[0-9]{2}|today(.*))',
+			'int' => '[0-9]+',
+			'signed_int' => '-?[0-9]+',
+			'class' => '[-0-9a-zA-Z_]+',
+			'id' => '[-0-9a-zA-Z_]+',
+		);
+
+		if ( isset( $preset_patterns[$pattern] ) ) {
+			$pattern = $preset_patterns[$pattern];
+		}
+
+		if ( '' == $pattern ) {
+			$pattern = '.+';
+		}
+
+		$pattern = sprintf( '/^%s:%s$/i', preg_quote( $opt, '/' ), $pattern );
+
+		if ( $single ) {
+			$matches = $this->get_first_match_option( $pattern );
+
+			if ( ! $matches ) {
+				return false;
+			}
+
+			return substr( $matches[0], strlen( $opt ) + 1 );
+		} else {
+			$matches_a = $this->get_all_match_options( $pattern );
+
+			if ( ! $matches_a ) {
+				return false;
+			}
+
+			$results = array();
+
+			foreach ( $matches_a as $matches ) {
+				$results[] = substr( $matches[0], strlen( $opt ) + 1 );
+			}
+
+			return $results;
+		}
+	}
+
+	public function get_id_option() {
+		return $this->get_option( 'id', 'id', true );
+	}
+
+	public function get_class_option( $default = '' ) {
+		if ( is_string( $default ) ) {
+			$default = explode( ' ', $default );
+		}
+
+		$options = array_merge(
+			(array) $default,
+			(array) $this->get_option( 'class', 'class' ) );
+
+		$options = array_filter( array_unique( $options ) );
+
+		return implode( ' ', $options );
+	}
+
+	public function get_size_option( $default = '' ) {
+		$option = $this->get_option( 'size', 'int', true );
+
+		if ( $option ) {
+			return $option;
+		}
+
+		$matches_a = $this->get_all_match_options( '%^([0-9]*)/[0-9]*$%' );
+
+		foreach ( (array) $matches_a as $matches ) {
+			if ( isset( $matches[1] ) && '' !== $matches[1] ) {
+				return $matches[1];
+			}
+		}
+
+		return $default;
+	}
+
+	public function get_maxlength_option( $default = '' ) {
+		$option = $this->get_option( 'maxlength', 'int', true );
+
+		if ( $option ) {
+			return $option;
+		}
+
+		$matches_a = $this->get_all_match_options(
+			'%^(?:[0-9]*x?[0-9]*)?/([0-9]+)$%' );
+
+		foreach ( (array) $matches_a as $matches ) {
+			if ( isset( $matches[1] ) && '' !== $matches[1] ) {
+				return $matches[1];
+			}
+		}
+
+		return $default;
+	}
+
+	public function get_minlength_option( $default = '' ) {
+		$option = $this->get_option( 'minlength', 'int', true );
+
+		if ( $option ) {
+			return $option;
+		} else {
+			return $default;
+		}
+	}
+
+	public function get_cols_option( $default = '' ) {
+		$option = $this->get_option( 'cols', 'int', true );
+
+		if ( $option ) {
+			return $option;
+		}
+
+		$matches_a = $this->get_all_match_options(
+			'%^([0-9]*)x([0-9]*)(?:/[0-9]+)?$%' );
+
+		foreach ( (array) $matches_a as $matches ) {
+			if ( isset( $matches[1] ) && '' !== $matches[1] ) {
+				return $matches[1];
+			}
+		}
+
+		return $default;
+	}
+
+	public function get_rows_option( $default = '' ) {
+		$option = $this->get_option( 'rows', 'int', true );
+
+		if ( $option ) {
+			return $option;
+		}
+
+		$matches_a = $this->get_all_match_options(
+			'%^([0-9]*)x([0-9]*)(?:/[0-9]+)?$%' );
+
+		foreach ( (array) $matches_a as $matches ) {
+			if ( isset( $matches[2] ) && '' !== $matches[2] ) {
+				return $matches[2];
+			}
+		}
+
+		return $default;
+	}
+
+	public function get_date_option( $opt ) {
+		$option = $this->get_option( $opt, 'date', true );
+
+		if ( preg_match( '/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $option ) ) {
+			return $option;
+		}
+
+		if ( preg_match( '/^today(?:([+-][0-9]+)([a-z]*))?/', $option, $matches ) ) {
+			$number = isset( $matches[1] ) ? (int) $matches[1] : 0;
+			$unit = isset( $matches[2] ) ? $matches[2] : '';
+
+			if ( ! preg_match( '/^(day|month|year|week)s?$/', $unit ) ) {
+				$unit = 'days';
+			}
+
+			$date = gmdate( 'Y-m-d',
+				strtotime( sprintf( 'today %1$s %2$s', $number, $unit ) ) );
+			return $date;
+		}
+
+		return false;
+	}
+
+	public function get_default_option( $default = '', $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'multiple' => false ) );
+
+		$options = (array) $this->get_option( 'default' );
+		$values = array();
+
+		if ( empty( $options ) ) {
+			return $args['multiple'] ? $values : $default;
+		}
+
+		foreach ( $options as $opt ) {
+			$opt = sanitize_key( $opt );
+
+			if ( 'user_' == substr( $opt, 0, 5 ) && is_user_logged_in() ) {
+				$primary_props = array( 'user_login', 'user_email', 'user_url' );
+				$opt = in_array( $opt, $primary_props ) ? $opt : substr( $opt, 5 );
+
+				$user = wp_get_current_user();
+				$user_prop = $user->get( $opt );
+
+				if ( ! empty( $user_prop ) ) {
+					if ( $args['multiple'] ) {
+						$values[] = $user_prop;
+					} else {
+						return $user_prop;
+					}
+				}
+
+			} elseif ( 'post_meta' == $opt && in_the_loop() ) {
+				if ( $args['multiple'] ) {
+					$values = array_merge( $values,
+						get_post_meta( get_the_ID(), $this->name ) );
+				} else {
+					$val = (string) get_post_meta( get_the_ID(), $this->name, true );
+
+					if ( strlen( $val ) ) {
+						return $val;
+					}
+				}
+
+			} elseif ( 'get' == $opt && isset( $_GET[$this->name] ) ) {
+				$vals = (array) $_GET[$this->name];
+				$vals = array_map( 'wpcf7_sanitize_query_var', $vals );
+
+				if ( $args['multiple'] ) {
+					$values = array_merge( $values, $vals );
+				} else {
+					$val = isset( $vals[0] ) ? (string) $vals[0] : '';
+
+					if ( strlen( $val ) ) {
+						return $val;
+					}
+				}
+
+			} elseif ( 'post' == $opt && isset( $_POST[$this->name] ) ) {
+				$vals = (array) $_POST[$this->name];
+				$vals = array_map( 'wpcf7_sanitize_query_var', $vals );
+
+				if ( $args['multiple'] ) {
+					$values = array_merge( $values, $vals );
+				} else {
+					$val = isset( $vals[0] ) ? (string) $vals[0] : '';
+
+					if ( strlen( $val ) ) {
+						return $val;
+					}
+				}
+
+			} elseif ( 'shortcode_attr' == $opt ) {
+				if ( $contact_form = WPCF7_ContactForm::get_current() ) {
+					$val = $contact_form->shortcode_attr( $this->name );
+
+					if ( strlen( $val ) ) {
+						if ( $args['multiple'] ) {
+							$values[] = $val;
+						} else {
+							return $val;
+						}
+					}
+				}
+			}
+		}
+
+		if ( $args['multiple'] ) {
+			$values = array_unique( $values );
+			return $values;
+		} else {
+			return $default;
+		}
+	}
+
+	public function get_data_option( $args = '' ) {
+		$options = (array) $this->get_option( 'data' );
+
+		return apply_filters( 'wpcf7_form_tag_data_option', null, $options, $args );
+	}
+
+	public function get_first_match_option( $pattern ) {
+		foreach( (array) $this->options as $option ) {
+			if ( preg_match( $pattern, $option, $matches ) ) {
+				return $matches;
+			}
+		}
+
+		return false;
+	}
+
+	public function get_all_match_options( $pattern ) {
+		$result = array();
+
+		foreach( (array) $this->options as $option ) {
+			if ( preg_match( $pattern, $option, $matches ) ) {
+				$result[] = $matches;
+			}
+		}
+
+		return $result;
+	}
+
+	public function offsetSet( $offset, $value ) {
+		if ( property_exists( __CLASS__, $offset ) ) {
+			$this->{$offset} = $value;
+		}
+	}
+
+	public function offsetGet( $offset ) {
+		if ( property_exists( __CLASS__, $offset ) ) {
+			return $this->{$offset};
+		}
+
+		return null;
+	}
+
+	public function offsetExists( $offset ) {
+		return property_exists( __CLASS__, $offset );
+	}
+
+	public function offsetUnset( $offset ) {
+	}
+}

+ 366 - 0
wp-content/plugins/contact-form-7/includes/form-tags-manager.php

@@ -0,0 +1,366 @@
+<?php
+
+function wpcf7_add_form_tag( $tag, $func, $features = '' ) {
+	$manager = WPCF7_FormTagsManager::get_instance();
+
+	return $manager->add( $tag, $func, $features );
+}
+
+function wpcf7_remove_form_tag( $tag ) {
+	$manager = WPCF7_FormTagsManager::get_instance();
+
+	return $manager->remove( $tag );
+}
+
+function wpcf7_replace_all_form_tags( $content ) {
+	$manager = WPCF7_FormTagsManager::get_instance();
+
+	return $manager->replace_all( $content );
+}
+
+function wpcf7_scan_form_tags( $cond = null ) {
+	$contact_form = WPCF7_ContactForm::get_current();
+
+	if ( $contact_form ) {
+		return $contact_form->scan_form_tags( $cond );
+	}
+
+	return array();
+}
+
+function wpcf7_form_tag_supports( $tag, $feature ) {
+	$manager = WPCF7_FormTagsManager::get_instance();
+
+	return $manager->tag_type_supports( $tag, $feature );
+}
+
+class WPCF7_FormTagsManager {
+
+	private static $instance;
+
+	private $tag_types = array();
+	private $scanned_tags = null; // Tags scanned at the last time of scan()
+
+	private function __construct() {}
+
+	public static function get_instance() {
+		if ( empty( self::$instance ) ) {
+			self::$instance = new self;
+		}
+
+		return self::$instance;
+	}
+
+	public function get_scanned_tags() {
+		return $this->scanned_tags;
+	}
+
+	public function add( $tag, $func, $features = '' ) {
+		if ( ! is_callable( $func ) ) {
+			return;
+		}
+
+		if ( true === $features ) { // for back-compat
+			$features = array( 'name-attr' => true );
+		}
+
+		$features = wp_parse_args( $features, array() );
+
+		$tags = array_filter( array_unique( (array) $tag ) );
+
+		foreach ( $tags as $tag ) {
+			$tag = $this->sanitize_tag_type( $tag );
+
+			if ( ! $this->tag_type_exists( $tag ) ) {
+				$this->tag_types[$tag] = array(
+					'function' => $func,
+					'features' => $features,
+				);
+			}
+		}
+	}
+
+	public function tag_type_exists( $tag ) {
+		return isset( $this->tag_types[$tag] );
+	}
+
+	public function tag_type_supports( $tag, $feature ) {
+		$feature = array_filter( (array) $feature );
+
+		if ( isset( $this->tag_types[$tag]['features'] ) ) {
+			return (bool) array_intersect(
+				array_keys( array_filter( $this->tag_types[$tag]['features'] ) ),
+				$feature );
+		}
+
+		return false;
+	}
+
+	public function collect_tag_types( $feature = null, $invert = false ) {
+		$tag_types = array_keys( $this->tag_types );
+
+		if ( empty( $feature ) ) {
+			return $tag_types;
+		}
+
+		$output = array();
+
+		foreach ( $tag_types as $tag ) {
+			if ( ! $invert && $this->tag_type_supports( $tag, $feature )
+			|| $invert && ! $this->tag_type_supports( $tag, $feature ) ) {
+				$output[] = $tag;
+			}
+		}
+
+		return $output;
+	}
+
+	private function sanitize_tag_type( $tag ) {
+		$tag = preg_replace( '/[^a-zA-Z0-9_*]+/', '_', $tag );
+		$tag = rtrim( $tag, '_' );
+		$tag = strtolower( $tag );
+		return $tag;
+	}
+
+	public function remove( $tag ) {
+		unset( $this->tag_types[$tag] );
+	}
+
+	public function normalize( $content ) {
+		if ( empty( $this->tag_types ) ) {
+			return $content;
+		}
+
+		$content = preg_replace_callback(
+			'/' . $this->tag_regex() . '/s',
+			array( $this, 'normalize_callback' ),
+			$content );
+
+		return $content;
+	}
+
+	private function normalize_callback( $m ) {
+		// allow [[foo]] syntax for escaping a tag
+		if ( $m[1] == '[' && $m[6] == ']' ) {
+			return $m[0];
+		}
+
+		$tag = $m[2];
+
+		$attr = trim( preg_replace( '/[\r\n\t ]+/', ' ', $m[3] ) );
+		$attr = strtr( $attr, array( '<' => '&lt;', '>' => '&gt;' ) );
+
+		$content = trim( $m[5] );
+		$content = str_replace( "\n", '<WPPreserveNewline />', $content );
+
+		$result = $m[1] . '[' . $tag
+			. ( $attr ? ' ' . $attr : '' )
+			. ( $m[4] ? ' ' . $m[4] : '' )
+			. ']'
+			. ( $content ? $content . '[/' . $tag . ']' : '' )
+			. $m[6];
+
+		return $result;
+	}
+
+	public function replace_all( $content ) {
+		return $this->scan( $content, true );
+	}
+
+	public function scan( $content, $replace = false ) {
+		$this->scanned_tags = array();
+
+		if ( empty( $this->tag_types ) ) {
+			if ( $replace ) {
+				return $content;
+			} else {
+				return $this->scanned_tags;
+			}
+		}
+
+		if ( $replace ) {
+			$content = preg_replace_callback(
+				'/' . $this->tag_regex() . '/s',
+				array( $this, 'replace_callback' ),
+				$content );
+
+			return $content;
+		} else {
+			preg_replace_callback(
+				'/' . $this->tag_regex() . '/s',
+				array( $this, 'scan_callback' ),
+				$content );
+
+			return $this->scanned_tags;
+		}
+	}
+
+	public function filter( $input, $cond ) {
+		if ( is_array( $input ) ) {
+			$tags = $input;
+		} elseif ( is_string( $input ) ) {
+			$tags = $this->scan( $input );
+		} else {
+			$tags = $this->scanned_tags;
+		}
+
+		if ( empty( $tags ) ) {
+			return array();
+		}
+
+		$cond = wp_parse_args( $cond, array(
+			'type' => array(),
+			'name' => array(),
+			'feature' => '',
+		) );
+
+		$type = array_filter( (array) $cond['type'] );
+		$name = array_filter( (array) $cond['name'] );
+		$feature = is_string( $cond['feature'] ) ? trim( $cond['feature'] ) : '';
+
+		if ( '!' == substr( $feature, 0, 1 ) ) {
+			$feature_negative = true;
+			$feature = trim( substr( $feature, 1 ) );
+		} else {
+			$feature_negative = false;
+		}
+
+		$output = array();
+
+		foreach ( $tags as $tag ) {
+			$tag = new WPCF7_FormTag( $tag );
+
+			if ( $type && ! in_array( $tag->type, $type, true ) ) {
+				continue;
+			}
+
+			if ( $name && ! in_array( $tag->name, $name, true ) ) {
+				continue;
+			}
+
+			if ( $feature ) {
+				if ( ! $this->tag_type_supports( $tag->type, $feature )
+				&& ! $feature_negative ) {
+					continue;
+				} elseif ( $this->tag_type_supports( $tag->type, $feature )
+				&& $feature_negative ) {
+					continue;
+				}
+			}
+
+			$output[] = $tag;
+		}
+
+		return $output;
+	}
+
+	private function tag_regex() {
+		$tagnames = array_keys( $this->tag_types );
+		$tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
+
+		return '(\[?)'
+			. '\[(' . $tagregexp . ')(?:[\r\n\t ](.*?))?(?:[\r\n\t ](\/))?\]'
+			. '(?:([^[]*?)\[\/\2\])?'
+			. '(\]?)';
+	}
+
+	private function replace_callback( $m ) {
+		return $this->scan_callback( $m, true );
+	}
+
+	private function scan_callback( $m, $replace = false ) {
+		// allow [[foo]] syntax for escaping a tag
+		if ( $m[1] == '[' && $m[6] == ']' ) {
+			return substr( $m[0], 1, -1 );
+		}
+
+		$tag = $m[2];
+		$attr = $this->parse_atts( $m[3] );
+
+		$scanned_tag = array(
+			'type' => $tag,
+			'basetype' => trim( $tag, '*' ),
+			'name' => '',
+			'options' => array(),
+			'raw_values' => array(),
+			'values' => array(),
+			'pipes' => null,
+			'labels' => array(),
+			'attr' => '',
+			'content' => '',
+		);
+
+		if ( is_array( $attr ) ) {
+			if ( is_array( $attr['options'] ) ) {
+				if ( $this->tag_type_supports( $tag, 'name-attr' )
+				&& ! empty( $attr['options'] ) ) {
+					$scanned_tag['name'] = array_shift( $attr['options'] );
+
+					if ( ! wpcf7_is_name( $scanned_tag['name'] ) ) {
+						return $m[0]; // Invalid name is used. Ignore this tag.
+					}
+				}
+
+				$scanned_tag['options'] = (array) $attr['options'];
+			}
+
+			$scanned_tag['raw_values'] = (array) $attr['values'];
+
+			if ( WPCF7_USE_PIPE ) {
+				$pipes = new WPCF7_Pipes( $scanned_tag['raw_values'] );
+				$scanned_tag['values'] = $pipes->collect_befores();
+				$scanned_tag['pipes'] = $pipes;
+			} else {
+				$scanned_tag['values'] = $scanned_tag['raw_values'];
+			}
+
+			$scanned_tag['labels'] = $scanned_tag['values'];
+
+		} else {
+			$scanned_tag['attr'] = $attr;
+		}
+
+		$scanned_tag['values'] = array_map( 'trim', $scanned_tag['values'] );
+		$scanned_tag['labels'] = array_map( 'trim', $scanned_tag['labels'] );
+
+		$content = trim( $m[5] );
+		$content = preg_replace( "/<br[\r\n\t ]*\/?>$/m", '', $content );
+		$scanned_tag['content'] = $content;
+
+		$scanned_tag = apply_filters( 'wpcf7_form_tag', $scanned_tag, $replace );
+
+		$scanned_tag = new WPCF7_FormTag( $scanned_tag );
+
+		$this->scanned_tags[] = $scanned_tag;
+
+		if ( $replace ) {
+			$func = $this->tag_types[$tag]['function'];
+			return $m[1] . call_user_func( $func, $scanned_tag ) . $m[6];
+		} else {
+			return $m[0];
+		}
+	}
+
+	private function parse_atts( $text ) {
+		$atts = array( 'options' => array(), 'values' => array() );
+		$text = preg_replace( "/[\x{00a0}\x{200b}]+/u", " ", $text );
+		$text = stripcslashes( trim( $text ) );
+
+		$pattern = '%^([-+*=0-9a-zA-Z:.!?#$&@_/|\%\r\n\t ]*?)((?:[\r\n\t ]*"[^"]*"|[\r\n\t ]*\'[^\']*\')*)$%';
+
+		if ( preg_match( $pattern, $text, $match ) ) {
+			if ( ! empty( $match[1] ) ) {
+				$atts['options'] = preg_split( '/[\r\n\t ]+/', trim( $match[1] ) );
+			}
+
+			if ( ! empty( $match[2] ) ) {
+				preg_match_all( '/"[^"]*"|\'[^\']*\'/', $match[2], $matched_values );
+				$atts['values'] = wpcf7_strip_quote_deep( $matched_values[0] );
+			}
+		} else {
+			$atts = $text;
+		}
+
+		return $atts;
+	}
+}

+ 380 - 0
wp-content/plugins/contact-form-7/includes/formatting.php

@@ -0,0 +1,380 @@
+<?php
+
+function wpcf7_autop( $pee, $br = 1 ) {
+	if ( trim( $pee ) === '' ) {
+		return '';
+	}
+
+	$pee = $pee . "\n"; // just to make things a little easier, pad the end
+	$pee = preg_replace( '|<br />\s*<br />|', "\n\n", $pee );
+	// Space things out a little
+	/* wpcf7: remove select and input */
+	$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';
+	$pee = preg_replace( '!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee );
+	$pee = preg_replace( '!(</' . $allblocks . '>)!', "$1\n\n", $pee );
+
+	/* wpcf7: take care of [response], [recaptcha], and [hidden] tags */
+	$form_tags_manager = WPCF7_FormTagsManager::get_instance();
+	$block_hidden_form_tags = $form_tags_manager->collect_tag_types(
+		array( 'display-block', 'display-hidden' ) );
+	$block_hidden_form_tags = sprintf( '(?:%s)',
+		implode( '|', $block_hidden_form_tags ) );
+
+	$pee = preg_replace( '!(\[' . $block_hidden_form_tags . '[^]]*\])!',
+		"\n$1\n\n", $pee );
+
+	$pee = str_replace( array( "\r\n", "\r" ), "\n", $pee ); // cross-platform newlines
+
+	if ( strpos( $pee, '<object' ) !== false ) {
+		$pee = preg_replace( '|\s*<param([^>]*)>\s*|', "<param$1>", $pee ); // no pee inside object/embed
+		$pee = preg_replace( '|\s*</embed>\s*|', '</embed>', $pee );
+	}
+
+	$pee = preg_replace( "/\n\n+/", "\n\n", $pee ); // take care of duplicates
+	// make paragraphs, including one at the end
+	$pees = preg_split( '/\n\s*\n/', $pee, -1, PREG_SPLIT_NO_EMPTY );
+	$pee = '';
+
+	foreach ( $pees as $tinkle ) {
+		$pee .= '<p>' . trim( $tinkle, "\n" ) . "</p>\n";
+	}
+
+	$pee = preg_replace( '|<p>\s*</p>|', '', $pee ); // under certain strange conditions it could create a P of entirely whitespace
+	$pee = preg_replace( '!<p>([^<]+)</(div|address|form|fieldset)>!', "<p>$1</p></$2>", $pee );
+	$pee = preg_replace( '!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee ); // don't pee all over a tag
+	$pee = preg_replace( "|<p>(<li.+?)</p>|", "$1", $pee ); // problem with nested lists
+	$pee = preg_replace( '|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $pee );
+	$pee = str_replace( '</blockquote></p>', '</p></blockquote>', $pee );
+	$pee = preg_replace( '!<p>\s*(</?' . $allblocks . '[^>]*>)!', "$1", $pee );
+	$pee = preg_replace( '!(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee );
+
+	/* wpcf7: take care of [response], [recaptcha], and [hidden] tag */
+	$pee = preg_replace( '!<p>\s*(\[' . $block_hidden_form_tags . '[^]]*\])!',
+		"$1", $pee );
+	$pee = preg_replace( '!(\[' . $block_hidden_form_tags . '[^]]*\])\s*</p>!',
+		"$1", $pee );
+
+	if ( $br ) {
+		/* wpcf7: add textarea */
+		$pee = preg_replace_callback(
+			'/<(script|style|textarea).*?<\/\\1>/s',
+			'wpcf7_autop_preserve_newline_callback', $pee );
+		$pee = preg_replace( '|(?<!<br />)\s*\n|', "<br />\n", $pee ); // optionally make line breaks
+		$pee = str_replace( '<WPPreserveNewline />', "\n", $pee );
+
+		/* wpcf7: remove extra <br /> just added before [response], [recaptcha], and [hidden] tags */
+		$pee = preg_replace( '!<br />\n(\[' . $block_hidden_form_tags . '[^]]*\])!',
+			"\n$1", $pee );
+	}
+
+	$pee = preg_replace( '!(</?' . $allblocks . '[^>]*>)\s*<br />!', "$1", $pee );
+	$pee = preg_replace( '!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee );
+
+	if ( strpos( $pee, '<pre' ) !== false ) {
+		$pee = preg_replace_callback( '!(<pre[^>]*>)(.*?)</pre>!is',
+			'clean_pre', $pee );
+	}
+
+	$pee = preg_replace( "|\n</p>$|", '</p>', $pee );
+
+	return $pee;
+}
+
+function wpcf7_autop_preserve_newline_callback( $matches ) {
+	return str_replace( "\n", '<WPPreserveNewline />', $matches[0] );
+}
+
+function wpcf7_sanitize_query_var( $text ) {
+	$text = wp_unslash( $text );
+	$text = wp_check_invalid_utf8( $text );
+
+	if ( false !== strpos( $text, '<' ) ) {
+		$text = wp_pre_kses_less_than( $text );
+		$text = wp_strip_all_tags( $text );
+	}
+
+	$text = preg_replace( '/%[a-f0-9]{2}/i', '', $text );
+	$text = preg_replace( '/ +/', ' ', $text );
+	$text = trim( $text, ' ' );
+
+	return $text;
+}
+
+function wpcf7_strip_quote( $text ) {
+	$text = trim( $text );
+
+	if ( preg_match( '/^"(.*)"$/s', $text, $matches ) ) {
+		$text = $matches[1];
+	} elseif ( preg_match( "/^'(.*)'$/s", $text, $matches ) ) {
+		$text = $matches[1];
+	}
+
+	return $text;
+}
+
+function wpcf7_strip_quote_deep( $arr ) {
+	if ( is_string( $arr ) ) {
+		return wpcf7_strip_quote( $arr );
+	}
+
+	if ( is_array( $arr ) ) {
+		$result = array();
+
+		foreach ( $arr as $key => $text ) {
+			$result[$key] = wpcf7_strip_quote_deep( $text );
+		}
+
+		return $result;
+	}
+}
+
+function wpcf7_normalize_newline( $text, $to = "\n" ) {
+	if ( ! is_string( $text ) ) {
+		return $text;
+	}
+
+	$nls = array( "\r\n", "\r", "\n" );
+
+	if ( ! in_array( $to, $nls ) ) {
+		return $text;
+	}
+
+	return str_replace( $nls, $to, $text );
+}
+
+function wpcf7_normalize_newline_deep( $arr, $to = "\n" ) {
+	if ( is_array( $arr ) ) {
+		$result = array();
+
+		foreach ( $arr as $key => $text ) {
+			$result[$key] = wpcf7_normalize_newline_deep( $text, $to );
+		}
+
+		return $result;
+	}
+
+	return wpcf7_normalize_newline( $arr, $to );
+}
+
+function wpcf7_strip_newline( $str ) {
+	$str = (string) $str;
+	$str = str_replace( array( "\r", "\n" ), '', $str );
+	return trim( $str );
+}
+
+function wpcf7_canonicalize( $text, $strto = 'lower' ) {
+	if ( function_exists( 'mb_convert_kana' )
+	&& 'UTF-8' == get_option( 'blog_charset' ) ) {
+		$text = mb_convert_kana( $text, 'asKV', 'UTF-8' );
+	}
+
+	if ( 'lower' == $strto ) {
+		$text = strtolower( $text );
+	} elseif ( 'upper' == $strto ) {
+		$text = strtoupper( $text );
+	}
+
+	$text = trim( $text );
+	return $text;
+}
+
+/**
+ * Check whether a string is a valid NAME token.
+ *
+ * ID and NAME tokens must begin with a letter ([A-Za-z])
+ * and may be followed by any number of letters, digits ([0-9]),
+ * hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
+ *
+ * @see http://www.w3.org/TR/html401/types.html#h-6.2
+ *
+ * @return bool True if it is a valid name, false if not.
+ */
+function wpcf7_is_name( $string ) {
+	return preg_match( '/^[A-Za-z][-A-Za-z0-9_:.]*$/', $string );
+}
+
+function wpcf7_sanitize_unit_tag( $tag ) {
+	$tag = preg_replace( '/[^A-Za-z0-9_-]/', '', $tag );
+	return $tag;
+}
+
+function wpcf7_is_email( $email ) {
+	$result = is_email( $email );
+	return apply_filters( 'wpcf7_is_email', $result, $email );
+}
+
+function wpcf7_is_url( $url ) {
+	$result = ( false !== filter_var( $url, FILTER_VALIDATE_URL ) );
+	return apply_filters( 'wpcf7_is_url', $result, $url );
+}
+
+function wpcf7_is_tel( $tel ) {
+	$result = preg_match( '%^[+]?[0-9()/ -]*$%', $tel );
+	return apply_filters( 'wpcf7_is_tel', $result, $tel );
+}
+
+function wpcf7_is_number( $number ) {
+	$result = is_numeric( $number );
+	return apply_filters( 'wpcf7_is_number', $result, $number );
+}
+
+function wpcf7_is_date( $date ) {
+	$result = preg_match( '/^([0-9]{4,})-([0-9]{2})-([0-9]{2})$/', $date, $matches );
+
+	if ( $result ) {
+		$result = checkdate( $matches[2], $matches[3], $matches[1] );
+	}
+
+	return apply_filters( 'wpcf7_is_date', $result, $date );
+}
+
+function wpcf7_is_mailbox_list( $mailbox_list ) {
+	if ( ! is_array( $mailbox_list ) ) {
+		$mailbox_text = (string) $mailbox_list;
+		$mailbox_text = wp_unslash( $mailbox_text );
+
+		$mailbox_text = preg_replace( '/\\\\(?:\"|\')/', 'esc-quote',
+			$mailbox_text );
+
+		$mailbox_text = preg_replace( '/(?:\".*?\"|\'.*?\')/', 'quoted-string',
+			$mailbox_text );
+
+		$mailbox_list = explode( ',', $mailbox_text );
+	}
+
+	$addresses = array();
+
+	foreach ( $mailbox_list as $mailbox ) {
+		if ( ! is_string( $mailbox ) ) {
+			return false;
+		}
+
+		$mailbox = trim( $mailbox );
+
+		if ( preg_match( '/<(.+)>$/', $mailbox, $matches ) ) {
+			$addr_spec = $matches[1];
+		} else {
+			$addr_spec = $mailbox;
+		}
+
+		if ( ! wpcf7_is_email( $addr_spec ) ) {
+			return false;
+		}
+
+		$addresses[] = $addr_spec;
+	}
+
+	return $addresses;
+}
+
+function wpcf7_is_email_in_domain( $email, $domain ) {
+	$email_list = wpcf7_is_mailbox_list( $email );
+	$domain = strtolower( $domain );
+
+	foreach ( $email_list as $email ) {
+		$email_domain = substr( $email, strrpos( $email, '@' ) + 1 );
+		$email_domain = strtolower( $email_domain );
+		$domain_parts = explode( '.', $domain );
+
+		do {
+			$site_domain = implode( '.', $domain_parts );
+
+			if ( $site_domain == $email_domain ) {
+				continue 2;
+			}
+
+			array_shift( $domain_parts );
+		} while ( $domain_parts );
+
+		return false;
+	}
+
+	return true;
+}
+
+function wpcf7_is_email_in_site_domain( $email ) {
+	if ( wpcf7_is_localhost() ) {
+		return true;
+	}
+
+	$site_domain = strtolower( $_SERVER['SERVER_NAME'] );
+
+	if ( preg_match( '/^[0-9.]+$/', $site_domain ) ) { // 123.456.789.012
+		return true;
+	}
+
+	if ( wpcf7_is_email_in_domain( $email, $site_domain ) ) {
+		return true;
+	}
+
+	$home_url = home_url();
+
+	// for interoperability with WordPress MU Domain Mapping plugin
+	if ( is_multisite() && function_exists( 'domain_mapping_siteurl' ) ) {
+		$domain_mapping_siteurl = domain_mapping_siteurl( false );
+
+		if ( $domain_mapping_siteurl ) {
+			$home_url = $domain_mapping_siteurl;
+		}
+	}
+
+	if ( preg_match( '%^https?://([^/]+)%', $home_url, $matches ) ) {
+		$site_domain = strtolower( $matches[1] );
+
+		if ( $site_domain != strtolower( $_SERVER['SERVER_NAME'] )
+		&& wpcf7_is_email_in_domain( $email, $site_domain ) ) {
+			return true;
+		}
+	}
+
+	return false;
+}
+
+function wpcf7_antiscript_file_name( $filename ) {
+	$filename = basename( $filename );
+	$parts = explode( '.', $filename );
+
+	if ( count( $parts ) < 2 ) {
+		return $filename;
+	}
+
+	$script_pattern = '/^(php|phtml|pl|py|rb|cgi|asp|aspx)\d?$/i';
+
+	$filename = array_shift( $parts );
+	$extension = array_pop( $parts );
+
+	foreach ( (array) $parts as $part ) {
+		if ( preg_match( $script_pattern, $part ) ) {
+			$filename .= '.' . $part . '_';
+		} else {
+			$filename .= '.' . $part;
+		}
+	}
+
+	if ( preg_match( $script_pattern, $extension ) ) {
+		$filename .= '.' . $extension . '_.txt';
+	} else {
+		$filename .= '.' . $extension;
+	}
+
+	return $filename;
+}
+
+function wpcf7_mask_password( $text, $length_unmasked = 0 ) {
+	$length = strlen( $text );
+	$length_unmasked = absint( $length_unmasked );
+
+	if ( 0 == $length_unmasked ) {
+		if ( 9 < $length ) {
+			$length_unmasked = 4;
+		} elseif ( 3 < $length ) {
+			$length_unmasked = 2;
+		} else {
+			$length_unmasked = $length;
+		}
+	}
+
+	$text = substr( $text, 0 - $length_unmasked );
+	$text = str_pad( $text, $length, '*', STR_PAD_LEFT );
+	return $text;
+}

+ 370 - 0
wp-content/plugins/contact-form-7/includes/functions.php

@@ -0,0 +1,370 @@
+<?php
+
+function wpcf7_plugin_path( $path = '' ) {
+	return path_join( WPCF7_PLUGIN_DIR, trim( $path, '/' ) );
+}
+
+function wpcf7_plugin_url( $path = '' ) {
+	$url = plugins_url( $path, WPCF7_PLUGIN );
+
+	if ( is_ssl() && 'http:' == substr( $url, 0, 5 ) ) {
+		$url = 'https:' . substr( $url, 5 );
+	}
+
+	return $url;
+}
+
+function wpcf7_upload_dir( $type = false ) {
+	$uploads = wp_get_upload_dir();
+
+	$uploads = apply_filters( 'wpcf7_upload_dir', array(
+		'dir' => $uploads['basedir'],
+		'url' => $uploads['baseurl'],
+	) );
+
+	if ( 'dir' == $type ) {
+		return $uploads['dir'];
+	} if ( 'url' == $type ) {
+		return $uploads['url'];
+	}
+
+	return $uploads;
+}
+
+function wpcf7_verify_nonce( $nonce, $action = 'wp_rest' ) {
+	return wp_verify_nonce( $nonce, $action );
+}
+
+function wpcf7_create_nonce( $action = 'wp_rest' ) {
+	return wp_create_nonce( $action );
+}
+
+function wpcf7_blacklist_check( $target ) {
+	$mod_keys = trim( get_option( 'blacklist_keys' ) );
+
+	if ( empty( $mod_keys ) ) {
+		return false;
+	}
+
+	$words = explode( "\n", $mod_keys );
+
+	foreach ( (array) $words as $word ) {
+		$word = trim( $word );
+
+		if ( empty( $word ) || 256 < strlen( $word ) ) {
+			continue;
+		}
+
+		$pattern = sprintf( '#%s#i', preg_quote( $word, '#' ) );
+
+		if ( preg_match( $pattern, $target ) ) {
+			return true;
+		}
+	}
+
+	return false;
+}
+
+function wpcf7_array_flatten( $input ) {
+	if ( ! is_array( $input ) ) {
+		return array( $input );
+	}
+
+	$output = array();
+
+	foreach ( $input as $value ) {
+		$output = array_merge( $output, wpcf7_array_flatten( $value ) );
+	}
+
+	return $output;
+}
+
+function wpcf7_flat_join( $input ) {
+	$input = wpcf7_array_flatten( $input );
+	$output = array();
+
+	foreach ( (array) $input as $value ) {
+		$output[] = trim( (string) $value );
+	}
+
+	return implode( ', ', $output );
+}
+
+function wpcf7_support_html5() {
+	return (bool) apply_filters( 'wpcf7_support_html5', true );
+}
+
+function wpcf7_support_html5_fallback() {
+	return (bool) apply_filters( 'wpcf7_support_html5_fallback', false );
+}
+
+function wpcf7_use_really_simple_captcha() {
+	return apply_filters( 'wpcf7_use_really_simple_captcha',
+		WPCF7_USE_REALLY_SIMPLE_CAPTCHA );
+}
+
+function wpcf7_validate_configuration() {
+	return apply_filters( 'wpcf7_validate_configuration',
+		WPCF7_VALIDATE_CONFIGURATION );
+}
+
+function wpcf7_autop_or_not() {
+	return (bool) apply_filters( 'wpcf7_autop_or_not', WPCF7_AUTOP );
+}
+
+function wpcf7_load_js() {
+	return apply_filters( 'wpcf7_load_js', WPCF7_LOAD_JS );
+}
+
+function wpcf7_load_css() {
+	return apply_filters( 'wpcf7_load_css', WPCF7_LOAD_CSS );
+}
+
+function wpcf7_format_atts( $atts ) {
+	$html = '';
+
+	$prioritized_atts = array( 'type', 'name', 'value' );
+
+	foreach ( $prioritized_atts as $att ) {
+		if ( isset( $atts[$att] ) ) {
+			$value = trim( $atts[$att] );
+			$html .= sprintf( ' %s="%s"', $att, esc_attr( $value ) );
+			unset( $atts[$att] );
+		}
+	}
+
+	foreach ( $atts as $key => $value ) {
+		$key = strtolower( trim( $key ) );
+
+		if ( ! preg_match( '/^[a-z_:][a-z_:.0-9-]*$/', $key ) ) {
+			continue;
+		}
+
+		$value = trim( $value );
+
+		if ( '' !== $value ) {
+			$html .= sprintf( ' %s="%s"', $key, esc_attr( $value ) );
+		}
+	}
+
+	$html = trim( $html );
+
+	return $html;
+}
+
+function wpcf7_link( $url, $anchor_text, $args = '' ) {
+	$defaults = array(
+		'id' => '',
+		'class' => '',
+	);
+
+	$args = wp_parse_args( $args, $defaults );
+	$args = array_intersect_key( $args, $defaults );
+	$atts = wpcf7_format_atts( $args );
+
+	$link = sprintf( '<a href="%1$s"%3$s>%2$s</a>',
+		esc_url( $url ),
+		esc_html( $anchor_text ),
+		$atts ? ( ' ' . $atts ) : '' );
+
+	return $link;
+}
+
+function wpcf7_get_request_uri() {
+	static $request_uri = '';
+
+	if ( empty( $request_uri ) ) {
+		$request_uri = add_query_arg( array() );
+	}
+
+	return esc_url_raw( $request_uri );
+}
+
+function wpcf7_register_post_types() {
+	if ( class_exists( 'WPCF7_ContactForm' ) ) {
+		WPCF7_ContactForm::register_post_type();
+		return true;
+	} else {
+		return false;
+	}
+}
+
+function wpcf7_version( $args = '' ) {
+	$defaults = array(
+		'limit' => -1,
+		'only_major' => false,
+	);
+
+	$args = wp_parse_args( $args, $defaults );
+
+	if ( $args['only_major'] ) {
+		$args['limit'] = 2;
+	}
+
+	$args['limit'] = (int) $args['limit'];
+
+	$ver = WPCF7_VERSION;
+	$ver = strtr( $ver, '_-+', '...' );
+	$ver = preg_replace( '/[^0-9.]+/', ".$0.", $ver );
+	$ver = preg_replace( '/[.]+/', ".", $ver );
+	$ver = trim( $ver, '.' );
+	$ver = explode( '.', $ver );
+
+	if ( -1 < $args['limit'] ) {
+		$ver = array_slice( $ver, 0, $args['limit'] );
+	}
+
+	$ver = implode( '.', $ver );
+
+	return $ver;
+}
+
+function wpcf7_version_grep( $version, array $input ) {
+	$pattern = '/^' . preg_quote( (string) $version, '/' ) . '(?:\.|$)/';
+
+	return preg_grep( $pattern, $input );
+}
+
+function wpcf7_enctype_value( $enctype ) {
+	$enctype = trim( $enctype );
+
+	if ( empty( $enctype ) ) {
+		return '';
+	}
+
+	$valid_enctypes = array(
+		'application/x-www-form-urlencoded',
+		'multipart/form-data',
+		'text/plain',
+	);
+
+	if ( in_array( $enctype, $valid_enctypes ) ) {
+		return $enctype;
+	}
+
+	$pattern = '%^enctype="(' . implode( '|', $valid_enctypes ) . ')"$%';
+
+	if ( preg_match( $pattern, $enctype, $matches ) ) {
+		return $matches[1]; // for back-compat
+	}
+
+	return '';
+}
+
+function wpcf7_rmdir_p( $dir ) {
+	if ( is_file( $dir ) ) {
+		if ( ! $result = unlink( $dir ) ) {
+			$stat = stat( $dir );
+			$perms = $stat['mode'];
+			chmod( $dir, $perms | 0200 ); // add write for owner
+
+			if ( ! $result = unlink( $dir ) ) {
+				chmod( $dir, $perms );
+			}
+		}
+
+		return $result;
+	}
+
+	if ( ! is_dir( $dir ) ) {
+		return false;
+	}
+
+	if ( $handle = opendir( $dir ) ) {
+		while ( false !== ( $file = readdir( $handle ) ) ) {
+			if ( $file == "." || $file == ".." ) {
+				continue;
+			}
+
+			wpcf7_rmdir_p( path_join( $dir, $file ) );
+		}
+
+		closedir( $handle );
+	}
+
+	if ( false !== ( $files = scandir( $dir ) )
+	&& ! array_diff( $files, array( '.', '..' ) ) ) {
+		return rmdir( $dir );
+	}
+
+	return false;
+}
+
+/* From _http_build_query in wp-includes/functions.php */
+function wpcf7_build_query( $args, $key = '' ) {
+	$sep = '&';
+	$ret = array();
+
+	foreach ( (array) $args as $k => $v ) {
+		$k = urlencode( $k );
+
+		if ( ! empty( $key ) ) {
+			$k = $key . '%5B' . $k . '%5D';
+		}
+
+		if ( null === $v ) {
+			continue;
+		} elseif ( false === $v ) {
+			$v = '0';
+		}
+
+		if ( is_array( $v ) || is_object( $v ) ) {
+			array_push( $ret, wpcf7_build_query( $v, $k ) );
+		} else {
+			array_push( $ret, $k . '=' . urlencode( $v ) );
+		}
+	}
+
+	return implode( $sep, $ret );
+}
+
+/**
+ * Returns the number of code units in a string.
+ *
+ * @see http://www.w3.org/TR/html5/infrastructure.html#code-unit-length
+ *
+ * @return int|bool The number of code units, or false if mb_convert_encoding is not available.
+ */
+function wpcf7_count_code_units( $string ) {
+	static $use_mb = null;
+
+	if ( is_null( $use_mb ) ) {
+		$use_mb = function_exists( 'mb_convert_encoding' );
+	}
+
+	if ( ! $use_mb ) {
+		return false;
+	}
+
+	$string = (string) $string;
+	$string = str_replace( "\r\n", "\n", $string );
+
+	$encoding = mb_detect_encoding( $string, mb_detect_order(), true );
+
+	if ( $encoding ) {
+		$string = mb_convert_encoding( $string, 'UTF-16', $encoding );
+	} else {
+		$string = mb_convert_encoding( $string, 'UTF-16', 'UTF-8' );
+	}
+
+	$byte_count = mb_strlen( $string, '8bit' );
+
+	return floor( $byte_count / 2 );
+}
+
+function wpcf7_is_localhost() {
+	$server_name = strtolower( $_SERVER['SERVER_NAME'] );
+	return in_array( $server_name, array( 'localhost', '127.0.0.1' ) );
+}
+
+function wpcf7_deprecated_function( $function, $version, $replacement ) {
+	$trigger_error = apply_filters( 'deprecated_function_trigger_error', true );
+
+	if ( WP_DEBUG && $trigger_error ) {
+		if ( function_exists( '__' ) ) {
+			trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ), $function, $version, $replacement ) );
+		} else {
+			trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', $function, $version, $replacement ) );
+		}
+	}
+}

+ 135 - 0
wp-content/plugins/contact-form-7/includes/integration.php

@@ -0,0 +1,135 @@
+<?php
+
+class WPCF7_Integration {
+
+	private static $instance;
+
+	private $services = array();
+	private $categories = array();
+
+	private function __construct() {}
+
+	public static function get_instance() {
+		if ( empty( self::$instance ) ) {
+			self::$instance = new self;
+		}
+
+		return self::$instance;
+	}
+
+	public function add_service( $name, WPCF7_Service $service ) {
+		$name = sanitize_key( $name );
+
+		if ( empty( $name ) || isset( $this->services[$name] ) ) {
+			return false;
+		}
+
+		$this->services[$name] = $service;
+	}
+
+	public function add_category( $name, $title ) {
+		$name = sanitize_key( $name );
+
+		if ( empty( $name ) || isset( $this->categories[$name] ) ) {
+			return false;
+		}
+
+		$this->categories[$name] = $title;
+	}
+
+	public function service_exists( $name = '' ) {
+		if ( '' == $name ) {
+			return (bool) count( $this->services );
+		} else {
+			return isset( $this->services[$name] );
+		}
+	}
+
+	public function get_service( $name ) {
+		if ( $this->service_exists( $name ) ) {
+			return $this->services[$name];
+		} else {
+			return false;
+		}
+	}
+
+	public function list_services( $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'include' => array(),
+		) );
+
+		$singular = false;
+		$services = (array) $this->services;
+
+		if ( ! empty( $args['include'] ) ) {
+			$services = array_intersect_key( $services,
+				array_flip( (array) $args['include'] ) );
+
+			if ( 1 == count( $services ) ) {
+				$singular = true;
+			}
+		}
+
+		if ( empty( $services ) ) {
+			return;
+		}
+
+		$action = wpcf7_current_action();
+
+		foreach ( $services as $name => $service ) {
+			$cats = array_intersect_key( $this->categories,
+				array_flip( $service->get_categories() ) );
+?>
+<div class="card<?php echo $service->is_active() ? ' active' : ''; ?>" id="<?php echo esc_attr( $name ); ?>">
+<?php $service->icon(); ?>
+<h2 class="title"><?php echo esc_html( $service->get_title() ); ?></h2>
+<div class="infobox">
+<?php echo esc_html( implode( ', ', $cats ) ); ?>
+<br />
+<?php $service->link(); ?>
+</div>
+<br class="clear" />
+
+<div class="inside">
+<?php
+			if ( $singular ) {
+				$service->display( $action );
+			} else {
+				$service->display();
+			}
+?>
+</div>
+</div>
+<?php
+		}
+	}
+
+}
+
+abstract class WPCF7_Service {
+
+	abstract public function get_title();
+	abstract public function is_active();
+
+	public function get_categories() {
+		return array();
+	}
+
+	public function icon() {
+		return '';
+	}
+
+	public function link() {
+		return '';
+	}
+
+	public function load( $action = '' ) {
+	}
+
+	public function display( $action = '' ) {
+	}
+
+	public function admin_notice( $message = '' ) {
+	}
+
+}

BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_2e83ff_256x240.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_454545_256x240.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_888888_256x240.png


BIN
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png


File diff suppressed because it is too large
+ 1225 - 0
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.css


File diff suppressed because it is too large
+ 7 - 0
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/jquery-ui.min.css


File diff suppressed because it is too large
+ 410 - 0
wp-content/plugins/contact-form-7/includes/js/jquery-ui/themes/smoothness/theme.css


+ 529 - 0
wp-content/plugins/contact-form-7/includes/js/scripts.js

@@ -0,0 +1,529 @@
+( function( $ ) {
+
+	'use strict';
+
+	if ( typeof wpcf7 === 'undefined' || wpcf7 === null ) {
+		return;
+	}
+
+	wpcf7 = $.extend( {
+		cached: 0,
+		inputs: []
+	}, wpcf7 );
+
+	$( function() {
+		wpcf7.supportHtml5 = ( function() {
+			var features = {};
+			var input = document.createElement( 'input' );
+
+			features.placeholder = 'placeholder' in input;
+
+			var inputTypes = [ 'email', 'url', 'tel', 'number', 'range', 'date' ];
+
+			$.each( inputTypes, function( index, value ) {
+				input.setAttribute( 'type', value );
+				features[ value ] = input.type !== 'text';
+			} );
+
+			return features;
+		} )();
+
+		$( 'div.wpcf7 > form' ).each( function() {
+			var $form = $( this );
+			wpcf7.initForm( $form );
+
+			if ( wpcf7.cached ) {
+				wpcf7.refill( $form );
+			}
+		} );
+	} );
+
+	wpcf7.getId = function( form ) {
+		return parseInt( $( 'input[name="_wpcf7"]', form ).val(), 10 );
+	};
+
+	wpcf7.initForm = function( form ) {
+		var $form = $( form );
+
+		$form.submit( function( event ) {
+			if ( typeof window.FormData !== 'function' ) {
+				return;
+			}
+
+			wpcf7.submit( $form );
+			event.preventDefault();
+		} );
+
+		$( '.wpcf7-submit', $form ).after( '<span class="ajax-loader"></span>' );
+
+		wpcf7.toggleSubmit( $form );
+
+		$form.on( 'click', '.wpcf7-acceptance', function() {
+			wpcf7.toggleSubmit( $form );
+		} );
+
+		// Exclusive Checkbox
+		$( '.wpcf7-exclusive-checkbox', $form ).on( 'click', 'input:checkbox', function() {
+			var name = $( this ).attr( 'name' );
+			$form.find( 'input:checkbox[name="' + name + '"]' ).not( this ).prop( 'checked', false );
+		} );
+
+		// Free Text Option for Checkboxes and Radio Buttons
+		$( '.wpcf7-list-item.has-free-text', $form ).each( function() {
+			var $freetext = $( ':input.wpcf7-free-text', this );
+			var $wrap = $( this ).closest( '.wpcf7-form-control' );
+
+			if ( $( ':checkbox, :radio', this ).is( ':checked' ) ) {
+				$freetext.prop( 'disabled', false );
+			} else {
+				$freetext.prop( 'disabled', true );
+			}
+
+			$wrap.on( 'change', ':checkbox, :radio', function() {
+				var $cb = $( '.has-free-text', $wrap ).find( ':checkbox, :radio' );
+
+				if ( $cb.is( ':checked' ) ) {
+					$freetext.prop( 'disabled', false ).focus();
+				} else {
+					$freetext.prop( 'disabled', true );
+				}
+			} );
+		} );
+
+		// Placeholder Fallback
+		if ( ! wpcf7.supportHtml5.placeholder ) {
+			$( '[placeholder]', $form ).each( function() {
+				$( this ).val( $( this ).attr( 'placeholder' ) );
+				$( this ).addClass( 'placeheld' );
+
+				$( this ).focus( function() {
+					if ( $( this ).hasClass( 'placeheld' ) ) {
+						$( this ).val( '' ).removeClass( 'placeheld' );
+					}
+				} );
+
+				$( this ).blur( function() {
+					if ( '' === $( this ).val() ) {
+						$( this ).val( $( this ).attr( 'placeholder' ) );
+						$( this ).addClass( 'placeheld' );
+					}
+				} );
+			} );
+		}
+
+		if ( wpcf7.jqueryUi && ! wpcf7.supportHtml5.date ) {
+			$form.find( 'input.wpcf7-date[type="date"]' ).each( function() {
+				$( this ).datepicker( {
+					dateFormat: 'yy-mm-dd',
+					minDate: new Date( $( this ).attr( 'min' ) ),
+					maxDate: new Date( $( this ).attr( 'max' ) )
+				} );
+			} );
+		}
+
+		if ( wpcf7.jqueryUi && ! wpcf7.supportHtml5.number ) {
+			$form.find( 'input.wpcf7-number[type="number"]' ).each( function() {
+				$( this ).spinner( {
+					min: $( this ).attr( 'min' ),
+					max: $( this ).attr( 'max' ),
+					step: $( this ).attr( 'step' )
+				} );
+			} );
+		}
+
+		// Character Count
+		$( '.wpcf7-character-count', $form ).each( function() {
+			var $count = $( this );
+			var name = $count.attr( 'data-target-name' );
+			var down = $count.hasClass( 'down' );
+			var starting = parseInt( $count.attr( 'data-starting-value' ), 10 );
+			var maximum = parseInt( $count.attr( 'data-maximum-value' ), 10 );
+			var minimum = parseInt( $count.attr( 'data-minimum-value' ), 10 );
+
+			var updateCount = function( target ) {
+				var $target = $( target );
+				var length = $target.val().length;
+				var count = down ? starting - length : length;
+				$count.attr( 'data-current-value', count );
+				$count.text( count );
+
+				if ( maximum && maximum < length ) {
+					$count.addClass( 'too-long' );
+				} else {
+					$count.removeClass( 'too-long' );
+				}
+
+				if ( minimum && length < minimum ) {
+					$count.addClass( 'too-short' );
+				} else {
+					$count.removeClass( 'too-short' );
+				}
+			};
+
+			$( ':input[name="' + name + '"]', $form ).each( function() {
+				updateCount( this );
+
+				$( this ).keyup( function() {
+					updateCount( this );
+				} );
+			} );
+		} );
+
+		// URL Input Correction
+		$form.on( 'change', '.wpcf7-validates-as-url', function() {
+			var val = $.trim( $( this ).val() );
+
+			if ( val
+			&& ! val.match( /^[a-z][a-z0-9.+-]*:/i )
+			&& -1 !== val.indexOf( '.' ) ) {
+				val = val.replace( /^\/+/, '' );
+				val = 'http://' + val;
+			}
+
+			$( this ).val( val );
+		} );
+	};
+
+	wpcf7.submit = function( form ) {
+		if ( typeof window.FormData !== 'function' ) {
+			return;
+		}
+
+		var $form = $( form );
+
+		$( '.ajax-loader', $form ).addClass( 'is-active' );
+
+		$( '[placeholder].placeheld', $form ).each( function( i, n ) {
+			$( n ).val( '' );
+		} );
+
+		wpcf7.clearResponse( $form );
+
+		var formData = new FormData( $form.get( 0 ) );
+
+		var detail = {
+			id: $form.closest( 'div.wpcf7' ).attr( 'id' ),
+			status: 'init',
+			inputs: [],
+			formData: formData
+		};
+
+		$.each( $form.serializeArray(), function( i, field ) {
+			if ( '_wpcf7' == field.name ) {
+				detail.contactFormId = field.value;
+			} else if ( '_wpcf7_version' == field.name ) {
+				detail.pluginVersion = field.value;
+			} else if ( '_wpcf7_locale' == field.name ) {
+				detail.contactFormLocale = field.value;
+			} else if ( '_wpcf7_unit_tag' == field.name ) {
+				detail.unitTag = field.value;
+			} else if ( '_wpcf7_container_post' == field.name ) {
+				detail.containerPostId = field.value;
+			} else if ( field.name.match( /^_wpcf7_\w+_free_text_/ ) ) {
+				var owner = field.name.replace( /^_wpcf7_\w+_free_text_/, '' );
+				detail.inputs.push( {
+					name: owner + '-free-text',
+					value: field.value
+				} );
+			} else if ( field.name.match( /^_/ ) ) {
+				// do nothing
+			} else {
+				detail.inputs.push( field );
+			}
+		} );
+
+		wpcf7.triggerEvent( $form.closest( 'div.wpcf7' ), 'beforesubmit', detail );
+
+		var ajaxSuccess = function( data, status, xhr, $form ) {
+			detail.id = $( data.into ).attr( 'id' );
+			detail.status = data.status;
+			detail.apiResponse = data;
+
+			var $message = $( '.wpcf7-response-output', $form );
+
+			switch ( data.status ) {
+				case 'validation_failed':
+					$.each( data.invalidFields, function( i, n ) {
+						$( n.into, $form ).each( function() {
+							wpcf7.notValidTip( this, n.message );
+							$( '.wpcf7-form-control', this ).addClass( 'wpcf7-not-valid' );
+							$( '[aria-invalid]', this ).attr( 'aria-invalid', 'true' );
+						} );
+					} );
+
+					$message.addClass( 'wpcf7-validation-errors' );
+					$form.addClass( 'invalid' );
+
+					wpcf7.triggerEvent( data.into, 'invalid', detail );
+					break;
+				case 'acceptance_missing':
+					$message.addClass( 'wpcf7-acceptance-missing' );
+					$form.addClass( 'unaccepted' );
+
+					wpcf7.triggerEvent( data.into, 'unaccepted', detail );
+					break;
+				case 'spam':
+					$message.addClass( 'wpcf7-spam-blocked' );
+					$form.addClass( 'spam' );
+
+					$( '[name="g-recaptcha-response"]', $form ).each( function() {
+						if ( '' === $( this ).val() ) {
+							var $recaptcha = $( this ).closest( '.wpcf7-form-control-wrap' );
+							wpcf7.notValidTip( $recaptcha, wpcf7.recaptcha.messages.empty );
+						}
+					} );
+
+					wpcf7.triggerEvent( data.into, 'spam', detail );
+					break;
+				case 'aborted':
+					$message.addClass( 'wpcf7-aborted' );
+					$form.addClass( 'aborted' );
+
+					wpcf7.triggerEvent( data.into, 'aborted', detail );
+					break;
+				case 'mail_sent':
+					$message.addClass( 'wpcf7-mail-sent-ok' );
+					$form.addClass( 'sent' );
+
+					wpcf7.triggerEvent( data.into, 'mailsent', detail );
+					break;
+				case 'mail_failed':
+					$message.addClass( 'wpcf7-mail-sent-ng' );
+					$form.addClass( 'failed' );
+
+					wpcf7.triggerEvent( data.into, 'mailfailed', detail );
+					break;
+				default:
+					var customStatusClass = 'custom-'
+						+ data.status.replace( /[^0-9a-z]+/i, '-' );
+					$message.addClass( 'wpcf7-' + customStatusClass );
+					$form.addClass( customStatusClass );
+			}
+
+			wpcf7.refill( $form, data );
+
+			wpcf7.triggerEvent( data.into, 'submit', detail );
+
+			if ( 'mail_sent' == data.status ) {
+				$form.each( function() {
+					this.reset();
+				} );
+			}
+
+			$form.find( '[placeholder].placeheld' ).each( function( i, n ) {
+				$( n ).val( $( n ).attr( 'placeholder' ) );
+			} );
+
+			$message.html( '' ).append( data.message ).slideDown( 'fast' );
+			$message.attr( 'role', 'alert' );
+
+			$( '.screen-reader-response', $form.closest( '.wpcf7' ) ).each( function() {
+				var $response = $( this );
+				$response.html( '' ).attr( 'role', '' ).append( data.message );
+
+				if ( data.invalidFields ) {
+					var $invalids = $( '<ul></ul>' );
+
+					$.each( data.invalidFields, function( i, n ) {
+						if ( n.idref ) {
+							var $li = $( '<li></li>' ).append( $( '<a></a>' ).attr( 'href', '#' + n.idref ).append( n.message ) );
+						} else {
+							var $li = $( '<li></li>' ).append( n.message );
+						}
+
+						$invalids.append( $li );
+					} );
+
+					$response.append( $invalids );
+				}
+
+				$response.attr( 'role', 'alert' ).focus();
+			} );
+		};
+
+		$.ajax( {
+			type: 'POST',
+			url: wpcf7.apiSettings.getRoute(
+				'/contact-forms/' + wpcf7.getId( $form ) + '/feedback' ),
+			data: formData,
+			dataType: 'json',
+			processData: false,
+			contentType: false
+		} ).done( function( data, status, xhr ) {
+			ajaxSuccess( data, status, xhr, $form );
+			$( '.ajax-loader', $form ).removeClass( 'is-active' );
+		} ).fail( function( xhr, status, error ) {
+			var $e = $( '<div class="ajax-error"></div>' ).text( error.message );
+			$form.after( $e );
+		} );
+	};
+
+	wpcf7.triggerEvent = function( target, name, detail ) {
+		var $target = $( target );
+
+		/* DOM event */
+		var event = new CustomEvent( 'wpcf7' + name, {
+			bubbles: true,
+			detail: detail
+		} );
+
+		$target.get( 0 ).dispatchEvent( event );
+
+		/* jQuery event */
+		$target.trigger( 'wpcf7:' + name, detail );
+		$target.trigger( name + '.wpcf7', detail ); // deprecated
+	};
+
+	wpcf7.toggleSubmit = function( form, state ) {
+		var $form = $( form );
+		var $submit = $( 'input:submit', $form );
+
+		if ( typeof state !== 'undefined' ) {
+			$submit.prop( 'disabled', ! state );
+			return;
+		}
+
+		if ( $form.hasClass( 'wpcf7-acceptance-as-validation' ) ) {
+			return;
+		}
+
+		$submit.prop( 'disabled', false );
+
+		$( '.wpcf7-acceptance', $form ).each( function() {
+			var $span = $( this );
+			var $input = $( 'input:checkbox', $span );
+
+			if ( ! $span.hasClass( 'optional' ) ) {
+				if ( $span.hasClass( 'invert' ) && $input.is( ':checked' )
+				|| ! $span.hasClass( 'invert' ) && ! $input.is( ':checked' ) ) {
+					$submit.prop( 'disabled', true );
+					return false;
+				}
+			}
+		} );
+	};
+
+	wpcf7.notValidTip = function( target, message ) {
+		var $target = $( target );
+		$( '.wpcf7-not-valid-tip', $target ).remove();
+		$( '<span role="alert" class="wpcf7-not-valid-tip"></span>' )
+			.text( message ).appendTo( $target );
+
+		if ( $target.is( '.use-floating-validation-tip *' ) ) {
+			var fadeOut = function( target ) {
+				$( target ).not( ':hidden' ).animate( {
+					opacity: 0
+				}, 'fast', function() {
+					$( this ).css( { 'z-index': -100 } );
+				} );
+			};
+
+			$target.on( 'mouseover', '.wpcf7-not-valid-tip', function() {
+				fadeOut( this );
+			} );
+
+			$target.on( 'focus', ':input', function() {
+				fadeOut( $( '.wpcf7-not-valid-tip', $target ) );
+			} );
+		}
+	};
+
+	wpcf7.refill = function( form, data ) {
+		var $form = $( form );
+
+		var refillCaptcha = function( $form, items ) {
+			$.each( items, function( i, n ) {
+				$form.find( ':input[name="' + i + '"]' ).val( '' );
+				$form.find( 'img.wpcf7-captcha-' + i ).attr( 'src', n );
+				var match = /([0-9]+)\.(png|gif|jpeg)$/.exec( n );
+				$form.find( 'input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]' ).attr( 'value', match[ 1 ] );
+			} );
+		};
+
+		var refillQuiz = function( $form, items ) {
+			$.each( items, function( i, n ) {
+				$form.find( ':input[name="' + i + '"]' ).val( '' );
+				$form.find( ':input[name="' + i + '"]' ).siblings( 'span.wpcf7-quiz-label' ).text( n[ 0 ] );
+				$form.find( 'input:hidden[name="_wpcf7_quiz_answer_' + i + '"]' ).attr( 'value', n[ 1 ] );
+			} );
+		};
+
+		if ( typeof data === 'undefined' ) {
+			$.ajax( {
+				type: 'GET',
+				url: wpcf7.apiSettings.getRoute(
+					'/contact-forms/' + wpcf7.getId( $form ) + '/refill' ),
+				beforeSend: function( xhr ) {
+					var nonce = $form.find( ':input[name="_wpnonce"]' ).val();
+
+					if ( nonce ) {
+						xhr.setRequestHeader( 'X-WP-Nonce', nonce );
+					}
+				},
+				dataType: 'json'
+			} ).done( function( data, status, xhr ) {
+				if ( data.captcha ) {
+					refillCaptcha( $form, data.captcha );
+				}
+
+				if ( data.quiz ) {
+					refillQuiz( $form, data.quiz );
+				}
+			} );
+
+		} else {
+			if ( data.captcha ) {
+				refillCaptcha( $form, data.captcha );
+			}
+
+			if ( data.quiz ) {
+				refillQuiz( $form, data.quiz );
+			}
+		}
+	};
+
+	wpcf7.clearResponse = function( form ) {
+		var $form = $( form );
+		$form.removeClass( 'invalid spam sent failed' );
+		$form.siblings( '.screen-reader-response' ).html( '' ).attr( 'role', '' );
+
+		$( '.wpcf7-not-valid-tip', $form ).remove();
+		$( '[aria-invalid]', $form ).attr( 'aria-invalid', 'false' );
+		$( '.wpcf7-form-control', $form ).removeClass( 'wpcf7-not-valid' );
+
+		$( '.wpcf7-response-output', $form )
+			.hide().empty().removeAttr( 'role' )
+			.removeClass( 'wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked' );
+	};
+
+	wpcf7.apiSettings.getRoute = function( path ) {
+		var url = wpcf7.apiSettings.root;
+
+		url = url.replace(
+			wpcf7.apiSettings.namespace,
+			wpcf7.apiSettings.namespace + path );
+
+		return url;
+	};
+
+} )( jQuery );
+
+/*
+ * Polyfill for Internet Explorer
+ * See https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
+ */
+( function () {
+	if ( typeof window.CustomEvent === "function" ) return false;
+
+	function CustomEvent ( event, params ) {
+		params = params || { bubbles: false, cancelable: false, detail: undefined };
+		var evt = document.createEvent( 'CustomEvent' );
+		evt.initCustomEvent( event,
+			params.bubbles, params.cancelable, params.detail );
+		return evt;
+	}
+
+	CustomEvent.prototype = window.Event.prototype;
+
+	window.CustomEvent = CustomEvent;
+} )();

+ 96 - 0
wp-content/plugins/contact-form-7/includes/l10n.php

@@ -0,0 +1,96 @@
+<?php
+
+function wpcf7_l10n() {
+	static $l10n = array();
+
+	if ( ! empty( $l10n ) ) {
+		return $l10n;
+	}
+
+	if ( ! is_admin() ) {
+		return $l10n;
+	}
+
+	require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
+
+	$api = translations_api( 'plugins', array(
+		'slug' => 'contact-form-7',
+		'version' => WPCF7_VERSION,
+	) );
+
+	if ( is_wp_error( $api ) || empty( $api['translations'] ) ) {
+		return $l10n;
+	}
+
+	foreach ( (array) $api['translations'] as $translation ) {
+		if ( ! empty( $translation['language'] )
+		&& ! empty( $translation['english_name'] ) ) {
+			$l10n[$translation['language']] = $translation['english_name'];
+		}
+	}
+
+	return $l10n;
+}
+
+function wpcf7_is_valid_locale( $locale ) {
+	$pattern = '/^[a-z]{2,3}(?:_[a-zA-Z_]{2,})?$/';
+	return (bool) preg_match( $pattern, $locale );
+}
+
+function wpcf7_is_rtl( $locale = '' ) {
+	static $rtl_locales = array(
+		'ar' => 'Arabic',
+		'ary' => 'Moroccan Arabic',
+		'azb' => 'South Azerbaijani',
+		'fa_IR' => 'Persian',
+		'haz' => 'Hazaragi',
+		'he_IL' => 'Hebrew',
+		'ps' => 'Pashto',
+		'ug_CN' => 'Uighur',
+	);
+
+	if ( empty( $locale ) && function_exists( 'is_rtl' ) ) {
+		return is_rtl();
+	}
+
+	if ( empty( $locale ) ) {
+		$locale = get_locale();
+	}
+
+	return isset( $rtl_locales[$locale] );
+}
+
+function wpcf7_load_textdomain( $locale = null ) {
+	global $l10n;
+
+	$domain = 'contact-form-7';
+
+	if ( get_locale() == $locale ) {
+		$locale = null;
+	}
+
+	if ( empty( $locale ) ) {
+		if ( is_textdomain_loaded( $domain ) ) {
+			return true;
+		} else {
+			return load_plugin_textdomain( $domain, false, $domain . '/languages' );
+		}
+	} else {
+		$mo_orig = $l10n[$domain];
+		unload_textdomain( $domain );
+
+		$mofile = $domain . '-' . $locale . '.mo';
+		$path = WP_PLUGIN_DIR . '/' . $domain . '/languages';
+
+		if ( $loaded = load_textdomain( $domain, $path . '/'. $mofile ) ) {
+			return $loaded;
+		} else {
+			$mofile = WP_LANG_DIR . '/plugins/' . $mofile;
+			return load_textdomain( $domain, $mofile );
+		}
+
+		$l10n[$domain] = $mo_orig;
+	}
+
+	return false;
+}

+ 439 - 0
wp-content/plugins/contact-form-7/includes/mail.php

@@ -0,0 +1,439 @@
+<?php
+
+class WPCF7_Mail {
+
+	private static $current = null;
+
+	private $name = '';
+	private $locale = '';
+	private $template = array();
+	private $use_html = false;
+	private $exclude_blank = false;
+
+	public static function get_current() {
+		return self::$current;
+	}
+
+	public static function send( $template, $name = '' ) {
+		self::$current = new self( $name, $template );
+		return self::$current->compose();
+	}
+
+	private function __construct( $name, $template ) {
+		$this->name = trim( $name );
+		$this->use_html = ! empty( $template['use_html'] );
+		$this->exclude_blank = ! empty( $template['exclude_blank'] );
+
+		$this->template = wp_parse_args( $template, array(
+			'subject' => '',
+			'sender' => '',
+			'body' => '',
+			'recipient' => '',
+			'additional_headers' => '',
+			'attachments' => '',
+		) );
+
+		if ( $submission = WPCF7_Submission::get_instance() ) {
+			$contact_form = $submission->get_contact_form();
+			$this->locale = $contact_form->locale();
+		}
+	}
+
+	public function name() {
+		return $this->name;
+	}
+
+	public function get( $component, $replace_tags = false ) {
+		$use_html = ( $this->use_html && 'body' == $component );
+		$exclude_blank = ( $this->exclude_blank && 'body' == $component );
+
+		$template = $this->template;
+		$component = isset( $template[$component] ) ? $template[$component] : '';
+
+		if ( $replace_tags ) {
+			$component = $this->replace_tags( $component, array(
+				'html' => $use_html,
+				'exclude_blank' => $exclude_blank,
+			) );
+
+			if ( $use_html
+			&& ! preg_match( '%<html[>\s].*</html>%is', $component ) ) {
+				$component = $this->htmlize( $component );
+			}
+		}
+
+		return $component;
+	}
+
+	private function htmlize( $body ) {
+		if ( $this->locale ) {
+			$lang_atts = sprintf( ' %s',
+				wpcf7_format_atts( array(
+					'dir' => wpcf7_is_rtl( $this->locale ) ? 'rtl' : 'ltr',
+					'lang' => str_replace( '_', '-', $this->locale ),
+				) )
+			);
+		} else {
+			$lang_atts = '';
+		}
+
+		$header = apply_filters( 'wpcf7_mail_html_header',
+			'<!doctype html>
+<html xmlns="http://www.w3.org/1999/xhtml"' . $lang_atts . '>
+<head>
+<title>' . esc_html( $this->get( 'subject', true ) ) . '</title>
+</head>
+<body>
+', $this );
+
+		$footer = apply_filters( 'wpcf7_mail_html_footer',
+			'</body>
+</html>', $this );
+
+		$html = $header . wpautop( $body ) . $footer;
+		return $html;
+	}
+
+	private function compose( $send = true ) {
+		$components = array(
+			'subject' => $this->get( 'subject', true ),
+			'sender' => $this->get( 'sender', true ),
+			'body' => $this->get( 'body', true ),
+			'recipient' => $this->get( 'recipient', true ),
+			'additional_headers' => $this->get( 'additional_headers', true ),
+			'attachments' => $this->attachments(),
+		);
+
+		$components = apply_filters( 'wpcf7_mail_components',
+			$components, wpcf7_get_current_contact_form(), $this );
+
+		if ( ! $send ) {
+			return $components;
+		}
+
+		$subject = wpcf7_strip_newline( $components['subject'] );
+		$sender = wpcf7_strip_newline( $components['sender'] );
+		$recipient = wpcf7_strip_newline( $components['recipient'] );
+		$body = $components['body'];
+		$additional_headers = trim( $components['additional_headers'] );
+		$attachments = $components['attachments'];
+
+		$headers = "From: $sender\n";
+
+		if ( $this->use_html ) {
+			$headers .= "Content-Type: text/html\n";
+			$headers .= "X-WPCF7-Content-Type: text/html\n";
+		} else {
+			$headers .= "X-WPCF7-Content-Type: text/plain\n";
+		}
+
+		if ( $additional_headers ) {
+			$headers .= $additional_headers . "\n";
+		}
+
+		return wp_mail( $recipient, $subject, $body, $headers, $attachments );
+	}
+
+	public function replace_tags( $content, $args = '' ) {
+		if ( true === $args ) {
+			$args = array( 'html' => true );
+		}
+
+		$args = wp_parse_args( $args, array(
+			'html' => false,
+			'exclude_blank' => false,
+		) );
+
+		return wpcf7_mail_replace_tags( $content, $args );
+	}
+
+	private function attachments( $template = null ) {
+		if ( ! $template ) {
+			$template = $this->get( 'attachments' );
+		}
+
+		$attachments = array();
+
+		if ( $submission = WPCF7_Submission::get_instance() ) {
+			$uploaded_files = $submission->uploaded_files();
+
+			foreach ( (array) $uploaded_files as $name => $path ) {
+				if ( false !== strpos( $template, "[${name}]" )
+				&& ! empty( $path ) ) {
+					$attachments[] = $path;
+				}
+			}
+		}
+
+		foreach ( explode( "\n", $template ) as $line ) {
+			$line = trim( $line );
+
+			if ( '[' == substr( $line, 0, 1 ) ) {
+				continue;
+			}
+
+			$path = path_join( WP_CONTENT_DIR, $line );
+
+			if ( is_readable( $path ) && is_file( $path ) ) {
+				$attachments[] = $path;
+			}
+		}
+
+		return $attachments;
+	}
+}
+
+function wpcf7_mail_replace_tags( $content, $args = '' ) {
+	$args = wp_parse_args( $args, array(
+		'html' => false,
+		'exclude_blank' => false,
+	) );
+
+	if ( is_array( $content ) ) {
+		foreach ( $content as $key => $value ) {
+			$content[$key] = wpcf7_mail_replace_tags( $value, $args );
+		}
+
+		return $content;
+	}
+
+	$content = explode( "\n", $content );
+
+	foreach ( $content as $num => $line ) {
+		$line = new WPCF7_MailTaggedText( $line, $args );
+		$replaced = $line->replace_tags();
+
+		if ( $args['exclude_blank'] ) {
+			$replaced_tags = $line->get_replaced_tags();
+
+			if ( empty( $replaced_tags ) || array_filter( $replaced_tags ) ) {
+				$content[$num] = $replaced;
+			} else {
+				unset( $content[$num] ); // Remove a line.
+			}
+		} else {
+			$content[$num] = $replaced;
+		}
+	}
+
+	$content = implode( "\n", $content );
+
+	return $content;
+}
+
+add_action( 'phpmailer_init', 'wpcf7_phpmailer_init' );
+
+function wpcf7_phpmailer_init( $phpmailer ) {
+	$custom_headers = $phpmailer->getCustomHeaders();
+	$phpmailer->clearCustomHeaders();
+	$wpcf7_content_type = false;
+
+	foreach ( (array) $custom_headers as $custom_header ) {
+		$name = $custom_header[0];
+		$value = $custom_header[1];
+
+		if ( 'X-WPCF7-Content-Type' === $name ) {
+			$wpcf7_content_type = trim( $value );
+		} else {
+			$phpmailer->addCustomHeader( $name, $value );
+		}
+	}
+
+	if ( 'text/html' === $wpcf7_content_type ) {
+		$phpmailer->msgHTML( $phpmailer->Body );
+	} elseif ( 'text/plain' === $wpcf7_content_type ) {
+		$phpmailer->AltBody = '';
+	}
+}
+
+class WPCF7_MailTaggedText {
+
+	private $html = false;
+	private $callback = null;
+	private $content = '';
+	private $replaced_tags = array();
+
+	public function __construct( $content, $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'html' => false,
+			'callback' => null,
+		) );
+
+		$this->html = (bool) $args['html'];
+
+		if ( null !== $args['callback'] && is_callable( $args['callback'] ) ) {
+			$this->callback = $args['callback'];
+		} elseif ( $this->html ) {
+			$this->callback = array( $this, 'replace_tags_callback_html' );
+		} else {
+			$this->callback = array( $this, 'replace_tags_callback' );
+		}
+
+		$this->content = $content;
+	}
+
+	public function get_replaced_tags() {
+		return $this->replaced_tags;
+	}
+
+	public function replace_tags() {
+		$regex = '/(\[?)\[[\t ]*'
+			. '([a-zA-Z_][0-9a-zA-Z:._-]*)' // [2] = name
+			. '((?:[\t ]+"[^"]*"|[\t ]+\'[^\']*\')*)' // [3] = values
+			. '[\t ]*\](\]?)/';
+
+		return preg_replace_callback( $regex, $this->callback, $this->content );
+	}
+
+	private function replace_tags_callback_html( $matches ) {
+		return $this->replace_tags_callback( $matches, true );
+	}
+
+	private function replace_tags_callback( $matches, $html = false ) {
+		// allow [[foo]] syntax for escaping a tag
+		if ( $matches[1] == '[' && $matches[4] == ']' ) {
+			return substr( $matches[0], 1, -1 );
+		}
+
+		$tag = $matches[0];
+		$tagname = $matches[2];
+		$values = $matches[3];
+
+		$mail_tag = new WPCF7_MailTag( $tag, $tagname, $values );
+		$field_name = $mail_tag->field_name();
+
+		$submission = WPCF7_Submission::get_instance();
+		$submitted = $submission
+			? $submission->get_posted_data( $field_name )
+			: null;
+
+		if ( null !== $submitted ) {
+
+			if ( $mail_tag->get_option( 'do_not_heat' ) ) {
+				$submitted = isset( $_POST[$field_name] ) ? $_POST[$field_name] : '';
+			}
+
+			$replaced = $submitted;
+
+			if ( $format = $mail_tag->get_option( 'format' ) ) {
+				$replaced = $this->format( $replaced, $format );
+			}
+
+			$replaced = wpcf7_flat_join( $replaced );
+
+			if ( $html ) {
+				$replaced = esc_html( $replaced );
+				$replaced = wptexturize( $replaced );
+			}
+
+			if ( $form_tag = $mail_tag->corresponding_form_tag() ) {
+				$type = $form_tag->type;
+
+				$replaced = apply_filters(
+					"wpcf7_mail_tag_replaced_{$type}", $replaced,
+					$submitted, $html, $mail_tag );
+			}
+
+			$replaced = apply_filters( 'wpcf7_mail_tag_replaced', $replaced,
+				$submitted, $html, $mail_tag );
+
+			$replaced = wp_unslash( trim( $replaced ) );
+
+			$this->replaced_tags[$tag] = $replaced;
+			return $replaced;
+		}
+
+		$special = apply_filters( 'wpcf7_special_mail_tags', null,
+			$mail_tag->tag_name(), $html, $mail_tag );
+
+		if ( null !== $special ) {
+			$this->replaced_tags[$tag] = $special;
+			return $special;
+		}
+
+		return $tag;
+	}
+
+	public function format( $original, $format ) {
+		$original = (array) $original;
+
+		foreach ( $original as $key => $value ) {
+			if ( preg_match( '/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $value ) ) {
+				$original[$key] = mysql2date( $format, $value );
+			}
+		}
+
+		return $original;
+	}
+}
+
+class WPCF7_MailTag {
+
+	private $tag;
+	private $tagname = '';
+	private $name = '';
+	private $options = array();
+	private $values = array();
+	private $form_tag = null;
+
+	public function __construct( $tag, $tagname, $values ) {
+		$this->tag = $tag;
+		$this->name = $this->tagname = $tagname;
+
+		$this->options = array(
+			'do_not_heat' => false,
+			'format' => '',
+		);
+
+		if ( ! empty( $values ) ) {
+			preg_match_all( '/"[^"]*"|\'[^\']*\'/', $values, $matches );
+			$this->values = wpcf7_strip_quote_deep( $matches[0] );
+		}
+
+		if ( preg_match( '/^_raw_(.+)$/', $tagname, $matches ) ) {
+			$this->name = trim( $matches[1] );
+			$this->options['do_not_heat'] = true;
+		}
+
+		if ( preg_match( '/^_format_(.+)$/', $tagname, $matches ) ) {
+			$this->name = trim( $matches[1] );
+			$this->options['format'] = $this->values[0];
+		}
+	}
+
+	public function tag_name() {
+		return $this->tagname;
+	}
+
+	public function field_name() {
+		return $this->name;
+	}
+
+	public function get_option( $option ) {
+		return $this->options[$option];
+	}
+
+	public function values() {
+		return $this->values;
+	}
+
+	public function corresponding_form_tag() {
+		if ( $this->form_tag instanceof WPCF7_FormTag ) {
+			return $this->form_tag;
+		}
+
+		if ( $submission = WPCF7_Submission::get_instance() ) {
+			$contact_form = $submission->get_contact_form();
+			$tags = $contact_form->scan_form_tags( array(
+				'name' => $this->name,
+				'feature' => '! zero-controls-container',
+			) );
+
+			if ( $tags ) {
+				$this->form_tag = $tags[0];
+			}
+		}
+
+		return $this->form_tag;
+	}
+}

+ 78 - 0
wp-content/plugins/contact-form-7/includes/pipe.php

@@ -0,0 +1,78 @@
+<?php
+
+class WPCF7_Pipe {
+
+	public $before = '';
+	public $after = '';
+
+	public function __construct( $text ) {
+		$text = (string) $text;
+
+		$pipe_pos = strpos( $text, '|' );
+
+		if ( false === $pipe_pos ) {
+			$this->before = $this->after = trim( $text );
+		} else {
+			$this->before = trim( substr( $text, 0, $pipe_pos ) );
+			$this->after = trim( substr( $text, $pipe_pos + 1 ) );
+		}
+	}
+}
+
+class WPCF7_Pipes {
+
+	private $pipes = array();
+
+	public function __construct( array $texts ) {
+		foreach ( $texts as $text ) {
+			$this->add_pipe( $text );
+		}
+	}
+
+	private function add_pipe( $text ) {
+		$pipe = new WPCF7_Pipe( $text );
+		$this->pipes[] = $pipe;
+	}
+
+	public function do_pipe( $before ) {
+		foreach ( $this->pipes as $pipe ) {
+			if ( $pipe->before == $before ) {
+				return $pipe->after;
+			}
+		}
+
+		return $before;
+	}
+
+	public function collect_befores() {
+		$befores = array();
+
+		foreach ( $this->pipes as $pipe ) {
+			$befores[] = $pipe->before;
+		}
+
+		return $befores;
+	}
+
+	public function collect_afters() {
+		$afters = array();
+
+		foreach ( $this->pipes as $pipe ) {
+			$afters[] = $pipe->after;
+		}
+
+		return $afters;
+	}
+
+	public function zero() {
+		return empty( $this->pipes );
+	}
+
+	public function random_pipe() {
+		if ( $this->zero() ) {
+			return null;
+		}
+
+		return $this->pipes[array_rand( $this->pipes )];
+	}
+}

+ 323 - 0
wp-content/plugins/contact-form-7/includes/rest-api.php

@@ -0,0 +1,323 @@
+<?php
+
+add_action( 'rest_api_init', 'wpcf7_rest_api_init' );
+
+function wpcf7_rest_api_init() {
+	$namespace = 'contact-form-7/v1';
+
+	register_rest_route( $namespace,
+		'/contact-forms',
+		array(
+			array(
+				'methods' => WP_REST_Server::READABLE,
+				'callback' => 'wpcf7_rest_get_contact_forms',
+			),
+			array(
+				'methods' => WP_REST_Server::CREATABLE,
+				'callback' => 'wpcf7_rest_create_contact_form',
+			),
+		)
+	);
+
+	register_rest_route( $namespace,
+		'/contact-forms/(?P<id>\d+)',
+		array(
+			array(
+				'methods' => WP_REST_Server::READABLE,
+				'callback' => 'wpcf7_rest_get_contact_form',
+			),
+			array(
+				'methods' => WP_REST_Server::EDITABLE,
+				'callback' => 'wpcf7_rest_update_contact_form',
+			),
+			array(
+				'methods' => WP_REST_Server::DELETABLE,
+				'callback' => 'wpcf7_rest_delete_contact_form',
+			),
+		)
+	);
+
+	register_rest_route( $namespace,
+		'/contact-forms/(?P<id>\d+)/feedback',
+		array(
+			array(
+				'methods' => WP_REST_Server::CREATABLE,
+				'callback' => 'wpcf7_rest_create_feedback',
+			),
+		)
+	);
+
+	register_rest_route( $namespace,
+		'/contact-forms/(?P<id>\d+)/refill',
+		array(
+			array(
+				'methods' => WP_REST_Server::READABLE,
+				'callback' => 'wpcf7_rest_get_refill',
+			),
+		)
+	);
+}
+
+function wpcf7_rest_get_contact_forms( WP_REST_Request $request ) {
+	if ( ! current_user_can( 'wpcf7_read_contact_forms' ) ) {
+		return new WP_Error( 'wpcf7_forbidden',
+			__( "You are not allowed to access contact forms.", 'contact-form-7' ),
+			array( 'status' => 403 ) );
+	}
+
+	$args = array();
+
+	$per_page = $request->get_param( 'per_page' );
+
+	if ( null !== $per_page ) {
+		$args['posts_per_page'] = (int) $per_page;
+	}
+
+	$offset = $request->get_param( 'offset' );
+
+	if ( null !== $offset ) {
+		$args['offset'] = (int) $offset;
+	}
+
+	$order = $request->get_param( 'order' );
+
+	if ( null !== $order ) {
+		$args['order'] = (string) $order;
+	}
+
+	$orderby = $request->get_param( 'orderby' );
+
+	if ( null !== $orderby ) {
+		$args['orderby'] = (string) $orderby;
+	}
+
+	$search = $request->get_param( 'search' );
+
+	if ( null !== $search ) {
+		$args['s'] = (string) $search;
+	}
+
+	$items = WPCF7_ContactForm::find( $args );
+
+	$response = array();
+
+	foreach ( $items as $item ) {
+		$response[] = array(
+			'id' => $item->id(),
+			'slug' => $item->name(),
+			'title' => $item->title(),
+			'locale' => $item->locale(),
+		);
+	}
+
+	return rest_ensure_response( $response );
+}
+
+function wpcf7_rest_create_contact_form( WP_REST_Request $request ) {
+	$id = (int) $request->get_param( 'id' );
+
+	if ( $id ) {
+		return new WP_Error( 'wpcf7_post_exists',
+			__( "Cannot create existing contact form.", 'contact-form-7' ),
+			array( 'status' => 400 ) );
+	}
+
+	if ( ! current_user_can( 'wpcf7_edit_contact_forms' ) ) {
+		return new WP_Error( 'wpcf7_forbidden',
+			__( "You are not allowed to create a contact form.", 'contact-form-7' ),
+			array( 'status' => 403 ) );
+	}
+
+	$args = $request->get_params();
+	$args['id'] = -1; // Create
+	$context = $request->get_param( 'context' );
+	$item = wpcf7_save_contact_form( $args, $context );
+
+	if ( ! $item ) {
+		return new WP_Error( 'wpcf7_cannot_save',
+			__( "There was an error saving the contact form.", 'contact-form-7' ),
+			array( 'status' => 500 ) );
+	}
+
+	$response = array(
+		'id' => $item->id(),
+		'slug' => $item->name(),
+		'title' => $item->title(),
+		'locale' => $item->locale(),
+		'properties' => $item->get_properties(),
+		'config_errors' => array(),
+	);
+
+	if ( wpcf7_validate_configuration() ) {
+		$config_validator = new WPCF7_ConfigValidator( $item );
+		$config_validator->validate();
+
+		$response['config_errors'] = $config_validator->collect_error_messages();
+
+		if ( 'save' == $context ) {
+			$config_validator->save();
+		}
+	}
+
+	return rest_ensure_response( $response );
+}
+
+function wpcf7_rest_get_contact_form( WP_REST_Request $request ) {
+	$id = (int) $request->get_param( 'id' );
+	$item = wpcf7_contact_form( $id );
+
+	if ( ! $item ) {
+		return new WP_Error( 'wpcf7_not_found',
+			__( "The requested contact form was not found.", 'contact-form-7' ),
+			array( 'status' => 404 ) );
+	}
+
+	if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
+		return new WP_Error( 'wpcf7_forbidden',
+			__( "You are not allowed to access the requested contact form.", 'contact-form-7' ),
+			array( 'status' => 403 ) );
+	}
+
+	$response = array(
+		'id' => $item->id(),
+		'slug' => $item->name(),
+		'title' => $item->title(),
+		'locale' => $item->locale(),
+		'properties' => $item->get_properties(),
+	);
+
+	return rest_ensure_response( $response );
+}
+
+function wpcf7_rest_update_contact_form( WP_REST_Request $request ) {
+	$id = (int) $request->get_param( 'id' );
+	$item = wpcf7_contact_form( $id );
+
+	if ( ! $item ) {
+		return new WP_Error( 'wpcf7_not_found',
+			__( "The requested contact form was not found.", 'contact-form-7' ),
+			array( 'status' => 404 ) );
+	}
+
+	if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
+		return new WP_Error( 'wpcf7_forbidden',
+			__( "You are not allowed to access the requested contact form.", 'contact-form-7' ),
+			array( 'status' => 403 ) );
+	}
+
+	$args = $request->get_params();
+	$context = $request->get_param( 'context' );
+	$item = wpcf7_save_contact_form( $args, $context );
+
+	if ( ! $item ) {
+		return new WP_Error( 'wpcf7_cannot_save',
+			__( "There was an error saving the contact form.", 'contact-form-7' ),
+			array( 'status' => 500 ) );
+	}
+
+	$response = array(
+		'id' => $item->id(),
+		'slug' => $item->name(),
+		'title' => $item->title(),
+		'locale' => $item->locale(),
+		'properties' => $item->get_properties(),
+		'config_errors' => array(),
+	);
+
+	if ( wpcf7_validate_configuration() ) {
+		$config_validator = new WPCF7_ConfigValidator( $item );
+		$config_validator->validate();
+
+		$response['config_errors'] = $config_validator->collect_error_messages();
+
+		if ( 'save' == $context ) {
+			$config_validator->save();
+		}
+	}
+
+	return rest_ensure_response( $response );
+}
+
+function wpcf7_rest_delete_contact_form( WP_REST_Request $request ) {
+	$id = (int) $request->get_param( 'id' );
+	$item = wpcf7_contact_form( $id );
+
+	if ( ! $item ) {
+		return new WP_Error( 'wpcf7_not_found',
+			__( "The requested contact form was not found.", 'contact-form-7' ),
+			array( 'status' => 404 ) );
+	}
+
+	if ( ! current_user_can( 'wpcf7_delete_contact_form', $id ) ) {
+		return new WP_Error( 'wpcf7_forbidden',
+			__( "You are not allowed to access the requested contact form.", 'contact-form-7' ),
+			array( 'status' => 403 ) );
+	}
+
+	$result = $item->delete();
+
+	if ( ! $result ) {
+		return new WP_Error( 'wpcf7_cannot_delete',
+			__( "There was an error deleting the contact form.", 'contact-form-7' ),
+			array( 'status' => 500 ) );
+	}
+
+	$response = array( 'deleted' => true );
+
+	return rest_ensure_response( $response );
+}
+
+function wpcf7_rest_create_feedback( WP_REST_Request $request ) {
+	$id = (int) $request->get_param( 'id' );
+	$item = wpcf7_contact_form( $id );
+
+	if ( ! $item ) {
+		return new WP_Error( 'wpcf7_not_found',
+			__( "The requested contact form was not found.", 'contact-form-7' ),
+			array( 'status' => 404 ) );
+	}
+
+	$result = $item->submit();
+
+	$unit_tag = $request->get_param( '_wpcf7_unit_tag' );
+
+	$response = array(
+		'into' => '#' . wpcf7_sanitize_unit_tag( $unit_tag ),
+		'status' => $result['status'],
+		'message' => $result['message'],
+	);
+
+	if ( 'validation_failed' == $result['status'] ) {
+		$invalid_fields = array();
+
+		foreach ( (array) $result['invalid_fields'] as $name => $field ) {
+			$invalid_fields[] = array(
+				'into' => 'span.wpcf7-form-control-wrap.'
+					. sanitize_html_class( $name ),
+				'message' => $field['reason'],
+				'idref' => $field['idref'],
+			);
+		}
+
+		$response['invalidFields'] = $invalid_fields;
+	}
+
+	$response = apply_filters( 'wpcf7_ajax_json_echo', $response, $result );
+
+	return rest_ensure_response( $response );
+}
+
+function wpcf7_rest_get_refill( WP_REST_Request $request ) {
+	$id = (int) $request->get_param( 'id' );
+	$item = wpcf7_contact_form( $id );
+
+	if ( ! $item ) {
+		return new WP_Error( 'wpcf7_not_found',
+			__( "The requested contact form was not found.", 'contact-form-7' ),
+			array( 'status' => 404 ) );
+	}
+
+	$response = apply_filters( 'wpcf7_ajax_onload', array() );
+
+	return rest_ensure_response( $response );
+}

+ 101 - 0
wp-content/plugins/contact-form-7/includes/shortcodes.php

@@ -0,0 +1,101 @@
+<?php
+/**
+ * All the functions and classes in this file are deprecated.
+ * You shouldn't use them. The functions and classes will be
+ * removed in a later version.
+ */
+
+function wpcf7_add_shortcode( $tag, $func, $has_name = false ) {
+	wpcf7_deprecated_function( __FUNCTION__, '4.6', 'wpcf7_add_form_tag' );
+
+	return wpcf7_add_form_tag( $tag, $func, $has_name );
+}
+
+function wpcf7_remove_shortcode( $tag ) {
+	wpcf7_deprecated_function( __FUNCTION__, '4.6', 'wpcf7_remove_form_tag' );
+
+	return wpcf7_remove_form_tag( $tag );
+}
+
+function wpcf7_do_shortcode( $content ) {
+	wpcf7_deprecated_function( __FUNCTION__, '4.6',
+		'wpcf7_replace_all_form_tags' );
+
+	return wpcf7_replace_all_form_tags( $content );
+}
+
+function wpcf7_scan_shortcode( $cond = null ) {
+	wpcf7_deprecated_function( __FUNCTION__, '4.6', 'wpcf7_scan_form_tags' );
+
+	return wpcf7_scan_form_tags( $cond );
+}
+
+class WPCF7_ShortcodeManager {
+
+	private static $form_tags_manager;
+
+	private function __construct() {}
+
+	public static function get_instance() {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_FormTagsManager::get_instance' );
+
+		self::$form_tags_manager = WPCF7_FormTagsManager::get_instance();
+		return new self;
+	}
+
+	public function get_scanned_tags() {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_FormTagsManager::get_scanned_tags' );
+
+		return self::$form_tags_manager->get_scanned_tags();
+	}
+
+	public function add_shortcode( $tag, $func, $has_name = false ) {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_FormTagsManager::add' );
+
+		return self::$form_tags_manager->add( $tag, $func, $has_name );
+	}
+
+	public function remove_shortcode( $tag ) {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_FormTagsManager::remove' );
+
+		return self::$form_tags_manager->remove( $tag );
+	}
+
+	public function normalize_shortcode( $content ) {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_FormTagsManager::normalize' );
+
+		return self::$form_tags_manager->normalize( $content );
+	}
+
+	public function do_shortcode( $content, $exec = true ) {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_FormTagsManager::replace_all' );
+
+		if ( $exec ) {
+			return self::$form_tags_manager->replace_all( $content );
+		} else {
+			return self::$form_tags_manager->scan( $content );
+		}
+	}
+
+	public function scan_shortcode( $content ) {
+		wpcf7_deprecated_function( __METHOD__, '4.6',
+			'WPCF7_FormTagsManager::scan' );
+
+		return self::$form_tags_manager->scan( $content );
+	}
+}
+
+class WPCF7_Shortcode extends WPCF7_FormTag {
+
+	public function __construct( $tag ) {
+		wpcf7_deprecated_function( 'WPCF7_Shortcode', '4.6', 'WPCF7_FormTag' );
+
+		parent::__construct( $tag );
+	}
+}

+ 165 - 0
wp-content/plugins/contact-form-7/includes/special-mail-tags.php

@@ -0,0 +1,165 @@
+<?php
+/**
+** Special Mail Tags
+** https://contactform7.com/special-mail-tags/
+**/
+
+add_filter( 'wpcf7_special_mail_tags', 'wpcf7_special_mail_tag', 10, 3 );
+
+function wpcf7_special_mail_tag( $output, $name, $html ) {
+	$name = preg_replace( '/^wpcf7\./', '_', $name ); // for back-compat
+
+	$submission = WPCF7_Submission::get_instance();
+
+	if ( ! $submission ) {
+		return $output;
+	}
+
+	if ( '_remote_ip' == $name ) {
+		if ( $remote_ip = $submission->get_meta( 'remote_ip' ) ) {
+			return $remote_ip;
+		} else {
+			return '';
+		}
+	}
+
+	if ( '_user_agent' == $name ) {
+		if ( $user_agent = $submission->get_meta( 'user_agent' ) ) {
+			return $html ? esc_html( $user_agent ) : $user_agent;
+		} else {
+			return '';
+		}
+	}
+
+	if ( '_url' == $name ) {
+		if ( $url = $submission->get_meta( 'url' ) ) {
+			return esc_url( $url );
+		} else {
+			return '';
+		}
+	}
+
+	if ( '_date' == $name || '_time' == $name ) {
+		if ( $timestamp = $submission->get_meta( 'timestamp' ) ) {
+			if ( '_date' == $name ) {
+				return date_i18n( get_option( 'date_format' ), $timestamp );
+			}
+
+			if ( '_time' == $name ) {
+				return date_i18n( get_option( 'time_format' ), $timestamp );
+			}
+		}
+
+		return '';
+	}
+
+	if ( '_invalid_fields' == $name ) {
+		return count( $submission->get_invalid_fields() );
+	}
+
+	return $output;
+}
+
+add_filter( 'wpcf7_special_mail_tags', 'wpcf7_post_related_smt', 10, 3 );
+
+function wpcf7_post_related_smt( $output, $name, $html ) {
+	if ( '_post_' != substr( $name, 0, 6 ) ) {
+		return $output;
+	}
+
+	$submission = WPCF7_Submission::get_instance();
+
+	if ( ! $submission ) {
+		return $output;
+	}
+
+	$post_id = (int) $submission->get_meta( 'container_post_id' );
+
+	if ( ! $post_id || ! $post = get_post( $post_id ) ) {
+		return '';
+	}
+
+	if ( '_post_id' == $name ) {
+		return (string) $post->ID;
+	}
+
+	if ( '_post_name' == $name ) {
+		return $post->post_name;
+	}
+
+	if ( '_post_title' == $name ) {
+		return $html ? esc_html( $post->post_title ) : $post->post_title;
+	}
+
+	if ( '_post_url' == $name ) {
+		return get_permalink( $post->ID );
+	}
+
+	$user = new WP_User( $post->post_author );
+
+	if ( '_post_author' == $name ) {
+		return $user->display_name;
+	}
+
+	if ( '_post_author_email' == $name ) {
+		return $user->user_email;
+	}
+
+	return $output;
+}
+
+add_filter( 'wpcf7_special_mail_tags', 'wpcf7_site_related_smt', 10, 3 );
+
+function wpcf7_site_related_smt( $output, $name, $html ) {
+	$filter = $html ? 'display' : 'raw';
+
+	if ( '_site_title' == $name ) {
+		return get_bloginfo( 'name', $filter );
+	}
+
+	if ( '_site_description' == $name ) {
+		return get_bloginfo( 'description', $filter );
+	}
+
+	if ( '_site_url' == $name ) {
+		return get_bloginfo( 'url', $filter );
+	}
+
+	if ( '_site_admin_email' == $name ) {
+		return get_bloginfo( 'admin_email', $filter );
+	}
+
+	return $output;
+}
+
+add_filter( 'wpcf7_special_mail_tags', 'wpcf7_user_related_smt', 10, 3 );
+
+function wpcf7_user_related_smt( $output, $name, $html ) {
+	if ( '_user_' != substr( $name, 0, 6 ) || '_user_agent' == $name ) {
+		return $output;
+	}
+
+	$submission = WPCF7_Submission::get_instance();
+
+	if ( ! $submission ) {
+		return $output;
+	}
+
+	$user_id = (int) $submission->get_meta( 'current_user_id' );
+
+	if ( ! $user_id ) {
+		return '';
+	}
+
+	$primary_props = array( 'user_login', 'user_email', 'user_url' );
+	$opt = ltrim( $name, '_' );
+	$opt = in_array( $opt, $primary_props ) ? $opt : substr( $opt, 5 );
+
+	$user = new WP_User( $user_id );
+
+	if ( $user->has_prop( $opt ) ) {
+		return $user->get( $opt );
+	}
+
+	return '';
+}

+ 401 - 0
wp-content/plugins/contact-form-7/includes/submission.php

@@ -0,0 +1,401 @@
+<?php
+
+class WPCF7_Submission {
+
+	private static $instance;
+
+	private $contact_form;
+	private $status = 'init';
+	private $posted_data = array();
+	private $uploaded_files = array();
+	private $skip_mail = false;
+	private $response = '';
+	private $invalid_fields = array();
+	private $meta = array();
+	private $consent = array();
+
+	private function __construct() {}
+
+	public static function get_instance( WPCF7_ContactForm $contact_form = null, $args = '' ) {
+		$args = wp_parse_args( $args, array(
+			'skip_mail' => false,
+		) );
+
+		if ( empty( self::$instance ) ) {
+			if ( null == $contact_form ) {
+				return null;
+			}
+
+			self::$instance = new self;
+			self::$instance->contact_form = $contact_form;
+			self::$instance->skip_mail = (bool) $args['skip_mail'];
+			self::$instance->setup_posted_data();
+			self::$instance->submit();
+		} elseif ( null != $contact_form ) {
+			return null;
+		}
+
+		return self::$instance;
+	}
+
+	public static function is_restful() {
+		return defined( 'REST_REQUEST' ) && REST_REQUEST;
+	}
+
+	public function get_status() {
+		return $this->status;
+	}
+
+	public function set_status( $status ) {
+		if ( preg_match( '/^[a-z][0-9a-z_]+$/', $status ) ) {
+			$this->status = $status;
+			return true;
+		}
+
+		return false;
+	}
+
+	public function is( $status ) {
+		return $this->status == $status;
+	}
+
+	public function get_response() {
+		return $this->response;
+	}
+
+	public function set_response( $response ) {
+		$this->response = $response;
+		return true;
+	}
+
+	public function get_contact_form() {
+		return $this->contact_form;
+	}
+
+	public function get_invalid_field( $name ) {
+		if ( isset( $this->invalid_fields[$name] ) ) {
+			return $this->invalid_fields[$name];
+		} else {
+			return false;
+		}
+	}
+
+	public function get_invalid_fields() {
+		return $this->invalid_fields;
+	}
+
+	public function get_posted_data( $name = '' ) {
+		if ( ! empty( $name ) ) {
+			if ( isset( $this->posted_data[$name] ) ) {
+				return $this->posted_data[$name];
+			} else {
+				return null;
+			}
+		}
+
+		return $this->posted_data;
+	}
+
+	private function setup_posted_data() {
+		$posted_data = (array) $_POST;
+		$posted_data = array_diff_key( $posted_data, array( '_wpnonce' => '' ) );
+		$posted_data = $this->sanitize_posted_data( $posted_data );
+
+		$tags = $this->contact_form->scan_form_tags();
+
+		foreach ( (array) $tags as $tag ) {
+			if ( empty( $tag->name ) ) {
+				continue;
+			}
+
+			$type = $tag->type;
+			$name = $tag->name;
+			$pipes = $tag->pipes;
+
+			$value_orig = $value = '';
+
+			if ( isset( $posted_data[$name] ) ) {
+				$value_orig = $value = $posted_data[$name];
+			}
+
+			if ( WPCF7_USE_PIPE
+			&& $pipes instanceof WPCF7_Pipes
+			&& ! $pipes->zero() ) {
+				if ( is_array( $value_orig ) ) {
+					$value = array();
+
+					foreach ( $value_orig as $v ) {
+						$value[] = $pipes->do_pipe( wp_unslash( $v ) );
+					}
+				} else {
+					$value = $pipes->do_pipe( wp_unslash( $value_orig ) );
+				}
+			}
+
+			$value = apply_filters( "wpcf7_posted_data_{$type}", $value,
+				$value_orig, $tag );
+
+			$posted_data[$name] = $value;
+		}
+
+		$this->posted_data = apply_filters( 'wpcf7_posted_data', $posted_data );
+
+		return $this->posted_data;
+	}
+
+	private function sanitize_posted_data( $value ) {
+		if ( is_array( $value ) ) {
+			$value = array_map( array( $this, 'sanitize_posted_data' ), $value );
+		} elseif ( is_string( $value ) ) {
+			$value = wp_check_invalid_utf8( $value );
+			$value = wp_kses_no_null( $value );
+		}
+
+		return $value;
+	}
+
+	private function submit() {
+		if ( ! $this->is( 'init' ) ) {
+			return $this->status;
+		}
+
+		$this->meta = array(
+			'remote_ip' => $this->get_remote_ip_addr(),
+			'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] )
+				? substr( $_SERVER['HTTP_USER_AGENT'], 0, 254 ) : '',
+			'url' => $this->get_request_url(),
+			'timestamp' => current_time( 'timestamp' ),
+			'unit_tag' =>
+				isset( $_POST['_wpcf7_unit_tag'] ) ? $_POST['_wpcf7_unit_tag'] : '',
+			'container_post_id' => isset( $_POST['_wpcf7_container_post'] )
+				? (int) $_POST['_wpcf7_container_post'] : 0,
+			'current_user_id' => get_current_user_id(),
+		);
+
+		$contact_form = $this->contact_form;
+
+		if ( ! $this->validate() ) { // Validation error occured
+			$this->set_status( 'validation_failed' );
+			$this->set_response( $contact_form->message( 'validation_error' ) );
+
+		} elseif ( ! $this->accepted() ) { // Not accepted terms
+			$this->set_status( 'acceptance_missing' );
+			$this->set_response( $contact_form->message( 'accept_terms' ) );
+
+		} elseif ( $this->spam() ) { // Spam!
+			$this->set_status( 'spam' );
+			$this->set_response( $contact_form->message( 'spam' ) );
+
+		} elseif ( ! $this->before_send_mail() ) {
+			if ( 'init' == $this->get_status() ) {
+				$this->set_status( 'aborted' );
+			}
+
+			if ( '' === $this->get_response() ) {
+				$this->set_response( $contact_form->filter_message(
+					__( "Sending mail has been aborted.", 'contact-form-7' ) )
+				);
+			}
+
+		} elseif ( $this->mail() ) {
+			$this->set_status( 'mail_sent' );
+			$this->set_response( $contact_form->message( 'mail_sent_ok' ) );
+
+			do_action( 'wpcf7_mail_sent', $contact_form );
+
+		} else {
+			$this->set_status( 'mail_failed' );
+			$this->set_response( $contact_form->message( 'mail_sent_ng' ) );
+
+			do_action( 'wpcf7_mail_failed', $contact_form );
+		}
+
+		$this->remove_uploaded_files();
+
+		return $this->status;
+	}
+
+	private function get_remote_ip_addr() {
+		$ip_addr = '';
+
+		if ( isset( $_SERVER['REMOTE_ADDR'] )
+		&& WP_Http::is_ip_address( $_SERVER['REMOTE_ADDR'] ) ) {
+			$ip_addr = $_SERVER['REMOTE_ADDR'];
+		}
+
+		return apply_filters( 'wpcf7_remote_ip_addr', $ip_addr );
+	}
+
+	private function get_request_url() {
+		$home_url = untrailingslashit( home_url() );
+
+		if ( self::is_restful() ) {
+			$referer = isset( $_SERVER['HTTP_REFERER'] )
+				? trim( $_SERVER['HTTP_REFERER'] ) : '';
+
+			if ( $referer && 0 === strpos( $referer, $home_url ) ) {
+				return esc_url_raw( $referer );
+			}
+		}
+
+		$url = preg_replace( '%(?<!:|/)/.*$%', '', $home_url )
+			. wpcf7_get_request_uri();
+
+		return $url;
+	}
+
+	private function validate() {
+		if ( $this->invalid_fields ) {
+			return false;
+		}
+
+		require_once WPCF7_PLUGIN_DIR . '/includes/validation.php';
+		$result = new WPCF7_Validation();
+
+		$tags = $this->contact_form->scan_form_tags();
+
+		foreach ( $tags as $tag ) {
+			$type = $tag->type;
+			$result = apply_filters( "wpcf7_validate_{$type}", $result, $tag );
+		}
+
+		$result = apply_filters( 'wpcf7_validate', $result, $tags );
+
+		$this->invalid_fields = $result->get_invalid_fields();
+
+		return $result->is_valid();
+	}
+
+	private function accepted() {
+		return apply_filters( 'wpcf7_acceptance', true, $this );
+	}
+
+	public function add_consent( $name, $conditions ) {
+		$this->consent[$name] = $conditions;
+		return true;
+	}
+
+	public function collect_consent() {
+		return (array) $this->consent;
+	}
+
+	private function spam() {
+		$spam = false;
+
+		if ( $this->contact_form->is_true( 'subscribers_only' )
+		&& current_user_can( 'wpcf7_submit', $this->contact_form->id() ) ) {
+			return $spam;
+		}
+
+		$user_agent = (string) $this->get_meta( 'user_agent' );
+
+		if ( strlen( $user_agent ) < 2 ) {
+			$spam = true;
+		}
+
+		if ( ! $this->verify_nonce() ) {
+			$spam = true;
+		}
+
+		if ( $this->is_blacklisted() ) {
+			$spam = true;
+		}
+
+		return apply_filters( 'wpcf7_spam', $spam );
+	}
+
+	private function verify_nonce() {
+		if ( ! $this->contact_form->nonce_is_active() ) {
+			return true;
+		}
+
+		return wpcf7_verify_nonce( $_POST['_wpnonce'] );
+	}
+
+	private function is_blacklisted() {
+		$target = wpcf7_array_flatten( $this->posted_data );
+		$target[] = $this->get_meta( 'remote_ip' );
+		$target[] = $this->get_meta( 'user_agent' );
+		$target = implode( "\n", $target );
+
+		return (bool) apply_filters( 'wpcf7_submission_is_blacklisted',
+			wpcf7_blacklist_check( $target ), $this );
+	}
+
+	/* Mail */
+
+	private function before_send_mail() {
+		$abort = false;
+
+		do_action_ref_array( 'wpcf7_before_send_mail', array(
+			$this->contact_form,
+			&$abort,
+			$this,
+		) );
+
+		return ! $abort;
+	}
+
+	private function mail() {
+		$contact_form = $this->contact_form;
+
+		$skip_mail = apply_filters( 'wpcf7_skip_mail',
+			$this->skip_mail, $contact_form );
+
+		if ( $skip_mail ) {
+			return true;
+		}
+
+		$result = WPCF7_Mail::send( $contact_form->prop( 'mail' ), 'mail' );
+
+		if ( $result ) {
+			$additional_mail = array();
+
+			if ( ( $mail_2 = $contact_form->prop( 'mail_2' ) ) && $mail_2['active'] ) {
+				$additional_mail['mail_2'] = $mail_2;
+			}
+
+			$additional_mail = apply_filters( 'wpcf7_additional_mail',
+				$additional_mail, $contact_form );
+
+			foreach ( $additional_mail as $name => $template ) {
+				WPCF7_Mail::send( $template, $name );
+			}
+
+			return true;
+		}
+
+		return false;
+	}
+
+	public function uploaded_files() {
+		return $this->uploaded_files;
+	}
+
+	public function add_uploaded_file( $name, $file_path ) {
+		$this->uploaded_files[$name] = $file_path;
+
+		if ( empty( $this->posted_data[$name] ) ) {
+			$this->posted_data[$name] = basename( $file_path );
+		}
+	}
+
+	public function remove_uploaded_files() {
+		foreach ( (array) $this->uploaded_files as $name => $path ) {
+			wpcf7_rmdir_p( $path );
+
+			if ( ( $dir = dirname( $path ) )
+			&& false !== ( $files = scandir( $dir ) )
+			&& ! array_diff( $files, array( '.', '..' ) ) ) {
+				// remove parent dir if it's empty.
+				rmdir( $dir );
+			}
+		}
+	}
+
+	public function get_meta( $name ) {
+		if ( isset( $this->meta[$name] ) ) {
+			return $this->meta[$name];
+		}
+	}
+}

+ 81 - 0
wp-content/plugins/contact-form-7/includes/upgrade.php

@@ -0,0 +1,81 @@
+<?php
+
+add_action( 'wpcf7_upgrade', 'wpcf7_convert_to_cpt', 10, 2 );
+
+function wpcf7_convert_to_cpt( $new_ver, $old_ver ) {
+	global $wpdb;
+
+	if ( ! version_compare( $old_ver, '3.0-dev', '<' ) ) {
+		return;
+	}
+
+	$old_rows = array();
+
+	$table_name = $wpdb->prefix . "contact_form_7";
+
+	if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) ) {
+		$old_rows = $wpdb->get_results( "SELECT * FROM $table_name" );
+	} elseif ( ( $opt = get_option( 'wpcf7' ) ) && ! empty( $opt['contact_forms'] ) ) {
+		foreach ( (array) $opt['contact_forms'] as $key => $value ) {
+			$old_rows[] = (object) array_merge( $value, array( 'cf7_unit_id' => $key ) );
+		}
+	}
+
+	foreach ( (array) $old_rows as $row ) {
+		$q = "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_old_cf7_unit_id'"
+			. $wpdb->prepare( " AND meta_value = %d", $row->cf7_unit_id );
+
+		if ( $wpdb->get_var( $q ) ) {
+			continue;
+		}
+
+		$postarr = array(
+			'post_type' => 'wpcf7_contact_form',
+			'post_status' => 'publish',
+			'post_title' => maybe_unserialize( $row->title ),
+		);
+
+		$post_id = wp_insert_post( $postarr );
+
+		if ( $post_id ) {
+			update_post_meta( $post_id, '_old_cf7_unit_id', $row->cf7_unit_id );
+
+			$metas = array( 'form', 'mail', 'mail_2', 'messages', 'additional_settings' );
+
+			foreach ( $metas as $meta ) {
+				update_post_meta( $post_id, '_' . $meta,
+					wpcf7_normalize_newline_deep( maybe_unserialize( $row->{$meta} ) ) );
+			}
+		}
+	}
+}
+
+add_action( 'wpcf7_upgrade', 'wpcf7_prepend_underscore', 10, 2 );
+
+function wpcf7_prepend_underscore( $new_ver, $old_ver ) {
+	if ( version_compare( $old_ver, '3.0-dev', '<' ) ) {
+		return;
+	}
+
+	if ( ! version_compare( $old_ver, '3.3-dev', '<' ) ) {
+		return;
+	}
+
+	$posts = WPCF7_ContactForm::find( array(
+		'post_status' => 'any',
+		'posts_per_page' => -1,
+	) );
+
+	foreach ( $posts as $post ) {
+		$props = $post->get_properties();
+
+		foreach ( $props as $prop => $value ) {
+			if ( metadata_exists( 'post', $post->id(), '_' . $prop ) ) {
+				continue;
+			}
+
+			update_post_meta( $post->id(), '_' . $prop, $value );
+			delete_post_meta( $post->id(), $prop );
+		}
+	}
+}

+ 81 - 0
wp-content/plugins/contact-form-7/includes/validation.php

@@ -0,0 +1,81 @@
+<?php
+
+class WPCF7_Validation implements ArrayAccess {
+	private $invalid_fields = array();
+	private $container = array();
+
+	public function __construct() {
+		$this->container = array(
+			'valid' => true,
+			'reason' => array(),
+			'idref' => array(),
+		);
+	}
+
+	public function invalidate( $context, $message ) {
+		if ( $context instanceof WPCF7_FormTag ) {
+			$tag = $context;
+		} elseif ( is_array( $context ) ) {
+			$tag = new WPCF7_FormTag( $context );
+		} elseif ( is_string( $context ) ) {
+			$tags = wpcf7_scan_form_tags( array( 'name' => trim( $context ) ) );
+			$tag = $tags ? new WPCF7_FormTag( $tags[0] ) : null;
+		}
+
+		$name = ! empty( $tag ) ? $tag->name : null;
+
+		if ( empty( $name ) || ! wpcf7_is_name( $name ) ) {
+			return;
+		}
+
+		if ( $this->is_valid( $name ) ) {
+			$id = $tag->get_id_option();
+
+			if ( empty( $id ) || ! wpcf7_is_name( $id ) ) {
+				$id = null;
+			}
+
+			$this->invalid_fields[$name] = array(
+				'reason' => (string) $message,
+				'idref' => $id,
+			);
+		}
+	}
+
+	public function is_valid( $name = null ) {
+		if ( ! empty( $name ) ) {
+			return ! isset( $this->invalid_fields[$name] );
+		} else {
+			return empty( $this->invalid_fields );
+		}
+	}
+
+	public function get_invalid_fields() {
+		return $this->invalid_fields;
+	}
+
+	public function offsetSet( $offset, $value ) {
+		if ( isset( $this->container[$offset] ) ) {
+			$this->container[$offset] = $value;
+		}
+
+		if ( 'reason' == $offset && is_array( $value ) ) {
+			foreach ( $value as $k => $v ) {
+				$this->invalidate( $k, $v );
+			}
+		}
+	}
+
+	public function offsetGet( $offset ) {
+		if ( isset( $this->container[$offset] ) ) {
+			return $this->container[$offset];
+		}
+	}
+
+	public function offsetExists( $offset ) {
+		return isset( $this->container[$offset] );
+	}
+
+	public function offsetUnset( $offset ) {
+	}
+}

+ 4 - 0
wp-content/plugins/contact-form-7/languages/readme.txt

@@ -0,0 +1,4 @@
+Translations have moved to
+https://translate.wordpress.org/projects/wp-plugins/contact-form-7
+
+Thank you for your contribution.

+ 358 - 0
wp-content/plugins/contact-form-7/license.txt

@@ -0,0 +1,358 @@
+Contact Form 7 WordPress Plugin, 2007-2018 Takayuki Miyoshi
+Contact Form 7 is distributed under the terms of the GNU GPL
+
+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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+                    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.

+ 281 - 0
wp-content/plugins/contact-form-7/modules/acceptance.php

@@ -0,0 +1,281 @@
+<?php
+/**
+** A base module for [acceptance]
+**/
+
+/* form_tag handler */
+
+add_action( 'wpcf7_init', 'wpcf7_add_form_tag_acceptance' );
+
+function wpcf7_add_form_tag_acceptance() {
+	wpcf7_add_form_tag( 'acceptance',
+		'wpcf7_acceptance_form_tag_handler',
+		array(
+			'name-attr' => true,
+			'do-not-store' => true,
+		)
+	);
+}
+
+function wpcf7_acceptance_form_tag_handler( $tag ) {
+	if ( empty( $tag->name ) ) {
+		return '';
+	}
+
+	$validation_error = wpcf7_get_validation_error( $tag->name );
+
+	$class = wpcf7_form_controls_class( $tag->type );
+
+	if ( $validation_error ) {
+		$class .= ' wpcf7-not-valid';
+	}
+
+	if ( $tag->has_option( 'invert' ) ) {
+		$class .= ' invert';
+	}
+
+	if ( $tag->has_option( 'optional' ) ) {
+		$class .= ' optional';
+	}
+
+	$atts = array(
+		'class' => trim( $class ),
+	);
+
+	$item_atts = array();
+
+	$item_atts['type'] = 'checkbox';
+	$item_atts['name'] = $tag->name;
+	$item_atts['value'] = '1';
+	$item_atts['tabindex'] = $tag->get_option( 'tabindex', 'signed_int', true );
+	$item_atts['aria-invalid'] = $validation_error ? 'true' : 'false';
+
+	if ( $tag->has_option( 'default:on' ) ) {
+		$item_atts['checked'] = 'checked';
+	}
+
+	$item_atts['class'] = $tag->get_class_option();
+	$item_atts['id'] = $tag->get_id_option();
+
+	$item_atts = wpcf7_format_atts( $item_atts );
+
+	$content = empty( $tag->content )
+		? (string) reset( $tag->values )
+		: $tag->content;
+
+	$content = trim( $content );
+
+	if ( $content ) {
+		$html = sprintf(
+			'<span class="wpcf7-list-item"><label><input %1$s /><span class="wpcf7-list-item-label">%2$s</span></label></span>',
+			$item_atts, $content );
+	} else {
+		$html = sprintf(
+			'<span class="wpcf7-list-item"><input %1$s /></span>',
+			$item_atts );
+	}
+
+	$atts = wpcf7_format_atts( $atts );
+
+	$html = sprintf(
+		'<span class="wpcf7-form-control-wrap %1$s"><span %2$s>%3$s</span>%4$s</span>',
+		sanitize_html_class( $tag->name ), $atts, $html, $validation_error );
+
+	return $html;
+}
+
+
+/* Validation filter */
+
+add_filter( 'wpcf7_validate_acceptance',
+	'wpcf7_acceptance_validation_filter', 10, 2 );
+
+function wpcf7_acceptance_validation_filter( $result, $tag ) {
+	if ( ! wpcf7_acceptance_as_validation() ) {
+		return $result;
+	}
+
+	if ( $tag->has_option( 'optional' ) ) {
+		return $result;
+	}
+
+	$name = $tag->name;
+	$value = ( ! empty( $_POST[$name] ) ? 1 : 0 );
+
+	$invert = $tag->has_option( 'invert' );
+
+	if ( $invert && $value || ! $invert && ! $value ) {
+		$result->invalidate( $tag, wpcf7_get_message( 'accept_terms' ) );
+	}
+
+	return $result;
+}
+
+
+/* Acceptance filter */
+
+add_filter( 'wpcf7_acceptance', 'wpcf7_acceptance_filter', 10, 2 );
+
+function wpcf7_acceptance_filter( $accepted, $submission ) {
+	$tags = wpcf7_scan_form_tags( array( 'type' => 'acceptance' ) );
+
+	foreach ( $tags as $tag ) {
+		$name = $tag->name;
+
+		if ( empty( $name ) ) {
+			continue;
+		}
+
+		$value = ( ! empty( $_POST[$name] ) ? 1 : 0 );
+
+		$content = empty( $tag->content )
+			? (string) reset( $tag->values )
+			: $tag->content;
+
+		$content = trim( $content );
+
+		if ( $value && $content ) {
+			$submission->add_consent( $name, $content );
+		}
+
+		if ( $tag->has_option( 'optional' ) ) {
+			continue;
+		}
+
+		$invert = $tag->has_option( 'invert' );
+
+		if ( $invert && $value || ! $invert && ! $value ) {
+			$accepted = false;
+		}
+	}
+
+	return $accepted;
+}
+
+add_filter( 'wpcf7_form_class_attr', 'wpcf7_acceptance_form_class_attr' );
+
+function wpcf7_acceptance_form_class_attr( $class ) {
+	if ( wpcf7_acceptance_as_validation() ) {
+		return $class . ' wpcf7-acceptance-as-validation';
+	}
+
+	return $class;
+}
+
+function wpcf7_acceptance_as_validation() {
+	if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
+		return false;
+	}
+
+	return $contact_form->is_true( 'acceptance_as_validation' );
+}
+
+add_filter( 'wpcf7_mail_tag_replaced_acceptance',
+	'wpcf7_acceptance_mail_tag', 10, 4 );
+
+function wpcf7_acceptance_mail_tag( $replaced, $submitted, $html, $mail_tag ) {
+	$form_tag = $mail_tag->corresponding_form_tag();
+
+	if ( ! $form_tag ) {
+		return $replaced;
+	}
+
+	if ( ! empty( $submitted ) ) {
+		$replaced = __( 'Consented', 'contact-form-7' );
+	} else {
+		$replaced = __( 'Not consented', 'contact-form-7' );
+	}
+
+	$content = empty( $form_tag->content )
+		? (string) reset( $form_tag->values )
+		: $form_tag->content;
+
+	if ( ! $html ) {
+		$content = wp_strip_all_tags( $content );
+	}
+
+	$content = trim( $content );
+
+	if ( $content ) {
+		/* translators: 1: 'Consented' or 'Not consented', 2: conditions */
+		$replaced = sprintf(
+			_x( '%1$s: %2$s', 'mail output for acceptance checkboxes',
+				'contact-form-7' ),
+			$replaced,
+			$content );
+	}
+
+	return $replaced;
+}
+
+
+/* Tag generator */
+
+add_action( 'wpcf7_admin_init', 'wpcf7_add_tag_generator_acceptance', 35 );
+
+function wpcf7_add_tag_generator_acceptance() {
+	$tag_generator = WPCF7_TagGenerator::get_instance();
+	$tag_generator->add( 'acceptance', __( 'acceptance', 'contact-form-7' ),
+		'wpcf7_tag_generator_acceptance' );
+}
+
+function wpcf7_tag_generator_acceptance( $contact_form, $args = '' ) {
+	$args = wp_parse_args( $args, array() );
+	$type = 'acceptance';
+
+	$description = __( "Generate a form-tag for an acceptance checkbox. For more details, see %s.", 'contact-form-7' );
+
+	$desc_link = wpcf7_link( __( 'https://contactform7.com/acceptance-checkbox/', 'contact-form-7' ), __( 'Acceptance Checkbox', 'contact-form-7' ) );
+
+?>
+<div class="control-box">
+<fieldset>
+<legend><?php echo sprintf( esc_html( $description ), $desc_link ); ?></legend>
+
+<table class="form-table">
+<tbody>
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-content' ); ?>"><?php echo esc_html( __( 'Condition', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="content" class="oneline large-text" id="<?php echo esc_attr( $args['content'] . '-content' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><?php echo esc_html( __( 'Options', 'contact-form-7' ) ); ?></th>
+	<td>
+		<fieldset>
+		<legend class="screen-reader-text"><?php echo esc_html( __( 'Options', 'contact-form-7' ) ); ?></legend>
+		<label><input type="checkbox" name="default:on" class="option" /> <?php echo esc_html( __( 'Make this checkbox checked by default', 'contact-form-7' ) ); ?></label><br />
+		<label><input type="checkbox" name="invert" class="option" /> <?php echo esc_html( __( 'Make this work inversely', 'contact-form-7' ) ); ?></label>
+		</fieldset>
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td>
+	</tr>
+
+</tbody>
+</table>
+</fieldset>
+</div>
+
+<div class="insert-box">
+	<input type="text" name="<?php echo $type; ?>" class="tag code" readonly="readonly" onfocus="this.select()" />
+
+	<div class="submitbox">
+	<input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" />
+	</div>
+</div>
+<?php
+}

+ 137 - 0
wp-content/plugins/contact-form-7/modules/akismet.php

@@ -0,0 +1,137 @@
+<?php
+/**
+** Akismet Filter
+** Akismet API: http://akismet.com/development/api/
+**/
+
+add_filter( 'wpcf7_spam', 'wpcf7_akismet' );
+
+function wpcf7_akismet( $spam ) {
+	if ( $spam ) {
+		return $spam;
+	}
+
+	if ( ! wpcf7_akismet_is_available() ) {
+		return false;
+	}
+
+	if ( ! $params = wpcf7_akismet_submitted_params() ) {
+		return false;
+	}
+
+	$c = array();
+
+	$c['comment_author'] = $params['author'];
+	$c['comment_author_email'] = $params['author_email'];
+	$c['comment_author_url'] = $params['author_url'];
+	$c['comment_content'] = $params['content'];
+
+	$c['blog'] = get_option( 'home' );
+	$c['blog_lang'] = get_locale();
+	$c['blog_charset'] = get_option( 'blog_charset' );
+	$c['user_ip'] = $_SERVER['REMOTE_ADDR'];
+	$c['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
+	$c['referrer'] = $_SERVER['HTTP_REFERER'];
+
+	// http://blog.akismet.com/2012/06/19/pro-tip-tell-us-your-comment_type/
+	$c['comment_type'] = 'contact-form';
+
+	if ( $permalink = get_permalink() ) {
+		$c['permalink'] = $permalink;
+	}
+
+	$ignore = array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' );
+
+	foreach ( $_SERVER as $key => $value ) {
+		if ( ! in_array( $key, (array) $ignore ) ) {
+			$c["$key"] = $value;
+		}
+	}
+
+	return wpcf7_akismet_comment_check( $c );
+}
+
+function wpcf7_akismet_is_available() {
+	if ( is_callable( array( 'Akismet', 'get_api_key' ) ) ) {
+		return (bool) Akismet::get_api_key();
+	}
+
+	return false;
+}
+
+function wpcf7_akismet_submitted_params() {
+	$params = array(
+		'author' => '',
+		'author_email' => '',
+		'author_url' => '',
+		'content' => '',
+	);
+
+	$has_akismet_option = false;
+
+	foreach ( (array) $_POST as $key => $val ) {
+		if ( '_wpcf7' == substr( $key, 0, 6 ) || '_wpnonce' == $key ) {
+			continue;
+		}
+
+		if ( is_array( $val ) ) {
+			$val = implode( ', ', wpcf7_array_flatten( $val ) );
+		}
+
+		$val = trim( $val );
+
+		if ( 0 == strlen( $val ) ) {
+			continue;
+		}
+
+		if ( $tags = wpcf7_scan_form_tags( array( 'name' => $key ) ) ) {
+			$tag = $tags[0];
+
+			$akismet = $tag->get_option( 'akismet',
+				'(author|author_email|author_url)', true );
+
+			if ( $akismet ) {
+				$has_akismet_option = true;
+
+				if ( 'author' == $akismet ) {
+					$params[$akismet] = trim( $params[$akismet] . ' ' . $val );
+					continue;
+				} elseif ( '' == $params[$akismet] ) {
+					$params[$akismet] = $val;
+					continue;
+				}
+			}
+		}
+
+		$params['content'] .= "\n\n" . $val;
+	}
+
+	if ( ! $has_akismet_option ) {
+		return false;
+	}
+
+	$params['content'] = trim( $params['content'] );
+
+	return $params;
+}
+
+function wpcf7_akismet_comment_check( $comment ) {
+	$spam = false;
+	$query_string = wpcf7_build_query( $comment );
+
+	if ( is_callable( array( 'Akismet', 'http_post' ) ) ) {
+		$response = Akismet::http_post( $query_string, 'comment-check' );
+	} else {
+		return $spam;
+	}
+
+	if ( 'true' == $response[1] ) {
+		$spam = true;
+	}
+
+	if ( $submission = WPCF7_Submission::get_instance() ) {
+		$submission->akismet = array( 'comment' => $comment, 'spam' => $spam );
+	}
+
+	return apply_filters( 'wpcf7_akismet_comment_check', $spam, $comment );
+}

File diff suppressed because it is too large
+ 365 - 0
wp-content/plugins/contact-form-7/modules/checkbox.php


+ 64 - 0
wp-content/plugins/contact-form-7/modules/count.php

@@ -0,0 +1,64 @@
+<?php
+/**
+** A base module for [count], Twitter-like character count
+**/
+
+/* form_tag handler */
+
+add_action( 'wpcf7_init', 'wpcf7_add_form_tag_count' );
+
+function wpcf7_add_form_tag_count() {
+	wpcf7_add_form_tag( 'count',
+		'wpcf7_count_form_tag_handler',
+		array(
+			'name-attr' => true,
+			'zero-controls-container' => true,
+			'not-for-mail' => true,
+		)
+	);
+}
+
+function wpcf7_count_form_tag_handler( $tag ) {
+	if ( empty( $tag->name ) ) {
+		return '';
+	}
+
+	$targets = wpcf7_scan_form_tags( array( 'name' => $tag->name ) );
+	$maxlength = $minlength = null;
+
+	while ( $targets ) {
+		$target = array_shift( $targets );
+
+		if ( 'count' != $target->type ) {
+			$maxlength = $target->get_maxlength_option();
+			$minlength = $target->get_minlength_option();
+			break;
+		}
+	}
+
+	if ( $maxlength && $minlength && $maxlength < $minlength ) {
+		$maxlength = $minlength = null;
+	}
+
+	if ( $tag->has_option( 'down' ) ) {
+		$value = (int) $maxlength;
+		$class = 'wpcf7-character-count down';
+	} else {
+		$value = '0';
+		$class = 'wpcf7-character-count up';
+	}
+
+	$atts = array();
+	$atts['id'] = $tag->get_id_option();
+	$atts['class'] = $tag->get_class_option( $class );
+	$atts['data-target-name'] = $tag->name;
+	$atts['data-starting-value'] = $value;
+	$atts['data-current-value'] = $value;
+	$atts['data-maximum-value'] = $maxlength;
+	$atts['data-minimum-value'] = $minlength;
+	$atts = wpcf7_format_atts( $atts );
+
+	$html = sprintf( '<span %1$s>%2$s</span>', $atts, $value );
+
+	return $html;
+}

File diff suppressed because it is too large
+ 224 - 0
wp-content/plugins/contact-form-7/modules/date.php


File diff suppressed because it is too large
+ 452 - 0
wp-content/plugins/contact-form-7/modules/file.php


+ 264 - 0
wp-content/plugins/contact-form-7/modules/flamingo.php

@@ -0,0 +1,264 @@
+<?php
+/**
+** Module for Flamingo plugin.
+** http://wordpress.org/extend/plugins/flamingo/
+**/
+
+add_action( 'wpcf7_submit', 'wpcf7_flamingo_submit', 10, 2 );
+
+function wpcf7_flamingo_submit( $contact_form, $result ) {
+	if ( ! class_exists( 'Flamingo_Contact' )
+	|| ! class_exists( 'Flamingo_Inbound_Message' ) ) {
+		return;
+	}
+
+	if ( $contact_form->in_demo_mode()
+	|| $contact_form->is_true( 'do_not_store' ) ) {
+		return;
+	}
+
+	$cases = (array) apply_filters( 'wpcf7_flamingo_submit_if',
+		array( 'spam', 'mail_sent', 'mail_failed' ) );
+
+	if ( empty( $result['status'] )
+	|| ! in_array( $result['status'], $cases ) ) {
+		return;
+	}
+
+	$submission = WPCF7_Submission::get_instance();
+
+	if ( ! $submission || ! $posted_data = $submission->get_posted_data() ) {
+		return;
+	}
+
+	$fields_senseless =
+		$contact_form->scan_form_tags( array( 'feature' => 'do-not-store' ) );
+
+	$exclude_names = array();
+
+	foreach ( $fields_senseless as $tag ) {
+		$exclude_names[] = $tag['name'];
+	}
+
+	$exclude_names[] = 'g-recaptcha-response';
+
+	foreach ( $posted_data as $key => $value ) {
+		if ( '_' == substr( $key, 0, 1 ) || in_array( $key, $exclude_names ) ) {
+			unset( $posted_data[$key] );
+		}
+	}
+
+	$email = wpcf7_flamingo_get_value( 'email', $contact_form );
+	$name = wpcf7_flamingo_get_value( 'name', $contact_form );
+	$subject = wpcf7_flamingo_get_value( 'subject', $contact_form );
+
+	$meta = array();
+
+	$special_mail_tags = array( 'serial_number', 'remote_ip',
+		'user_agent', 'url', 'date', 'time', 'post_id', 'post_name',
+		'post_title', 'post_url', 'post_author', 'post_author_email',
+		'site_title', 'site_description', 'site_url', 'site_admin_email',
+		'user_login', 'user_email', 'user_display_name' );
+
+	foreach ( $special_mail_tags as $smt ) {
+		$meta[$smt] = apply_filters( 'wpcf7_special_mail_tags', '',
+			sprintf( '_%s', $smt ), false );
+	}
+
+	$akismet = isset( $submission->akismet )
+		? (array) $submission->akismet : null;
+
+	if ( 'mail_sent' == $result['status'] ) {
+		$flamingo_contact = Flamingo_Contact::add( array(
+			'email' => $email,
+			'name' => $name,
+		) );
+	}
+
+	$post_meta = get_post_meta( $contact_form->id(), '_flamingo', true );
+
+	$channel_id = isset( $post_meta['channel'] )
+		? (int) $post_meta['channel']
+		: wpcf7_flamingo_add_channel(
+			$contact_form->name(), $contact_form->title() );
+
+	if ( $channel_id ) {
+		if ( ! isset( $post_meta['channel'] )
+		|| $post_meta['channel'] !== $channel_id ) {
+			$post_meta = empty( $post_meta ) ? array() : (array) $post_meta;
+			$post_meta = array_merge( $post_meta, array(
+				'channel' => $channel_id,
+			) );
+
+			update_post_meta( $contact_form->id(), '_flamingo', $post_meta );
+		}
+
+		$channel = get_term( $channel_id,
+			Flamingo_Inbound_Message::channel_taxonomy );
+
+		if ( ! $channel || is_wp_error( $channel ) ) {
+			$channel = 'contact-form-7';
+		} else {
+			$channel = $channel->slug;
+		}
+	} else {
+		$channel = 'contact-form-7';
+	}
+
+	$args = array(
+		'channel' => $channel,
+		'subject' => $subject,
+		'from' => trim( sprintf( '%s <%s>', $name, $email ) ),
+		'from_name' => $name,
+		'from_email' => $email,
+		'fields' => $posted_data,
+		'meta' => $meta,
+		'akismet' => $akismet,
+		'spam' => ( 'spam' == $result['status'] ),
+		'consent' => $submission->collect_consent(),
+	);
+
+	$flamingo_inbound = Flamingo_Inbound_Message::add( $args );
+
+	$result += array(
+		'flamingo_contact_id' =>
+			empty( $flamingo_contact ) ? 0 : absint( $flamingo_contact->id ),
+		'flamingo_inbound_id' =>
+			empty( $flamingo_inbound ) ? 0 : absint( $flamingo_inbound->id ),
+	);
+
+	do_action( 'wpcf7_after_flamingo', $result );
+}
+
+function wpcf7_flamingo_get_value( $field, $contact_form ) {
+	if ( empty( $field ) || empty( $contact_form ) ) {
+		return false;
+	}
+
+	$value = '';
+
+	if ( in_array( $field, array( 'email', 'name', 'subject' ) ) ) {
+		$templates = $contact_form->additional_setting( 'flamingo_' . $field );
+
+		if ( empty( $templates[0] ) ) {
+			$template = sprintf( '[your-%s]', $field );
+		} else {
+			$template = trim( wpcf7_strip_quote( $templates[0] ) );
+		}
+
+		$value = wpcf7_mail_replace_tags( $template );
+	}
+
+	$value = apply_filters( 'wpcf7_flamingo_get_value', $value,
+		$field, $contact_form );
+
+	return $value;
+}
+
+function wpcf7_flamingo_add_channel( $slug, $name = '' ) {
+	if ( ! class_exists( 'Flamingo_Inbound_Message' ) ) {
+		return false;
+	}
+
+	$parent = term_exists( 'contact-form-7',
+		Flamingo_Inbound_Message::channel_taxonomy );
+
+	if ( ! $parent ) {
+		$parent = wp_insert_term( __( 'Contact Form 7', 'contact-form-7' ),
+			Flamingo_Inbound_Message::channel_taxonomy,
+			array( 'slug' => 'contact-form-7' ) );
+
+		if ( is_wp_error( $parent ) ) {
+			return false;
+		}
+	}
+
+	$parent = (int) $parent['term_id'];
+
+	if ( ! is_taxonomy_hierarchical( Flamingo_Inbound_Message::channel_taxonomy ) ) {
+		// backward compat for Flamingo 1.0.4 and lower
+		return $parent;
+	}
+
+	if ( empty( $name ) ) {
+		$name = $slug;
+	}
+
+	$channel = term_exists( $slug,
+		Flamingo_Inbound_Message::channel_taxonomy,
+		$parent );
+
+	if ( ! $channel ) {
+		$channel = wp_insert_term( $name,
+			Flamingo_Inbound_Message::channel_taxonomy,
+			array( 'slug' => $slug, 'parent' => $parent ) );
+
+		if ( is_wp_error( $channel ) ) {
+			return false;
+		}
+	}
+
+	return (int) $channel['term_id'];
+}
+
+add_action( 'wpcf7_after_update', 'wpcf7_flamingo_update_channel' );
+
+function wpcf7_flamingo_update_channel( $contact_form ) {
+	if ( ! class_exists( 'Flamingo_Inbound_Message' ) ) {
+		return false;
+	}
+
+	$post_meta = get_post_meta( $contact_form->id(), '_flamingo', true );
+
+	$channel = isset( $post_meta['channel'] )
+		? get_term( $post_meta['channel'],
+			Flamingo_Inbound_Message::channel_taxonomy )
+		: get_term_by( 'slug', $contact_form->name(),
+			Flamingo_Inbound_Message::channel_taxonomy );
+
+	if ( ! $channel || is_wp_error( $channel ) ) {
+		return;
+	}
+
+	if ( $channel->name !== wp_unslash( $contact_form->title() ) ) {
+		wp_update_term( $channel->term_id,
+			Flamingo_Inbound_Message::channel_taxonomy,
+			array(
+				'name' => $contact_form->title(),
+				'slug' => $contact_form->name(),
+				'parent' => $channel->parent,
+			)
+		);
+	}
+}
+
+add_filter( 'wpcf7_special_mail_tags', 'wpcf7_flamingo_serial_number', 10, 3 );
+
+function wpcf7_flamingo_serial_number( $output, $name, $html ) {
+	if ( '_serial_number' != $name ) {
+		return $output;
+	}
+
+	if ( ! class_exists( 'Flamingo_Inbound_Message' )
+	|| ! method_exists( 'Flamingo_Inbound_Message', 'count' ) ) {
+		return $output;
+	}
+
+	if ( ! $contact_form = WPCF7_ContactForm::get_current() ) {
+		return $output;
+	}
+
+	$post_meta = get_post_meta( $contact_form->id(), '_flamingo', true );
+
+	$channel_id = isset( $post_meta['channel'] )
+		? (int) $post_meta['channel']
+		: wpcf7_flamingo_add_channel(
+			$contact_form->name(), $contact_form->title() );
+
+	if ( $channel_id ) {
+		return 1 + (int) Flamingo_Inbound_Message::count(
+			array( 'channel_id' => $channel_id ) );
+	}
+
+	return 0;
+}

+ 36 - 0
wp-content/plugins/contact-form-7/modules/hidden.php

@@ -0,0 +1,36 @@
+<?php
+
+add_action( 'wpcf7_init', 'wpcf7_add_form_tag_hidden' );
+
+function wpcf7_add_form_tag_hidden() {
+	wpcf7_add_form_tag( 'hidden',
+		'wpcf7_hidden_form_tag_handler',
+		array(
+			'name-attr' => true,
+			'display-hidden' => true,
+		)
+	);
+}
+
+function wpcf7_hidden_form_tag_handler( $tag ) {
+	if ( empty( $tag->name ) ) {
+		return '';
+	}
+
+	$atts = array();
+
+	$class = wpcf7_form_controls_class( $tag->type );
+	$atts['class'] = $tag->get_class_option( $class );
+	$atts['id'] = $tag->get_id_option();
+
+	$value = (string) reset( $tag->values );
+	$value = $tag->get_default_option( $value );
+	$atts['value'] = $value;
+
+	$atts['type'] = 'hidden';
+	$atts['name'] = $tag->name;
+	$atts = wpcf7_format_atts( $atts );
+
+	$html = sprintf( '<input %s />', $atts );
+	return $html;
+}

+ 30 - 0
wp-content/plugins/contact-form-7/modules/listo.php

@@ -0,0 +1,30 @@
+<?php
+/**
+** Retrieve list data from the Listo plugin.
+** Listo http://wordpress.org/plugins/listo/
+**/
+
+add_filter( 'wpcf7_form_tag_data_option', 'wpcf7_listo', 10, 3 );
+
+function wpcf7_listo( $data, $options, $args ) {
+	if ( ! function_exists( 'listo' ) ) {
+		return $data;
+	}
+
+	$args = wp_parse_args( $args, array() );
+
+	$contact_form = wpcf7_get_current_contact_form();
+	$args['locale'] = $contact_form->locale();
+
+	foreach ( (array) $options as $option ) {
+		$option = explode( '.', $option );
+		$type = $option[0];
+		$args['group'] = isset( $option[1] ) ? $option[1] : null;
+
+		if ( $list = listo( $type, $args ) ) {
+			$data = array_merge( (array) $data, $list );
+		}
+	}
+
+	return $data;
+}

File diff suppressed because it is too large
+ 232 - 0
wp-content/plugins/contact-form-7/modules/number.php


+ 235 - 0
wp-content/plugins/contact-form-7/modules/quiz.php

@@ -0,0 +1,235 @@
+<?php
+/**
+** A base module for [quiz]
+**/
+
+/* form_tag handler */
+
+add_action( 'wpcf7_init', 'wpcf7_add_form_tag_quiz' );
+
+function wpcf7_add_form_tag_quiz() {
+	wpcf7_add_form_tag( 'quiz',
+		'wpcf7_quiz_form_tag_handler',
+		array(
+			'name-attr' => true,
+			'do-not-store' => true,
+			'not-for-mail' => true,
+		)
+	);
+}
+
+function wpcf7_quiz_form_tag_handler( $tag ) {
+	if ( empty( $tag->name ) ) {
+		return '';
+	}
+
+	$validation_error = wpcf7_get_validation_error( $tag->name );
+
+	$class = wpcf7_form_controls_class( $tag->type );
+
+	if ( $validation_error ) {
+		$class .= ' wpcf7-not-valid';
+	}
+
+	$atts = array();
+
+	$atts['size'] = $tag->get_size_option( '40' );
+	$atts['maxlength'] = $tag->get_maxlength_option();
+	$atts['minlength'] = $tag->get_minlength_option();
+
+	if ( $atts['maxlength'] && $atts['minlength'] && $atts['maxlength'] < $atts['minlength'] ) {
+		unset( $atts['maxlength'], $atts['minlength'] );
+	}
+
+	$atts['class'] = $tag->get_class_option( $class );
+	$atts['id'] = $tag->get_id_option();
+	$atts['tabindex'] = $tag->get_option( 'tabindex', 'signed_int', true );
+	$atts['autocomplete'] = 'off';
+	$atts['aria-required'] = 'true';
+	$atts['aria-invalid'] = $validation_error ? 'true' : 'false';
+
+	$pipes = $tag->pipes;
+
+	if ( $pipes instanceof WPCF7_Pipes && ! $pipes->zero() ) {
+		$pipe = $pipes->random_pipe();
+		$question = $pipe->before;
+		$answer = $pipe->after;
+	} else {
+		// default quiz
+		$question = '1+1=?';
+		$answer = '2';
+	}
+
+	$answer = wpcf7_canonicalize( $answer );
+
+	$atts['type'] = 'text';
+	$atts['name'] = $tag->name;
+
+	$atts = wpcf7_format_atts( $atts );
+
+	$html = sprintf(
+		'<span class="wpcf7-form-control-wrap %1$s"><label><span class="wpcf7-quiz-label">%2$s</span> <input %3$s /></label><input type="hidden" name="_wpcf7_quiz_answer_%4$s" value="%5$s" />%6$s</span>',
+		sanitize_html_class( $tag->name ),
+		esc_html( $question ), $atts, $tag->name,
+		wp_hash( $answer, 'wpcf7_quiz' ), $validation_error );
+
+	return $html;
+}
+
+
+/* Validation filter */
+
+add_filter( 'wpcf7_validate_quiz', 'wpcf7_quiz_validation_filter', 10, 2 );
+
+function wpcf7_quiz_validation_filter( $result, $tag ) {
+	$name = $tag->name;
+
+	$answer = isset( $_POST[$name] ) ? wpcf7_canonicalize( $_POST[$name] ) : '';
+	$answer = wp_unslash( $answer );
+
+	$answer_hash = wp_hash( $answer, 'wpcf7_quiz' );
+
+	$expected_hash = isset( $_POST['_wpcf7_quiz_answer_' . $name] )
+		? (string) $_POST['_wpcf7_quiz_answer_' . $name]
+		: '';
+
+	if ( $answer_hash != $expected_hash ) {
+		$result->invalidate( $tag, wpcf7_get_message( 'quiz_answer_not_correct' ) );
+	}
+
+	return $result;
+}
+
+
+/* Ajax echo filter */
+
+add_filter( 'wpcf7_ajax_onload', 'wpcf7_quiz_ajax_refill' );
+add_filter( 'wpcf7_ajax_json_echo', 'wpcf7_quiz_ajax_refill' );
+
+function wpcf7_quiz_ajax_refill( $items ) {
+	if ( ! is_array( $items ) ) {
+		return $items;
+	}
+
+	$fes = wpcf7_scan_form_tags( array( 'type' => 'quiz' ) );
+
+	if ( empty( $fes ) ) {
+		return $items;
+	}
+
+	$refill = array();
+
+	foreach ( $fes as $fe ) {
+		$name = $fe['name'];
+		$pipes = $fe['pipes'];
+
+		if ( empty( $name ) ) {
+			continue;
+		}
+
+		if ( $pipes instanceof WPCF7_Pipes && ! $pipes->zero() ) {
+			$pipe = $pipes->random_pipe();
+			$question = $pipe->before;
+			$answer = $pipe->after;
+		} else {
+			// default quiz
+			$question = '1+1=?';
+			$answer = '2';
+		}
+
+		$answer = wpcf7_canonicalize( $answer );
+
+		$refill[$name] = array( $question, wp_hash( $answer, 'wpcf7_quiz' ) );
+	}
+
+	if ( ! empty( $refill ) ) {
+		$items['quiz'] = $refill;
+	}
+
+	return $items;
+}
+
+
+/* Messages */
+
+add_filter( 'wpcf7_messages', 'wpcf7_quiz_messages' );
+
+function wpcf7_quiz_messages( $messages ) {
+	$messages = array_merge( $messages, array(
+		'quiz_answer_not_correct' => array(
+			'description' =>
+				__( "Sender doesn't enter the correct answer to the quiz", 'contact-form-7' ),
+			'default' =>
+				__( "The answer to the quiz is incorrect.", 'contact-form-7' ),
+		),
+	) );
+
+	return $messages;
+}
+
+
+/* Tag generator */
+
+add_action( 'wpcf7_admin_init', 'wpcf7_add_tag_generator_quiz', 40 );
+
+function wpcf7_add_tag_generator_quiz() {
+	$tag_generator = WPCF7_TagGenerator::get_instance();
+	$tag_generator->add( 'quiz', __( 'quiz', 'contact-form-7' ),
+		'wpcf7_tag_generator_quiz' );
+}
+
+function wpcf7_tag_generator_quiz( $contact_form, $args = '' ) {
+	$args = wp_parse_args( $args, array() );
+	$type = 'quiz';
+
+	$description = __( "Generate a form-tag for a question-answer pair. For more details, see %s.", 'contact-form-7' );
+
+	$desc_link = wpcf7_link( __( 'https://contactform7.com/quiz/', 'contact-form-7' ), __( 'Quiz', 'contact-form-7' ) );
+
+?>
+<div class="control-box">
+<fieldset>
+<legend><?php echo sprintf( esc_html( $description ), $desc_link ); ?></legend>
+
+<table class="form-table">
+<tbody>
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><?php echo esc_html( __( 'Questions and answers', 'contact-form-7' ) ); ?></th>
+	<td>
+		<fieldset>
+		<legend class="screen-reader-text"><?php echo esc_html( __( 'Questions and answers', 'contact-form-7' ) ); ?></legend>
+		<textarea name="values" class="values" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>"></textarea><br />
+		<label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><span class="description"><?php echo esc_html( __( "One pipe-separated question-answer pair (e.g. The capital of Brazil?|Rio) per line.", 'contact-form-7' ) ); ?></span></label>
+		</fieldset>
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td>
+	</tr>
+
+</tbody>
+</table>
+</fieldset>
+</div>
+
+<div class="insert-box">
+	<input type="text" name="<?php echo $type; ?>" class="tag code" readonly="readonly" onfocus="this.select()" />
+
+	<div class="submitbox">
+	<input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" />
+	</div>
+</div>
+<?php
+}

+ 646 - 0
wp-content/plugins/contact-form-7/modules/really-simple-captcha.php

@@ -0,0 +1,646 @@
+<?php
+/**
+** A base module for [captchac] and [captchar]
+**/
+
+/* form_tag handler */
+
+add_action( 'wpcf7_init', 'wpcf7_add_form_tag_captcha' );
+
+function wpcf7_add_form_tag_captcha() {
+	// CAPTCHA-Challenge (image)
+	wpcf7_add_form_tag( 'captchac',
+		'wpcf7_captchac_form_tag_handler',
+		array(
+			'name-attr' => true,
+			'zero-controls-container' => true,
+			'not-for-mail' => true,
+		)
+	);
+
+	// CAPTCHA-Response (input)
+	wpcf7_add_form_tag( 'captchar',
+		'wpcf7_captchar_form_tag_handler',
+		array(
+			'name-attr' => true,
+			'do-not-store' => true,
+			'not-for-mail' => true,
+		)
+	);
+}
+
+function wpcf7_captchac_form_tag_handler( $tag ) {
+	if ( ! class_exists( 'ReallySimpleCaptcha' ) ) {
+		$error = sprintf(
+			/* translators: %s: link labeled 'Really Simple CAPTCHA' */
+			esc_html( __( "To use CAPTCHA, you need %s plugin installed.", 'contact-form-7' ) ),
+			wpcf7_link( 'https://wordpress.org/plugins/really-simple-captcha/', 'Really Simple CAPTCHA' ) );
+
+		return sprintf( '<em>%s</em>', $error );
+	}
+
+	if ( empty( $tag->name ) ) {
+		return '';
+	}
+
+	$class = wpcf7_form_controls_class( $tag->type );
+	$class .= ' wpcf7-captcha-' . $tag->name;
+
+	$atts = array();
+	$atts['class'] = $tag->get_class_option( $class );
+	$atts['id'] = $tag->get_id_option();
+
+	$op = array( // Default
+		'img_size' => array( 72, 24 ),
+		'base' => array( 6, 18 ),
+		'font_size' => 14,
+		'font_char_width' => 15,
+	);
+
+	$op = array_merge( $op, wpcf7_captchac_options( $tag->options ) );
+
+	if ( ! $filename = wpcf7_generate_captcha( $op ) ) {
+		return '';
+	}
+
+	if ( ! empty( $op['img_size'] ) ) {
+		if ( isset( $op['img_size'][0] ) ) {
+			$atts['width'] = $op['img_size'][0];
+		}
+
+		if ( isset( $op['img_size'][1] ) ) {
+			$atts['height'] = $op['img_size'][1];
+		}
+	}
+
+	$atts['alt'] = 'captcha';
+	$atts['src'] = wpcf7_captcha_url( $filename );
+
+	$atts = wpcf7_format_atts( $atts );
+
+	$prefix = substr( $filename, 0, strrpos( $filename, '.' ) );
+
+	$html = sprintf(
+		'<input type="hidden" name="_wpcf7_captcha_challenge_%1$s" value="%2$s" /><img %3$s />',
+		$tag->name, esc_attr( $prefix ), $atts );
+
+	return $html;
+}
+
+function wpcf7_captchar_form_tag_handler( $tag ) {
+	if ( empty( $tag->name ) ) {
+		return '';
+	}
+
+	$validation_error = wpcf7_get_validation_error( $tag->name );
+
+	$class = wpcf7_form_controls_class( $tag->type );
+
+	if ( $validation_error ) {
+		$class .= ' wpcf7-not-valid';
+	}
+
+	$atts = array();
+
+	$atts['size'] = $tag->get_size_option( '40' );
+	$atts['maxlength'] = $tag->get_maxlength_option();
+	$atts['minlength'] = $tag->get_minlength_option();
+
+	if ( $atts['maxlength'] && $atts['minlength']
+	&& $atts['maxlength'] < $atts['minlength'] ) {
+		unset( $atts['maxlength'], $atts['minlength'] );
+	}
+
+	$atts['class'] = $tag->get_class_option( $class );
+	$atts['id'] = $tag->get_id_option();
+	$atts['tabindex'] = $tag->get_option( 'tabindex', 'signed_int', true );
+	$atts['autocomplete'] = 'off';
+	$atts['aria-invalid'] = $validation_error ? 'true' : 'false';
+
+	$value = (string) reset( $tag->values );
+
+	if ( wpcf7_is_posted() ) {
+		$value = '';
+	}
+
+	if ( $tag->has_option( 'placeholder' )
+	|| $tag->has_option( 'watermark' ) ) {
+		$atts['placeholder'] = $value;
+		$value = '';
+	}
+
+	$atts['value'] = $value;
+	$atts['type'] = 'text';
+	$atts['name'] = $tag->name;
+
+	$atts = wpcf7_format_atts( $atts );
+
+	$html = sprintf(
+		'<span class="wpcf7-form-control-wrap %1$s"><input %2$s />%3$s</span>',
+		sanitize_html_class( $tag->name ), $atts, $validation_error );
+
+	return $html;
+}
+
+
+/* Validation filter */
+
+add_filter( 'wpcf7_validate_captchar', 'wpcf7_captcha_validation_filter', 10, 2 );
+
+function wpcf7_captcha_validation_filter( $result, $tag ) {
+	$type = $tag->type;
+	$name = $tag->name;
+
+	$captchac = '_wpcf7_captcha_challenge_' . $name;
+
+	$prefix = isset( $_POST[$captchac] ) ? (string) $_POST[$captchac] : '';
+	$response = isset( $_POST[$name] ) ? (string) $_POST[$name] : '';
+	$response = wpcf7_canonicalize( $response );
+
+	if ( 0 == strlen( $prefix ) || ! wpcf7_check_captcha( $prefix, $response ) ) {
+		$result->invalidate( $tag, wpcf7_get_message( 'captcha_not_match' ) );
+	}
+
+	if ( 0 != strlen( $prefix ) ) {
+		wpcf7_remove_captcha( $prefix );
+	}
+
+	return $result;
+}
+
+
+/* Ajax echo filter */
+
+add_filter( 'wpcf7_ajax_onload', 'wpcf7_captcha_ajax_refill' );
+add_filter( 'wpcf7_ajax_json_echo', 'wpcf7_captcha_ajax_refill' );
+
+function wpcf7_captcha_ajax_refill( $items ) {
+	if ( ! is_array( $items ) ) {
+		return $items;
+	}
+
+	$tags = wpcf7_scan_form_tags( array( 'type' => 'captchac' ) );
+
+	if ( empty( $tags ) ) {
+		return $items;
+	}
+
+	$refill = array();
+
+	foreach ( $tags as $tag ) {
+		$name = $tag->name;
+		$options = $tag->options;
+
+		if ( empty( $name ) ) {
+			continue;
+		}
+
+		$op = wpcf7_captchac_options( $options );
+
+		if ( $filename = wpcf7_generate_captcha( $op ) ) {
+			$captcha_url = wpcf7_captcha_url( $filename );
+			$refill[$name] = $captcha_url;
+		}
+	}
+
+	if ( ! empty( $refill ) ) {
+		$items['captcha'] = $refill;
+	}
+
+	return $items;
+}
+
+
+/* Messages */
+
+add_filter( 'wpcf7_messages', 'wpcf7_captcha_messages' );
+
+function wpcf7_captcha_messages( $messages ) {
+	$messages = array_merge( $messages, array(
+		'captcha_not_match' => array(
+			'description' =>
+				__( "The code that sender entered does not match the CAPTCHA", 'contact-form-7' ),
+			'default' =>
+				__( 'Your entered code is incorrect.', 'contact-form-7' ),
+		),
+	) );
+
+	return $messages;
+}
+
+
+/* Tag generator */
+
+add_action( 'wpcf7_admin_init', 'wpcf7_add_tag_generator_captcha', 46 );
+
+function wpcf7_add_tag_generator_captcha() {
+	if ( ! wpcf7_use_really_simple_captcha() ) {
+		return;
+	}
+
+	$tag_generator = WPCF7_TagGenerator::get_instance();
+	$tag_generator->add( 'captcha',
+		__( 'CAPTCHA (Really Simple CAPTCHA)', 'contact-form-7' ),
+		'wpcf7_tag_generator_captcha' );
+}
+
+function wpcf7_tag_generator_captcha( $contact_form, $args = '' ) {
+	$args = wp_parse_args( $args, array() );
+
+	if ( ! class_exists( 'ReallySimpleCaptcha' ) ) {
+?>
+<div class="control-box">
+<fieldset>
+<legend><?php
+	echo sprintf(
+		/* translators: %s: link labeled 'Really Simple CAPTCHA' */
+		esc_html( __( "To use CAPTCHA, you first need to install and activate %s plugin.", 'contact-form-7' ) ),
+		wpcf7_link( 'https://wordpress.org/plugins/really-simple-captcha/', 'Really Simple CAPTCHA' )
+	);
+?></legend>
+</fieldset>
+</div>
+<?php
+
+		return;
+	}
+
+	$description = __( "Generate form-tags for a CAPTCHA image and corresponding response input field. For more details, see %s.", 'contact-form-7' );
+
+	$desc_link = wpcf7_link( __( 'https://contactform7.com/captcha/', 'contact-form-7' ), __( 'CAPTCHA', 'contact-form-7' ) );
+
+?>
+<div class="control-box">
+<fieldset>
+<legend><?php echo sprintf( esc_html( $description ), $desc_link ); ?></legend>
+
+<table class="form-table">
+<tbody>
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /></td>
+	</tr>
+</tbody>
+</table>
+
+<table class="form-table scope captchac">
+<caption><?php echo esc_html( __( "Image settings", 'contact-form-7' ) ); ?></caption>
+<tbody>
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-captchac-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-captchac-id' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-captchac-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-captchac-class' ); ?>" /></td>
+	</tr>
+</tbody>
+</table>
+
+<table class="form-table scope captchar">
+<caption><?php echo esc_html( __( "Input field settings", 'contact-form-7' ) ); ?></caption>
+<tbody>
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-captchar-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-captchar-id' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-captchar-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-captchar-class' ); ?>" /></td>
+	</tr>
+</tbody>
+</table>
+</fieldset>
+</div>
+
+<div class="insert-box">
+	<input type="text" name="captcha" class="tag code" readonly="readonly" onfocus="this.select()" />
+
+	<div class="submitbox">
+	<input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" />
+	</div>
+</div>
+<?php
+}
+
+
+/* Warning message */
+
+add_action( 'wpcf7_admin_warnings', 'wpcf7_captcha_display_warning_message' );
+
+function wpcf7_captcha_display_warning_message() {
+	if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
+		return;
+	}
+
+	$has_tags = (bool) $contact_form->scan_form_tags(
+		array( 'type' => array( 'captchac' ) ) );
+
+	if ( ! $has_tags ) {
+		return;
+	}
+
+	if ( ! class_exists( 'ReallySimpleCaptcha' ) ) {
+		return;
+	}
+
+	$uploads_dir = wpcf7_captcha_tmp_dir();
+	wpcf7_init_captcha();
+
+	if ( ! is_dir( $uploads_dir ) || ! wp_is_writable( $uploads_dir ) ) {
+		$message = sprintf( __( 'This contact form contains CAPTCHA fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually.', 'contact-form-7' ), $uploads_dir );
+
+		echo '<div class="notice notice-warning"><p>' . esc_html( $message ) . '</p></div>';
+	}
+
+	if ( ! function_exists( 'imagecreatetruecolor' )
+	|| ! function_exists( 'imagettftext' ) ) {
+		$message = __( "This contact form contains CAPTCHA fields, but the necessary libraries (GD and FreeType) are not available on your server.", 'contact-form-7' );
+
+		echo '<div class="notice notice-warning"><p>' . esc_html( $message ) . '</p></div>';
+	}
+}
+
+
+/* CAPTCHA functions */
+
+function wpcf7_init_captcha() {
+	static $captcha = null;
+
+	if ( $captcha ) {
+		return $captcha;
+	}
+
+	if ( class_exists( 'ReallySimpleCaptcha' ) ) {
+		$captcha = new ReallySimpleCaptcha();
+	} else {
+		return false;
+	}
+
+	$dir = trailingslashit( wpcf7_captcha_tmp_dir() );
+
+	$captcha->tmp_dir = $dir;
+
+	if ( is_callable( array( $captcha, 'make_tmp_dir' ) ) ) {
+		$result = $captcha->make_tmp_dir();
+
+		if ( ! $result ) {
+			return false;
+		}
+
+		return $captcha;
+	}
+
+	if ( wp_mkdir_p( $dir ) ) {
+		$htaccess_file = path_join( $dir, '.htaccess' );
+
+		if ( file_exists( $htaccess_file ) ) {
+			return $captcha;
+		}
+
+		if ( $handle = fopen( $htaccess_file, 'w' ) ) {
+			fwrite( $handle, 'Order deny,allow' . "\n" );
+			fwrite( $handle, 'Deny from all' . "\n" );
+			fwrite( $handle, '<Files ~ "^[0-9A-Za-z]+\\.(jpeg|gif|png)$">' . "\n" );
+			fwrite( $handle, '    Allow from all' . "\n" );
+			fwrite( $handle, '</Files>' . "\n" );
+			fclose( $handle );
+		}
+	} else {
+		return false;
+	}
+
+	return $captcha;
+}
+
+function wpcf7_captcha_tmp_dir() {
+	if ( defined( 'WPCF7_CAPTCHA_TMP_DIR' ) ) {
+		return WPCF7_CAPTCHA_TMP_DIR;
+	} else {
+		return path_join( wpcf7_upload_dir( 'dir' ), 'wpcf7_captcha' );
+	}
+}
+
+function wpcf7_captcha_tmp_url() {
+	if ( defined( 'WPCF7_CAPTCHA_TMP_URL' ) ) {
+		return WPCF7_CAPTCHA_TMP_URL;
+	} else {
+		return path_join( wpcf7_upload_dir( 'url' ), 'wpcf7_captcha' );
+	}
+}
+
+function wpcf7_captcha_url( $filename ) {
+	$url = path_join( wpcf7_captcha_tmp_url(), $filename );
+
+	if ( is_ssl() && 'http:' == substr( $url, 0, 5 ) ) {
+		$url = 'https:' . substr( $url, 5 );
+	}
+
+	return apply_filters( 'wpcf7_captcha_url', esc_url_raw( $url ) );
+}
+
+function wpcf7_generate_captcha( $options = null ) {
+	if ( ! $captcha = wpcf7_init_captcha() ) {
+		return false;
+	}
+
+	if ( ! is_dir( $captcha->tmp_dir )
+	|| ! wp_is_writable( $captcha->tmp_dir ) ) {
+		return false;
+	}
+
+	$img_type = imagetypes();
+
+	if ( $img_type & IMG_PNG ) {
+		$captcha->img_type = 'png';
+	} elseif ( $img_type & IMG_GIF ) {
+		$captcha->img_type = 'gif';
+	} elseif ( $img_type & IMG_JPG ) {
+		$captcha->img_type = 'jpeg';
+	} else {
+		return false;
+	}
+
+	if ( is_array( $options ) ) {
+		if ( isset( $options['img_size'] ) ) {
+			$captcha->img_size = $options['img_size'];
+		}
+
+		if ( isset( $options['base'] ) ) {
+			$captcha->base = $options['base'];
+		}
+
+		if ( isset( $options['font_size'] ) ) {
+			$captcha->font_size = $options['font_size'];
+		}
+
+		if ( isset( $options['font_char_width'] ) ) {
+			$captcha->font_char_width = $options['font_char_width'];
+		}
+
+		if ( isset( $options['fg'] ) ) {
+			$captcha->fg = $options['fg'];
+		}
+
+		if ( isset( $options['bg'] ) ) {
+			$captcha->bg = $options['bg'];
+		}
+	}
+
+	$prefix = wp_rand();
+	$captcha_word = $captcha->generate_random_word();
+	return $captcha->generate_image( $prefix, $captcha_word );
+}
+
+function wpcf7_check_captcha( $prefix, $response ) {
+	if ( ! $captcha = wpcf7_init_captcha() ) {
+		return false;
+	}
+
+	return $captcha->check( $prefix, $response );
+}
+
+function wpcf7_remove_captcha( $prefix ) {
+	if ( ! $captcha = wpcf7_init_captcha() ) {
+		return false;
+	}
+
+	// Contact Form 7 generates $prefix with wp_rand()
+	if ( preg_match( '/[^0-9]/', $prefix ) ) {
+		return false;
+	}
+
+	$captcha->remove( $prefix );
+}
+
+add_action( 'template_redirect', 'wpcf7_cleanup_captcha_files', 20 );
+
+function wpcf7_cleanup_captcha_files() {
+	if ( ! $captcha = wpcf7_init_captcha() ) {
+		return false;
+	}
+
+	if ( is_callable( array( $captcha, 'cleanup' ) ) ) {
+		return $captcha->cleanup();
+	}
+
+	$dir = trailingslashit( wpcf7_captcha_tmp_dir() );
+
+	if ( ! is_dir( $dir ) || ! is_readable( $dir ) || ! wp_is_writable( $dir ) ) {
+		return false;
+	}
+
+	if ( $handle = opendir( $dir ) ) {
+		while ( false !== ( $file = readdir( $handle ) ) ) {
+			if ( ! preg_match( '/^[0-9]+\.(php|txt|png|gif|jpeg)$/', $file ) ) {
+				continue;
+			}
+
+			$stat = stat( path_join( $dir, $file ) );
+
+			if ( $stat['mtime'] + 3600 < time() ) { // 3600 secs == 1 hour
+				unlink( path_join( $dir, $file ) );
+			}
+		}
+
+		closedir( $handle );
+	}
+}
+
+function wpcf7_captchac_options( $options ) {
+	if ( ! is_array( $options ) ) {
+		return array();
+	}
+
+	$op = array();
+	$image_size_array = preg_grep( '%^size:[smlSML]$%', $options );
+
+	if ( $image_size = array_shift( $image_size_array ) ) {
+		preg_match( '%^size:([smlSML])$%', $image_size, $is_matches );
+
+		switch ( strtolower( $is_matches[1] ) ) {
+			case 's':
+				$op['img_size'] = array( 60, 20 );
+				$op['base'] = array( 6, 15 );
+				$op['font_size'] = 11;
+				$op['font_char_width'] = 13;
+				break;
+			case 'l':
+				$op['img_size'] = array( 84, 28 );
+				$op['base'] = array( 6, 20 );
+				$op['font_size'] = 17;
+				$op['font_char_width'] = 19;
+				break;
+			case 'm':
+			default:
+				$op['img_size'] = array( 72, 24 );
+				$op['base'] = array( 6, 18 );
+				$op['font_size'] = 14;
+				$op['font_char_width'] = 15;
+		}
+	}
+
+	$fg_color_array = preg_grep(
+		'%^fg:#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$%', $options );
+
+	if ( $fg_color = array_shift( $fg_color_array ) ) {
+		preg_match( '%^fg:#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$%',
+			$fg_color, $fc_matches );
+
+		if ( 3 == strlen( $fc_matches[1] ) ) {
+			$r = substr( $fc_matches[1], 0, 1 );
+			$g = substr( $fc_matches[1], 1, 1 );
+			$b = substr( $fc_matches[1], 2, 1 );
+
+			$op['fg'] = array(
+				hexdec( $r . $r ),
+				hexdec( $g . $g ),
+				hexdec( $b . $b ),
+			);
+		} elseif ( 6 == strlen( $fc_matches[1] ) ) {
+			$r = substr( $fc_matches[1], 0, 2 );
+			$g = substr( $fc_matches[1], 2, 2 );
+			$b = substr( $fc_matches[1], 4, 2 );
+
+			$op['fg'] = array(
+				hexdec( $r ),
+				hexdec( $g ),
+				hexdec( $b ),
+			);
+		}
+	}
+
+	$bg_color_array = preg_grep(
+		'%^bg:#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$%', $options );
+
+	if ( $bg_color = array_shift( $bg_color_array ) ) {
+		preg_match( '%^bg:#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$%',
+			$bg_color, $bc_matches );
+
+		if ( 3 == strlen( $bc_matches[1] ) ) {
+			$r = substr( $bc_matches[1], 0, 1 );
+			$g = substr( $bc_matches[1], 1, 1 );
+			$b = substr( $bc_matches[1], 2, 1 );
+
+			$op['bg'] = array(
+				hexdec( $r . $r ),
+				hexdec( $g . $g ),
+				hexdec( $b . $b ),
+			);
+		} elseif ( 6 == strlen( $bc_matches[1] ) ) {
+			$r = substr( $bc_matches[1], 0, 2 );
+			$g = substr( $bc_matches[1], 2, 2 );
+			$b = substr( $bc_matches[1], 4, 2 );
+
+			$op['bg'] = array(
+				hexdec( $r ),
+				hexdec( $g ),
+				hexdec( $b ),
+			);
+		}
+	}
+
+	return $op;
+}

+ 515 - 0
wp-content/plugins/contact-form-7/modules/recaptcha.php

@@ -0,0 +1,515 @@
+<?php
+
+class WPCF7_RECAPTCHA extends WPCF7_Service {
+
+	const VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
+
+	private static $instance;
+	private $sitekeys;
+
+	public static function get_instance() {
+		if ( empty( self::$instance ) ) {
+			self::$instance = new self;
+		}
+
+		return self::$instance;
+	}
+
+	private function __construct() {
+		$this->sitekeys = WPCF7::get_option( 'recaptcha' );
+	}
+
+	public function get_title() {
+		return __( 'reCAPTCHA', 'contact-form-7' );
+	}
+
+	public function is_active() {
+		$sitekey = $this->get_sitekey();
+		$secret = $this->get_secret( $sitekey );
+		return $sitekey && $secret;
+	}
+
+	public function get_categories() {
+		return array( 'captcha' );
+	}
+
+	public function icon() {
+	}
+
+	public function link() {
+		echo sprintf( '<a href="%1$s">%2$s</a>',
+			'https://www.google.com/recaptcha/intro/index.html',
+			'google.com/recaptcha' );
+	}
+
+	public function get_sitekey() {
+		if ( empty( $this->sitekeys ) || ! is_array( $this->sitekeys ) ) {
+			return false;
+		}
+
+		$sitekeys = array_keys( $this->sitekeys );
+
+		return $sitekeys[0];
+	}
+
+	public function get_secret( $sitekey ) {
+		$sitekeys = (array) $this->sitekeys;
+
+		if ( isset( $sitekeys[$sitekey] ) ) {
+			return $sitekeys[$sitekey];
+		} else {
+			return false;
+		}
+	}
+
+	public function verify( $response_token ) {
+		$is_human = false;
+
+		if ( empty( $response_token ) ) {
+			return $is_human;
+		}
+
+		$url = self::VERIFY_URL;
+		$sitekey = $this->get_sitekey();
+		$secret = $this->get_secret( $sitekey );
+
+		$response = wp_safe_remote_post( $url, array(
+			'body' => array(
+				'secret' => $secret,
+				'response' => $response_token,
+				'remoteip' => $_SERVER['REMOTE_ADDR'],
+			),
+		) );
+
+		if ( 200 != wp_remote_retrieve_response_code( $response ) ) {
+			return $is_human;
+		}
+
+		$response = wp_remote_retrieve_body( $response );
+		$response = json_decode( $response, true );
+
+		$is_human = isset( $response['success'] ) && true == $response['success'];
+		return $is_human;
+	}
+
+	private function menu_page_url( $args = '' ) {
+		$args = wp_parse_args( $args, array() );
+
+		$url = menu_page_url( 'wpcf7-integration', false );
+		$url = add_query_arg( array( 'service' => 'recaptcha' ), $url );
+
+		if ( ! empty( $args) ) {
+			$url = add_query_arg( $args, $url );
+		}
+
+		return $url;
+	}
+
+	public function load( $action = '' ) {
+		if ( 'setup' == $action ) {
+			if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {
+				check_admin_referer( 'wpcf7-recaptcha-setup' );
+
+				$sitekey = isset( $_POST['sitekey'] ) ? trim( $_POST['sitekey'] ) : '';
+				$secret = isset( $_POST['secret'] ) ? trim( $_POST['secret'] ) : '';
+
+				if ( $sitekey && $secret ) {
+					WPCF7::update_option( 'recaptcha', array( $sitekey => $secret ) );
+					$redirect_to = $this->menu_page_url( array(
+						'message' => 'success',
+					) );
+				} elseif ( '' === $sitekey && '' === $secret ) {
+					WPCF7::update_option( 'recaptcha', null );
+					$redirect_to = $this->menu_page_url( array(
+						'message' => 'success',
+					) );
+				} else {
+					$redirect_to = $this->menu_page_url( array(
+						'action' => 'setup',
+						'message' => 'invalid',
+					) );
+				}
+
+				wp_safe_redirect( $redirect_to );
+				exit();
+			}
+		}
+	}
+
+	public function admin_notice( $message = '' ) {
+		if ( 'invalid' == $message ) {
+			echo sprintf(
+				'<div class="error notice notice-error is-dismissible"><p><strong>%1$s</strong>: %2$s</p></div>',
+				esc_html( __( "ERROR", 'contact-form-7' ) ),
+				esc_html( __( "Invalid key values.", 'contact-form-7' ) ) );
+		}
+
+		if ( 'success' == $message ) {
+			echo sprintf( '<div class="updated notice notice-success is-dismissible"><p>%s</p></div>',
+				esc_html( __( 'Settings saved.', 'contact-form-7' ) ) );
+		}
+	}
+
+	public function display( $action = '' ) {
+?>
+<p><?php echo esc_html( __( "reCAPTCHA is a free service to protect your website from spam and abuse.", 'contact-form-7' ) ); ?></p>
+
+<?php
+		if ( 'setup' == $action ) {
+			$this->display_setup();
+			return;
+		}
+
+		if ( $this->is_active() ) {
+			$sitekey = $this->get_sitekey();
+			$secret = $this->get_secret( $sitekey );
+?>
+<table class="form-table">
+<tbody>
+<tr>
+	<th scope="row"><?php echo esc_html( __( 'Site Key', 'contact-form-7' ) ); ?></th>
+	<td class="code"><?php echo esc_html( $sitekey ); ?></td>
+</tr>
+<tr>
+	<th scope="row"><?php echo esc_html( __( 'Secret Key', 'contact-form-7' ) ); ?></th>
+	<td class="code"><?php echo esc_html( wpcf7_mask_password( $secret ) ); ?></td>
+</tr>
+</tbody>
+</table>
+
+<p><a href="<?php echo esc_url( $this->menu_page_url( 'action=setup' ) ); ?>" class="button"><?php echo esc_html( __( "Reset Keys", 'contact-form-7' ) ); ?></a></p>
+
+<?php
+		} else {
+?>
+<p><?php echo esc_html( __( "To use reCAPTCHA, you need to install an API key pair.", 'contact-form-7' ) ); ?></p>
+
+<p><a href="<?php echo esc_url( $this->menu_page_url( 'action=setup' ) ); ?>" class="button"><?php echo esc_html( __( "Configure Keys", 'contact-form-7' ) ); ?></a></p>
+
+<p><?php echo sprintf( esc_html( __( "For more details, see %s.", 'contact-form-7' ) ), wpcf7_link( __( 'https://contactform7.com/recaptcha/', 'contact-form-7' ), __( 'reCAPTCHA', 'contact-form-7' ) ) ); ?></p>
+<?php
+		}
+	}
+
+	public function display_setup() {
+?>
+<form method="post" action="<?php echo esc_url( $this->menu_page_url( 'action=setup' ) ); ?>">
+<?php wp_nonce_field( 'wpcf7-recaptcha-setup' ); ?>
+<table class="form-table">
+<tbody>
+<tr>
+	<th scope="row"><label for="sitekey"><?php echo esc_html( __( 'Site Key', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" aria-required="true" value="" id="sitekey" name="sitekey" class="regular-text code" /></td>
+</tr>
+<tr>
+	<th scope="row"><label for="secret"><?php echo esc_html( __( 'Secret Key', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" aria-required="true" value="" id="secret" name="secret" class="regular-text code" /></td>
+</tr>
+</tbody>
+</table>
+
+<p class="submit"><input type="submit" class="button button-primary" value="<?php echo esc_attr( __( 'Save', 'contact-form-7' ) ); ?>" name="submit" /></p>
+</form>
+<?php
+	}
+}
+
+add_action( 'wpcf7_init', 'wpcf7_recaptcha_register_service' );
+
+function wpcf7_recaptcha_register_service() {
+	$integration = WPCF7_Integration::get_instance();
+
+	$categories = array(
+		'captcha' => __( 'CAPTCHA', 'contact-form-7' ),
+	);
+
+	foreach ( $categories as $name => $category ) {
+		$integration->add_category( $name, $category );
+	}
+
+	$services = array(
+		'recaptcha' => WPCF7_RECAPTCHA::get_instance(),
+	);
+
+	foreach ( $services as $name => $service ) {
+		$integration->add_service( $name, $service );
+	}
+}
+
+add_action( 'wpcf7_enqueue_scripts', 'wpcf7_recaptcha_enqueue_scripts' );
+
+function wpcf7_recaptcha_enqueue_scripts() {
+	$url = 'https://www.google.com/recaptcha/api.js';
+	$url = add_query_arg( array(
+		'onload' => 'recaptchaCallback',
+		'render' => 'explicit',
+	), $url );
+
+	wp_register_script( 'google-recaptcha', $url, array(), '2.0', true );
+}
+
+add_action( 'wp_footer', 'wpcf7_recaptcha_callback_script' );
+
+function wpcf7_recaptcha_callback_script() {
+	if ( ! wp_script_is( 'google-recaptcha', 'enqueued' ) ) {
+		return;
+	}
+
+?>
+<script type="text/javascript">
+var recaptchaWidgets = [];
+var recaptchaCallback = function() {
+	var forms = document.getElementsByTagName( 'form' );
+	var pattern = /(^|\s)g-recaptcha(\s|$)/;
+
+	for ( var i = 0; i < forms.length; i++ ) {
+		var divs = forms[ i ].getElementsByTagName( 'div' );
+
+		for ( var j = 0; j < divs.length; j++ ) {
+			var sitekey = divs[ j ].getAttribute( 'data-sitekey' );
+
+			if ( divs[ j ].className && divs[ j ].className.match( pattern ) && sitekey ) {
+				var params = {
+					'sitekey': sitekey,
+					'type': divs[ j ].getAttribute( 'data-type' ),
+					'size': divs[ j ].getAttribute( 'data-size' ),
+					'theme': divs[ j ].getAttribute( 'data-theme' ),
+					'badge': divs[ j ].getAttribute( 'data-badge' ),
+					'tabindex': divs[ j ].getAttribute( 'data-tabindex' )
+				};
+
+				var callback = divs[ j ].getAttribute( 'data-callback' );
+
+				if ( callback && 'function' == typeof window[ callback ] ) {
+					params[ 'callback' ] = window[ callback ];
+				}
+
+				var expired_callback = divs[ j ].getAttribute( 'data-expired-callback' );
+
+				if ( expired_callback && 'function' == typeof window[ expired_callback ] ) {
+					params[ 'expired-callback' ] = window[ expired_callback ];
+				}
+
+				var widget_id = grecaptcha.render( divs[ j ], params );
+				recaptchaWidgets.push( widget_id );
+				break;
+			}
+		}
+	}
+};
+
+document.addEventListener( 'wpcf7submit', function( event ) {
+	switch ( event.detail.status ) {
+		case 'spam':
+		case 'mail_sent':
+		case 'mail_failed':
+			for ( var i = 0; i < recaptchaWidgets.length; i++ ) {
+				grecaptcha.reset( recaptchaWidgets[ i ] );
+			}
+	}
+}, false );
+</script>
+<?php
+}
+
+add_action( 'wpcf7_init', 'wpcf7_recaptcha_add_form_tag_recaptcha' );
+
+function wpcf7_recaptcha_add_form_tag_recaptcha() {
+	$recaptcha = WPCF7_RECAPTCHA::get_instance();
+
+	if ( $recaptcha->is_active() ) {
+		wpcf7_add_form_tag( 'recaptcha', 'wpcf7_recaptcha_form_tag_handler',
+			array( 'display-block' => true ) );
+	}
+}
+
+function wpcf7_recaptcha_form_tag_handler( $tag ) {
+	if ( ! wp_script_is( 'google-recaptcha', 'registered' ) ) {
+		wpcf7_recaptcha_enqueue_scripts();
+	}
+
+	wp_enqueue_script( 'google-recaptcha' );
+
+	$atts = array();
+
+	$recaptcha = WPCF7_RECAPTCHA::get_instance();
+	$atts['data-sitekey'] = $recaptcha->get_sitekey();
+	$atts['data-type'] = $tag->get_option( 'type', '(audio|image)', true );
+	$atts['data-size'] = $tag->get_option(
+		'size', '(compact|normal|invisible)', true );
+	$atts['data-theme'] = $tag->get_option( 'theme', '(dark|light)', true );
+	$atts['data-badge'] = $tag->get_option(
+		'badge', '(bottomright|bottomleft|inline)', true );
+	$atts['data-tabindex'] = $tag->get_option( 'tabindex', 'signed_int', true );
+	$atts['data-callback'] = $tag->get_option( 'callback', '', true );
+	$atts['data-expired-callback'] =
+		$tag->get_option( 'expired_callback', '', true );
+
+	$atts['class'] = $tag->get_class_option(
+		wpcf7_form_controls_class( $tag->type, 'g-recaptcha' ) );
+	$atts['id'] = $tag->get_id_option();
+
+	$html = sprintf( '<div %1$s></div>', wpcf7_format_atts( $atts ) );
+	$html .= wpcf7_recaptcha_noscript(
+		array( 'sitekey' => $atts['data-sitekey'] ) );
+	$html = sprintf( '<div class="wpcf7-form-control-wrap">%s</div>', $html );
+
+	return $html;
+}
+
+function wpcf7_recaptcha_noscript( $args = '' ) {
+	$args = wp_parse_args( $args, array(
+		'sitekey' => '',
+	) );
+
+	if ( empty( $args['sitekey'] ) ) {
+		return;
+	}
+
+	$url = add_query_arg( 'k', $args['sitekey'],
+		'https://www.google.com/recaptcha/api/fallback' );
+
+	ob_start();
+?>
+
+<noscript>
+	<div style="width: 302px; height: 422px;">
+		<div style="width: 302px; height: 422px; position: relative;">
+			<div style="width: 302px; height: 422px; position: absolute;">
+				<iframe src="<?php echo esc_url( $url ); ?>" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;">
+				</iframe>
+			</div>
+			<div style="width: 300px; height: 60px; border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
+				<textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;">
+				</textarea>
+			</div>
+		</div>
+	</div>
+</noscript>
+<?php
+	return ob_get_clean();
+}
+
+add_filter( 'wpcf7_spam', 'wpcf7_recaptcha_check_with_google', 9 );
+
+function wpcf7_recaptcha_check_with_google( $spam ) {
+	if ( $spam ) {
+		return $spam;
+	}
+
+	$contact_form = wpcf7_get_current_contact_form();
+
+	if ( ! $contact_form ) {
+		return $spam;
+	}
+
+	$tags = $contact_form->scan_form_tags( array( 'type' => 'recaptcha' ) );
+
+	if ( empty( $tags ) ) {
+		return $spam;
+	}
+
+	$recaptcha = WPCF7_RECAPTCHA::get_instance();
+
+	if ( ! $recaptcha->is_active() ) {
+		return $spam;
+	}
+
+	$response_token = wpcf7_recaptcha_response();
+	$spam = ! $recaptcha->verify( $response_token );
+
+	return $spam;
+}
+
+add_action( 'wpcf7_admin_init', 'wpcf7_add_tag_generator_recaptcha', 45 );
+
+function wpcf7_add_tag_generator_recaptcha() {
+	$tag_generator = WPCF7_TagGenerator::get_instance();
+	$tag_generator->add( 'recaptcha', __( 'reCAPTCHA', 'contact-form-7' ),
+		'wpcf7_tag_generator_recaptcha', array( 'nameless' => 1 ) );
+}
+
+function wpcf7_tag_generator_recaptcha( $contact_form, $args = '' ) {
+	$args = wp_parse_args( $args, array() );
+
+	$recaptcha = WPCF7_RECAPTCHA::get_instance();
+
+	if ( ! $recaptcha->is_active() ) {
+?>
+<div class="control-box">
+<fieldset>
+<legend><?php echo sprintf( esc_html( __( "To use reCAPTCHA, first you need to install an API key pair. For more details, see %s.", 'contact-form-7' ) ), wpcf7_link( __( 'https://contactform7.com/recaptcha/', 'contact-form-7' ), __( 'reCAPTCHA', 'contact-form-7' ) ) ); ?></legend>
+</fieldset>
+</div>
+<?php
+
+		return;
+	}
+
+	$description = __( "Generate a form-tag for a reCAPTCHA widget. For more details, see %s.", 'contact-form-7' );
+
+	$desc_link = wpcf7_link( __( 'https://contactform7.com/recaptcha/', 'contact-form-7' ), __( 'reCAPTCHA', 'contact-form-7' ) );
+
+?>
+<div class="control-box">
+<fieldset>
+<legend><?php echo sprintf( esc_html( $description ), $desc_link ); ?></legend>
+
+<table class="form-table">
+<tbody>
+	<tr>
+	<th scope="row"><?php echo esc_html( __( 'Size', 'contact-form-7' ) ); ?></th>
+	<td>
+		<fieldset>
+		<legend class="screen-reader-text"><?php echo esc_html( __( 'Size', 'contact-form-7' ) ); ?></legend>
+		<label for="<?php echo esc_attr( $args['content'] . '-size-normal' ); ?>"><input type="radio" name="size" class="option default" id="<?php echo esc_attr( $args['content'] . '-size-normal' ); ?>" value="normal" checked="checked" /> <?php echo esc_html( __( 'Normal', 'contact-form-7' ) ); ?></label>
+		<br />
+		<label for="<?php echo esc_attr( $args['content'] . '-size-compact' ); ?>"><input type="radio" name="size" class="option" id="<?php echo esc_attr( $args['content'] . '-size-compact' ); ?>" value="compact" /> <?php echo esc_html( __( 'Compact', 'contact-form-7' ) ); ?></label>
+		</fieldset>
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row"><?php echo esc_html( __( 'Theme', 'contact-form-7' ) ); ?></th>
+	<td>
+		<fieldset>
+		<legend class="screen-reader-text"><?php echo esc_html( __( 'Theme', 'contact-form-7' ) ); ?></legend>
+		<label for="<?php echo esc_attr( $args['content'] . '-theme-light' ); ?>"><input type="radio" name="theme" class="option default" id="<?php echo esc_attr( $args['content'] . '-theme-light' ); ?>" value="light" checked="checked" /> <?php echo esc_html( __( 'Light', 'contact-form-7' ) ); ?></label>
+		<br />
+		<label for="<?php echo esc_attr( $args['content'] . '-theme-dark' ); ?>"><input type="radio" name="theme" class="option" id="<?php echo esc_attr( $args['content'] . '-theme-dark' ); ?>" value="dark" /> <?php echo esc_html( __( 'Dark', 'contact-form-7' ) ); ?></label>
+		</fieldset>
+	</td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td>
+	</tr>
+
+</tbody>
+</table>
+</fieldset>
+</div>
+
+<div class="insert-box">
+	<input type="text" name="recaptcha" class="tag code" readonly="readonly" onfocus="this.select()" />
+
+	<div class="submitbox">
+	<input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" />
+	</div>
+</div>
+<?php
+}
+
+function wpcf7_recaptcha_response() {
+	if ( isset( $_POST['g-recaptcha-response'] ) ) {
+		return $_POST['g-recaptcha-response'];
+	}
+
+	return false;
+}

+ 19 - 0
wp-content/plugins/contact-form-7/modules/response.php

@@ -0,0 +1,19 @@
+<?php
+/**
+** A base module for [response]
+**/
+
+/* form_tag handler */
+
+add_action( 'wpcf7_init', 'wpcf7_add_form_tag_response' );
+
+function wpcf7_add_form_tag_response() {
+	wpcf7_add_form_tag( 'response', 'wpcf7_response_form_tag_handler',
+		array( 'display-block' => true ) );
+}
+
+function wpcf7_response_form_tag_handler( $tag ) {
+	if ( $contact_form = wpcf7_get_current_contact_form() ) {
+		return $contact_form->form_response_output();
+	}
+}

File diff suppressed because it is too large
+ 251 - 0
wp-content/plugins/contact-form-7/modules/select.php


+ 92 - 0
wp-content/plugins/contact-form-7/modules/submit.php

@@ -0,0 +1,92 @@
+<?php
+/**
+** A base module for [submit]
+**/
+
+/* form_tag handler */
+
+add_action( 'wpcf7_init', 'wpcf7_add_form_tag_submit' );
+
+function wpcf7_add_form_tag_submit() {
+	wpcf7_add_form_tag( 'submit', 'wpcf7_submit_form_tag_handler' );
+}
+
+function wpcf7_submit_form_tag_handler( $tag ) {
+	$class = wpcf7_form_controls_class( $tag->type );
+
+	$atts = array();
+
+	$atts['class'] = $tag->get_class_option( $class );
+	$atts['id'] = $tag->get_id_option();
+	$atts['tabindex'] = $tag->get_option( 'tabindex', 'signed_int', true );
+
+	$value = isset( $tag->values[0] ) ? $tag->values[0] : '';
+
+	if ( empty( $value ) ) {
+		$value = __( 'Send', 'contact-form-7' );
+	}
+
+	$atts['type'] = 'submit';
+	$atts['value'] = $value;
+
+	$atts = wpcf7_format_atts( $atts );
+
+	$html = sprintf( '<input %1$s />', $atts );
+
+	return $html;
+}
+
+
+/* Tag generator */
+
+add_action( 'wpcf7_admin_init', 'wpcf7_add_tag_generator_submit', 55 );
+
+function wpcf7_add_tag_generator_submit() {
+	$tag_generator = WPCF7_TagGenerator::get_instance();
+	$tag_generator->add( 'submit', __( 'submit', 'contact-form-7' ),
+		'wpcf7_tag_generator_submit', array( 'nameless' => 1 ) );
+}
+
+function wpcf7_tag_generator_submit( $contact_form, $args = '' ) {
+	$args = wp_parse_args( $args, array() );
+
+	$description = __( "Generate a form-tag for a submit button. For more details, see %s.", 'contact-form-7' );
+
+	$desc_link = wpcf7_link( __( 'https://contactform7.com/submit-button/', 'contact-form-7' ), __( 'Submit Button', 'contact-form-7' ) );
+
+?>
+<div class="control-box">
+<fieldset>
+<legend><?php echo sprintf( esc_html( $description ), $desc_link ); ?></legend>
+
+<table class="form-table">
+<tbody>
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Label', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'Id attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" /></td>
+	</tr>
+
+	<tr>
+	<th scope="row"><label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class attribute', 'contact-form-7' ) ); ?></label></th>
+	<td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" /></td>
+	</tr>
+
+</tbody>
+</table>
+</fieldset>
+</div>
+
+<div class="insert-box">
+	<input type="text" name="submit" class="tag code" readonly="readonly" onfocus="this.select()" />
+
+	<div class="submitbox">
+	<input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" />
+	</div>
+</div>
+<?php
+}

File diff suppressed because it is too large
+ 319 - 0
wp-content/plugins/contact-form-7/modules/text.php


File diff suppressed because it is too large
+ 193 - 0
wp-content/plugins/contact-form-7/modules/textarea.php


+ 87 - 0
wp-content/plugins/contact-form-7/readme.txt

@@ -0,0 +1,87 @@
+=== Contact Form 7 ===
+Contributors: takayukister
+Donate link: https://contactform7.com/donate/
+Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
+Requires at least: 4.8
+Tested up to: 4.9
+Stable tag: 5.0.1
+License: GPLv2 or later
+License URI: https://www.gnu.org/licenses/gpl-2.0.html
+
+Just another contact form plugin. Simple but flexible.
+
+== Description ==
+
+Contact Form 7 can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.
+
+= Docs & Support =
+
+You can find [docs](https://contactform7.com/docs/), [FAQ](https://contactform7.com/faq/) and more detailed information about Contact Form 7 on [contactform7.com](https://contactform7.com/). If you were unable to find the answer to your question on the FAQ or in any of the documentation, you should check the [support forum](https://wordpress.org/support/plugin/contact-form-7/) on WordPress.org. If you can't locate any topics that pertain to your particular issue, post a new topic for it.
+
+= Contact Form 7 Needs Your Support =
+
+It is hard to continue development and support for this free plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider [__making a donation__](https://contactform7.com/donate/). Your donation will help encourage and support the plugin's continued development and better user support.
+
+= Recommended Plugins =
+
+The following plugins are recommended for Contact Form 7 users:
+
+* [Flamingo](https://wordpress.org/plugins/flamingo/) by Takayuki Miyoshi - With Flamingo, you can save submitted messages via contact forms in the database.
+* [Bogo](https://wordpress.org/plugins/bogo/) by Takayuki Miyoshi - Bogo is a straight-forward multilingual plugin that doesn't cause headaches.
+
+= Translations =
+
+You can [translate Contact Form 7](https://contactform7.com/translating-contact-form-7/) on [__translate.wordpress.org__](https://translate.wordpress.org/projects/wp-plugins/contact-form-7).
+
+== Installation ==
+
+1. Upload the entire `contact-form-7` folder to the `/wp-content/plugins/` directory.
+1. Activate the plugin through the 'Plugins' menu in WordPress.
+
+You will find 'Contact' menu in your WordPress admin panel.
+
+For basic usage, you can also have a look at the [plugin web site](https://contactform7.com/).
+
+== Frequently Asked Questions ==
+
+Do you have questions or issues with Contact Form 7? Use these support channels appropriately.
+
+1. [Docs](https://contactform7.com/docs/)
+1. [FAQ](https://contactform7.com/faq/)
+1. [Support Forum](https://wordpress.org/support/plugin/contact-form-7/)
+
+[Support](https://contactform7.com/support/)
+
+== Screenshots ==
+
+1. screenshot-1.png
+
+== Changelog ==
+
+For more information, see [Releases](https://contactform7.com/category/releases/).
+
+= 5.0.1 =
+
+* Fixed incorrect uses of _n().
+* Config validation: Fixed incorrect count of alerts in the Additional Settings tab panel.
+* Config validation: Fixed improper treatment for the [_site_admin_email] special mail-tag in the From mail header field.
+* Acceptance checkbox: The class and id attributes specified were applied to the wrong HTML element.
+* Config validation: When there is an additional mail header for mailboxes like Cc or Reply-To, but it has a possible empty value, “Invalid mailbox syntax is used” error will be returned.
+* Explicitly specify the fourth parameter of add_action() to avoid passing unintended parameter values.
+* Check if the target directory is empty before removing the directory.
+
+= 5.0 =
+
+* Additional settings: on_sent_ok and on_submit have been removed.
+* New additional setting: skip_mail
+* Flamingo: Inbound channel title changes in conjunction with a change in the title of the corresponding contact form.
+* DOM events: Make an entire API response object accessible through the event.detail.apiResponse property.
+* HTML mail: Adds language-related attributes to the HTML header.
+* File upload: Sets the accept attribute to an uploading field.
+* Introduces the WPCF7_MailTag class.
+* Allows aborting a mail-sending attempt using the wpcf7_before_send_mail action hook. Also, you can set a custom status and a message through the action hook.
+* Acceptance checkbox: Allows the specifying of a statement of conditions in the form-tag’s content part.
+* Acceptance checkbox: Supports the optional option.
+* New special mail tags: [_site_title], [_site_description], [_site_url], [_site_admin_email], [_invalid_fields], [_user_login], [_user_email], [_user_url], [_user_first_name], [_user_last_name], [_user_nickname], and [_user_display_name]
+* New filter hooks: wpcf7_upload_file_name, wpcf7_autop_or_not, wpcf7_posted_data_{$type}, and wpcf7_mail_tag_replaced_{$type}
+* New form-tag features: zero-controls-container and not-for-mail

+ 157 - 0
wp-content/plugins/contact-form-7/settings.php

@@ -0,0 +1,157 @@
+<?php
+
+require_once WPCF7_PLUGIN_DIR . '/includes/functions.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/l10n.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/formatting.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/pipe.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/form-tag.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/form-tags-manager.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/shortcodes.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/capabilities.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/contact-form-template.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/contact-form.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/contact-form-functions.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/mail.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/special-mail-tags.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/submission.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/upgrade.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/integration.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/config-validator.php';
+require_once WPCF7_PLUGIN_DIR . '/includes/rest-api.php';
+
+if ( is_admin() ) {
+	require_once WPCF7_PLUGIN_DIR . '/admin/admin.php';
+} else {
+	require_once WPCF7_PLUGIN_DIR . '/includes/controller.php';
+}
+
+class WPCF7 {
+
+	public static function load_modules() {
+		self::load_module( 'acceptance' );
+		self::load_module( 'akismet' );
+		self::load_module( 'checkbox' );
+		self::load_module( 'count' );
+		self::load_module( 'date' );
+		self::load_module( 'file' );
+		self::load_module( 'flamingo' );
+		self::load_module( 'listo' );
+		self::load_module( 'number' );
+		self::load_module( 'quiz' );
+		self::load_module( 'really-simple-captcha' );
+		self::load_module( 'recaptcha' );
+		self::load_module( 'response' );
+		self::load_module( 'select' );
+		self::load_module( 'submit' );
+		self::load_module( 'text' );
+		self::load_module( 'textarea' );
+		self::load_module( 'hidden' );
+	}
+
+	protected static function load_module( $mod ) {
+		$dir = WPCF7_PLUGIN_MODULES_DIR;
+
+		if ( empty( $dir ) || ! is_dir( $dir ) ) {
+			return false;
+		}
+
+		$file = path_join( $dir, $mod . '.php' );
+
+		if ( file_exists( $file ) ) {
+			include_once $file;
+		}
+	}
+
+	public static function get_option( $name, $default = false ) {
+		$option = get_option( 'wpcf7' );
+
+		if ( false === $option ) {
+			return $default;
+		}
+
+		if ( isset( $option[$name] ) ) {
+			return $option[$name];
+		} else {
+			return $default;
+		}
+	}
+
+	public static function update_option( $name, $value ) {
+		$option = get_option( 'wpcf7' );
+		$option = ( false === $option ) ? array() : (array) $option;
+		$option = array_merge( $option, array( $name => $value ) );
+		update_option( 'wpcf7', $option );
+	}
+}
+
+add_action( 'plugins_loaded', 'wpcf7' );
+
+function wpcf7() {
+	wpcf7_load_textdomain();
+	WPCF7::load_modules();
+
+	/* Shortcodes */
+	add_shortcode( 'contact-form-7', 'wpcf7_contact_form_tag_func' );
+	add_shortcode( 'contact-form', 'wpcf7_contact_form_tag_func' );
+}
+
+add_action( 'init', 'wpcf7_init' );
+
+function wpcf7_init() {
+	wpcf7_get_request_uri();
+	wpcf7_register_post_types();
+
+	do_action( 'wpcf7_init' );
+}
+
+add_action( 'admin_init', 'wpcf7_upgrade' );
+
+function wpcf7_upgrade() {
+	$old_ver = WPCF7::get_option( 'version', '0' );
+	$new_ver = WPCF7_VERSION;
+
+	if ( $old_ver == $new_ver ) {
+		return;
+	}
+
+	do_action( 'wpcf7_upgrade', $new_ver, $old_ver );
+
+	WPCF7::update_option( 'version', $new_ver );
+}
+
+/* Install and default settings */
+
+add_action( 'activate_' . WPCF7_PLUGIN_BASENAME, 'wpcf7_install' );
+
+function wpcf7_install() {
+	if ( $opt = get_option( 'wpcf7' ) ) {
+		return;
+	}
+
+	wpcf7_load_textdomain();
+	wpcf7_register_post_types();
+	wpcf7_upgrade();
+
+	if ( get_posts( array( 'post_type' => 'wpcf7_contact_form' ) ) ) {
+		return;
+	}
+
+	$contact_form = WPCF7_ContactForm::get_template(
+		array(
+			'title' =>
+				/* translators: title of your first contact form. %d: number fixed to '1' */
+				sprintf( __( 'Contact form %d', 'contact-form-7' ), 1 ),
+		)
+	);
+
+	$contact_form->save();
+
+	WPCF7::update_option( 'bulk_validate',
+		array(
+			'timestamp' => current_time( 'timestamp' ),
+			'version' => WPCF7_VERSION,
+			'count_valid' => 1,
+			'count_invalid' => 0,
+		)
+	);
+}

+ 28 - 0
wp-content/plugins/contact-form-7/uninstall.php

@@ -0,0 +1,28 @@
+<?php
+
+if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
+	exit();
+}
+
+function wpcf7_delete_plugin() {
+	global $wpdb;
+
+	delete_option( 'wpcf7' );
+
+	$posts = get_posts(
+		array(
+			'numberposts' => -1,
+			'post_type' => 'wpcf7_contact_form',
+			'post_status' => 'any',
+		)
+	);
+
+	foreach ( $posts as $post ) {
+		wp_delete_post( $post->ID, true );
+	}
+
+	$wpdb->query( sprintf( "DROP TABLE IF EXISTS %s",
+		$wpdb->prefix . 'contact_form_7' ) );
+}
+
+wpcf7_delete_plugin();

+ 66 - 0
wp-content/plugins/contact-form-7/wp-contact-form-7.php

@@ -0,0 +1,66 @@
+<?php
+/*
+Plugin Name: Contact Form 7
+Plugin URI: https://contactform7.com/
+Description: Just another contact form plugin. Simple but flexible.
+Author: Takayuki Miyoshi
+Author URI: https://ideasilo.wordpress.com/
+Text Domain: contact-form-7
+Domain Path: /languages/
+Version: 5.0.1
+*/
+
+define( 'WPCF7_VERSION', '5.0.1' );
+
+define( 'WPCF7_REQUIRED_WP_VERSION', '4.8' );
+
+define( 'WPCF7_PLUGIN', __FILE__ );
+
+define( 'WPCF7_PLUGIN_BASENAME', plugin_basename( WPCF7_PLUGIN ) );
+
+define( 'WPCF7_PLUGIN_NAME', trim( dirname( WPCF7_PLUGIN_BASENAME ), '/' ) );
+
+define( 'WPCF7_PLUGIN_DIR', untrailingslashit( dirname( WPCF7_PLUGIN ) ) );
+
+define( 'WPCF7_PLUGIN_MODULES_DIR', WPCF7_PLUGIN_DIR . '/modules' );
+
+if ( ! defined( 'WPCF7_LOAD_JS' ) ) {
+	define( 'WPCF7_LOAD_JS', true );
+}
+
+if ( ! defined( 'WPCF7_LOAD_CSS' ) ) {
+	define( 'WPCF7_LOAD_CSS', true );
+}
+
+if ( ! defined( 'WPCF7_AUTOP' ) ) {
+	define( 'WPCF7_AUTOP', true );
+}
+
+if ( ! defined( 'WPCF7_USE_PIPE' ) ) {
+	define( 'WPCF7_USE_PIPE', true );
+}
+
+if ( ! defined( 'WPCF7_ADMIN_READ_CAPABILITY' ) ) {
+	define( 'WPCF7_ADMIN_READ_CAPABILITY', 'edit_posts' );
+}
+
+if ( ! defined( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY' ) ) {
+	define( 'WPCF7_ADMIN_READ_WRITE_CAPABILITY', 'publish_pages' );
+}
+
+if ( ! defined( 'WPCF7_VERIFY_NONCE' ) ) {
+	define( 'WPCF7_VERIFY_NONCE', false );
+}
+
+if ( ! defined( 'WPCF7_USE_REALLY_SIMPLE_CAPTCHA' ) ) {
+	define( 'WPCF7_USE_REALLY_SIMPLE_CAPTCHA', false );
+}
+
+if ( ! defined( 'WPCF7_VALIDATE_CONFIGURATION' ) ) {
+	define( 'WPCF7_VALIDATE_CONFIGURATION', true );
+}
+
+// Deprecated, not used in the plugin core. Use wpcf7_plugin_url() instead.
+define( 'WPCF7_PLUGIN_URL', untrailingslashit( plugins_url( '', WPCF7_PLUGIN ) ) );
+
+require_once WPCF7_PLUGIN_DIR . '/settings.php';

File diff suppressed because it is too large
+ 1824 - 0
wp-content/plugins/fusion-builder/assets/css/animations.css


+ 0 - 0
wp-content/plugins/fusion-builder/assets/css/animations.min.css


Some files were not shown because too many files changed in this diff