[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/plugins/akismet/ -> class-akismet-connector.php (summary)

Akismet Connector integration.

File Size: 147 lines (5 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Akismet_Connector:: (5 methods):
  init()
  validate_api_key()
  set_connected_status()
  invalidate_key_status_cache()
  register_connector()


Class: Akismet_Connector  - X-Ref

Integrates Akismet with the WordPress Connectors framework,
handling API key validation and connection status reporting.

init()   X-Ref
Register hooks for the WordPress Connectors integration.


validate_api_key( $response, $server, $request )   X-Ref
Validate the Akismet API key when saved via the connectors REST settings endpoint.
If the key is invalid, revert it to an empty string.

return: WP_REST_Response
param: WP_REST_Response $response The response object.
param: WP_REST_Server   $server   The server instance.
param: WP_REST_Request  $request  The request object.

set_connected_status( $data )   X-Ref
Set the isConnected status for the Akismet connector based on actual key validity.

return: array
param: array $data Script module data.

invalidate_key_status_cache()   X-Ref
Clear the connector key status cache so it doesn't serve stale data.


register_connector( $registry )   X-Ref
Register the Akismet connector with an is_active callback so the
connectors page can detect Akismet as active when installed as a mu-plugin.

We re-register the full connector rather than patching the core one
so that Akismet still has a connector even if core removes its own.

param: WP_Connector_Registry $registry Connector registry instance.



Generated : Sat Jun 13 09:38:55 2026 Cross-referenced by PHPXref