Skip to content

Connectors: Register Akismet as a default non-AI connector#11688

Closed
jorgefilipecosta wants to merge 4 commits intoWordPress:trunkfrom
jorgefilipecosta:connectors/register-akismet-default
Closed

Connectors: Register Akismet as a default non-AI connector#11688
jorgefilipecosta wants to merge 4 commits intoWordPress:trunkfrom
jorgefilipecosta:connectors/register-akismet-default

Conversation

@jorgefilipecosta
Copy link
Copy Markdown
Member

@jorgefilipecosta jorgefilipecosta commented Apr 30, 2026

Summary

  • Registers Akismet in the default connector registry as a spam_filtering type.
  • Wires plugin metadata to akismet/akismet.php with an is_active callback.
  • Reuses the existing wordpress_api_key option / WPCOM_API_KEY constant for API key authentication, and points users to https://akismet.com/get/ for credentials.

Must be tested with akismet installed, as the connector only appears if akismet is installed, does not needs activation.

Ticket: https://core.trac.wordpress.org/ticket/65012

Test plan

  • With Akismet inactive, confirm the connector appears in the registry and reports is_active as false.
  • With Akismet active and registering its own is_active callback, confirm the connector reports is_active as true.
  • Verify the wordpress_api_key option and WPCOM_API_KEY constant are picked up as credentials.

Adds Akismet to the default connector registry as a `spam_filtering` type, with plugin metadata pointing to `akismet/akismet.php` and API key authentication wired to the existing `wordpress_api_key` option / `WPCOM_API_KEY` constant. The `is_active` callback defaults to `__return_false` so the connector reports inactive until the Akismet plugin overrides it from its own registration.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props jorgefilipecosta, mukesh27.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

The default connector registry now includes Akismet, which is a `spam_filtering` connector that uses the legacy `wordpress_api_key` option. Update the test expectations to allow non-AI connector types and skip the AI-specific `connectors_ai_{id}_api_key` setting-name format check for them.
@jorgefilipecosta jorgefilipecosta requested a review from gziolo April 30, 2026 16:31
Comment thread src/wp-includes/connectors.php Outdated
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Copy link
Copy Markdown
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted inline, the code diverged from the description. Regardless, thr implementation looks correct to me as the connector will be considered as active only when the plugin code runs.

Comment thread src/wp-includes/connectors.php
pento pushed a commit that referenced this pull request May 6, 2026
Akismet is bundled with WordPress core, but it wasn't appearing on the Connectors screen even when present on the file system.

Partially reverts [62210], bringing back the main part of [62193].
Follow-up to [62210], [62193].
Developed in #11688.

Props audrasjb, bluefuton, davidbaumwald, desrosj, eclev91, gziolo, johnbillion, jorbin, jorgefilipecosta, lukecarbis, matt, matveb, peterwilsoncc, westonruter.
See #65012.

git-svn-id: https://develop.svn.wordpress.org/trunk@62310 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request May 6, 2026
Akismet is bundled with WordPress core, but it wasn't appearing on the Connectors screen even when present on the file system.

Partially reverts [62210], bringing back the main part of [62193].
Follow-up to [62210], [62193].
Developed in WordPress/wordpress-develop#11688.

Props audrasjb, bluefuton, davidbaumwald, desrosj, eclev91, gziolo, johnbillion, jorbin, jorgefilipecosta, lukecarbis, matt, matveb, peterwilsoncc, westonruter.
See #65012.
Built from https://develop.svn.wordpress.org/trunk@62310


git-svn-id: http://core.svn.wordpress.org/trunk@61590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
pento pushed a commit that referenced this pull request May 7, 2026
Akismet is bundled with WordPress core, but it wasn't appearing on the Connectors screen even when present on the file system.

Partially reverts [62210], bringing back the main part of [62193].
Follow-up to [62210], [62193].
Developed in #11688.

Reviewed by gziolo.
Merges [62310] to the 7.0 branch.

Props audrasjb, bluefuton, davidbaumwald, desrosj, eclev91, gziolo, johnbillion, jorbin, jorgefilipecosta, lukecarbis, matt, matveb, peterwilsoncc, westonruter.
Fixes #65012.

git-svn-id: https://develop.svn.wordpress.org/branches/7.0@62319 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request May 7, 2026
Akismet is bundled with WordPress core, but it wasn't appearing on the Connectors screen even when present on the file system.

Partially reverts [62210], bringing back the main part of [62193].
Follow-up to [62210], [62193].
Developed in WordPress/wordpress-develop#11688.

Reviewed by gziolo.
Merges [62310] to the 7.0 branch.

Props audrasjb, bluefuton, davidbaumwald, desrosj, eclev91, gziolo, johnbillion, jorbin, jorgefilipecosta, lukecarbis, matt, matveb, peterwilsoncc, westonruter.
Fixes #65012.
Built from https://develop.svn.wordpress.org/branches/7.0@62319


git-svn-id: http://core.svn.wordpress.org/branches/7.0@61599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants