Skip to content

Connectors: Register Akismet Anti-Spam as a default connector#11399

Open
jorgefilipecosta wants to merge 4 commits intoWordPress:trunkfrom
jorgefilipecosta:add/akismet-connector
Open

Connectors: Register Akismet Anti-Spam as a default connector#11399
jorgefilipecosta wants to merge 4 commits intoWordPress:trunkfrom
jorgefilipecosta:add/akismet-connector

Conversation

@jorgefilipecosta
Copy link
Copy Markdown
Member

@jorgefilipecosta jorgefilipecosta commented Mar 30, 2026

Summary

Register Akismet Anti-Spam as a built-in non-AI connector with spam_filtering type.

  • Uses the existing wordpress_api_key WordPress option for API key storage
  • Checks the WPCOM_API_KEY PHP constant

Testing

Verify the akismet connector works as expected:

  • Test the default activation flow.
  • Delete Akismet and test the installation flow. Set an Akismet key verify it shows as connected, on the connectors and on the Akismet own settings page.
  • Set a key on Akismet settings page verify it is reflected on the connectors screen.
  • Set a key using wp-config define( 'WPCOM_API_KEY', 'your-key' ); verify the connectors reflect the key was set on wp-config.

See also: WordPress/gutenberg#76828

Add Akismet as a non-AI default connector with `spam_filtering` type.
Uses the existing `wordpress_api_key` option for the API key and
checks the `WPCOM_API_KEY` constant.

See #64957.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @1178653+wordpress-develop-pr-bot[bot]@users.noreply.github.com.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

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

Props jorgefilipecosta.

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

_wp_connectors_register_default_ai_providers( $registry );
}

// Non-AI default connectors.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Only this part is relevant the rest is Gutenberg ref update which is included for testing but will not be part of the commit.

@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.

Adjusts unit tests to account for the newly registered Akismet connector:
- Add `akismet` to expected connector keys and update count.
- Allow `spam_filtering` as a valid connector type.
- Scope `connectors_ai_` setting name check to AI providers only.
- Add `wordpress_api_key` to expected REST settings.

See #64730.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant