🗂️ File Manager Pro
🖥️ Tipo de Hospedagem:
Vps
📁 Diretório Raiz:
/home
🌐 Servidor:
www.apm-abl.com
👤 Usuário:
apmablcosr
🔐 Sessão:
🔑 Credenciais:
adm_a4f93500 / 6fce****
📍 Localização Atual:
home
Caminho completo: /home
📤 Enviar Arquivo
📁 Nova Pasta
⬆️ Voltar
🏠 Raiz
🗑️ DELETAR
📦 ZIPAR/DEZIPAR
Status
Nome
Tamanho
Modificado
Permissões
Ações
📁 a
-
03/02/2026 22:15
0755
✏️
📁 apmablcosr
-
26/01/2026 16:35
0705
✏️
🗑️
Editando: akismet.tar
.htaccess 0000644 00000001404 15136137540 0006346 0 ustar 00 # Only allow direct access to specific Web-available files. # Apache 2.2 <IfModule !mod_authz_core.c> Order Deny,Allow Deny from all </IfModule> # Apache 2.4 <IfModule mod_authz_core.c> Require all denied </IfModule> # Akismet CSS and JS <FilesMatch "^(form\.js|akismet(-frontend|-admin)?\.js|akismet(-admin)?(-rtl)?\.css|inter\.css)$"> <IfModule !mod_authz_core.c> Allow from all </IfModule> <IfModule mod_authz_core.c> Require all granted </IfModule> </FilesMatch> # Akismet images <FilesMatch "^(logo-(a|full)-2x\.png|akismet-refresh-logo\.svg|akismet-refresh-logo@2x\.png|arrow-left\.svg|icon-external\.svg)$"> <IfModule !mod_authz_core.c> Allow from all </IfModule> <IfModule mod_authz_core.c> Require all granted </IfModule> </FilesMatch> class.akismet-widget.php 0000644 00000006105 15136137540 0011306 0 ustar 00 <?php /** * @package Akismet */ class Akismet_Widget extends WP_Widget { function __construct() { load_plugin_textdomain( 'akismet' ); parent::__construct( 'akismet_widget', __( 'Akismet Widget' , 'akismet'), array( 'description' => __( 'Display the number of spam comments Akismet has caught' , 'akismet') ) ); if ( is_active_widget( false, false, $this->id_base ) ) { add_action( 'wp_head', array( $this, 'css' ) ); } } function css() { ?> <style type="text/css"> .a-stats { width: auto; } .a-stats a { background: #7CA821; background-image:-moz-linear-gradient(0% 100% 90deg,#5F8E14,#7CA821); background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#7CA821),to(#5F8E14)); border: 1px solid #5F8E14; border-radius:3px; color: #CFEA93; cursor: pointer; display: block; font-weight: normal; height: 100%; -moz-border-radius:3px; padding: 7px 0 8px; text-align: center; text-decoration: none; -webkit-border-radius:3px; width: 100%; } .a-stats a:hover { text-decoration: none; background-image:-moz-linear-gradient(0% 100% 90deg,#6F9C1B,#659417); background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#659417),to(#6F9C1B)); } .a-stats .count { color: #FFF; display: block; font-size: 15px; line-height: 16px; padding: 0 13px; white-space: nowrap; } </style> <?php } function form( $instance ) { if ( $instance && isset( $instance['title'] ) ) { $title = $instance['title']; } else { $title = __( 'Spam Blocked' , 'akismet' ); } ?> <p> <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' , 'akismet'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> </p> <?php } function update( $new_instance, $old_instance ) { $instance = array(); $instance['title'] = strip_tags( $new_instance['title'] ); return $instance; } function widget( $args, $instance ) { $count = get_option( 'akismet_spam_count' ); if ( ! isset( $instance['title'] ) ) { $instance['title'] = __( 'Spam Blocked' , 'akismet' ); } echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title']; echo esc_html( $instance['title'] ); echo $args['after_title']; } ?> <div class="a-stats"> <a href="https://akismet.com" target="_blank" rel="noopener" title=""> <?php echo wp_kses( sprintf( /* translators: The placeholder is the number of pieces of spam blocked by Akismet. */ _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count, 'akismet' ), number_format_i18n( $count ) ), array( 'strong' => array( 'class' => true, ), ) ); ?> </a> </div> <?php echo $args['after_widget']; } } function akismet_register_widgets() { register_widget( 'Akismet_Widget' ); } add_action( 'widgets_init', 'akismet_register_widgets' ); changelog.txt 0000644 00000052720 15136137540 0007247 0 ustar 00 === 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 class.akismet-cli.php 0000644 00000011245 15136137540 0010573 0 ustar 00 <?php WP_CLI::add_command( 'akismet', 'Akismet_CLI' ); /** * Filter spam comments. */ class Akismet_CLI extends WP_CLI_Command { /** * Checks one or more comments against the Akismet API. * * ## OPTIONS * <comment_id>... * : The ID(s) of the comment(s) to check. * * [--noaction] * : Don't change the status of the comment. Just report what Akismet thinks it is. * * ## EXAMPLES * * wp akismet check 12345 * * @alias comment-check */ public function check( $args, $assoc_args ) { foreach ( $args as $comment_id ) { if ( isset( $assoc_args['noaction'] ) ) { // Check the comment, but don't reclassify it. $api_response = Akismet::check_db_comment( $comment_id, 'wp-cli' ); } else { $api_response = Akismet::recheck_comment( $comment_id, 'wp-cli' ); } if ( 'true' === $api_response ) { WP_CLI::line( sprintf( __( "Comment #%d is spam.", 'akismet' ), $comment_id ) ); } else if ( 'false' === $api_response ) { WP_CLI::line( sprintf( __( "Comment #%d is not spam.", 'akismet' ), $comment_id ) ); } else { if ( false === $api_response ) { WP_CLI::error( __( "Failed to connect to Akismet.", 'akismet' ) ); } else if ( is_wp_error( $api_response ) ) { WP_CLI::warning( sprintf( __( "Comment #%d could not be checked.", 'akismet' ), $comment_id ) ); } } } } /** * Recheck all comments in the Pending queue. * * ## EXAMPLES * * wp akismet recheck_queue * * @alias recheck-queue */ public function recheck_queue() { $batch_size = 100; $start = 0; $total_counts = array(); do { $result_counts = Akismet_Admin::recheck_queue_portion( $start, $batch_size ); if ( $result_counts['processed'] > 0 ) { foreach ( $result_counts as $key => $count ) { if ( ! isset( $total_counts[ $key ] ) ) { $total_counts[ $key ] = $count; } else { $total_counts[ $key ] += $count; } } $start += $batch_size; $start -= $result_counts['spam']; // These comments will have been removed from the queue. } } while ( $result_counts['processed'] > 0 ); WP_CLI::line( sprintf( _n( "Processed %d comment.", "Processed %d comments.", $total_counts['processed'], 'akismet' ), number_format( $total_counts['processed'] ) ) ); WP_CLI::line( sprintf( _n( "%d comment moved to Spam.", "%d comments moved to Spam.", $total_counts['spam'], 'akismet' ), number_format( $total_counts['spam'] ) ) ); if ( $total_counts['error'] ) { WP_CLI::line( sprintf( _n( "%d comment could not be checked.", "%d comments could not be checked.", $total_counts['error'], 'akismet' ), number_format( $total_counts['error'] ) ) ); } } /** * Fetches stats from the Akismet API. * * ## OPTIONS * * [<interval>] * : The time period for which to retrieve stats. * --- * default: all * options: * - days * - months * - all * --- * * [--format=<format>] * : Allows overriding the output of the command when listing connections. * --- * default: table * options: * - table * - json * - csv * - yaml * - count * --- * * [--summary] * : When set, will display a summary of the stats. * * ## EXAMPLES * * wp akismet stats * wp akismet stats all * wp akismet stats days * wp akismet stats months * wp akismet stats all --summary */ public function stats( $args, $assoc_args ) { $api_key = Akismet::get_api_key(); if ( empty( $api_key ) ) { WP_CLI::error( __( 'API key must be set to fetch stats.', 'akismet' ) ); } switch ( $args[0] ) { case 'days': $interval = '60-days'; break; case 'months': $interval = '6-months'; break; default: $interval = 'all'; break; } $request_args = array( 'blog' => get_option( 'home' ), 'key' => $api_key, 'from' => $interval, ); $request_args = apply_filters( 'akismet_request_args', $request_args, 'get-stats' ); $response = Akismet::http_post( Akismet::build_query( $request_args ), 'get-stats' ); if ( empty( $response[1] ) ) { WP_CLI::error( __( 'Currently unable to fetch stats. Please try again.', 'akismet' ) ); } $response_body = json_decode( $response[1], true ); if ( is_null( $response_body ) ) { WP_CLI::error( __( 'Stats response could not be decoded.', 'akismet' ) ); } if ( isset( $assoc_args['summary'] ) ) { $keys = array( 'spam', 'ham', 'missed_spam', 'false_positives', 'accuracy', 'time_saved', ); WP_CLI\Utils\format_items( $assoc_args['format'], array( $response_body ), $keys ); } else { $stats = $response_body['breakdown']; WP_CLI\Utils\format_items( $assoc_args['format'], $stats, array_keys( end( $stats ) ) ); } } } _inc/akismet-admin.css 0000644 00000016733 15136137540 0010730 0 ustar 00 #akismet-plugin-container { background-color: var(--akismet-color-light-grey); font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen-Sans', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif; --akismet-color-charcoal: #272635; --akismet-color-light-grey: #f6f7f7; --akismet-color-mid-grey: #a7aaad; --akismet-color-dark-grey: #646970; --akismet-color-grey-80: #2c3338; --akismet-color-grey-100: #101517; --akismet-color-white: #fff; --akismet-color-mid-green: #357b49; --akismet-color-mid-red: #e82c3f; --akismet-color-light-blue: #256eff; --akismet-color-notice-light-green: #dbf0e1; --akismet-color-notice-dark-green: #69bf82; --akismet-color-notice-light-red: #ffdbde; --akismet-color-notice-dark-red: #ff6676; } #akismet-plugin-container a { color: var(--akismet-color-mid-green); } #akismet-plugin-container button:focus-visible, #akismet-plugin-container input:focus-visible { border: 0; box-shadow: none; outline: 2px solid var(--akismet-color-light-blue); } .akismet-masthead { box-shadow: none; } .akismet-masthead__logo { margin: 20px 0; } .akismet-section-header { box-shadow: none; margin-bottom: 0; } .akismet-section-header__label { color: var(--akismet-color-charcoal); font-weight: 600; } .akismet-button, .akismet-button:hover { background-color: var(--akismet-color-mid-green); border: 0; color: #fff; } /* Need this specificity to override the existing header rule */ .akismet-new-snapshot h3.akismet-new-snapshot__header { background: none; font-size: 13px; color: var(--akismet-color-charcoal); text-align: left; text-transform: none; } .akismet-new-snapshot .akismet-new-snapshot__number { color: var(--akismet-color-charcoal); letter-spacing: -1px; text-align: left; } .akismet-new-snapshot li.akismet-new-snapshot__item { color: var(--akismet-color-dark-grey); font-size: 13px; text-align: left; text-transform: none; } .akismet-masthead__logo-link { min-height: 50px; } .akismet-masthead__back-link-container { margin-top: 16px; margin-bottom: 2px; } /* Need this specificity to override the existing link rule */ #akismet-plugin-container a.akismet-masthead__back-link { background-image: url(img/arrow-left.svg); background-position: left; background-repeat: no-repeat; background-size: 16px; color: var(--akismet-color-charcoal); font-weight: 400; padding-left: 20px; text-decoration: none; } #akismet-plugin-container a.akismet-masthead__back-link:hover { text-decoration: underline; } .akismet-new-snapshot__item { border-top: 1px solid var(--akismet-color-light-grey); border-left: 1px solid var(--akismet-color-light-grey); padding: 1em; } .akismet-new-snapshot li:first-child { border-left: none; } .akismet-new-snapshot__list { display: flex; margin-bottom: 0; } .akismet-new-snapshot__item { flex: 1 0 33.33%; margin-bottom: 0; padding-left: 1.5em; padding-right: 1.5em; } .akismet-new-snapshot__chart { padding: 1em; } .akismet-box { border: 0; } .akismet-box, .akismet-card { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 0 2px rgba(0, 0, 0, 0.16); border-radius: 8px; overflow: hidden; } .akismet-card { margin: 32px auto 0 auto; } .akismet-lower { padding-top: 0; } .akismet-lower .inside { padding: 0; } .akismet-section-header__label { margin: 0; } .akismet-settings__row { border-bottom: 1px solid var(--akismet-color-light-grey); display: block; padding: 1em 1.5em; } .akismet-settings__row-input { margin-left: auto; } .akismet-settings__row-title { font-weight: 500; font-size: 1em; margin: 0; margin-bottom: 1em; } .akismet-settings__row-description { margin-top: 0.5em; } .akismet-card-actions { display: flex; justify-content: flex-end; padding: 1em; } .akismet-card-actions__secondary-action { align-self: center; margin-right: auto; } .akismet-card-actions__secondary-action a[target="_blank"]::after { background: url('img/icon-external.svg') no-repeat; background-size: contain; content: ""; display: inline-block; height: 16px; margin-left: 5px; vertical-align: middle; width: 16px; } .akismet-settings__row label { padding-bottom: 1em; } .akismet-settings__row-note { font-size: 0.9em; margin-top: 0.4em; } .akismet-settings__row input[type="checkbox"], .akismet-settings__row input[type="radio"] { accent-color: var(--akismet-color-mid-green); box-shadow: none; flex-shrink: 0; margin: 2px 0 0 0; } .akismet-settings__row input[type="checkbox"] { margin-top: 1px; vertical-align: top; -webkit-appearance: checkbox; } .akismet-settings__row input[type="radio"] { -webkit-appearance: radio; } /* Fix up misbehaving wp-admin styles in Chrome (from forms and colors stylesheets) */ .akismet-settings__row input[type="checkbox"]:checked:before { content: ''; } .akismet-settings__row input[type="radio"]:checked:before { background: none; } .akismet-settings__row input[type="checkbox"]:checked:hover, .akismet-settings__row input[type="radio"]:checked:hover { accent-color: var(--akismet-color-mid-green); } .akismet-button:disabled { background-color: var(--akismet-color-mid-grey); color: var(--akismet-color-white); cursor: arrow; } .akismet-awaiting-stats, .akismet-account { padding: 0 1rem 1rem 1rem; margin: 0; } .akismet-account { padding-bottom: 0; } .akismet-account th { font-weight: 500; padding-right: 1em; } .akismet-account th, .akismet-account td { padding-bottom: 1em; } .akismet-settings__row-input-label { align-items: center; display: flex; } .akismet-settings__row-label-text { padding-left: 0.5em; margin-top: 2px; } .akismet-alert { border-left: 8px solid; border-radius: 8px; margin: 20px 0; padding: 0.2em 1em; } .akismet-alert__heading { font-size: 1em; } .akismet-alert.is-good { background-color: var(--akismet-color-notice-light-green); border-left-color: var(--akismet-color-notice-dark-green); } .akismet-alert.is-neutral { background-color: var(--akismet-color-white); border-left-color: var(--akismet-color-dark-grey); } .akismet-alert.is-bad { background-color: var(--akismet-color-notice-light-red); border-left-color: var(--akismet-color-notice-dark-red); } #akismet-plugin-container .akismet-alert.is-good a, #akismet-plugin-container .akismet-alert.is-bad a { /* For better contrast - green isn't great */ color: var(--akismet-color-grey-80); } /* Setup - API key input */ .akismet-enter-api-key-box { margin: 1.5rem 0; } .akismet-enter-api-key-box__reveal { background: none; border: 0; color: var(--akismet-color-mid-green); cursor: pointer; text-decoration: underline; } .akismet-enter-api-key-box__form-wrapper { display: none; margin-top: 1.5rem; } .akismet-enter-api-key-box__input-wrapper { box-sizing: border-box; display: flex; flex-wrap: nowrap; padding: 0 1.5rem; width: 100%; } .akismet-enter-api-key-box__key-input { flex-grow: 1; margin-right: 1rem; } h3.akismet-enter-api-key-box__header { padding-top: 0; padding-bottom: 1em; text-align: left; } @media screen and (max-width: 782px) { .akismet-new-snapshot__list { display: block; } .akismet-new-snapshot__number { float: right; font-size: 20px; font-weight: 500; margin-top: -16px; } .akismet-new-snapshot__header { font-size: 14px; font-weight: 500; } .akismet-new-snapshot__text { font-size: 12px; } .akismet-settings__row input[type="checkbox"], .akismet-settings__row input[type="radio"] { height: 24px; width: 24px; } .akismet-settings__row-label-text { padding-left: 0.8em; } .akismet-settings__row input[type="checkbox"], .akismet-settings__row input[type="radio"] { margin-top: 0; } } _inc/img/akismet-refresh-logo@2x.png 0000644 00000005337 15136137540 0013354 0 ustar 00 �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`� _inc/img/icon-external.svg 0000644 00000000536 15136137540 0011532 0 ustar 00 <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>