diff --git a/backport-changelog/7.0/11428.md b/backport-changelog/7.0/11428.md new file mode 100644 index 00000000000000..0c1101c4a43cdb --- /dev/null +++ b/backport-changelog/7.0/11428.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/11428 + +* https://github.com/WordPress/gutenberg/pull/76978 diff --git a/lib/compat/wordpress-7.0/class-wp-connector-registry.php b/lib/compat/wordpress-7.0/class-wp-connector-registry.php index e6fbd2d5842c5f..19c715214ac7a5 100644 --- a/lib/compat/wordpress-7.0/class-wp-connector-registry.php +++ b/lib/compat/wordpress-7.0/class-wp-connector-registry.php @@ -60,8 +60,8 @@ final class WP_Connector_Registry { * For connectors with `api_key` authentication, a `setting_name` can be provided * explicitly. If omitted, one is automatically generated using the pattern * `connectors_{$type}_{$id}_api_key`, with hyphens in the type and ID normalized - * to underscores (e.g., connector type `spam_filtering` with ID `akismet` produces - * `connectors_spam_filtering_akismet_api_key`). This setting name is used for the + * to underscores (e.g., connector type `spam_filtering` with ID `my_plugin` produces + * `connectors_spam_filtering_my_plugin_api_key`). This setting name is used for the * Settings API registration and REST API exposure. * * Registering a connector with an ID that is already registered will trigger a @@ -99,7 +99,7 @@ final class WP_Connector_Registry { * Optional. Plugin data for install/activate UI. * * @type string $file The plugin's main file path relative to the plugins - * directory (e.g. 'akismet/akismet.php' or 'hello.php'). + * directory (e.g. 'my-plugin/my-plugin.php' or 'hello.php'). * @type callable $is_active Optional callback to determine whether the plugin * is active. Receives no arguments and must return bool. * } diff --git a/lib/experimental/connectors/default-connectors.php b/lib/experimental/connectors/default-connectors.php index 2d08f162738004..0a6aabc156be0d 100644 --- a/lib/experimental/connectors/default-connectors.php +++ b/lib/experimental/connectors/default-connectors.php @@ -23,25 +23,6 @@ function _gutenberg_connectors_init(): void { _gutenberg_register_default_ai_providers( $registry ); } - // Non-AI default connectors. - $registry->register( - 'akismet', - array( - 'name' => __( 'Akismet Anti-Spam', 'gutenberg' ), - 'description' => __( 'Protect your site from spam.', 'gutenberg' ), - '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', - ), - ) - ); - /** * Fires when the connector registry is ready for plugins to register connectors. * diff --git a/routes/connectors-home/default-connectors.tsx b/routes/connectors-home/default-connectors.tsx index 7e212ba3846bea..a0491758ad2dc8 100644 --- a/routes/connectors-home/default-connectors.tsx +++ b/routes/connectors-home/default-connectors.tsx @@ -21,7 +21,6 @@ import { OpenAILogo, ClaudeLogo, GeminiLogo, - AkismetLogo, DefaultConnectorLogo, } from './logos'; @@ -58,7 +57,6 @@ const CONNECTOR_LOGOS: Record< string, React.ComponentType > = { google: GeminiLogo, openai: OpenAILogo, anthropic: ClaudeLogo, - akismet: AkismetLogo, }; function getConnectorLogo( @@ -239,12 +237,6 @@ export function registerDefaultConnectors() { const sanitize = ( s: string ) => s.replace( /[^a-z0-9-_]/gi, '-' ); for ( const [ connectorId, data ] of Object.entries( connectors ) ) { - // Special case: Hide Akismet unless it is already installed. - // See https://core.trac.wordpress.org/ticket/65012 - if ( connectorId === 'akismet' && ! data.plugin?.isInstalled ) { - continue; - } - const { authentication } = data; const connectorName = sanitize( connectorId ); diff --git a/routes/connectors-home/logos.tsx b/routes/connectors-home/logos.tsx index 6852300e2f189f..0bdcf38831e24f 100644 --- a/routes/connectors-home/logos.tsx +++ b/routes/connectors-home/logos.tsx @@ -53,26 +53,6 @@ export const DefaultConnectorLogo = () => ( ); -// Akismet logo as inline SVG — extracted from the official akismet-refresh-logo.svg -export const AkismetLogo = () => ( - -); - // Gemini logo as inline SVG export const GeminiLogo = () => (