[wp-trac] [WordPress Trac] #65012: Fix: Register Akismet Anti-Spam as a connector

WordPress Trac noreply at wordpress.org
Wed Apr 1 15:17:27 UTC 2026


#65012: Fix: Register Akismet Anti-Spam as a connector
------------------------------+-----------------------------------
 Reporter:  jorgefilipecosta  |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:  trunk
 Severity:  normal            |   Keywords:  has-patch 2nd-opinion
  Focuses:                    |
------------------------------+-----------------------------------
 Akismet comes with core but the connectors screen was not showing akismet
 even if akismet was on the file system. This PR fixes the issue.
 Registers Akismet Anti-Spam as a built-in non-AI connector with
 `spam_filtering` type on the Connectors screen.


 Core PR: [https://github.com/WordPress/wordpress-develop/pull/11399
 #11399].

 == What This Changes ==

 Registers Akismet Anti-Spam as a default connector in
 `_wp_connectors_register_defaults()`:

 {{{#!php
 $registry->register(
     'akismet',
     array(
         'name'           => __( 'Akismet Anti-spam' ),
         'description'    => __( 'Protect your site from spam.' ),
         'type'           => 'spam_filtering',
         'plugin'         => array(
             'file' => 'akismet/akismet.php',
         ),
         'authentication' => array(
             'method'          => 'api_key',
             'credentials_url' => 'https://akismet.com/get/',
             'setting_name'    => 'wordpress_api_key',
             'constant_name'   => 'WPCOM_API_KEY',
         ),
     )
 );
 }}}

 Key details:

  * Uses the existing `wordpress_api_key` WordPress option for API key
 storage (shared with Akismet's own settings).
  * Checks the `WPCOM_API_KEY` PHP constant for sites that define the key
 in `wp-config.php`.
  * Introduces the `spam_filtering` connector type alongside the existing
 `ai_provider` type.
  * References the plugin file as `akismet/akismet.php` for activate flows.


 == Testing Instructions ==

  1. Visit Settings → Connectors and verify the Akismet card appears when
 akismet is on the file system.
  2. Test the default activation flow.
  3. Set an Akismet key and verify it shows as connected on both the
 Connectors screen and the Akismet settings page.
  4. Set a key on the Akismet settings page and verify it is reflected on
 the Connectors screen.
  5. Set a key using `wp-config.php` via `define( 'WPCOM_API_KEY', 'your-
 key' );` and verify the Connectors screen reflects the key was set via
 constant.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65012>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list