akismet.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * @package Akismet
  4. */
  5. /*
  6. Plugin Name: Akismet Anti-spam: Spam Protection
  7. Plugin URI: https://akismet.com/
  8. Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
  9. Version: 5.3.1
  10. Requires at least: 5.8
  11. Requires PHP: 5.6.20
  12. Author: Automattic - Anti-spam Team
  13. Author URI: https://automattic.com/wordpress-plugins/
  14. License: GPLv2 or later
  15. Text Domain: akismet
  16. */
  17. /*
  18. This program is free software; you can redistribute it and/or
  19. modify it under the terms of the GNU General Public License
  20. as published by the Free Software Foundation; either version 2
  21. of the License, or (at your option) any later version.
  22. This program is distributed in the hope that it will be useful,
  23. but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. GNU General Public License for more details.
  26. You should have received a copy of the GNU General Public License
  27. along with this program; if not, write to the Free Software
  28. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  29. Copyright 2005-2023 Automattic, Inc.
  30. */
  31. // Make sure we don't expose any info if called directly
  32. if ( !function_exists( 'add_action' ) ) {
  33. echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
  34. exit;
  35. }
  36. define( 'AKISMET_VERSION', '5.3.1' );
  37. define( 'AKISMET__MINIMUM_WP_VERSION', '5.8' );
  38. define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  39. define( 'AKISMET_DELETE_LIMIT', 10000 );
  40. register_activation_hook( __FILE__, array( 'Akismet', 'plugin_activation' ) );
  41. register_deactivation_hook( __FILE__, array( 'Akismet', 'plugin_deactivation' ) );
  42. require_once( AKISMET__PLUGIN_DIR . 'class.akismet.php' );
  43. require_once( AKISMET__PLUGIN_DIR . 'class.akismet-widget.php' );
  44. require_once( AKISMET__PLUGIN_DIR . 'class.akismet-rest-api.php' );
  45. add_action( 'init', array( 'Akismet', 'init' ) );
  46. add_action( 'rest_api_init', array( 'Akismet_REST_API', 'init' ) );
  47. if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
  48. require_once( AKISMET__PLUGIN_DIR . 'class.akismet-admin.php' );
  49. add_action( 'init', array( 'Akismet_Admin', 'init' ) );
  50. }
  51. //add wrapper class around deprecated akismet functions that are referenced elsewhere
  52. require_once( AKISMET__PLUGIN_DIR . 'wrapper.php' );
  53. if ( defined( 'WP_CLI' ) && WP_CLI ) {
  54. require_once( AKISMET__PLUGIN_DIR . 'class.akismet-cli.php' );
  55. }