Server IP : 213.176.29.180 / Your IP : 3.133.155.253 Web Server : Apache System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64 User : webtaragh ( 1001) PHP Version : 8.3.14 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home/webtaragh/public_html/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
PK �$Z0.6�� � readme.txtnu �[��� === Akismet Anti-spam: Spam Protection === Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer, stephdau, kbrownkd, bluefuton, akismetantispam Tags: comments, spam, antispam, anti-spam, contact form Requires at least: 5.8 Tested up to: 6.7 Stable tag: 5.3.5 License: GPLv2 or later The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam solution for WordPress and WooCommerce. == Description == The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam solution for WordPress and WooCommerce. Akismet checks your comments and contact form submissions against our global database of spam to prevent your site from publishing malicious content. You can review the comment spam it catches on your blog's "Comments" admin screen. Major features in Akismet include: * Automatically checks all comments and filters out the ones that look like spam. * Each comment has a status history, so you can easily see which comments were caught or cleared by Akismet and which were spammed or unspammed by a moderator. * URLs are shown in the comment body to reveal hidden or misleading links. * Moderators can see the number of approved comments for each user. * A discard feature that outright blocks the worst spam, saving you disk space and speeding up your site. PS: You'll be prompted to get an Akismet.com API key to use it, once activated. Keys are free for personal blogs; paid subscriptions are available for businesses and commercial sites. == Installation == Upload the Akismet plugin to your blog, activate it, and then enter your Akismet.com API key. 1, 2, 3: You're done! == Changelog == = 5.3.5 = *Release Date - 18 November 2024* * Address compatibility issues with < PHP 7.3 in v5.3.4 release. = 5.3.4 = *Release Date - 18 November 2024* * Improve activation notice on Comments for users who haven't set up their API key yet. * Improve notice about commercial site status. = 5.3.3 = *Release Date - 10 July 2024* * Make setup step clearer for new users. * Remove the stats section from the configuration page if the site has been revoked from the key. * Skip the Akismet comment check when the comment matches something in the disallowed list. * Prompt users on legacy plans to contact Akismet support for upgrades. = 5.3.2 = *Release Date - 21 March 2024* * Improve the empty state shown to new users when no spam has been caught yet. * Update the message shown to users without a current subscription. * Add foundations for future webhook support. = 5.3.1 = *Release Date - 17 January 2024* * Make the plugin more resilient when asset files are missing (as seen in WordPress Playground). * Add a link to the 'Account overview' page on akismet.com. * Fix a minor error that occurs when another plugin removes all comment actions from the dashboard. * Add the akismet_request_args filter to allow request args in Akismet API requests to be filtered. * Fix a bug that causes some contact forms to include unnecessary data in the comment_content parameter. = 5.3 = *Release Date - 14 September 2023* * Improve display of user notices. * Add stylesheets for RTL languages. * Remove initial disabled state from 'Save changes' button. * Improve accessibility of API key entry form. * Add new filter hooks for Fluent Forms. * Fix issue with PHP 8.1 compatibility. = 5.2 = *Release Date - 21 June 2023* * Visual refresh of Akismet stats. * Improve PHP 8.1 compatibility. * Improve appearance of plugin to match updated stats. * Change minimum supported PHP version to 5.6 to match WordPress. * Drop IE11 support and update minimum WordPress version to 5.8 (where IE11 support was removed from WP Core). = 5.1 = *Release Date - 20 March 2023* * Removed unnecessary limit notices from admin page. * Improved spam detection by including post taxonomies in the comment-check call. * Removed API keys from stats iframes to avoid possible inadvertent exposure. = 5.0.2 = *Release Date - 1 December 2022* * Improved compatibility with themes that hide or show UI elements based on mouse movements. * Increased security of API keys by sending them in request bodies instead of subdomains. = 5.0.1 = *Release Date - 28 September 2022* * Added an empty state for the Statistics section on the admin page. * Fixed a bug that broke some admin page links when Jetpack plugins are active. * Marked some event listeners as passive to improve performance in newer browsers. * Disabled interaction observation on forms that post to other domains. = 5.0 = *Release Date - 26 July 2022* * Added a new feature to catch spammers by observing how they interact with the page. = 4.2.5 = *Release Date - 11 July 2022* * Fixed a bug that added unnecessary comment history entries after comment rechecks. * Added a notice that displays when WP-Cron is disabled and might be affecting comment rechecks. = 4.2.4 = *Release Date - 20 May 2022* * Improved translator instructions for comment history. * Bumped the "Tested up to" tag to WP 6.0. = 4.2.3 = *Release Date - 25 April 2022* * Improved compatibility with Fluent Forms * Fixed missing translation domains * Updated stats URL. * Improved accessibility of elements on the config page. = 4.2.2 = *Release Date - 24 January 2022* * Improved compatibility with Formidable Forms * Fixed a bug that could cause issues when multiple contact forms appear on one page. * Updated delete_comment and deleted_comment actions to pass two arguments to match WordPress core since 4.9.0. * Added a filter that allows comment types to be excluded when counting users' approved comments. = 4.2.1 = *Release Date - 1 October 2021* * Fixed a bug causing AMP validation to fail on certain pages with forms. = 4.2 = *Release Date - 30 September 2021* * Added links to additional information on API usage notifications. * Reduced the number of network requests required for a comment page when running Akismet. * Improved compatibility with the most popular contact form plugins. * Improved API usage buttons for clarity on what upgrade is needed. For older changelog entries, please see the [additional changelog.txt file](https://plugins.svn.wordpress.org/akismet/trunk/changelog.txt) delivered with the plugin. PK �$ZO%s9; ; akismet.phpnu �[��� <?php /** * @package Akismet */ /* Plugin Name: Akismet Anti-spam: Spam Protection Plugin URI: https://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key. Version: 5.3.5 Requires at least: 5.8 Requires PHP: 5.6.20 Author: Automattic - Anti-spam Team Author URI: https://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Copyright 2005-2023 Automattic, Inc. */ // Make sure we don't expose any info if called directly if ( ! function_exists( 'add_action' ) ) { echo 'Hi there! I\'m just a plugin, not much I can do when called directly.'; exit; } define( 'AKISMET_VERSION', '5.3.5' ); define( 'AKISMET__MINIMUM_WP_VERSION', '5.8' ); define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); define( 'AKISMET_DELETE_LIMIT', 10000 ); register_activation_hook( __FILE__, array( 'Akismet', 'plugin_activation' ) ); register_deactivation_hook( __FILE__, array( 'Akismet', 'plugin_deactivation' ) ); require_once AKISMET__PLUGIN_DIR . 'class.akismet.php'; require_once AKISMET__PLUGIN_DIR . 'class.akismet-widget.php'; require_once AKISMET__PLUGIN_DIR . 'class.akismet-rest-api.php'; add_action( 'init', array( 'Akismet', 'init' ) ); add_action( 'rest_api_init', array( 'Akismet_REST_API', 'init' ) ); if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) { require_once AKISMET__PLUGIN_DIR . 'class.akismet-admin.php'; add_action( 'init', array( 'Akismet_Admin', 'init' ) ); } // add wrapper class around deprecated akismet functions that are referenced elsewhere require_once AKISMET__PLUGIN_DIR . 'wrapper.php'; if ( defined( 'WP_CLI' ) && WP_CLI ) { require_once AKISMET__PLUGIN_DIR . 'class.akismet-cli.php'; } PK �$Z�e@mH mH class.akismet-rest-api.phpnu �[��� <?php class Akismet_REST_API { /** * Register the REST API routes. */ public static function init() { if ( ! function_exists( 'register_rest_route' ) ) { // The REST API wasn't integrated into core until 4.4, and we support 4.0+ (for now). return false; } register_rest_route( 'akismet/v1', '/key', array( array( 'methods' => WP_REST_Server::READABLE, 'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'get_key' ), ), array( 'methods' => WP_REST_Server::EDITABLE, 'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'set_key' ), 'args' => array( 'key' => array( 'required' => true, 'type' => 'string', 'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ), 'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ), ), ), ), array( 'methods' => WP_REST_Server::DELETABLE, 'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'delete_key' ), ), ) ); register_rest_route( 'akismet/v1', '/settings/', array( array( 'methods' => WP_REST_Server::READABLE, 'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'get_settings' ), ), array( 'methods' => WP_REST_Server::EDITABLE, 'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'set_boolean_settings' ), 'args' => array( 'akismet_strictness' => array( 'required' => false, 'type' => 'boolean', 'description' => __( 'If true, Akismet will automatically discard the worst spam automatically rather than putting it in the spam folder.', 'akismet' ), ), 'akismet_show_user_comments_approved' => array( 'required' => false, 'type' => 'boolean', 'description' => __( 'If true, show the number of approved comments beside each comment author in the comments list page.', 'akismet' ), ), ), ), ) ); register_rest_route( 'akismet/v1', '/stats', array( 'methods' => WP_REST_Server::READABLE, 'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'get_stats' ), 'args' => array( 'interval' => array( 'required' => false, 'type' => 'string', 'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_interval' ), 'description' => __( 'The time period for which to retrieve stats. Options: 60-days, 6-months, all', 'akismet' ), 'default' => 'all', ), ), ) ); register_rest_route( 'akismet/v1', '/stats/(?P<interval>[\w+])', array( 'args' => array( 'interval' => array( 'description' => __( 'The time period for which to retrieve stats. Options: 60-days, 6-months, all', 'akismet' ), 'type' => 'string', ), ), array( 'methods' => WP_REST_Server::READABLE, 'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'get_stats' ), ), ) ); register_rest_route( 'akismet/v1', '/alert', array( array( 'methods' => WP_REST_Server::READABLE, 'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'get_alert' ), 'args' => array( 'key' => array( 'required' => false, 'type' => 'string', 'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ), 'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ), ), ), ), array( 'methods' => WP_REST_Server::EDITABLE, 'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'set_alert' ), 'args' => array( 'key' => array( 'required' => false, 'type' => 'string', 'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ), 'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ), ), ), ), array( 'methods' => WP_REST_Server::DELETABLE, 'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ), 'callback' => array( 'Akismet_REST_API', 'delete_alert' ), 'args' => array( 'key' => array( 'required' => false, 'type' => 'string', 'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ), 'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ), ), ), ), ) ); register_rest_route( 'akismet/v1', '/webhook', array( 'methods' => WP_REST_Server::CREATABLE, 'callback' => array( 'Akismet_REST_API', 'receive_webhook' ), 'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ), ) ); } /** * Get the current Akismet API key. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function get_key( $request = null ) { return rest_ensure_response( Akismet::get_api_key() ); } /** * Set the API key, if possible. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function set_key( $request ) { if ( defined( 'WPCOM_API_KEY' ) ) { return rest_ensure_response( new WP_Error( 'hardcoded_key', __( 'This site\'s API key is hardcoded and cannot be changed via the API.', 'akismet' ), array( 'status' => 409 ) ) ); } $new_api_key = $request->get_param( 'key' ); if ( ! self::key_is_valid( $new_api_key ) ) { return rest_ensure_response( new WP_Error( 'invalid_key', __( 'The value provided is not a valid and registered API key.', 'akismet' ), array( 'status' => 400 ) ) ); } update_option( 'wordpress_api_key', $new_api_key ); return self::get_key(); } /** * Unset the API key, if possible. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function delete_key( $request ) { if ( defined( 'WPCOM_API_KEY' ) ) { return rest_ensure_response( new WP_Error( 'hardcoded_key', __( 'This site\'s API key is hardcoded and cannot be deleted.', 'akismet' ), array( 'status' => 409 ) ) ); } delete_option( 'wordpress_api_key' ); return rest_ensure_response( true ); } /** * Get the Akismet settings. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function get_settings( $request = null ) { return rest_ensure_response( array( 'akismet_strictness' => ( get_option( 'akismet_strictness', '1' ) === '1' ), 'akismet_show_user_comments_approved' => ( get_option( 'akismet_show_user_comments_approved', '1' ) === '1' ), ) ); } /** * Update the Akismet settings. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function set_boolean_settings( $request ) { foreach ( array( 'akismet_strictness', 'akismet_show_user_comments_approved', ) as $setting_key ) { $setting_value = $request->get_param( $setting_key ); if ( is_null( $setting_value ) ) { // This setting was not specified. continue; } // From 4.7+, WP core will ensure that these are always boolean // values because they are registered with 'type' => 'boolean', // but we need to do this ourselves for prior versions. $setting_value = self::parse_boolean( $setting_value ); update_option( $setting_key, $setting_value ? '1' : '0' ); } return self::get_settings(); } /** * Parse a numeric or string boolean value into a boolean. * * @param mixed $value The value to convert into a boolean. * @return bool The converted value. */ public static function parse_boolean( $value ) { switch ( $value ) { case true: case 'true': case '1': case 1: return true; case false: case 'false': case '0': case 0: return false; default: return (bool) $value; } } /** * Get the Akismet stats for a given time period. * * Possible `interval` values: * - all * - 60-days * - 6-months * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function get_stats( $request ) { $api_key = Akismet::get_api_key(); $interval = $request->get_param( 'interval' ); $stat_totals = array(); $request_args = array( 'blog' => get_option( 'home' ), 'key' => $api_key, 'from' => $interval, ); $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' ); $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' ); if ( ! empty( $response[1] ) ) { $stat_totals[ $interval ] = json_decode( $response[1] ); } return rest_ensure_response( $stat_totals ); } /** * Get the current alert code and message. Alert codes are used to notify the site owner * if there's a problem, like a connection issue between their site and the Akismet API, * invalid requests being sent, etc. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function get_alert( $request ) { return rest_ensure_response( array( 'code' => get_option( 'akismet_alert_code' ), 'message' => get_option( 'akismet_alert_msg' ), ) ); } /** * Update the current alert code and message by triggering a call to the Akismet server. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function set_alert( $request ) { delete_option( 'akismet_alert_code' ); delete_option( 'akismet_alert_msg' ); // Make a request so the most recent alert code and message are retrieved. Akismet::verify_key( Akismet::get_api_key() ); return self::get_alert( $request ); } /** * Clear the current alert code and message. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function delete_alert( $request ) { delete_option( 'akismet_alert_code' ); delete_option( 'akismet_alert_msg' ); return self::get_alert( $request ); } private static function key_is_valid( $key ) { $request_args = array( 'key' => $key, 'blog' => get_option( 'home' ), ); $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-key' ); $response = Akismet::http_post( Akismet::build_query( $request_args ), 'verify-key' ); if ( $response[1] == 'valid' ) { return true; } return false; } public static function privileged_permission_callback() { return current_user_can( 'manage_options' ); } /** * For calls that Akismet.com makes to the site to clear outdated alert codes, use the API key for authorization. */ public static function remote_call_permission_callback( $request ) { $local_key = Akismet::get_api_key(); return $local_key && ( strtolower( $request->get_param( 'key' ) ) === strtolower( $local_key ) ); } public static function sanitize_interval( $interval, $request, $param ) { $interval = trim( $interval ); $valid_intervals = array( '60-days', '6-months', 'all' ); if ( ! in_array( $interval, $valid_intervals ) ) { $interval = 'all'; } return $interval; } public static function sanitize_key( $key, $request, $param ) { return trim( $key ); } /** * Process a webhook request from the Akismet servers. * * @param WP_REST_Request $request * @return WP_Error|WP_REST_Response */ public static function receive_webhook( $request ) { Akismet::log( array( 'Webhook request received', $request->get_body() ) ); /** * The request body should look like this: * array( * 'key' => '1234567890abcd', * 'endpoint' => '[comment-check|submit-ham|submit-spam]', * 'comments' => array( * array( * 'guid' => '[...]', * 'result' => '[true|false]', * 'comment_author' => '[...]', * [...] * ), * array( * 'guid' => '[...]', * [...], * ), * [...] * ) * ) * * Multiple comments can be included in each request, and the only truly required * field for each is the guid, although it would be friendly to include also * comment_post_ID, comment_parent, and comment_author_email, if possible to make * searching easier. */ // The response will include statuses for the result of each comment that was supplied. $response = array( 'comments' => array(), ); $endpoint = $request->get_param( 'endpoint' ); switch ( $endpoint ) { case 'comment-check': $webhook_comments = $request->get_param( 'comments' ); if ( ! is_array( $webhook_comments ) ) { return rest_ensure_response( new WP_Error( 'malformed_request', __( 'The \'comments\' parameter must be an array.', 'akismet' ), array( 'status' => 400 ) ) ); } foreach ( $webhook_comments as $webhook_comment ) { $guid = $webhook_comment['guid']; if ( ! $guid ) { // Without the GUID, we can't be sure that we're matching the right comment. // We'll make it a rule that any comment without a GUID is ignored intentionally. continue; } // Search on the fields that are indexed in the comments table, plus the GUID. // The GUID is the only thing we really need to search on, but comment_meta // is not indexed in a useful way if there are many many comments. This // should help narrow it down first. $queryable_fields = array( 'comment_post_ID' => 'post_id', 'comment_parent' => 'parent', 'comment_author_email' => 'author_email', ); $query_args = array(); $query_args['status'] = 'any'; $query_args['meta_key'] = 'akismet_guid'; $query_args['meta_value'] = $guid; foreach ( $queryable_fields as $queryable_field => $wp_comment_query_field ) { if ( isset( $webhook_comment[ $queryable_field ] ) ) { $query_args[ $wp_comment_query_field ] = $webhook_comment[ $queryable_field ]; } } $comments_query = new WP_Comment_Query( $query_args ); $comments = $comments_query->comments; if ( ! $comments ) { // Unexpected, although the comment could have been deleted since being submitted. Akismet::log( 'Webhook failed: no matching comment found.' ); $response['comments'][ $guid ] = array( 'status' => 'error', 'message' => __( 'Could not find matching comment.', 'akismet' ), ); continue; } if ( count( $comments ) > 1 ) { // Two comments shouldn't be able to match the same GUID. Akismet::log( 'Webhook failed: multiple matching comments found.', $comments ); $response['comments'][ $guid ] = array( 'status' => 'error', 'message' => __( 'Multiple comments matched request.', 'akismet' ), ); continue; } else { // We have one single match, as hoped for. Akismet::log( 'Found matching comment.', $comments ); $current_status = wp_get_comment_status( $comments[0] ); $result = $webhook_comment['result']; if ( 'true' == $result ) { Akismet::log( 'Comment should be spam' ); // The comment should be classified as spam. if ( 'spam' != $current_status ) { // The comment is not classified as spam. If Akismet was the one to act on it, move it to spam. if ( Akismet::last_comment_status_change_came_from_akismet( $comments[0]->comment_ID ) ) { Akismet::log( 'Comment is not spam; marking as spam.' ); wp_spam_comment( $comments[0] ); Akismet::update_comment_history( $comments[0]->comment_ID, '', 'webhook-spam' ); } else { Akismet::log( 'Comment is not spam, but it has already been manually handled by some other process.' ); Akismet::update_comment_history( $comments[0]->comment_ID, '', 'webhook-spam-noaction' ); } } } elseif ( 'false' == $result ) { Akismet::log( 'Comment should be ham' ); // The comment should be classified as ham. if ( 'spam' == $current_status ) { Akismet::log( 'Comment is spam.' ); // The comment is classified as spam. If Akismet was the one to label it as spam, unspam it. if ( Akismet::last_comment_status_change_came_from_akismet( $comments[0]->comment_ID ) ) { Akismet::log( 'Akismet marked it as spam; unspamming.' ); wp_unspam_comment( $comments[0] ); akismet::update_comment_history( $comments[0]->comment_ID, '', 'webhook-ham' ); } else { Akismet::log( 'Comment is not spam, but it has already been manually handled by some other process.' ); Akismet::update_comment_history( $comments[0]->comment_ID, '', 'webhook-ham-noaction' ); } } } $response['comments'][ $guid ] = array( 'status' => 'success' ); } } break; case 'submit-ham': case 'submit-spam': // Nothing to do for submit-ham or submit-spam. break; default: // Unsupported endpoint. break; } /** * Allow plugins to do things with a successfully processed webhook request, like logging. * * @since 5.3.2 * * @param WP_REST_Request $request The REST request object. */ do_action( 'akismet_webhook_received', $request ); Akismet::log( 'Done processing webhook.' ); return rest_ensure_response( $response ); } } PK �$Z;��% % .htaccessnu �[��� # Only allow direct access to specific Web-available files. # Apache 2.2 <IfModule !mod_authz_core.c> Order Deny,Allow Deny from all </IfModule> # Apache 2.4 <IfModule mod_authz_core.c> Require all denied </IfModule> # Akismet CSS and JS <FilesMatch "^(form\.js|akismet(-frontend|-admin)?\.js|akismet(-admin)?(-rtl)?\.css|inter\.css)$"> <IfModule !mod_authz_core.c> Allow from all </IfModule> <IfModule mod_authz_core.c> Require all granted </IfModule> </FilesMatch> # Akismet images <FilesMatch "^(logo-a-2x\.png|akismet-refresh-logo\.svg|akismet-refresh-logo@2x\.png|arrow-left\.svg|icon-external\.svg|akismet-activation-banner-elements\.png)$"> <IfModule !mod_authz_core.c> Allow from all </IfModule> <IfModule mod_authz_core.c> Require all granted </IfModule> </FilesMatch> PK �$Z�3�{� {� class.akismet-admin.phpnu �[��� <?php // We plan to gradually remove all of the disabled lint rules below. // phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotValidated // phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash // phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized // phpcs:disable Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped class Akismet_Admin { const NONCE = 'akismet-update-key'; private static $initiated = false; private static $notices = array(); private static $allowed = array( 'a' => array( 'href' => true, 'title' => true, ), 'b' => array(), 'code' => array(), 'del' => array( 'datetime' => true, ), 'em' => array(), 'i' => array(), 'q' => array( 'cite' => true, ), 'strike' => array(), 'strong' => array(), ); /** * List of pages where activation banner should be displayed. * * @var array */ private static $activation_banner_pages = array( 'edit-comments.php', 'options-discussion.php', 'plugins.php', ); public static function init() { if ( ! self::$initiated ) { self::init_hooks(); } if ( isset( $_POST['action'] ) && $_POST['action'] == 'enter-key' ) { self::enter_api_key(); } } public static function init_hooks() { // The standalone stats page was removed in 3.0 for an all-in-one config and stats page. // Redirect any links that might have been bookmarked or in browser history. if ( isset( $_GET['page'] ) && 'akismet-stats-display' == $_GET['page'] ) { wp_safe_redirect( esc_url_raw( self::get_page_url( 'stats' ) ), 301 ); die; } self::$initiated = true; add_action( 'admin_init', array( 'Akismet_Admin', 'admin_init' ) ); add_action( 'admin_menu', array( 'Akismet_Admin', 'admin_menu' ), 5 ); // Priority 5, so it's called before Jetpack's admin_menu. add_action( 'admin_notices', array( 'Akismet_Admin', 'display_notice' ) ); add_action( 'admin_enqueue_scripts', array( 'Akismet_Admin', 'load_resources' ) ); add_action( 'activity_box_end', array( 'Akismet_Admin', 'dashboard_stats' ) ); add_action( 'rightnow_end', array( 'Akismet_Admin', 'rightnow_stats' ) ); add_action( 'manage_comments_nav', array( 'Akismet_Admin', 'check_for_spam_button' ) ); add_action( 'admin_action_akismet_recheck_queue', array( 'Akismet_Admin', 'recheck_queue' ) ); add_action( 'wp_ajax_akismet_recheck_queue', array( 'Akismet_Admin', 'recheck_queue' ) ); add_action( 'wp_ajax_comment_author_deurl', array( 'Akismet_Admin', 'remove_comment_author_url' ) ); add_action( 'wp_ajax_comment_author_reurl', array( 'Akismet_Admin', 'add_comment_author_url' ) ); add_action( 'jetpack_auto_activate_akismet', array( 'Akismet_Admin', 'connect_jetpack_user' ) ); add_filter( 'plugin_action_links', array( 'Akismet_Admin', 'plugin_action_links' ), 10, 2 ); add_filter( 'comment_row_actions', array( 'Akismet_Admin', 'comment_row_action' ), 10, 2 ); add_filter( 'plugin_action_links_' . plugin_basename( plugin_dir_path( __FILE__ ) . 'akismet.php' ), array( 'Akismet_Admin', 'admin_plugin_settings_link' ) ); add_filter( 'wxr_export_skip_commentmeta', array( 'Akismet_Admin', 'exclude_commentmeta_from_export' ), 10, 3 ); add_filter( 'all_plugins', array( 'Akismet_Admin', 'modify_plugin_description' ) ); // priority=1 because we need ours to run before core's comment anonymizer runs, and that's registered at priority=10 add_filter( 'wp_privacy_personal_data_erasers', array( 'Akismet_Admin', 'register_personal_data_eraser' ), 1 ); } public static function admin_init() { if ( get_option( 'Activated_Akismet' ) ) { delete_option( 'Activated_Akismet' ); if ( ! headers_sent() ) { $admin_url = self::get_page_url( 'init' ); wp_redirect( $admin_url ); } } load_plugin_textdomain( 'akismet' ); add_meta_box( 'akismet-status', __( 'Comment History', 'akismet' ), array( 'Akismet_Admin', 'comment_status_meta_box' ), 'comment', 'normal' ); if ( function_exists( 'wp_add_privacy_policy_content' ) ) { wp_add_privacy_policy_content( __( 'Akismet', 'akismet' ), __( 'We collect information about visitors who comment on Sites that use our Akismet Anti-spam service. The information we collect depends on how the User sets up Akismet for the Site, but typically includes the commenter\'s IP address, user agent, referrer, and Site URL (along with other information directly provided by the commenter such as their name, username, email address, and the comment itself).', 'akismet' ) ); } } public static function admin_menu() { if ( class_exists( 'Jetpack' ) ) { add_action( 'jetpack_admin_menu', array( 'Akismet_Admin', 'load_menu' ) ); } else { self::load_menu(); } } public static function admin_head() { if ( ! current_user_can( 'manage_options' ) ) { return; } } public static function admin_plugin_settings_link( $links ) { $settings_link = '<a href="' . esc_url( self::get_page_url() ) . '">' . __( 'Settings', 'akismet' ) . '</a>'; array_unshift( $links, $settings_link ); return $links; } public static function load_menu() { if ( class_exists( 'Jetpack' ) ) { $hook = add_submenu_page( 'jetpack', __( 'Akismet Anti-spam', 'akismet' ), __( 'Akismet Anti-spam', 'akismet' ), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); } else { $hook = add_options_page( __( 'Akismet Anti-spam', 'akismet' ), __( 'Akismet Anti-spam', 'akismet' ), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) ); } if ( $hook ) { add_action( "load-$hook", array( 'Akismet_Admin', 'admin_help' ) ); } } public static function load_resources() { global $hook_suffix; if ( in_array( $hook_suffix, apply_filters( 'akismet_admin_page_hook_suffixes', array_merge( array( 'index.php', // dashboard 'comment.php', 'post.php', 'settings_page_akismet-key-config', 'jetpack_page_akismet-key-config', ), self::$activation_banner_pages ) ) ) ) { $akismet_css_path = is_rtl() ? '_inc/rtl/akismet-rtl.css' : '_inc/akismet.css'; wp_register_style( 'akismet', plugin_dir_url( __FILE__ ) . $akismet_css_path, array(), self::get_asset_file_version( $akismet_css_path ) ); wp_enqueue_style( 'akismet' ); wp_register_style( 'akismet-font-inter', plugin_dir_url( __FILE__ ) . '_inc/fonts/inter.css', array(), self::get_asset_file_version( '_inc/fonts/inter.css' ) ); wp_enqueue_style( 'akismet-font-inter' ); $akismet_admin_css_path = is_rtl() ? '_inc/rtl/akismet-admin-rtl.css' : '_inc/akismet-admin.css'; wp_register_style( 'akismet-admin', plugin_dir_url( __FILE__ ) . $akismet_admin_css_path, array(), self::get_asset_file_version( $akismet_admin_css_path ) ); wp_enqueue_style( 'akismet-admin' ); // Enqueue the Akismet activation banner background separately so we can // include the right path to the image. Shown on edit-comments.php and plugins.php. if ( in_array( $hook_suffix, self::$activation_banner_pages, true ) ) { $activation_banner_url = esc_url( plugin_dir_url( __FILE__ ) . '_inc/img/akismet-activation-banner-elements.png' ); $inline_css = '.akismet-activate {' . PHP_EOL . 'background-image: url(' . $activation_banner_url . ');' . PHP_EOL . '}'; wp_add_inline_style( 'akismet-admin', $inline_css ); } wp_register_script( 'akismet.js', plugin_dir_url( __FILE__ ) . '_inc/akismet.js', array( 'jquery' ), self::get_asset_file_version( '_inc/akismet.js' ) ); wp_enqueue_script( 'akismet.js' ); wp_register_script( 'akismet-admin.js', plugin_dir_url( __FILE__ ) . '_inc/akismet-admin.js', array(), self::get_asset_file_version( '/_inc/akismet-admin.js' ) ); wp_enqueue_script( 'akismet-admin.js' ); $inline_js = array( 'comment_author_url_nonce' => wp_create_nonce( 'comment_author_url_nonce' ), 'strings' => array( 'Remove this URL' => __( 'Remove this URL', 'akismet' ), 'Removing...' => __( 'Removing...', 'akismet' ), 'URL removed' => __( 'URL removed', 'akismet' ), '(undo)' => __( '(undo)', 'akismet' ), 'Re-adding...' => __( 'Re-adding...', 'akismet' ), ), ); if ( isset( $_GET['akismet_recheck'] ) && wp_verify_nonce( $_GET['akismet_recheck'], 'akismet_recheck' ) ) { $inline_js['start_recheck'] = true; } if ( apply_filters( 'akismet_enable_mshots', true ) ) { $inline_js['enable_mshots'] = true; } wp_localize_script( 'akismet.js', 'WPAkismet', $inline_js ); } } /** * Add help to the Akismet page * * @return false if not the Akismet page */ public static function admin_help() { $current_screen = get_current_screen(); // Screen Content if ( current_user_can( 'manage_options' ) ) { if ( ! Akismet::get_api_key() || ( isset( $_GET['view'] ) && $_GET['view'] == 'start' ) ) { // setup page $current_screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview', 'akismet' ), 'content' => '<p><strong>' . esc_html__( 'Akismet Setup', 'akismet' ) . '</strong></p>' . '<p>' . esc_html__( 'Akismet filters out spam, so you can focus on more important things.', 'akismet' ) . '</p>' . '<p>' . esc_html__( 'On this page, you are able to set up the Akismet plugin.', 'akismet' ) . '</p>', ) ); $current_screen->add_help_tab( array( 'id' => 'setup-signup', 'title' => __( 'New to Akismet', 'akismet' ), 'content' => '<p><strong>' . esc_html__( 'Akismet Setup', 'akismet' ) . '</strong></p>' . '<p>' . esc_html__( 'You need to enter an API key to activate the Akismet service on your site.', 'akismet' ) . '</p>' . /* translators: %s: a link to the signup page with the text 'Akismet.com'. */ '<p>' . sprintf( __( 'Sign up for an account on %s to get an API Key.', 'akismet' ), '<a href="https://akismet.com/plugin-signup/" target="_blank">Akismet.com</a>' ) . '</p>', ) ); $current_screen->add_help_tab( array( 'id' => 'setup-manual', 'title' => __( 'Enter an API Key', 'akismet' ), 'content' => '<p><strong>' . esc_html__( 'Akismet Setup', 'akismet' ) . '</strong></p>' . '<p>' . esc_html__( 'If you already have an API key', 'akismet' ) . '</p>' . '<ol>' . '<li>' . esc_html__( 'Copy and paste the API key into the text field.', 'akismet' ) . '</li>' . '<li>' . esc_html__( 'Click the Use this Key button.', 'akismet' ) . '</li>' . '</ol>', ) ); } elseif ( isset( $_GET['view'] ) && $_GET['view'] == 'stats' ) { // stats page $current_screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview', 'akismet' ), 'content' => '<p><strong>' . esc_html__( 'Akismet Stats', 'akismet' ) . '</strong></p>' . '<p>' . esc_html__( 'Akismet filters out spam, so you can focus on more important things.', 'akismet' ) . '</p>' . '<p>' . esc_html__( 'On this page, you are able to view stats on spam filtered on your site.', 'akismet' ) . '</p>', ) ); } else { // configuration page $current_screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview', 'akismet' ), 'content' => '<p><strong>' . esc_html__( 'Akismet Configuration', 'akismet' ) . '</strong></p>' . '<p>' . esc_html__( 'Akismet filters out spam, so you can focus on more important things.', 'akismet' ) . '</p>' . '<p>' . esc_html__( 'On this page, you are able to update your Akismet settings and view spam stats.', 'akismet' ) . '</p>', ) ); $current_screen->add_help_tab( array( 'id' => 'settings', 'title' => __( 'Settings', 'akismet' ), 'content' => '<p><strong>' . esc_html__( 'Akismet Configuration', 'akismet' ) . '</strong></p>' . ( Akismet::predefined_api_key() ? '' : '<p><strong>' . esc_html__( 'API Key', 'akismet' ) . '</strong> - ' . esc_html__( 'Enter/remove an API key.', 'akismet' ) . '</p>' ) . '<p><strong>' . esc_html__( 'Comments', 'akismet' ) . '</strong> - ' . esc_html__( 'Show the number of approved comments beside each comment author in the comments list page.', 'akismet' ) . '</p>' . '<p><strong>' . esc_html__( 'Strictness', 'akismet' ) . '</strong> - ' . esc_html__( 'Choose to either discard the worst spam automatically or to always put all spam in spam folder.', 'akismet' ) . '</p>', ) ); if ( ! Akismet::predefined_api_key() ) { $current_screen->add_help_tab( array( 'id' => 'account', 'title' => __( 'Account', 'akismet' ), 'content' => '<p><strong>' . esc_html__( 'Akismet Configuration', 'akismet' ) . '</strong></p>' . '<p><strong>' . esc_html__( 'Subscription Type', 'akismet' ) . '</strong> - ' . esc_html__( 'The Akismet subscription plan', 'akismet' ) . '</p>' . '<p><strong>' . esc_html__( 'Status', 'akismet' ) . '</strong> - ' . esc_html__( 'The subscription status - active, cancelled or suspended', 'akismet' ) . '</p>', ) ); } } } // Help Sidebar $current_screen->set_help_sidebar( '<p><strong>' . esc_html__( 'For more information:', 'akismet' ) . '</strong></p>' . '<p><a href="https://akismet.com/faq/" target="_blank">' . esc_html__( 'Akismet FAQ', 'akismet' ) . '</a></p>' . '<p><a href="https://akismet.com/support/" target="_blank">' . esc_html__( 'Akismet Support', 'akismet' ) . '</a></p>' ); } public static function enter_api_key() { if ( ! current_user_can( 'manage_options' ) ) { die( __( 'Cheatin’ uh?', 'akismet' ) ); } if ( ! wp_verify_nonce( $_POST['_wpnonce'], self::NONCE ) ) { return false; } foreach ( array( 'akismet_strictness', 'akismet_show_user_comments_approved' ) as $option ) { update_option( $option, isset( $_POST[ $option ] ) && (int) $_POST[ $option ] == 1 ? '1' : '0' ); } if ( ! empty( $_POST['akismet_comment_form_privacy_notice'] ) ) { self::set_form_privacy_notice_option( $_POST['akismet_comment_form_privacy_notice'] ); } else { self::set_form_privacy_notice_option( 'hide' ); } if ( Akismet::predefined_api_key() ) { return false; // shouldn't have option to save key if already defined } $new_key = preg_replace( '/[^a-f0-9]/i', '', $_POST['key'] ); $old_key = Akismet::get_api_key(); if ( empty( $new_key ) ) { if ( ! empty( $old_key ) ) { delete_option( 'wordpress_api_key' ); self::$notices[] = 'new-key-empty'; } } elseif ( $new_key != $old_key ) { self::save_key( $new_key ); } return true; } public static function save_key( $api_key ) { $key_status = Akismet::verify_key( $api_key ); if ( $key_status == 'valid' ) { $akismet_user = self::get_akismet_user( $api_key ); if ( $akismet_user ) { if ( in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub' ) ) ) { update_option( 'wordpress_api_key', $api_key ); } if ( $akismet_user->status == 'active' ) { self::$notices['status'] = 'new-key-valid'; } elseif ( $akismet_user->status == 'notice' ) { self::$notices['status'] = $akismet_user; } else { self::$notices['status'] = $akismet_user->status; } } else { self::$notices['status'] = 'new-key-invalid'; } } elseif ( in_array( $key_status, array( 'invalid', 'failed' ) ) ) { self::$notices['status'] = 'new-key-' . $key_status; } } public static function dashboard_stats() { if ( did_action( 'rightnow_end' ) ) { return; // We already displayed this info in the "Right Now" section } if ( ! $count = get_option( 'akismet_spam_count' ) ) { return; } global $submenu; echo '<h3>' . esc_html( _x( 'Spam', 'comments', 'akismet' ) ) . '</h3>'; echo '<p>' . sprintf( /* translators: 1: Akismet website URL, 2: Comments page URL, 3: Number of spam comments. */ _n( '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comment</a>.', '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comments</a>.', $count, 'akismet' ), 'https://akismet.com/wordpress/', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n( $count ) ) . '</p>'; } // WP 2.5+ public static function rightnow_stats() { if ( $count = get_option( 'akismet_spam_count' ) ) { $intro = sprintf( /* translators: 1: Akismet website URL, 2: Number of spam comments. */ _n( '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comment already. ', '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comments already. ', $count, 'akismet' ), 'https://akismet.com/wordpress/', number_format_i18n( $count ) ); } else { /* translators: %s: Akismet website URL. */ $intro = sprintf( __( '<a href="%s">Akismet</a> blocks spam from getting to your blog. ', 'akismet' ), 'https://akismet.com/wordpress/' ); } $link = add_query_arg( array( 'comment_status' => 'spam' ), admin_url( 'edit-comments.php' ) ); if ( $queue_count = self::get_spam_count() ) { $queue_text = sprintf( /* translators: 1: Number of comments, 2: Comments page URL. */ _n( 'There’s <a href="%2$s">%1$s comment</a> in your spam queue right now.', 'There are <a href="%2$s">%1$s comments</a> in your spam queue right now.', $queue_count, 'akismet' ), number_format_i18n( $queue_count ), esc_url( $link ) ); } else { /* translators: %s: Comments page URL. */ $queue_text = sprintf( __( "There’s nothing in your <a href='%s'>spam queue</a> at the moment.", 'akismet' ), esc_url( $link ) ); } $text = $intro . '<br />' . $queue_text; echo "<p class='akismet-right-now'>$text</p>\n"; } public static function check_for_spam_button( $comment_status ) { // The "Check for Spam" button should only appear when the page might be showing // a comment with comment_approved=0, which means an un-trashed, un-spammed, // not-yet-moderated comment. if ( 'all' != $comment_status && 'moderated' != $comment_status ) { return; } $link = ''; $comments_count = wp_count_comments(); echo '</div>'; echo '<div class="alignleft actions">'; $classes = array( 'button-secondary', 'checkforspam', 'button-disabled', // Disable button until the page is loaded ); if ( $comments_count->moderated > 0 ) { $classes[] = 'enable-on-load'; if ( ! Akismet::get_api_key() ) { $link = self::get_page_url(); $classes[] = 'ajax-disabled'; } } echo '<a class="' . esc_attr( implode( ' ', $classes ) ) . '"' . ( ! empty( $link ) ? ' href="' . esc_url( $link ) . '"' : '' ) . /* translators: The placeholder is for showing how much of the process has completed, as a percent. e.g., "Checking for Spam (40%)" */ ' data-progress-label="' . esc_attr( __( 'Checking for Spam (%1$s%)', 'akismet' ) ) . '" data-success-url="' . esc_attr( remove_query_arg( array( 'akismet_recheck', 'akismet_recheck_error' ), add_query_arg( array( 'akismet_recheck_complete' => 1, 'recheck_count' => urlencode( '__recheck_count__' ), 'spam_count' => urlencode( '__spam_count__' ), ) ) ) ) . '" data-failure-url="' . esc_attr( remove_query_arg( array( 'akismet_recheck', 'akismet_recheck_complete' ), add_query_arg( array( 'akismet_recheck_error' => 1 ) ) ) ) . '" data-pending-comment-count="' . esc_attr( $comments_count->moderated ) . '" data-nonce="' . esc_attr( wp_create_nonce( 'akismet_check_for_spam' ) ) . '" ' . ( ! in_array( 'ajax-disabled', $classes ) ? 'onclick="return false;"' : '' ) . ' >' . esc_html__( 'Check for Spam', 'akismet' ) . '</a>'; echo '<span class="checkforspam-spinner"></span>'; } public static function recheck_queue() { global $wpdb; Akismet::fix_scheduled_recheck(); if ( ! ( isset( $_GET['recheckqueue'] ) || ( isset( $_REQUEST['action'] ) && 'akismet_recheck_queue' == $_REQUEST['action'] ) ) ) { return; } if ( ! wp_verify_nonce( $_POST['nonce'], 'akismet_check_for_spam' ) ) { wp_send_json( array( 'error' => __( 'You don’t have permission to do that.', 'akismet' ), ) ); return; } $result_counts = self::recheck_queue_portion( empty( $_POST['offset'] ) ? 0 : $_POST['offset'], empty( $_POST['limit'] ) ? 100 : $_POST['limit'] ); if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { wp_send_json( array( 'counts' => $result_counts, ) ); } else { $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url( 'edit-comments.php' ); wp_safe_redirect( $redirect_to ); exit; } } public static function recheck_queue_portion( $start = 0, $limit = 100 ) { global $wpdb; $paginate = ''; if ( $limit <= 0 ) { $limit = 100; } if ( $start < 0 ) { $start = 0; } $moderation = $wpdb->get_col( $wpdb->prepare( "SELECT * FROM {$wpdb->comments} WHERE comment_approved = '0' LIMIT %d OFFSET %d", $limit, $start ) ); $result_counts = array( 'processed' => is_countable( $moderation ) ? count( $moderation ) : 0, 'spam' => 0, 'ham' => 0, 'error' => 0, ); foreach ( $moderation as $comment_id ) { $api_response = Akismet::recheck_comment( $comment_id, 'recheck_queue' ); if ( 'true' === $api_response ) { ++$result_counts['spam']; } elseif ( 'false' === $api_response ) { ++$result_counts['ham']; } else { ++$result_counts['error']; } } return $result_counts; } // Adds an 'x' link next to author URLs, clicking will remove the author URL and show an undo link public static function remove_comment_author_url() { if ( ! empty( $_POST['id'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) { $comment_id = intval( $_POST['id'] ); $comment = get_comment( $comment_id, ARRAY_A ); if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) { $comment['comment_author_url'] = ''; do_action( 'comment_remove_author_url' ); print( wp_update_comment( $comment ) ); die(); } } } public static function add_comment_author_url() { if ( ! empty( $_POST['id'] ) && ! empty( $_POST['url'] ) && check_admin_referer( 'comment_author_url_nonce' ) ) { $comment_id = intval( $_POST['id'] ); $comment = get_comment( $comment_id, ARRAY_A ); if ( $comment && current_user_can( 'edit_comment', $comment['comment_ID'] ) ) { $comment['comment_author_url'] = esc_url( $_POST['url'] ); do_action( 'comment_add_author_url' ); print( wp_update_comment( $comment ) ); die(); } } } public static function comment_row_action( $a, $comment ) { $akismet_result = get_comment_meta( $comment->comment_ID, 'akismet_result', true ); if ( ! $akismet_result && get_comment_meta( $comment->comment_ID, 'akismet_skipped', true ) ) { $akismet_result = 'skipped'; // Akismet chose to skip the comment-check request. } $akismet_error = get_comment_meta( $comment->comment_ID, 'akismet_error', true ); $user_result = get_comment_meta( $comment->comment_ID, 'akismet_user_result', true ); $comment_status = wp_get_comment_status( $comment->comment_ID ); $desc = null; if ( $akismet_error ) { $desc = __( 'Awaiting spam check', 'akismet' ); } elseif ( ! $user_result || $user_result == $akismet_result ) { // Show the original Akismet result if the user hasn't overridden it, or if their decision was the same if ( $akismet_result == 'true' && $comment_status != 'spam' && $comment_status != 'trash' ) { $desc = __( 'Flagged as spam by Akismet', 'akismet' ); } elseif ( $akismet_result == 'false' && $comment_status == 'spam' ) { $desc = __( 'Cleared by Akismet', 'akismet' ); } } else { $who = get_comment_meta( $comment->comment_ID, 'akismet_user', true ); if ( $user_result == 'true' ) { /* translators: %s: Username. */ $desc = sprintf( __( 'Flagged as spam by %s', 'akismet' ), $who ); } else { /* translators: %s: Username. */ $desc = sprintf( __( 'Un-spammed by %s', 'akismet' ), $who ); } } // add a History item to the hover links, just after Edit if ( $akismet_result && is_array( $a ) ) { $b = array(); foreach ( $a as $k => $item ) { $b[ $k ] = $item; if ( $k == 'edit' || $k == 'unspam' ) { $b['history'] = '<a href="comment.php?action=editcomment&c=' . $comment->comment_ID . '#akismet-status" title="' . esc_attr__( 'View comment history', 'akismet' ) . '"> ' . esc_html__( 'History', 'akismet' ) . '</a>'; } } $a = $b; } if ( $desc ) { echo '<span class="akismet-status" commentid="' . $comment->comment_ID . '"><a href="comment.php?action=editcomment&c=' . $comment->comment_ID . '#akismet-status" title="' . esc_attr__( 'View comment history', 'akismet' ) . '">' . esc_html( $desc ) . '</a></span>'; } $show_user_comments_option = get_option( 'akismet_show_user_comments_approved' ); if ( $show_user_comments_option === false ) { // Default to active if the user hasn't made a decision. $show_user_comments_option = '1'; } $show_user_comments = apply_filters( 'akismet_show_user_comments_approved', $show_user_comments_option ); $show_user_comments = $show_user_comments === 'false' ? false : $show_user_comments; // option used to be saved as 'false' / 'true' if ( $show_user_comments ) { $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url ); $comment_count = intval( $comment_count ); echo '<span class="akismet-user-comment-count" commentid="' . $comment->comment_ID . '" style="display:none;"><br><span class="akismet-user-comment-counts">'; /* translators: %s: Number of comments. */ echo sprintf( esc_html( _n( '%s approved', '%s approved', $comment_count, 'akismet' ) ), number_format_i18n( $comment_count ) ) . '</span></span>'; } return $a; } public static function comment_status_meta_box( $comment ) { $history = Akismet::get_comment_history( $comment->comment_ID ); if ( $history ) { foreach ( $history as $row ) { $message = ''; if ( ! empty( $row['message'] ) ) { // Old versions of Akismet stored the message as a literal string in the commentmeta. // New versions don't do that for two reasons: // 1) Save space. // 2) The message can be translated into the current language of the blog, not stuck // in the language of the blog when the comment was made. $message = esc_html( $row['message'] ); } elseif ( ! empty( $row['event'] ) ) { // If possible, use a current translation. switch ( $row['event'] ) { case 'recheck-spam': $message = esc_html( __( 'Akismet re-checked and caught this comment as spam.', 'akismet' ) ); break; case 'check-spam': $message = esc_html( __( 'Akismet caught this comment as spam.', 'akismet' ) ); break; case 'recheck-ham': $message = esc_html( __( 'Akismet re-checked and cleared this comment.', 'akismet' ) ); break; case 'check-ham': $message = esc_html( __( 'Akismet cleared this comment.', 'akismet' ) ); break; case 'wp-blacklisted': case 'wp-disallowed': $message = sprintf( /* translators: The placeholder is a WordPress PHP function name. */ esc_html( __( 'Comment was caught by %s.', 'akismet' ) ), function_exists( 'wp_check_comment_disallowed_list' ) ? '<code>wp_check_comment_disallowed_list</code>' : '<code>wp_blacklist_check</code>' ); break; case 'report-spam': if ( isset( $row['user'] ) ) { /* translators: The placeholder is a username. */ $message = esc_html( sprintf( __( '%s reported this comment as spam.', 'akismet' ), $row['user'] ) ); } elseif ( ! $message ) { $message = esc_html( __( 'This comment was reported as spam.', 'akismet' ) ); } break; case 'report-ham': if ( isset( $row['user'] ) ) { /* translators: The placeholder is a username. */ $message = esc_html( sprintf( __( '%s reported this comment as not spam.', 'akismet' ), $row['user'] ) ); } elseif ( ! $message ) { $message = esc_html( __( 'This comment was reported as not spam.', 'akismet' ) ); } break; case 'cron-retry-spam': $message = esc_html( __( 'Akismet caught this comment as spam during an automatic retry.', 'akismet' ) ); break; case 'cron-retry-ham': $message = esc_html( __( 'Akismet cleared this comment during an automatic retry.', 'akismet' ) ); break; case 'check-error': if ( isset( $row['meta'], $row['meta']['response'] ) ) { /* translators: The placeholder is an error response returned by the API server. */ $message = sprintf( esc_html( __( 'Akismet was unable to check this comment (response: %s) but will automatically retry later.', 'akismet' ) ), '<code>' . esc_html( $row['meta']['response'] ) . '</code>' ); } else { $message = esc_html( __( 'Akismet was unable to check this comment but will automatically retry later.', 'akismet' ) ); } break; case 'recheck-error': if ( isset( $row['meta'], $row['meta']['response'] ) ) { /* translators: The placeholder is an error response returned by the API server. */ $message = sprintf( esc_html( __( 'Akismet was unable to recheck this comment (response: %s).', 'akismet' ) ), '<code>' . esc_html( $row['meta']['response'] ) . '</code>' ); } else { $message = esc_html( __( 'Akismet was unable to recheck this comment.', 'akismet' ) ); } break; case 'webhook-spam': $message = esc_html( __( 'Akismet caught this comment as spam and updated its status via webhook.', 'akismet' ) ); break; case 'webhook-ham': $message = esc_html( __( 'Akismet cleared this comment and updated its status via webhook.', 'akismet' ) ); break; case 'webhook-spam-noaction': $message = esc_html( __( 'Akismet determined this comment was spam during a recheck. It did not update the comment status because it had already been modified by another user or plugin.', 'akismet' ) ); break; case 'webhook-ham-noaction': $message = esc_html( __( 'Akismet cleared this comment during a recheck. It did not update the comment status because it had already been modified by another user or plugin.', 'akismet' ) ); break; case 'akismet-skipped': $message = esc_html( __( 'This comment was not sent to Akismet when it was submitted because it was caught by something else.', 'akismet' ) ); break; case 'akismet-skipped-disallowed': $message = esc_html( __( 'This comment was not sent to Akismet when it was submitted because it was caught by the comment disallowed list.', 'akismet' ) ); break; default: if ( preg_match( '/^status-changed/', $row['event'] ) ) { // Half of these used to be saved without the dash after 'status-changed'. // See https://plugins.trac.wordpress.org/changeset/1150658/akismet/trunk $new_status = preg_replace( '/^status-changed-?/', '', $row['event'] ); /* translators: The placeholder is a short string (like 'spam' or 'approved') denoting the new comment status. */ $message = sprintf( esc_html( __( 'Comment status was changed to %s', 'akismet' ) ), '<code>' . esc_html( $new_status ) . '</code>' ); } elseif ( preg_match( '/^status-/', $row['event'] ) ) { $new_status = preg_replace( '/^status-/', '', $row['event'] ); if ( isset( $row['user'] ) ) { /* translators: %1$s is a username; %2$s is a short string (like 'spam' or 'approved') denoting the new comment status. */ $message = sprintf( esc_html( __( '%1$s changed the comment status to %2$s.', 'akismet' ) ), $row['user'], '<code>' . esc_html( $new_status ) . '</code>' ); } } break; } } if ( ! empty( $message ) ) { echo '<p>'; if ( isset( $row['time'] ) ) { $time = gmdate( 'D d M Y @ h:i:s a', (int) $row['time'] ) . ' GMT'; /* translators: The placeholder is an amount of time, like "7 seconds" or "3 days" returned by the function human_time_diff(). */ $time_html = '<span style="color: #999;" alt="' . esc_attr( $time ) . '" title="' . esc_attr( $time ) . '">' . sprintf( esc_html__( '%s ago', 'akismet' ), human_time_diff( $row['time'] ) ) . '</span>'; printf( /* translators: %1$s is a human-readable time difference, like "3 hours ago", and %2$s is an already-translated phrase describing how a comment's status changed, like "This comment was reported as spam." */ esc_html( __( '%1$s - %2$s', 'akismet' ) ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $time_html, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $message ); // esc_html() is done above so that we can use HTML in $message. } else { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $message; // esc_html() is done above so that we can use HTML in $message. } echo '</p>'; } } } else { echo '<p>'; echo esc_html( __( 'No comment history.', 'akismet' ) ); echo '</p>'; } } public static function plugin_action_links( $links, $file ) { if ( $file == plugin_basename( plugin_dir_url( __FILE__ ) . '/akismet.php' ) ) { $links[] = '<a href="' . esc_url( self::get_page_url() ) . '">' . esc_html__( 'Settings', 'akismet' ) . '</a>'; } return $links; } // Total spam in queue // get_option( 'akismet_spam_count' ) is the total caught ever public static function get_spam_count( $type = false ) { global $wpdb; if ( ! $type ) { // total $count = wp_cache_get( 'akismet_spam_count', 'widget' ); if ( false === $count ) { $count = wp_count_comments(); $count = $count->spam; wp_cache_set( 'akismet_spam_count', $count, 'widget', 3600 ); } return $count; } elseif ( 'comments' == $type || 'comment' == $type ) { // comments $type = ''; } return (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(comment_ID) FROM {$wpdb->comments} WHERE comment_approved = 'spam' AND comment_type = %s", $type ) ); } // Check connectivity between the WordPress blog and Akismet's servers. // Returns an associative array of server IP addresses, where the key is the IP address, and value is true (available) or false (unable to connect). public static function check_server_ip_connectivity() { $servers = $ips = array(); // Some web hosts may disable this function if ( function_exists( 'gethostbynamel' ) ) { $ips = gethostbynamel( 'rest.akismet.com' ); if ( $ips && is_array( $ips ) && count( $ips ) ) { $api_key = Akismet::get_api_key(); foreach ( $ips as $ip ) { $response = Akismet::verify_key( $api_key, $ip ); // even if the key is invalid, at least we know we have connectivity if ( $response == 'valid' || $response == 'invalid' ) { $servers[ $ip ] = 'connected'; } else { $servers[ $ip ] = $response ? $response : 'unable to connect'; } } } } return $servers; } // Simpler connectivity check public static function check_server_connectivity( $cache_timeout = 86400 ) { $debug = array(); $debug['PHP_VERSION'] = PHP_VERSION; $debug['WORDPRESS_VERSION'] = $GLOBALS['wp_version']; $debug['AKISMET_VERSION'] = AKISMET_VERSION; $debug['AKISMET__PLUGIN_DIR'] = AKISMET__PLUGIN_DIR; $debug['SITE_URL'] = site_url(); $debug['HOME_URL'] = home_url(); $servers = get_option( 'akismet_available_servers' ); if ( ( time() - get_option( 'akismet_connectivity_time' ) < $cache_timeout ) && $servers !== false ) { $servers = self::check_server_ip_connectivity(); update_option( 'akismet_available_servers', $servers ); update_option( 'akismet_connectivity_time', time() ); } if ( wp_http_supports( array( 'ssl' ) ) ) { $response = wp_remote_get( 'https://rest.akismet.com/1.1/test' ); } else { $response = wp_remote_get( 'http://rest.akismet.com/1.1/test' ); } $debug['gethostbynamel'] = function_exists( 'gethostbynamel' ) ? 'exists' : 'not here'; $debug['Servers'] = $servers; $debug['Test Connection'] = $response; Akismet::log( $debug ); if ( $response && 'connected' == wp_remote_retrieve_body( $response ) ) { return true; } return false; } // Check the server connectivity and store the available servers in an option. public static function get_server_connectivity( $cache_timeout = 86400 ) { return self::check_server_connectivity( $cache_timeout ); } /** * Find out whether any comments in the Pending queue have not yet been checked by Akismet. * * @return bool */ public static function are_any_comments_waiting_to_be_checked() { return ! ! get_comments( array( // Exclude comments that are not pending. This would happen if someone manually approved or spammed a comment // that was waiting to be checked. The akismet_error meta entry will eventually be removed by the cron recheck job. 'status' => 'hold', // This is the commentmeta that is saved when a comment couldn't be checked. 'meta_key' => 'akismet_error', // We only need to know whether at least one comment is waiting for a check. 'number' => 1, ) ); } public static function get_page_url( $page = 'config' ) { $args = array( 'page' => 'akismet-key-config' ); if ( $page == 'stats' ) { $args = array( 'page' => 'akismet-key-config', 'view' => 'stats', ); } elseif ( $page == 'delete_key' ) { $args = array( 'page' => 'akismet-key-config', 'view' => 'start', 'action' => 'delete-key', '_wpnonce' => wp_create_nonce( self::NONCE ), ); } elseif ( $page === 'init' ) { $args = array( 'page' => 'akismet-key-config', 'view' => 'start', ); } return add_query_arg( $args, menu_page_url( 'akismet-key-config', false ) ); } public static function get_akismet_user( $api_key ) { $akismet_user = false; $request_args = array( 'key' => $api_key, 'blog' => get_option( 'home' ), ); $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-subscription' ); $subscription_verification = Akismet::http_post( Akismet::build_query( $request_args ), 'get-subscription' ); if ( ! empty( $subscription_verification[1] ) ) { if ( 'invalid' !== $subscription_verification[1] ) { $akismet_user = json_decode( $subscription_verification[1] ); } } return $akismet_user; } public static function get_stats( $api_key ) { $stat_totals = array(); foreach ( array( '6-months', 'all' ) as $interval ) { $request_args = array( 'blog' => get_option( 'home' ), 'key' => $api_key, 'from' => $interval, ); $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' ); $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' ); if ( ! empty( $response[1] ) ) { $data = json_decode( $response[1] ); /* * The json decoded response should be an object. If it's not an object, something's wrong, and the data * shouldn't be added to the stats_totals array. */ if ( is_object( $data ) ) { $stat_totals[ $interval ] = $data; } } } return $stat_totals; } public static function verify_wpcom_key( $api_key, $user_id, $extra = array() ) { $request_args = array_merge( array( 'user_id' => $user_id, 'api_key' => $api_key, 'get_account_type' => 'true', ), $extra ); $request_args = apply_filters( 'akismet_request_args', $request_args, 'verify-wpcom-key' ); $akismet_account = Akismet::http_post( Akismet::build_query( $request_args ), 'verify-wpcom-key' ); if ( ! empty( $akismet_account[1] ) ) { $akismet_account = json_decode( $akismet_account[1] ); } Akismet::log( compact( 'akismet_account' ) ); return $akismet_account; } public static function connect_jetpack_user() { if ( $jetpack_user = self::get_jetpack_user() ) { if ( isset( $jetpack_user['user_id'] ) && isset( $jetpack_user['api_key'] ) ) { $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'], array( 'action' => 'connect_jetpack_user' ) ); if ( is_object( $akismet_user ) ) { self::save_key( $akismet_user->api_key ); return in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub' ) ); } } } return false; } public static function display_alert() { Akismet::view( 'notice', array( 'type' => 'alert', 'code' => (int) get_option( 'akismet_alert_code' ), 'msg' => get_option( 'akismet_alert_msg' ), ) ); } public static function get_usage_limit_alert_data() { return array( 'type' => 'usage-limit', 'code' => (int) get_option( 'akismet_alert_code' ), 'msg' => get_option( 'akismet_alert_msg' ), 'api_calls' => get_option( 'akismet_alert_api_calls' ), 'usage_limit' => get_option( 'akismet_alert_usage_limit' ), 'upgrade_plan' => get_option( 'akismet_alert_upgrade_plan' ), 'upgrade_url' => get_option( 'akismet_alert_upgrade_url' ), 'upgrade_type' => get_option( 'akismet_alert_upgrade_type' ), 'upgrade_via_support' => get_option( 'akismet_alert_upgrade_via_support' ) === 'true', ); } public static function display_usage_limit_alert() { Akismet::view( 'notice', self::get_usage_limit_alert_data() ); } public static function display_spam_check_warning() { Akismet::fix_scheduled_recheck(); if ( wp_next_scheduled( 'akismet_schedule_cron_recheck' ) > time() && self::are_any_comments_waiting_to_be_checked() ) { /* * The 'akismet_display_cron_disabled_notice' filter can be used to control whether the WP-Cron disabled notice is displayed. */ if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON && apply_filters( 'akismet_display_cron_disabled_notice', true ) ) { Akismet::view( 'notice', array( 'type' => 'spam-check-cron-disabled' ) ); } else { /* translators: The Akismet configuration page URL. */ $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.', 'akismet' ), esc_url( self::get_page_url() ) ) ); Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text, ) ); } } } public static function display_api_key_warning() { Akismet::view( 'notice', array( 'type' => 'plugin' ) ); } public static function display_page() { if ( ! Akismet::get_api_key() || ( isset( $_GET['view'] ) && $_GET['view'] == 'start' ) ) { self::display_start_page(); } elseif ( isset( $_GET['view'] ) && $_GET['view'] == 'stats' ) { self::display_stats_page(); } else { self::display_configuration_page(); } } public static function display_start_page() { if ( isset( $_GET['action'] ) ) { if ( $_GET['action'] == 'delete-key' ) { if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], self::NONCE ) ) { delete_option( 'wordpress_api_key' ); } } } if ( $api_key = Akismet::get_api_key() && ( empty( self::$notices['status'] ) || 'existing-key-invalid' != self::$notices['status'] ) ) { self::display_configuration_page(); return; } // the user can choose to auto connect their API key by clicking a button on the akismet done page // if jetpack, get verified api key by using connected wpcom user id // if no jetpack, get verified api key by using an akismet token $akismet_user = false; if ( isset( $_GET['token'] ) && preg_match( '/^(\d+)-[0-9a-f]{20}$/', $_GET['token'] ) ) { $akismet_user = self::verify_wpcom_key( '', '', array( 'token' => $_GET['token'] ) ); } elseif ( $jetpack_user = self::get_jetpack_user() ) { $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'] ); } if ( isset( $_GET['action'] ) ) { if ( $_GET['action'] == 'save-key' ) { if ( is_object( $akismet_user ) ) { self::save_key( $akismet_user->api_key ); self::display_configuration_page(); return; } } } Akismet::view( 'start', compact( 'akismet_user' ) ); /* // To see all variants when testing. $akismet_user->status = 'no-sub'; Akismet::view( 'start', compact( 'akismet_user' ) ); $akismet_user->status = 'cancelled'; Akismet::view( 'start', compact( 'akismet_user' ) ); $akismet_user->status = 'suspended'; Akismet::view( 'start', compact( 'akismet_user' ) ); $akismet_user->status = 'other'; Akismet::view( 'start', compact( 'akismet_user' ) ); $akismet_user = false; */ } public static function display_stats_page() { Akismet::view( 'stats' ); } public static function display_configuration_page() { $api_key = Akismet::get_api_key(); $akismet_user = self::get_akismet_user( $api_key ); if ( ! $akismet_user ) { // This could happen if the user's key became invalid after it was previously valid and successfully set up. self::$notices['status'] = 'existing-key-invalid'; self::display_start_page(); return; } $stat_totals = self::get_stats( $api_key ); // If unset, create the new strictness option using the old discard option to determine its default. // If the old option wasn't set, default to discarding the blatant spam. if ( get_option( 'akismet_strictness' ) === false ) { add_option( 'akismet_strictness', ( get_option( 'akismet_discard_month' ) === 'false' ? '0' : '1' ) ); } // Sync the local "Total spam blocked" count with the authoritative count from the server. if ( isset( $stat_totals['all'], $stat_totals['all']->spam ) ) { update_option( 'akismet_spam_count', $stat_totals['all']->spam ); } $notices = array(); if ( empty( self::$notices ) ) { if ( ! empty( $stat_totals['all'] ) && isset( $stat_totals['all']->time_saved ) && $akismet_user->status == 'active' && $akismet_user->account_type == 'free-api-key' ) { $time_saved = false; if ( $stat_totals['all']->time_saved > 1800 ) { $total_in_minutes = round( $stat_totals['all']->time_saved / 60 ); $total_in_hours = round( $total_in_minutes / 60 ); $total_in_days = round( $total_in_hours / 8 ); $cleaning_up = __( 'Cleaning up spam takes time.', 'akismet' ); if ( $total_in_days > 1 ) { /* translators: %s: Number of days. */ $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %s day!', 'Akismet has saved you %s days!', $total_in_days, 'akismet' ), number_format_i18n( $total_in_days ) ); } elseif ( $total_in_hours > 1 ) { /* translators: %s: Number of hours. */ $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %d hour!', 'Akismet has saved you %d hours!', $total_in_hours, 'akismet' ), $total_in_hours ); } elseif ( $total_in_minutes >= 30 ) { /* translators: %s: Number of minutes. */ $time_saved = $cleaning_up . ' ' . sprintf( _n( 'Akismet has saved you %d minute!', 'Akismet has saved you %d minutes!', $total_in_minutes, 'akismet' ), $total_in_minutes ); } } $notices[] = array( 'type' => 'active-notice', 'time_saved' => $time_saved, ); } } if ( ! Akismet::predefined_api_key() && ! isset( self::$notices['status'] ) && in_array( $akismet_user->status, array( 'cancelled', 'suspended', 'missing', 'no-sub' ) ) ) { $notices[] = array( 'type' => $akismet_user->status ); } $alert_code = get_option( 'akismet_alert_code' ); if ( isset( Akismet::$limit_notices[ $alert_code ] ) ) { $notices[] = self::get_usage_limit_alert_data(); } elseif ( $alert_code > 0 ) { $notices[] = array( 'type' => 'alert', 'code' => (int) get_option( 'akismet_alert_code' ), 'msg' => get_option( 'akismet_alert_msg' ), ); } /* * To see all variants when testing. * * You may also want to comment out the akismet_view_arguments filter in Akismet::view() * to ensure that you can see all of the notices (e.g. suspended, active-notice). */ // $notices[] = array( 'type' => 'active-notice', 'time_saved' => 'Cleaning up spam takes time. Akismet has saved you 1 minute!' ); // $notices[] = array( 'type' => 'plugin' ); // $notices[] = array( 'type' => 'notice', 'notice_header' => 'This is the notice header.', 'notice_text' => 'This is the notice text.' ); // $notices[] = array( 'type' => 'missing-functions' ); // $notices[] = array( 'type' => 'servers-be-down' ); // $notices[] = array( 'type' => 'active-dunning' ); // $notices[] = array( 'type' => 'cancelled' ); // $notices[] = array( 'type' => 'suspended' ); // $notices[] = array( 'type' => 'missing' ); // $notices[] = array( 'type' => 'no-sub' ); // $notices[] = array( 'type' => 'new-key-valid' ); // $notices[] = array( 'type' => 'new-key-invalid' ); // $notices[] = array( 'type' => 'existing-key-invalid' ); // $notices[] = array( 'type' => 'new-key-failed' ); // $notices[] = array( 'type' => 'usage-limit', 'api_calls' => '15000', 'usage_limit' => '10000', 'upgrade_plan' => 'Enterprise', 'upgrade_url' => 'https://akismet.com/account/', 'code' => 10502 ); // $notices[] = array( 'type' => 'spam-check', 'link_text' => 'Link text.' ); // $notices[] = array( 'type' => 'spam-check-cron-disabled' ); // $notices[] = array( 'type' => 'alert', 'code' => 123 ); // $notices[] = array( 'type' => 'alert', 'code' => Akismet::ALERT_CODE_COMMERCIAL ); Akismet::log( compact( 'stat_totals', 'akismet_user' ) ); Akismet::view( 'config', compact( 'api_key', 'akismet_user', 'stat_totals', 'notices' ) ); } public static function display_notice() { global $hook_suffix; if ( in_array( $hook_suffix, array( 'jetpack_page_akismet-key-config', 'settings_page_akismet-key-config' ) ) ) { // This page manages the notices and puts them inline where they make sense. return; } // To see notice variants while testing. // Akismet::view( 'notice', array( 'type' => 'spam-check-cron-disabled' ) ); // Akismet::view( 'notice', array( 'type' => 'spam-check' ) ); // Akismet::view( 'notice', array( 'type' => 'alert', 'code' => 123, 'msg' => 'Message' ) ); if ( in_array( $hook_suffix, array( 'edit-comments.php' ) ) && (int) get_option( 'akismet_alert_code' ) > 0 ) { Akismet::verify_key( Akismet::get_api_key() ); // verify that the key is still in alert state $alert_code = get_option( 'akismet_alert_code' ); if ( isset( Akismet::$limit_notices[ $alert_code ] ) ) { self::display_usage_limit_alert(); } elseif ( $alert_code > 0 ) { self::display_alert(); } } elseif ( in_array( $hook_suffix, self::$activation_banner_pages, true ) && ! Akismet::get_api_key() ) { // Show the "Set Up Akismet" banner on the comments and plugin pages if no API key has been set. self::display_api_key_warning(); } elseif ( $hook_suffix == 'edit-comments.php' && wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) { self::display_spam_check_warning(); } if ( isset( $_GET['akismet_recheck_complete'] ) ) { $recheck_count = (int) $_GET['recheck_count']; $spam_count = (int) $_GET['spam_count']; if ( $recheck_count === 0 ) { $message = __( 'There were no comments to check. Akismet will only check comments awaiting moderation.', 'akismet' ); } else { /* translators: %s: Number of comments. */ $message = sprintf( _n( 'Akismet checked %s comment.', 'Akismet checked %s comments.', $recheck_count, 'akismet' ), number_format( $recheck_count ) ); $message .= ' '; if ( $spam_count === 0 ) { $message .= __( 'No comments were caught as spam.', 'akismet' ); } else { /* translators: %s: Number of comments. */ $message .= sprintf( _n( '%s comment was caught as spam.', '%s comments were caught as spam.', $spam_count, 'akismet' ), number_format( $spam_count ) ); } } echo '<div class="notice notice-success"><p>' . esc_html( $message ) . '</p></div>'; } elseif ( isset( $_GET['akismet_recheck_error'] ) ) { echo '<div class="notice notice-error"><p>' . esc_html( __( 'Akismet could not recheck your comments for spam.', 'akismet' ) ) . '</p></div>'; } } public static function display_status() { if ( ! self::get_server_connectivity() ) { Akismet::view( 'notice', array( 'type' => 'servers-be-down' ) ); } elseif ( ! empty( self::$notices ) ) { foreach ( self::$notices as $index => $type ) { if ( is_object( $type ) ) { $notice_header = $notice_text = ''; if ( property_exists( $type, 'notice_header' ) ) { $notice_header = wp_kses( $type->notice_header, self::$allowed ); } if ( property_exists( $type, 'notice_text' ) ) { $notice_text = wp_kses( $type->notice_text, self::$allowed ); } if ( property_exists( $type, 'status' ) ) { $type = wp_kses( $type->status, self::$allowed ); Akismet::view( 'notice', compact( 'type', 'notice_header', 'notice_text' ) ); unset( self::$notices[ $index ] ); } } else { Akismet::view( 'notice', compact( 'type' ) ); unset( self::$notices[ $index ] ); } } } } private static function get_jetpack_user() { if ( ! class_exists( 'Jetpack' ) ) { return false; } if ( defined( 'JETPACK__VERSION' ) && version_compare( JETPACK__VERSION, '7.7', '<' ) ) { // For version of Jetpack prior to 7.7. Jetpack::load_xml_rpc_client(); } $xml = new Jetpack_IXR_ClientMulticall( array( 'user_id' => get_current_user_id() ) ); $xml->addCall( 'wpcom.getUserID' ); $xml->addCall( 'akismet.getAPIKey' ); $xml->query(); Akismet::log( compact( 'xml' ) ); if ( ! $xml->isError() ) { $responses = $xml->getResponse(); if ( ( is_countable( $responses ) ? count( $responses ) : 0 ) > 1 ) { // Due to a quirk in how Jetpack does multi-calls, the response order // can't be trusted to match the call order. It's a good thing our // return values can be mostly differentiated from each other. $first_response_value = array_shift( $responses[0] ); $second_response_value = array_shift( $responses[1] ); // If WPCOM ever reaches 100 billion users, this will fail. :-) if ( preg_match( '/^[a-f0-9]{12}$/i', $first_response_value ) ) { $api_key = $first_response_value; $user_id = (int) $second_response_value; } else { $api_key = $second_response_value; $user_id = (int) $first_response_value; } return compact( 'api_key', 'user_id' ); } } return false; } /** * Some commentmeta isn't useful in an export file. Suppress it (when supported). * * @param bool $exclude * @param string $key The meta key * @param object $meta The meta object * @return bool Whether to exclude this meta entry from the export. */ public static function exclude_commentmeta_from_export( $exclude, $key, $meta ) { if ( in_array( $key, array( 'akismet_as_submitted', 'akismet_rechecking', 'akismet_delayed_moderation_email' ) ) ) { return true; } return $exclude; } /** * When Akismet is active, remove the "Activate Akismet" step from the plugin description. */ public static function modify_plugin_description( $all_plugins ) { if ( isset( $all_plugins['akismet/akismet.php'] ) ) { if ( Akismet::get_api_key() ) { $all_plugins['akismet/akismet.php']['Description'] = __( 'Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Your site is fully configured and being protected, even while you sleep.', 'akismet' ); } else { $all_plugins['akismet/akismet.php']['Description'] = __( 'Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started, just go to <a href="admin.php?page=akismet-key-config">your Akismet Settings page</a> to set up your API key.', 'akismet' ); } } return $all_plugins; } private static function set_form_privacy_notice_option( $state ) { if ( in_array( $state, array( 'display', 'hide' ) ) ) { update_option( 'akismet_comment_form_privacy_notice', $state ); } } public static function register_personal_data_eraser( $erasers ) { $erasers['akismet'] = array( 'eraser_friendly_name' => __( 'Akismet', 'akismet' ), 'callback' => array( 'Akismet_Admin', 'erase_personal_data' ), ); return $erasers; } /** * When a user requests that their personal data be removed, Akismet has a duty to discard * any personal data we store outside of the comment itself. Right now, that is limited * to the copy of the comment we store in the akismet_as_submitted commentmeta. * * FWIW, this information would be automatically deleted after 15 days. * * @param $email_address string The email address of the user who has requested erasure. * @param $page int This function can (and will) be called multiple times to prevent timeouts, * so this argument is used for pagination. * @return array * @see https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-eraser-to-your-plugin/ */ public static function erase_personal_data( $email_address, $page = 1 ) { $items_removed = false; $number = 50; $page = (int) $page; $comments = get_comments( array( 'author_email' => $email_address, 'number' => $number, 'paged' => $page, 'order_by' => 'comment_ID', 'order' => 'ASC', ) ); foreach ( (array) $comments as $comment ) { $comment_as_submitted = get_comment_meta( $comment->comment_ID, 'akismet_as_submitted', true ); if ( $comment_as_submitted ) { delete_comment_meta( $comment->comment_ID, 'akismet_as_submitted' ); $items_removed = true; } } // Tell core if we have more comments to work on still $done = ( is_countable( $comments ) ? count( $comments ) : 0 ) < $number; return array( 'items_removed' => $items_removed, 'items_retained' => false, // always false in this example 'messages' => array(), // no messages in this example 'done' => $done, ); } /** * Return an array of HTML elements that are allowed in a notice. * * @return array */ public static function get_notice_kses_allowed_elements() { return self::$allowed; } /** * Return a version to append to the URL of an asset file (e.g. CSS and images). * * @param string $relative_path Relative path to asset file * @return string */ public static function get_asset_file_version( $relative_path ) { $full_path = AKISMET__PLUGIN_DIR . $relative_path; // If the AKISMET_VERSION contains a lower-case letter, it's a development version (e.g. 5.3.1a2). // Use the file modified time in development. if ( preg_match( '/[a-z]/', AKISMET_VERSION ) && file_exists( $full_path ) ) { return filemtime( $full_path ); } // Otherwise, use the AKISMET_VERSION. return AKISMET_VERSION; } } PK �$Z ��d� � class.akismet-cli.phpnu �[��� <?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 ) { /* translators: %d: Comment ID. */ WP_CLI::line( sprintf( __( 'Comment #%d is spam.', 'akismet' ), $comment_id ) ); } elseif ( 'false' === $api_response ) { /* translators: %d: Comment ID. */ WP_CLI::line( sprintf( __( 'Comment #%d is not spam.', 'akismet' ), $comment_id ) ); } elseif ( false === $api_response ) { /* translators: %d: Comment ID. */ WP_CLI::error( __( 'Failed to connect to Akismet.', 'akismet' ) ); } elseif ( is_wp_error( $api_response ) ) { /* translators: %d: Comment ID. */ 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 ); /* translators: %d: Number of comments. */ WP_CLI::line( sprintf( _n( 'Processed %d comment.', 'Processed %d comments.', $total_counts['processed'], 'akismet' ), number_format( $total_counts['processed'] ) ) ); /* translators: %d: Number of comments. */ 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'] ) { /* translators: %d: Number of comments. */ WP_CLI::line( sprintf( _n( '%d comment could not be checked.', '%d comments could not be checked.', $total_counts['error'], 'akismet' ), number_format( $total_counts['error'] ) ) ); } } /** * Fetches stats from the Akismet API. * * ## OPTIONS * * [<interval>] * : The time period for which to retrieve stats. * --- * default: all * options: * - days * - months * - all * --- * * [--format=<format>] * : Allows overriding the output of the command when listing connections. * --- * default: table * options: * - table * - json * - csv * - yaml * - count * --- * * [--summary] * : When set, will display a summary of the stats. * * ## EXAMPLES * * wp akismet stats * wp akismet stats all * wp akismet stats days * wp akismet stats months * wp akismet stats all --summary */ public function stats( $args, $assoc_args ) { $api_key = Akismet::get_api_key(); if ( empty( $api_key ) ) { WP_CLI::error( __( 'API key must be set to fetch stats.', 'akismet' ) ); } switch ( $args[0] ) { case 'days': $interval = '60-days'; break; case 'months': $interval = '6-months'; break; default: $interval = 'all'; break; } $request_args = array( 'blog' => get_option( 'home' ), 'key' => $api_key, 'from' => $interval, ); $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' ); $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' ); if ( empty( $response[1] ) ) { WP_CLI::error( __( 'Currently unable to fetch stats. Please try again.', 'akismet' ) ); } $response_body = json_decode( $response[1], true ); if ( is_null( $response_body ) ) { WP_CLI::error( __( 'Stats response could not be decoded.', 'akismet' ) ); } if ( isset( $assoc_args['summary'] ) ) { $keys = array( 'spam', 'ham', 'missed_spam', 'false_positives', 'accuracy', 'time_saved', ); WP_CLI\Utils\format_items( $assoc_args['format'], array( $response_body ), $keys ); } else { $stats = $response_body['breakdown']; WP_CLI\Utils\format_items( $assoc_args['format'], $stats, array_keys( end( $stats ) ) ); } } } PK �$Z��FN�F �F LICENSE.txtnu �[��� 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. PK �$Z��R��U �U changelog.txtnu �[��� === Akismet Anti-spam === == Archived Changelog Entries == This file contains older changelog entries, so we can keep the size of the standard WordPress readme.txt file reasonable. For the latest changes, please see the "Changelog" section of the [readme.txt file](https://plugins.svn.wordpress.org/akismet/trunk/readme.txt). = 4.1.12 = *Release Date - 3 September 2021* * Fixed "Use of undefined constant" notice. * Improved styling of alert notices. = 4.1.11 = *Release Date - 23 August 2021* * Added support for Akismet API usage notifications on Akismet settings and edit-comments admin pages. * Added support for the deleted_comment action when bulk-deleting comments from Spam. = 4.1.10 = *Release Date - 6 July 2021* * Simplified the code around checking comments in REST API and XML-RPC requests. * Updated Plus plan terminology in notices to match current subscription names. * Added `rel="noopener"` to the widget link to avoid warnings in Google Lighthouse. * Set the Akismet JavaScript as deferred instead of async to improve responsiveness. * Improved the preloading of screenshot popups on the edit comments admin page. = 4.1.9 = *Release Date - 2 March 2021* * Improved handling of pingbacks in XML-RPC multicalls = 4.1.8 = *Release Date - 6 January 2021* * Fixed missing fields in submit-spam and submit-ham calls that could lead to reduced accuracy. * Fixed usage of deprecated jQuery function. = 4.1.7 = *Release Date - 22 October 2020* * Show the "Set up your Akismet account" banner on the comments admin screen, where it's relevant to mention if Akismet hasn't been configured. * Don't use wp_blacklist_check when the new wp_check_comment_disallowed_list function is available. = 4.1.6 = *Release Date - 4 June 2020* * Disable "Check for Spam" button until the page is loaded to avoid errors with clicking through to queue recheck endpoint directly. * Added filter "akismet_enable_mshots" to allow disabling screenshot popups on the edit comments admin page. = 4.1.5 = *Release Date - 29 April 2020* * Based on user feedback, we have dropped the in-admin notice explaining the availability of the "privacy notice" option in the AKismet settings screen. The option itself is available, but after displaying the notice for the last 2 years, it is now considered a known fact. * Updated the "Requires at least" to WP 4.6, based on recommendations from https://wp-info.org/tools/checkplugini18n.php?slug=akismet * Moved older changelog entries to a separate file to keep the size of this readme reasonable, also based on recommendations from https://wp-info.org/tools/checkplugini18n.php?slug=akismet = 4.1.4 = *Release Date - 17 March 2020* * Only redirect to the Akismet setup screen upon plugin activation if the plugin was activated manually from within the plugin-related screens, to help users with non-standard install workflows, like WP-CLI. * Update the layout of the initial setup screen to be more readable on small screens. * If no API key has been entered, don't run code that expects an API key. * Improve the readability of the comment history entries. * Don't modify the comment form HTML if no API key has been set. = 4.1.3 = *Release Date - 31 October 2019* * Prevented an attacker from being able to cause a user to unknowingly recheck their Pending comments for spam. * Improved compatibility with Jetpack 7.7+. * Updated the plugin activation page to use consistent language and markup. * Redirecting users to the Akismet connnection/settings screen upon plugin activation, in an effort to make it easier for people to get setup. = 4.1.2 = *Release Date - 14 May 2019* * Fixed a conflict between the Akismet setup banner and other plugin notices. * Reduced the number of API requests made by the plugin when attempting to verify the API key. * Include additional data in the pingback pre-check API request to help make the stats more accurate. * Fixed a bug that was enabling the "Check for Spam" button when no comments were eligible to be checked. * Improved Akismet's AMP compatibility. = 4.1.1 = *Release Date - 31 January 2019* * Fixed the "Setup Akismet" notice so it resizes responsively. * Only highlight the "Save Changes" button in the Akismet config when changes have been made. * The count of comments in your spam queue shown on the dashboard show now always be up-to-date. = 4.1 = *Release Date - 12 November 2018* * Added a WP-CLI method for retrieving stats. * Hooked into the new "Personal Data Eraser" functionality from WordPress 4.9.6. * Added functionality to clear outdated alerts from Akismet.com. = 4.0.8 = *Release Date - 19 June 2018* * Improved the grammar and consistency of the in-admin privacy related notes (notice and config). * Revised in-admin explanation of the comment form privacy notice to make its usage clearer. * Added `rel="nofollow noopener"` to the comment form privacy notice to improve SEO and security. = 4.0.7 = *Release Date - 28 May 2018* * Based on user feedback, the link on "Learn how your comment data is processed." in the optional privacy notice now has a `target` of `_blank` and opens in a new tab/window. * Updated the in-admin privacy notice to use the term "comment" instead of "contact" in "Akismet can display a notice to your users under your comment forms." * Only show in-admin privacy notice if Akismet has an API Key configured = 4.0.6 = *Release Date - 26 May 2018* * Moved away from using `empty( get_option() )` to instantiating a variable to be compatible with older versions of PHP (5.3, 5.4, etc). = 4.0.5 = *Release Date - 26 May 2018* * Corrected version number after tagging. Sorry... = 4.0.4 = *Release Date - 26 May 2018* * Added a hook to provide Akismet-specific privacy information for a site's privacy policy. * Added tools to control the display of a privacy related notice under comment forms. * Fixed HTML in activation failure message to close META and HEAD tag properly. * Fixed a bug that would sometimes prevent Akismet from being correctly auto-configured. = 4.0.3 = *Release Date - 19 February 2018* * Added a scheduled task to remove entries in wp_commentmeta that no longer have corresponding comments in wp_comments. * Added a new `akismet_batch_delete_count` action to the batch delete methods for people who'd like to keep track of the numbers of records being processed by those methods. = 4.0.2 = *Release Date - 18 December 2017* * Fixed a bug that could cause Akismet to recheck a comment that has already been manually approved or marked as spam. * Fixed a bug that could cause Akismet to claim that some comments are still waiting to be checked when no comments are waiting to be checked. = 4.0.1 = *Release Date - 6 November 2017* * Fixed a bug that could prevent some users from connecting Akismet via their Jetpack connection. * Ensured that any pending Akismet-related events are unscheduled if the plugin is deactivated. * Allow some JavaScript to be run asynchronously to avoid affecting page render speeds. = 4.0 = *Release Date - 19 September 2017* * Added REST API endpoints for configuring Akismet and retrieving stats. * Increased the minimum supported WordPress version to 4.0. * Added compatibility with comments submitted via the REST API. * Improved the progress indicator on the "Check for Spam" button. = 3.3.4 = *Release Date - 3 August 2017* * Disabled Akismet's debug log output by default unless AKISMET_DEBUG is defined. * URL previews now begin preloading when the mouse moves near them in the comments section of wp-admin. * When a comment is caught by the Comment Blacklist, Akismet will always allow it to stay in the trash even if it is spam as well. * Fixed a bug that was preventing an error from being shown when a site can't reach Akismet's servers. = 3.3.3 = *Release Date - 13 July 2017* * Reduced amount of bandwidth used by the URL Preview feature. * Improved the admin UI when the API key is manually pre-defined for the site. * Removed a workaround for WordPress installations older than 3.3 that will improve Akismet's compatibility with other plugins. * The number of spam blocked that is displayed on the WordPress dashboard will now be more accurate and updated more frequently. * Fixed a bug in the Akismet widget that could cause PHP warnings. = 3.3.2 = *Release Date - 10 May 2017* * Fixed a bug causing JavaScript errors in some browsers. = 3.3.1 = *Release Date - 2 May 2017* * Improve performance by only requesting the akismet_comment_nonce option when absolutely necessary. * Fixed two bugs that could cause PHP warnings. * Fixed a bug that was preventing the "Remove author URL" feature from working after a comment was edited using "Quick Edit." * Fixed a bug that was preventing the URL preview feature from working after a comment was edited using "Quick Edit." = 3.3 = *Release Date - 23 February 2017* * Updated the Akismet admin pages with a new clean design. * Fixed bugs preventing the `akismet_add_comment_nonce` and `akismet_update_alert` wrapper functions from working properly. * Fixed bug preventing the loading indicator from appearing when re-checking all comments for spam. * Added a progress indicator to the "Check for Spam" button. * Added a success message after manually rechecking the Pending queue for spam. = 3.2 = *Release Date - 6 September 2016* * Added a WP-CLI module. You can now check comments and recheck the moderation queue from the command line. * Stopped using the deprecated jQuery function `.live()`. * Fixed a bug in `remove_comment_author_url()` and `add_comment_author_url()` that could generate PHP notices. * Fixed a bug that could cause an infinite loop for sites with very very very large comment IDs. * Fixed a bug that could cause the Akismet widget title to be blank. = 3.1.11 = *Release Date - 12 May 2016* * Fixed a bug that could cause the "Check for Spam" button to skip some comments. * Fixed a bug that could prevent some spam submissions from being sent to Akismet. * Updated all links to use https:// when possible. * Disabled Akismet debug logging unless WP_DEBUG and WP_DEBUG_LOG are both enabled. = 3.1.10 = *Release Date - 1 April 2016* * Fixed a bug that could cause comments caught as spam to be placed in the Pending queue. * Fixed a bug that could have resulted in comments that were caught by the core WordPress comment blacklist not to have a corresponding History entry. * Fixed a bug that could have caused avoidable PHP warnings in the error log. = 3.1.9 = *Release Date - 28 March 2016* * Add compatibility with Jetpack so that Jetpack can automatically configure Akismet settings when appropriate. * Fixed a bug preventing some comment data from being sent to Akismet. = 3.1.8 = *Release Date - 4 March 2016* * Fixed a bug preventing Akismet from being used with some plugins that rewrite admin URLs. * Reduced the amount of bandwidth used on Akismet API calls * Reduced the amount of space Akismet uses in the database * Fixed a bug that could cause comments caught as spam to be placed in the Pending queue. = 3.1.7 = *Release Date - 4 January 2016* * Added documentation for the 'akismet_comment_nonce' filter. * The post-install activation button is now accessible to screen readers and keyboard-only users. * Fixed a bug that was preventing the "Remove author URL" feature from working in WordPress 4.4 = 3.1.6 = *Release Date - 14 December 2015* * Improve the notices shown after activating Akismet. * Update some strings to allow for the proper plural forms in all languages. = 3.1.5 = *Release Date - 13 October 2015* * Closes a potential XSS vulnerability. = 3.1.4 = *Release Date - 24 September 2015* * Fixed a bug that was preventing some users from automatically connecting using Jetpack if they didn't have a current Akismet subscription. * Fixed a bug that could cause comments caught as spam to be placed in the Pending queue. * Error messages and instructions have been simplified to be more understandable. * Link previews are enabled for all links inside comments, not just the author's website link. = 3.1.3 = *Release Date - 6 July 2015* * Notify users when their account status changes after previously being successfully set up. This should help any users who are seeing blank Akismet settings screens. = 3.1.2 = *Release Date - 7 June 2015* * Reduced the amount of space Akismet uses in the commentmeta table. * Fixed a bug where some comments with quotes in the author name weren't getting history entries * Pre-emptive security improvements to ensure that the Akismet plugin can't be used by attackers to compromise a WordPress installation. * Better UI for the key entry field: allow whitespace to be included at the beginning or end of the key and strip it out automatically when the form is submitted. * When deactivating the plugin, notify the Akismet API so the site can be marked as inactive. * Clearer error messages. = 3.1.1 = *Release Date - 17th March, 2015* * Improvements to the "Remove comment author URL" JavaScript * Include the pingback pre-check from the 2.6 branch. = 3.1 = *Release Date - 11th March, 2015* * Use HTTPS by default for all requests to Akismet. * Fix for a situation where Akismet might strip HTML from a comment. = 3.0.4 = *Release Date - 11th December, 2014* * Fix to make .htaccess compatible with Apache 2.4. * Fix to allow removal of https author URLs. * Fix to avoid stripping part of the author URL when removing and re-adding. * Removed the "Check for Spam" button from the "Trash" and "Approved" queues, where it would have no effect. * Allow automatic API key configuration when Jetpack is installed and connected to a WordPress.com account = 3.0.3 = *Release Date - 3rd November, 2014* * Fix for sending the wrong data to delete_comment action that could have prevented old spam comments from being deleted. * Added a filter to disable logging of Akismet debugging information. * Added a filter for the maximum comment age when deleting old spam comments. * Added a filter for the number per batch when deleting old spam comments. * Removed the "Check for Spam" button from the Spam folder. = 3.0.2 = *Release Date - 18th August, 2014* * Performance improvements. * Fixed a bug that could truncate the comment data being sent to Akismet for checking. = 3.0.1 = *Release Date - 9th July, 2014* * Removed dependency on PHP's fsockopen function * Fix spam/ham reports to work when reported outside of the WP dashboard, e.g., from Notifications or the WP app * Remove jQuery dependency for comment form JavaScript * Remove unnecessary data from some Akismet comment meta * Suspended keys will now result in all comments being put in moderation, not spam. = 3.0.0 = *Release Date - 15th April, 2014* * Move Akismet to Settings menu * Drop Akismet Stats menu * Add stats snapshot to Akismet settings * Add Akismet subscription details and status to Akismet settings * Add contextual help for each page * Improve Akismet setup to use Jetpack to automate plugin setup * Fix "Check for Spam" to use AJAX to avoid page timing out * Fix Akismet settings page to be responsive * Drop legacy code * Tidy up CSS and Javascript * Replace the old discard setting with a new "discard pervasive spam" feature. = 2.6.0 = *Release Date - 18th March, 2014* * Add ajax paging to the check for spam button to handle large volumes of comments * Optimize javascript and add localization support * Fix bug in link to spam comments from right now dashboard widget * Fix bug with deleting old comments to avoid timeouts dealing with large volumes of comments * Include X-Pingback-Forwarded-For header in outbound WordPress pingback verifications * Add pre-check for pingbacks, to stop spam before an outbound verification request is made = 2.5.9 = *Release Date - 1st August, 2013* * Update 'Already have a key' link to redirect page rather than depend on javascript * Fix some non-translatable strings to be translatable * Update Activation banner in plugins page to redirect user to Akismet config page = 2.5.8 = *Release Date - 20th January, 2013* * Simplify the activation process for new users * Remove the reporter_ip parameter * Minor preventative security improvements = 2.5.7 = *Release Date - 13th December, 2012* * FireFox Stats iframe preview bug * Fix mshots preview when using https * Add .htaccess to block direct access to files * Prevent some PHP notices * Fix Check For Spam return location when referrer is empty * Fix Settings links for network admins * Fix prepare() warnings in WP 3.5 = 2.5.6 = *Release Date - 26th April, 2012* * Prevent retry scheduling problems on sites where wp_cron is misbehaving * Preload mshot previews * Modernize the widget code * Fix a bug where comments were not held for moderation during an error condition * Improve the UX and display when comments are temporarily held due to an error * Make the Check For Spam button force a retry when comments are held due to an error * Handle errors caused by an invalid key * Don't retry comments that are too old * Improve error messages when verifying an API key = 2.5.5 = *Release Date - 11th January, 2012* * Add nonce check for comment author URL remove action * Fix the settings link = 2.5.4 = *Release Date - 5th January, 2012* * Limit Akismet CSS and Javascript loading in wp-admin to just the pages that need it * Added author URL quick removal functionality * Added mShot preview on Author URL hover * Added empty index.php to prevent directory listing * Move wp-admin menu items under Jetpack, if it is installed * Purge old Akismet comment meta data, default of 15 days = 2.5.3 = *Release Date - 8th Febuary, 2011* * Specify the license is GPL v2 or later * Fix a bug that could result in orphaned commentmeta entries * Include hotfix for WordPress 3.0.5 filter issue = 2.5.2 = *Release Date - 14th January, 2011* * Properly format the comment count for author counts * Look for super admins on multisite installs when looking up user roles * Increase the HTTP request timeout * Removed padding for author approved count * Fix typo in function name * Set Akismet stats iframe height to fixed 2500px. Better to have one tall scroll bar than two side by side. = 2.5.1 = *Release Date - 17th December, 2010* * Fix a bug that caused the "Auto delete" option to fail to discard comments correctly * Remove the comment nonce form field from the 'Akismet Configuration' page in favor of using a filter, akismet_comment_nonce * Fixed padding bug in "author" column of posts screen * Added margin-top to "cleared by ..." badges on dashboard * Fix possible error when calling akismet_cron_recheck() * Fix more PHP warnings * Clean up XHTML warnings for comment nonce * Fix for possible condition where scheduled comment re-checks could get stuck * Clean up the comment meta details after deleting a comment * Only show the status badge if the comment status has been changed by someone/something other than Akismet * Show a 'History' link in the row-actions * Translation fixes * Reduced font-size on author name * Moved "flagged by..." notification to top right corner of comment container and removed heavy styling * Hid "flagged by..." notification while on dashboard = 2.5.0 = *Release Date - 7th December, 2010* * Track comment actions under 'Akismet Status' on the edit comment screen * Fix a few remaining deprecated function calls ( props Mike Glendinning ) * Use HTTPS for the stats IFRAME when wp-admin is using HTTPS * Use the WordPress HTTP class if available * Move the admin UI code to a separate file, only loaded when needed * Add cron retry feature, to replace the old connectivity check * Display Akismet status badge beside each comment * Record history for each comment, and display it on the edit page * Record the complete comment as originally submitted in comment_meta, to use when reporting spam and ham * Highlight links in comment content * New option, "Show the number of comments you've approved beside each comment author." * New option, "Use a nonce on the comment form." = 2.4.0 = *Release Date - 23rd August, 2010* * Spell out that the license is GPLv2 * Fix PHP warnings * Fix WordPress deprecated function calls * Fire the delete_comment action when deleting comments * Move code specific for older WP versions to legacy.php * General code clean up = 2.3.0 = *Release Date - 5th June, 2010* * Fix "Are you sure" nonce message on config screen in WPMU * Fix XHTML compliance issue in sidebar widget * Change author link; remove some old references to WordPress.com accounts * Localize the widget title (core ticket #13879) = 2.2.9 = *Release Date - 2nd June, 2010* * Eliminate a potential conflict with some plugins that may cause spurious reports = 2.2.8 = *Release Date - 27th May, 2010* * Fix bug in initial comment check for ipv6 addresses * Report comments as ham when they are moved from spam to moderation * Report comments as ham when clicking undo after spam * Use transition_comment_status action when available instead of older actions for spam/ham submissions * Better diagnostic messages when PHP network functions are unavailable * Better handling of comments by logged-in users = 2.2.7 = *Release Date - 17th December, 2009* * Add a new AKISMET_VERSION constant * Reduce the possibility of over-counting spam when another spam filter plugin is in use * Disable the connectivity check when the API key is hard-coded for WPMU = 2.2.6 = *Release Date - 20th July, 2009* * Fix a global warning introduced in 2.2.5 * Add changelog and additional readme.txt tags * Fix an array conversion warning in some versions of PHP * Support a new WPCOM_API_KEY constant for easier use with WordPress MU = 2.2.5 = *Release Date - 13th July, 2009* * Include a new Server Connectivity diagnostic check, to detect problems caused by firewalls = 2.2.4 = *Release Date - 3rd June, 2009* * Fixed a key problem affecting the stats feature in WordPress MU * Provide additional blog information in Akismet API calls PK �$Zʲ�y|, |, _inc/akismet-frontend.jsnu �[��� /** * Observe how the user enters content into the comment form in order to determine whether it's a bot or not. * * Note that no actual input is being saved here, only counts and timings between events. */ ( function() { // Passive event listeners are guaranteed to never call e.preventDefault(), // but they're not supported in all browsers. Use this feature detection // to determine whether they're available for use. var supportsPassive = false; try { var opts = Object.defineProperty( {}, 'passive', { get : function() { supportsPassive = true; } } ); window.addEventListener( 'testPassive', null, opts ); window.removeEventListener( 'testPassive', null, opts ); } catch ( e ) {} function init() { var input_begin = ''; var keydowns = {}; var lastKeyup = null; var lastKeydown = null; var keypresses = []; var modifierKeys = []; var correctionKeys = []; var lastMouseup = null; var lastMousedown = null; var mouseclicks = []; var mousemoveTimer = null; var lastMousemoveX = null; var lastMousemoveY = null; var mousemoveStart = null; var mousemoves = []; var touchmoveCountTimer = null; var touchmoveCount = 0; var lastTouchEnd = null; var lastTouchStart = null; var touchEvents = []; var scrollCountTimer = null; var scrollCount = 0; var correctionKeyCodes = [ 'Backspace', 'Delete', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown' ]; var modifierKeyCodes = [ 'Shift', 'CapsLock' ]; var forms = document.querySelectorAll( 'form[method=post]' ); for ( var i = 0; i < forms.length; i++ ) { var form = forms[i]; var formAction = form.getAttribute( 'action' ); // Ignore forms that POST directly to other domains; these could be things like payment forms. if ( formAction ) { // Check that the form is posting to an external URL, not a path. if ( formAction.indexOf( 'http://' ) == 0 || formAction.indexOf( 'https://' ) == 0 ) { if ( formAction.indexOf( 'http://' + window.location.hostname + '/' ) != 0 && formAction.indexOf( 'https://' + window.location.hostname + '/' ) != 0 ) { continue; } } } form.addEventListener( 'submit', function () { var ak_bkp = prepare_timestamp_array_for_request( keypresses ); var ak_bmc = prepare_timestamp_array_for_request( mouseclicks ); var ak_bte = prepare_timestamp_array_for_request( touchEvents ); var ak_bmm = prepare_timestamp_array_for_request( mousemoves ); var input_fields = { // When did the user begin entering any input? 'bib': input_begin, // When was the form submitted? 'bfs': Date.now(), // How many keypresses did they make? 'bkpc': keypresses.length, // How quickly did they press a sample of keys, and how long between them? 'bkp': ak_bkp, // How quickly did they click the mouse, and how long between clicks? 'bmc': ak_bmc, // How many mouseclicks did they make? 'bmcc': mouseclicks.length, // When did they press modifier keys (like Shift or Capslock)? 'bmk': modifierKeys.join( ';' ), // When did they correct themselves? e.g., press Backspace, or use the arrow keys to move the cursor back 'bck': correctionKeys.join( ';' ), // How many times did they move the mouse? 'bmmc': mousemoves.length, // How many times did they move around using a touchscreen? 'btmc': touchmoveCount, // How many times did they scroll? 'bsc': scrollCount, // How quickly did they perform touch events, and how long between them? 'bte': ak_bte, // How many touch events were there? 'btec' : touchEvents.length, // How quickly did they move the mouse, and how long between moves? 'bmm' : ak_bmm }; var akismet_field_prefix = 'ak_'; if ( this.getElementsByClassName ) { // Check to see if we've used an alternate field name prefix. We store this as an attribute of the container around some of the Akismet fields. var possible_akismet_containers = this.getElementsByClassName( 'akismet-fields-container' ); for ( var containerIndex = 0; containerIndex < possible_akismet_containers.length; containerIndex++ ) { var container = possible_akismet_containers.item( containerIndex ); if ( container.getAttribute( 'data-prefix' ) ) { akismet_field_prefix = container.getAttribute( 'data-prefix' ); break; } } } for ( var field_name in input_fields ) { var field = document.createElement( 'input' ); field.setAttribute( 'type', 'hidden' ); field.setAttribute( 'name', akismet_field_prefix + field_name ); field.setAttribute( 'value', input_fields[ field_name ] ); this.appendChild( field ); } }, supportsPassive ? { passive: true } : false ); form.addEventListener( 'keydown', function ( e ) { // If you hold a key down, some browsers send multiple keydown events in a row. // Ignore any keydown events for a key that hasn't come back up yet. if ( e.key in keydowns ) { return; } var keydownTime = ( new Date() ).getTime(); keydowns[ e.key ] = [ keydownTime ]; if ( ! input_begin ) { input_begin = keydownTime; } // In some situations, we don't want to record an interval since the last keypress -- for example, // on the first keypress, or on a keypress after focus has changed to another element. Normally, // we want to record the time between the last keyup and this keydown. But if they press a // key while already pressing a key, we want to record the time between the two keydowns. var lastKeyEvent = Math.max( lastKeydown, lastKeyup ); if ( lastKeyEvent ) { keydowns[ e.key ].push( keydownTime - lastKeyEvent ); } lastKeydown = keydownTime; }, supportsPassive ? { passive: true } : false ); form.addEventListener( 'keyup', function ( e ) { if ( ! ( e.key in keydowns ) ) { // This key was pressed before this script was loaded, or a mouseclick happened during the keypress, or... return; } var keyupTime = ( new Date() ).getTime(); if ( 'TEXTAREA' === e.target.nodeName || 'INPUT' === e.target.nodeName ) { if ( -1 !== modifierKeyCodes.indexOf( e.key ) ) { modifierKeys.push( keypresses.length - 1 ); } else if ( -1 !== correctionKeyCodes.indexOf( e.key ) ) { correctionKeys.push( keypresses.length - 1 ); } else { // ^ Don't record timings for keys like Shift or backspace, since they // typically get held down for longer than regular typing. var keydownTime = keydowns[ e.key ][0]; var keypress = []; // Keypress duration. keypress.push( keyupTime - keydownTime ); // Amount of time between this keypress and the previous keypress. if ( keydowns[ e.key ].length > 1 ) { keypress.push( keydowns[ e.key ][1] ); } keypresses.push( keypress ); } } delete keydowns[ e.key ]; lastKeyup = keyupTime; }, supportsPassive ? { passive: true } : false ); form.addEventListener( "focusin", function ( e ) { lastKeydown = null; lastKeyup = null; keydowns = {}; }, supportsPassive ? { passive: true } : false ); form.addEventListener( "focusout", function ( e ) { lastKeydown = null; lastKeyup = null; keydowns = {}; }, supportsPassive ? { passive: true } : false ); } document.addEventListener( 'mousedown', function ( e ) { lastMousedown = ( new Date() ).getTime(); }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'mouseup', function ( e ) { if ( ! lastMousedown ) { // If the mousedown happened before this script was loaded, but the mouseup happened after... return; } var now = ( new Date() ).getTime(); var mouseclick = []; mouseclick.push( now - lastMousedown ); if ( lastMouseup ) { mouseclick.push( lastMousedown - lastMouseup ); } mouseclicks.push( mouseclick ); lastMouseup = now; // If the mouse has been clicked, don't record this time as an interval between keypresses. lastKeydown = null; lastKeyup = null; keydowns = {}; }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'mousemove', function ( e ) { if ( mousemoveTimer ) { clearTimeout( mousemoveTimer ); mousemoveTimer = null; } else { mousemoveStart = ( new Date() ).getTime(); lastMousemoveX = e.offsetX; lastMousemoveY = e.offsetY; } mousemoveTimer = setTimeout( function ( theEvent, originalMousemoveStart ) { var now = ( new Date() ).getTime() - 500; // To account for the timer delay. var mousemove = []; mousemove.push( now - originalMousemoveStart ); mousemove.push( Math.round( Math.sqrt( Math.pow( theEvent.offsetX - lastMousemoveX, 2 ) + Math.pow( theEvent.offsetY - lastMousemoveY, 2 ) ) ) ); if ( mousemove[1] > 0 ) { // If there was no measurable distance, then it wasn't really a move. mousemoves.push( mousemove ); } mousemoveStart = null; mousemoveTimer = null; }, 500, e, mousemoveStart ); }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'touchmove', function ( e ) { if ( touchmoveCountTimer ) { clearTimeout( touchmoveCountTimer ); } touchmoveCountTimer = setTimeout( function () { touchmoveCount++; }, 500 ); }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'touchstart', function ( e ) { lastTouchStart = ( new Date() ).getTime(); }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'touchend', function ( e ) { if ( ! lastTouchStart ) { // If the touchstart happened before this script was loaded, but the touchend happened after... return; } var now = ( new Date() ).getTime(); var touchEvent = []; touchEvent.push( now - lastTouchStart ); if ( lastTouchEnd ) { touchEvent.push( lastTouchStart - lastTouchEnd ); } touchEvents.push( touchEvent ); lastTouchEnd = now; // Don't record this time as an interval between keypresses. lastKeydown = null; lastKeyup = null; keydowns = {}; }, supportsPassive ? { passive: true } : false ); document.addEventListener( 'scroll', function ( e ) { if ( scrollCountTimer ) { clearTimeout( scrollCountTimer ); } scrollCountTimer = setTimeout( function () { scrollCount++; }, 500 ); }, supportsPassive ? { passive: true } : false ); } /** * For the timestamp data that is collected, don't send more than `limit` data points in the request. * Choose a random slice and send those. */ function prepare_timestamp_array_for_request( a, limit ) { if ( ! limit ) { limit = 100; } var rv = ''; if ( a.length > 0 ) { var random_starting_point = Math.max( 0, Math.floor( Math.random() * a.length - limit ) ); for ( var i = 0; i < limit && i < a.length; i++ ) { rv += a[ random_starting_point + i ][0]; if ( a[ random_starting_point + i ].length >= 2 ) { rv += "," + a[ random_starting_point + i ][1]; } rv += ";"; } } return rv; } if ( document.readyState !== 'loading' ) { init(); } else { document.addEventListener( 'DOMContentLoaded', init ); } })();PK �$ZQK�.� � _inc/fonts/inter.cssnu �[��� @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url("https://s0.wp.com/i/fonts/inter/Inter-Regular.woff2?v=3.19") format("woff2"), url("https://s0.wp.com/i/fonts/inter/Inter-Regular.woff?v=3.19") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 400; font-display: swap; src: url("https://s0.wp.com/i/fonts/inter/Inter-Italic.woff2?v=3.19") format("woff2"), url("https://s0.wp.com/i/fonts/inter/Inter-Italic.woff?v=3.19") format("woff"); } @font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url("https://s0.wp.com/i/fonts/inter/Inter-Medium.woff2?v=3.19") format("woff2"), url("https://s0.wp.com/i/fonts/inter/Inter-Medium.woff?v=3.19") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 500; font-display: swap; src: url("https://s0.wp.com/i/fonts/inter/Inter-MediumItalic.woff2?v=3.19") format("woff2"), url("https://s0.wp.com/i/fonts/inter/Inter-MediumItalic.woff?v=3.19") format("woff"); } @font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url("https://s0.wp.com/i/fonts/inter/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("https://s0.wp.com/i/fonts/inter/Inter-SemiBold.woff?v=3.19") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 600; font-display: swap; src: url("https://s0.wp.com/i/fonts/inter/Inter-SemiBoldItalic.woff2?v=3.19") format("woff2"), url("https://s0.wp.com/i/fonts/inter/Inter-SemiBoldItalic.woff?v=3.19") format("woff"); } @font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url("https://s0.wp.com/i/fonts/inter/Inter-Bold.woff2?v=3.19") format("woff2"), url("https://s0.wp.com/i/fonts/inter/Inter-Bold.woff?v=3.19") format("woff"); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 700; font-display: swap; src: url("https://s0.wp.com/i/fonts/inter/Inter-BoldItalic.woff2?v=3.19") format("woff2"), url("https://s0.wp.com/i/fonts/inter/Inter-BoldItalic.woff?v=3.19") format("woff"); } PK �$Z�ؑ � _inc/img/logo-a-2x.pngnu �[��� �PNG IHDR , iF�z pHYs % %IR$� sRGB ��� gAMA ���a IDATx͘MHQ���KC++����cc�ת�ZDA�צڵ� J��A�1�(h�rU��}��$Hed�m�,�̏�<�s�7�7�f|o|o���^��{���w��#�X̼�qR=���(+]���|5�Q0V&9U�G�X��0�b��`h��oz�r �I0Ԡ�A��n=��<0��nk�-ð\_Eq�\TS�NF@��2L_�|&�j��y�(g����נ��P{� ��z�eY�RA9����l�|I��;]�7�̸.�c�X�&ʗ0�aN�(j=������`)�Z�4��9A4��;ĩ:I�&��2p)M�r�m� J(W�dh��r���O��0���L�?�Zp �9f'_�r�zl�3Bl������fW��"O�� � � �_r�a�=�0N��Sט>i�0Ui@�%zc�;R�<k8��=`L�1f4��v�S�\A� ��8X��v�,�2�m�-�����Ս�T'K.�h?�i�/ �.B�ʵ���p�Z�5�0� ��s�Hin�o�1�V�-N�t��@���@�%�%\1*��a���C|�5IF�hW �<VzE)��� ./�*�Pl���NQ��øsȹv�Ē�7?�>����>quh`�ٛ)K!�U�U>JQ�6�}$u���c=۟Sn=�l���+�.�H����@f"WP�\����ٻ�/{l���qA�t�l�w����y����h�b;_q�]�+0�"b�boI�\�7�r��V g��ZO�_�G��b�;ij&磐��*�YJ>=S_A�����+N� ĩ] IEND�B`�PK �$Z��! �! ! _inc/img/akismet-refresh-logo.svgnu �[��� <svg xmlns="http://www.w3.org/2000/svg" width="203" height="44" fill="none"><rect width="44" height="44" fill="#357B49" rx="6"/><path fill="#fff" fill-rule="evenodd" d="m29.746 28.31-6.392-16.797c-.152-.397-.305-.672-.789-.675-.673 0-1.408.611-1.746 1.316l-7.378 16.154c-.072.16-.143.311-.214.454-.5.995-1.045 1.546-2.357 1.626a.399.399 0 0 0-.16.033l-.01.004a.399.399 0 0 0-.23.392v.01c0 .054.01.106.03.155l.004.01a.416.416 0 0 0 .394.252h6.212a.417.417 0 0 0 .307-.12.416.416 0 0 0 .124-.305.398.398 0 0 0-.105-.302.399.399 0 0 0-.294-.127c-.757 0-2.197-.062-2.197-1.164.02-.318.103-.63.245-.916l1.399-3.152c.52-1.163 1.654-1.163 2.572-1.163h5.843c.023 0 .044 0 .062.003.13.014.16.081.214.242l1.534 4.07a2.857 2.857 0 0 1 .216 1.04c0 .054-.003.104-.01.153-.09.726-.831.887-1.49.887a.4.4 0 0 0-.294.127l-.007.008-.007.008a.401.401 0 0 0-.092.286v.01c0 .054.01.106.03.155l.005.01a.42.42 0 0 0 .395.252h7.011a.413.413 0 0 0 .279-.13.412.412 0 0 0 .11-.297.387.387 0 0 0-.09-.294.388.388 0 0 0-.277-.135c-1.448-.122-2.295-.643-2.847-2.08Zm-11.985-5.844 2.847-6.304c.361-.728.659-1.486.889-2.265 0-.06.03-.092.06-.092s.061.032.061.091c.02.122.045.247.073.374.197.888.584 1.878.914 2.723l.176.453 1.684 4.529a.927.927 0 0 1 .092.4.473.473 0 0 1-.009.094c-.041.202-.228.272-.602.272h-6.063c-.122 0-.184-.03-.184-.092a.36.36 0 0 1 .062-.183Zm17.107-.721c0 .786-.446 1.231-1.25 1.231-.806 0-1.125-.409-1.125-1.034 0-.786.465-1.231 1.25-1.231.785 0 1.125.427 1.125 1.034ZM9.629 23.002c.803 0 1.25-.447 1.25-1.231 0-.607-.343-1.036-1.128-1.036-.785 0-1.25.447-1.25 1.231 0 .625.325 1.036 1.128 1.036Z" clip-rule="evenodd"/><path fill="#000" fill-rule="evenodd" d="M94.37 14.539c0-1.24-1.166-1.633-2.95-1.633a1.225 1.225 0 0 1-.103-.424.674.674 0 0 1 .186-.432.738.738 0 0 1 .432-.22 9.943 9.943 0 0 0 2.984-1.209c.085-.056.166-.114.244-.17.332-.237.63-.45 1.133-.45a.857.857 0 0 1 .436.095c.133.069.243.172.319.297l-.514 14.527c0 .065 0 .098.034.098.02 0 .028-.011.045-.033a.51.51 0 0 1 .058-.065l4.796-4.037.033-.028c.593-.502.824-.698.824-1.082 0-.457-.309-.882-1.509-.882a.456.456 0 0 1-.329-.134.416.416 0 0 1-.117-.323c0-.293.172-.424.48-.424h7.271a.465.465 0 0 1 .34.11.42.42 0 0 1 .141.314.41.41 0 0 1-.017.167.419.419 0 0 1-.225.249.45.45 0 0 1-.17.041c-1.715.229-3.43 1.176-4.664 2.155l-4.574 3.722 4.151 4.08c.162.162.326.329.493.498.641.653 1.317 1.341 2.079 1.885a4.931 4.931 0 0 0 2.915 1.045c.234 0 .423-.02.587-.04.125-.013.235-.025.339-.025.24 0 .24.196.24.294a.56.56 0 0 1-.171.424 3.94 3.94 0 0 1-.755.588c-.7.32-1.469.484-2.246.478a4.728 4.728 0 0 1-2.778-.848 12.042 12.042 0 0 1-2.093-2.024l-5.047-5.583a.515.515 0 0 1-.058-.065c-.017-.022-.025-.033-.045-.033-.034 0-.034.033-.034.098l-.172 4.8c0 1.436.995 2.176 2.504 2.415a.528.528 0 0 1 .319.166c.082.09.127.205.127.324a.406.406 0 0 1-.142.313.45.45 0 0 1-.338.11h-7.677a.477.477 0 0 1-.335-.115.438.438 0 0 1-.145-.308.454.454 0 0 1 .119-.33.5.5 0 0 1 .326-.16c1.715-.229 2.676-.751 2.71-2.22l.543-15.996Zm-19.929-1.894 7.168 17.923c.618 1.534 1.578 2.09 3.19 2.22a.452.452 0 0 1 .31.144.408.408 0 0 1 .102.313.421.421 0 0 1-.123.317.461.461 0 0 1-.323.14H76.91a.489.489 0 0 1-.343-.13.444.444 0 0 1-.138-.327.403.403 0 0 1 .113-.319.442.442 0 0 1 .322-.138c.789 0 1.68-.196 1.68-1.11a2.933 2.933 0 0 0-.24-1.11l-1.714-4.353c-.069-.196-.103-.272-.31-.272h-6.539c-1.029 0-2.286 0-2.88 1.24l-1.578 3.385a2.49 2.49 0 0 0-.286.98c0 1.174 1.612 1.24 2.47 1.24a.462.462 0 0 1 .328.134.417.417 0 0 1 .117.323.426.426 0 0 1-.137.326.47.47 0 0 1-.343.13h-6.951a.489.489 0 0 1-.343-.13.445.445 0 0 1-.137-.326.4.4 0 0 1 .116-.323.442.442 0 0 1 .33-.134c1.68-.098 2.23-.85 2.88-2.22l8.266-17.237c.378-.75 1.2-1.404 1.956-1.404.548 0 .72.294.891.718Zm-6.288 11.698c-.068.131-.068.164-.068.196 0 .033.068.098.206.098h6.802c.48 0 .686-.098.686-.392a.967.967 0 0 0-.103-.424L73.79 18.98l-.21-.514c-.42-1.024-.918-2.244-1.094-3.273 0-.066-.034-.098-.068-.098-.035 0-.069.033-.069.098a14.374 14.374 0 0 1-.995 2.426l-3.2 6.725Zm43.783-3.863c1.784 0 2.675.425 2.675 1.665l-.274 7.215c-.069 1.991-.377 3.101-2.778 3.395a.471.471 0 0 0-.312.164.428.428 0 0 0-.1.326.405.405 0 0 0 .273.396.45.45 0 0 0 .173.028h7.683a.463.463 0 0 0 .347-.112.42.42 0 0 0 .139-.323.453.453 0 0 0-.12-.33.5.5 0 0 0-.326-.16c-2.229-.326-2.435-1.632-2.435-3.428l.406-11.284a.697.697 0 0 0-.301-.335.745.745 0 0 0-.454-.09c-.47 0-.784.227-1.103.457a8.534 8.534 0 0 1-2.978 1.372.73.73 0 0 0-.434.22.667.667 0 0 0-.184.433.753.753 0 0 0 .103.391Zm3.842-6.692c1.269 0 2.023-.686 2.023-1.86 0-.98-.549-1.6-1.84-1.6-1.247 0-2.001.652-2.001 1.86 0 .98.549 1.6 1.818 1.6Zm17.939 6.431c0 .324-.04.887-.07 1.314-.018.262-.033.473-.033.547a.335.335 0 0 1-.105.197.366.366 0 0 1-.437.042.34.34 0 0 1-.144-.174c-.412-2.09-2.229-3.068-3.979-3.068-1.749 0-3.144.816-3.144 2.448 0 1.443 1.824 2.198 3.219 2.774.182.076.357.148.52.218.229.105.459.207.686.309 1.614.716 3.133 1.391 3.704 2.793.17.435.251.896.24 1.36a4.153 4.153 0 0 1-.309 1.6c-.926 2.252-3.715 3.395-6.379 3.395-3.944 0-4.63-1.175-4.63-3.787v-.827a.256.256 0 0 1 .093-.23.298.298 0 0 1 .25-.064c.286 0 .343.13.343.163.754 2.024 2.949 3.265 5.007 3.265 1.646 0 3.121-.816 3.121-2.35 0-1.744-1.337-2.306-2.797-2.918-.289-.121-.583-.245-.873-.38a50.215 50.215 0 0 0-.817-.369c-1.347-.598-2.654-1.178-3.367-2.21a3.501 3.501 0 0 1-.492-1.752 3.778 3.778 0 0 1 .378-1.6c.897-1.838 3.292-3.297 6.276-3.297s3.739.904 3.739 2.601Zm25.716 1.894c0-.947-.137-2.057-.823-2.971-.681-.882-1.778-1.524-3.527-1.524-2.916 0-5.111 1.85-6.174 4.527-.034.066-.069.098-.103.098-.034 0-.069-.032-.069-.13l.343-3.95a.78.78 0 0 0-.326-.328.84.84 0 0 0-.462-.097c-.488 0-.783.228-1.127.494l-.211.159c-.921.543-1.929.94-2.984 1.175a.77.77 0 0 0-.435.24.705.705 0 0 0-.182.446.93.93 0 0 0 .103.392c1.817 0 2.984.391 2.984 1.665l-.241 7.05c-.068 1.992-.377 3.102-2.743 3.396a.482.482 0 0 0-.36.139.432.432 0 0 0-.121.35.443.443 0 0 0 .162.318.473.473 0 0 0 .353.107h7.648a.447.447 0 0 0 .345-.105.4.4 0 0 0 .136-.32.448.448 0 0 0-.263-.445.5.5 0 0 0-.183-.044c-2.23-.326-2.47-1.6-2.47-3.395l.137-3.428c.115-2.775 1.441-6.007 4.974-6.007 2.812 0 3.258 2.318 3.258 4.538l-.172 4.897c-.068 1.959-.377 3.101-2.778 3.395a.461.461 0 0 0-.319.158.415.415 0 0 0-.092.332.396.396 0 0 0 .126.304.436.436 0 0 0 .32.12h7.682a.463.463 0 0 0 .335-.107.423.423 0 0 0 .145-.306.433.433 0 0 0-.113-.336.487.487 0 0 0-.332-.154c-2.184-.327-2.47-1.567-2.47-3.395l.137-3.559c.115-2.774 1.475-5.876 4.974-5.876 2.812 0 3.224 2.318 3.224 4.538l-.172 4.897c-.069 1.959-.343 3.101-2.744 3.395a.475.475 0 0 0-.34.148.414.414 0 0 0-.106.341.405.405 0 0 0 .141.315.446.446 0 0 0 .339.11h7.649a.473.473 0 0 0 .358-.102.44.44 0 0 0 .114-.145.407.407 0 0 0 .042-.177.466.466 0 0 0-.133-.34.498.498 0 0 0-.347-.15c-2.183-.327-2.469-1.567-2.469-3.395l.24-6.464c0-2.383-.72-5.289-4.527-5.289-2.984 0-5.248 1.948-6.18 4.527-.034.066-.068.098-.103.098-.034 0-.068-.032-.068-.13Zm29.023-.196c0 .587-.138 1.665-.789 2.024-2.092 1.11-6.763 1.567-10.049 1.567-.138 0-.172.065-.172.163.005.8.144 1.593.412 2.35.857 2.318 2.858 3.537 5.247 3.537a6.696 6.696 0 0 0 2.829-.63 6.369 6.369 0 0 0 2.247-1.753.491.491 0 0 1 .168-.188.53.53 0 0 1 .244-.084.453.453 0 0 1 .328.098.4.4 0 0 1 .152.294.449.449 0 0 1-.069.196c-1.406 3.036-4.253 4.505-6.956 4.505-4.573-.033-6.757-3.69-6.757-7.215 0-4.08 2.858-9.173 8.197-9.173 2.875.01 4.968 1.991 4.968 4.309Zm-10.701 1.088c-.07.226-.127.454-.172.686a5.136 5.136 0 0 0-.108.674.147.147 0 0 0 .057.099.164.164 0 0 0 .114.032c2.675 0 8.163-.914 8.163-1.763a3.297 3.297 0 0 0-1.061-2.3 3.638 3.638 0 0 0-2.437-.965c-2.361 0-3.939 1.665-4.551 3.526l-.005.011Zm16.011-2.981c.24 0 .309.065.309.228l-.315 9.5c0 1.143.143 2.35 1.029 3.2.374.352.822.628 1.314.808.492.18 1.018.26 1.544.236 2.47 0 4.39-1.306 5.214-3.102a.94.94 0 0 0 .137-.359.297.297 0 0 0-.093-.238.329.329 0 0 0-.25-.088.312.312 0 0 0-.24.098c-1.166 1.11-2.287 1.567-3.43 1.567a2.779 2.779 0 0 1-1.088-.19 2.664 2.664 0 0 1-.913-.594c-.651-.652-.651-1.6-.651-2.415l.314-8.662 5.316-.49a.682.682 0 0 0 .368-.227.63.63 0 0 0 .147-.393.645.645 0 0 0-.117-.35.687.687 0 0 0-.295-.238h-5.145c-.205 0-.24-.098-.24-.228l.137-3.809c0-.327-.274-.457-.651-.457a.688.688 0 0 0-.413.086.634.634 0 0 0-.273.306c-.686 2.71-1.818 4.113-4.047 4.864a.469.469 0 0 0-.225.166.434.434 0 0 0-.084.258.47.47 0 0 0 .062.31.51.51 0 0 0 .247.213h2.332ZM87.553 23.565c0 .838-.5 1.314-1.4 1.314-.9 0-1.26-.438-1.26-1.104 0-.838.52-1.314 1.4-1.314.88 0 1.26.457 1.26 1.104Zm51.386 1.314c.901 0 1.401-.476 1.401-1.314 0-.647-.38-1.104-1.261-1.104-.88 0-1.4.476-1.4 1.314 0 .666.36 1.104 1.26 1.104Z" clip-rule="evenodd"/></svg>PK �$Z�:�� � $ _inc/img/akismet-refresh-logo@2x.pngnu �[��� �PNG IHDR � X �!� �PLTEGpL?O4zH4{I5zI4zI5{I4{H5{I5zJ7G4|I4{I5zH6xH4zJ6zJ/O6zH5{H6{I5|I4{I4{I h�w N�`�������� ���� ��� B�T �ͻ��р��O�`��� �ů������ ���[�k�����Ɓ��[�lu��6zI5zH5zG7wG5{I3{G5{G4zI4|I�1�q PtRNS p���Ϗ` o��pp�����@���0`P ���������p���������������_o���������` ��� NIDATx�ч A@��~?�C���@ޕ��0���[��q��)�Ţ3M��ya�uC;1�2��n��ba�5`��& ���K\a�K�a�����/(l����-:��[tn1���������V�(ܫ< ��ŐX���ܞyx�G�kqp��D`�9��U,#Y�Oko@�\4��]�:}�Xno�]X�N|U9ޚ���뻾��a�{#�*��b��J,}�?� X���^��uXD��F,����� g(S�T����Ì�/�E;!��E,�E*�|QZvW���?>�,�I5�4e��+��ZJ>�����%�`��u�yK��ֳ5���[���ݛ#��/�Ŋ��v�Ha�`��ûs��v��Wg�u��&,���x�4c�pa,`�P0��z,��q�7}����m_?u�j�닾�,��H��rssN�̸W�T���+���X��r��X_�7>36�Y-{fq���~��#����^� 뎼��W�e�+v�Sɻ0L�/���]Y�}=6�6;_��9�C[8߫ӟ���v��u��+���Lt��X`*y}��b���J�ڢ�ɻ6b!'� ��_���V"*ý�����>Q���(.ȉqp�UQG�uf�r��oJ����E�b����}��'P�RzGέ�� �\�kD*+��K�0�M��|z ,��@����ֱ�Ʒ�b�vF�[��-C�!��_?�1��T��� 52v�(��,�ĩ��`9���� �N��D���<1�Q��` �G�o9����ky�殳?=*�"h���G9��8(�uUm���0u���XT4K���ј��j�G��x:��p%�R�t���N�ClI��2y�U����r��~�e�JFѩ������؝��Ky��ifoGC�(\�dY,�)?�`7�t���0�� !����-�"�87�@��Qt��&�Gm0��.�ja_���g�1�ő�N^�-X%��U�F;��³z7͙X����u�Y0u����f�/�<iԦ�D����Z4�X��X�)ai�=��m�5����/����8}l�=�d��~K#���/���KNz���� ����yk�e�o���C�~a��>$�����Ϗ��v,2�Ǣ"o��l�j��hC��|k�a��s%Cg�] ^����3t�C��h�Y�d��!��MҢ��Ig��l$�1��*��� 9�7�{V���SUM]6�k''i�bѡؓamGf���p G@��T�v��uf_Uy��������X:�i�E?��]&��Đ�w$itD�e�5E�����A>\k��m�2aƻ�IWq��wbAk�}��&>j�FS�e���I}0�I���g�#@fY��v,'0���D^ř>�b�Mr�*�Y�,�v}����p�O֫�a�_w���Ű�x�Ţ_��*sA,A�Q F���z��bgb�ES��e;��yX��a�d c`�}�-�F,�Lsa,t* o].�������KK�VND5��2Q,Bn�WU��rȻ�\��~W��t�ҡ���ݗ�ӕ��Ƃ� j���t���K����g�+&c�/G��R� �W�0�����'��tՙt_.�瘅� І��́K-�gcq,��X����._.���Ӣ_�" &�"�*��Kx�sוr�t��e%�}�.�f��U}��v�e-y������~�)-�Lq��J׳T`��J\�͂.}�R��ύ���X\ K���mr��e,���1�H������i�ˇ�5j�Y@?@%^5Ak���-C�R,fu��q �Q�&��nv{��y,�BO8�_��`��cX,�h�[;Z�-^F�5$��l���:�P4���y�Gr���r���V����;�h=� �4ڒ� �IX�F�h+����K<W�M�\5���t;9�M���P�����T��tSe�_���űj�O���O�M�\4-pFñ(�,����cʚ٘� i1� ��?X9��ן�?y�c�uҸ:j��k�:.V�g�IP�}�֘����S9��aaޚx�+�n�Ҏ솴&�&��2����kw<۰5(�/_� 0�V�_ˬ�uiӝ"���)� 0���\��Q �h��̣9�fҤ��o���2�F��@���Q�Ӭ-c��k�9���Z�Jݲ�]�C#��^v#o�0���AT�w�E��E��4��4chL�~h���� �P}8��)�g#`�m2���(�g�[��{��7o@��, KY�PY�#T��)6��|�]�x�!��,BM����w]L(�x����� -��m�!t�}[��K�X� u��� IEND�B`�PK �$Z��[� � / _inc/img/akismet-activation-banner-elements.pngnu �[��� �PNG IHDR � � ȿ�� sRGB ��� PLTEGpL U�U?? H�HJUHmH$mH 3�L:�N:uNO�o�O_?O 6�O5xO6{M3�G:N:uN<{O4{F9�J O�oO�g�G_�GW7K4}L:|N5I7J<I6yH8|I�J[5J5zJ7}K O�kK�k�K[�G[ �I\ M�kM�j�J\�G\M�i�H\ N�jL�j�J\L�i�H[�I\L�j�H\ �I\M�j�H[ M�j�I\ L�k�H\ M�jL�jM�jL�j�I\ L�i�I[ M�j�I\�~~~~~||}{{{yyywwwttusstrrsqqqonpmmollnkkmiikhhjggiffgddfccdaac__a^]_\[^[Z\XWYVVXTTVRRSPPRNNQMLNKJMIHKHGJFEHDCFBAD@@B>>@=<?;:=:9<8769<;7658::6446994375325763314662003502450/30/.022.--/00-,,./0,*+-.*,-.*))+,-)')*++)(+'&'(*&'(*%$%&'(%$$%%'#"##$%"!#""&!!"#$!!!!" $ "! O��� �tRNS #'&)**+-000326;@@@@DKPRX__```fppuvvz����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������A�� *IDATx���?OSQ���9�RM��G��@4j l4��n���B�]�p�A�tp1��w��PR1!j��T���������s�G� 6��.��</�<�A�v��bgN�Gh�D۹����ё����KKol�ٖ0��D��c�뺎�ض������*�@�w��Ha��5 ?z� I�{��ϩW4�Z�G�K�N�S I�$0� @�y���Њ'�a1�S���%�7b3@`@0M��ܸ��Z���b�=K�-�bsJb&�R$y���kB`:[�ӡ�b�L���� ��J0�54H���滓�Ӎy��>���p����gR o�14�����J(2!nL9����n�f�-:���b� Hb�B �IAq38!'������z�L�u\���� ��e�9ku�`,����O�wK�ש���lrn~~q)��@�zcU�����~D4W���승Q2g�Ls9���6�J�%g���'����7K��x~�F� �8��!z�y��R��Hk�*PJ��=�l��ʥ��[�Kv��o E�؍j��T5\zJe���*��<�A��t��yK��n��R�^w��W�E���_�z�(+_�������ή���U�Q?��Mbk�02DQ\(���0A%�,� �u�'p�ʭ>�o���P02v���sJ{������%Y�EQ�/u�UԵ# �"Y� !��kק���j�ŏs��W������j�ź�����0[��)�#�"��˴�L�}�_���^�\<��5Z����Y+��,��(�#��S���4_�[8`8]r��`m,-7�-��$�����r��lv���W���c��k��J���� � �@�Ȏ�(��������\oO8duk �σ�U%XUAF7����ReIE�I�K��胹*��aK�}�w@3+'5z�� X�����ɐh����n�]���~�Zs=�Qi�uˆ)n�]�"!�R�H���S�O��i�KK�]o"d��8�$���F0� [iRA��N��T������w�f;��٢��M��8vG� Է,��FP�jI��9*���X-���}�{��Q!V � h `�FG�WS�t��e�ھ<�8牟m����Bvk�h�q2 Pĕm��$[�-SR�R9�8���c�>�G���/..>����m��V�����@���x�}�Aw9�n�Ҏ�iƭ�߀�x����;�y1��/�� �ɱ��B����y���8�=�9�Փ���F;���J��L YB$���7�D] �Bq�R�7Dt#�Zc\j0Q��d���tOϤT�{Mw��� �Pu�?MAo�^N��p��)0�MÝ�qL3�M�֙|:���wb�ֹ��vן����wl�}��Mz���w��?ĘND��� ��L`ftf�Q~<�s��nhu1�+��:��8��[c>m|��YQ���)�\r8��:��v3���Ԯ���k����Ŀza+s7���רv��T�TU� �p$��d�����lM�+�nl�_��1�2>��:} �it�i=� Ǎ��'))Kf��#f�a�u���ɚV��W �� #�����Y�^ؤG��3$Q a� �),2$�|�\�d&�::�$B+[��. uox�q�l�g6�[G� �@ᡔR�r���AJ�yf��X�������|�c�g3���"1�B�5+y�<�%�=$�a��* ��s��Xdg=���˾r��t:UP":�TBJQ�L2��!��M���T,Q3�C�W�1'1�}��0�pH��L�L��9%O�Lf�$K&!�$K ;ZQ���|l{XWTOop2Oғ�p<` �!�p@���ʥqɏ��7����VS��c�ܵ:�ȸ��I=�I?�g��2E8�p�0/eI�t̥$��K�XQ���W��7��x��;O?.��e!#�Ĭ�$�Q�5wi��)�&�Gjy[,M��u�]Q=�yNn�qzq���H��8��� �%CdO9�Ȧ�$w�'��O��gW�Ҵ����:�J�QN�,�� ��K�9��� �rI��Mv�s�|�Ѷg�ZI�p��u��y�67`��x �E��P�d27'$O��R*Y�|��<\jR�w�Jʷ�|�����q�'�7^�d�MJ��4� ���&0%� ������c<��x��|��'�=qEu�������KnJ)M넚�d.�$W��6Rn"��e��Զ�f����ow\H%��1�3�i���Ȟ䤤�B"�r�:�@�'O I�p/��yp-� bI6p���y�������7m4�m��anf8�!��E�$�p�Җ3%��Ϡ<�çիÈ�,�/Vb�f�Q��SD�M(�l� @�I9�\(9$�Xk�g���A� �_a�-��}��:����_R�����E���q�4!��l�$*��MiJ��@��|[��7b��#z�WL�n泚s7�R�BLH�'�n�ך6��]���m�6C��sZ���~�r��M��\�`@)�-9�fm��?��)6-��:�E�Xd�3x���������+,)����:��S�JӴM;j�O~���j1� 2���p�x�5Rv%?Ί�p����T5��Դm�e�ޗs���@���f��GX0R�W���z���R�1�U��S��Q=�W���9�?p�Y���w���Ç�E7��c�S��z����̄��,Y�y�a�w�:43S�F�c��W&ӊʷE�j�ӺA�~�mI)r�H.d��N �T"��qj���x��[�i�=�{��� *�AO��/HH.�i>F�������G%��\]��ͧ{K��Փ/���j�G���@5988���}���}����ΥK����w�lo��{�!`y�؎.�N����ӿ8���j�7ϡ���Kf�'En�2�%GI��U��[wd�M[w�0�����\�w_yq����d����`�pp�捣��`{�������q �m�~�6�8�?8%�2�dF.&� \�k���ڭ�Z&U��Ntڪ1iP)�ҠՓ����mմ�� ��i�'dC��>s������羗�� T �/���P� ��xg�o�o ۻ/�o�m_����������[;;� L!���I����3����ݾw�|���%��������!�؊3p$- Qjuc�ɵ�~�����~1�#L�� Q� p3.�q���/o�������C��O>�a ��0�m��8 ]���'�7�zO|s�#��"�(2{��)�?�>�t���w���E�m�(���DM�m8%,\��H�|���i�Ec��F֓�)8%t¸��e(�Ժ*�ď�� (�����6��Q��?�XD�v=�u��h ��� ��i�=ׂF�m��HG?O��N�oL�m}Sb�������q�:�g���;�F���X�#��gj�v|m��|촟QZL���<?P�b�q]�B�O���t-�e���y�����^�z���l�1v����۹p��v�}���w_-E���*2��F�)G��=_� ��뽂����j�%9�b�3κ!<K�F�3�^�E�B� ������mU����9|���QK�R\�yei�ۥ������XW7 ^�o��:2����(��JHXiBqrP݊>>ܤ����KT�NH���L l���L�8:�e�bH�-BAjA��� WǨ�a�[�5�|�@�z���ڱ�=3♘;-�6ث�B�ң���c��nî 6�8p �>::ZA|E�b�ȄQ�2��C�"�Z�:��Y��� �4���_?y�Y�p�:ȥK��9���7�y�Ģ��3(���(��.M.4oř�z���(�i�܊�xR)��}*Jی��>,CZ�䑱Iq����)f<�}�z1�����aa������k �"����o3� ��J���يe�Đ:2�(֒�3�.d ����L��Az��82G��Ze�zҌcn/�`����G�I��O�^l �� "��&��V���/d�O���H Wc��6䍌]��ы���yx 1�p2�.� #���"?>��J��STK�%��:�S����NQ=�?A �\� z�NQ�!E2E�|��3�@+gE��8�H��{����?�[q��)*���@ .�#��o[ҷ"��qҚ�фh�X�WdT��"?�F����$oE��m�<i��'C�L8!��^]�)��Lgm,�- 1*'h�%������RQG�<C�7-I��<.������4��(��9RO�O>���L�x��_���q� �8\���l��1l�b� �.femF��BW���W9E^�q�b^m-wBJi���t���0�h�X��p>� ���g����.�"���*Avՠ�o�f�!|U�.�f�|�ܼ�ʐ���1��9�[Q�HO� ���>!��:rP�<r(�^��_��@��>Q�ku�q�๎���0�7<�[�t@��=��U-)yǯd\9�Sk�bo��+��yu^<IpC�d��S�8��M�vԛEc,��H2�M�)��#p�o�)���XF��3Ow IEND�B`�PK �$Ze�%� � _inc/img/arrow-left.svgnu �[��� <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"></path></svg>PK �$Zt��^ ^ _inc/img/icon-external.svgnu �[��� <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path fill="#357b49" d="M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"></path></svg>PK �$Z�Q��&