[wp-trac] [WordPress Trac] #64791: Connectors: Extensibility API allowing plugins to register custom connector cards

WordPress Trac noreply at wordpress.org
Wed Mar 11 16:10:21 UTC 2026


#64791: Connectors: Extensibility API allowing plugins to register custom connector
cards
--------------------------------------+---------------------
 Reporter:  gziolo                    |       Owner:  gziolo
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  7.0
Component:  Administration            |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------
Changes (by gziolo):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61943" 61943]:
 {{{
 #!CommitTicketReference repository="" revision="61943"
 Connectors: Add connector registry for extensibility

 Introduces `WP_Connector_Registry` class and a `wp_connectors_init` action
 hook so plugins can register their own connectors alongside the built-in
 defaults (Anthropic, Google, OpenAI).

 Key changes:
 * `WP_Connector_Registry` — A `final` singleton class managing connector
 registration and lookup, with validation for IDs, required fields, and
 authentication methods.
 * `wp_connectors_init` action — Fired during `init` after built-in
 connectors are registered. Passes the registry instance so plugins call
 `$registry->register()` directly.
 * `_wp_connectors_init()` — Private function that creates the registry,
 merges hardcoded defaults with AI Client registry data, registers them,
 then fires the action.
 * Public read-only functions — `wp_is_connector_registered()`,
 `wp_get_connector()`, `wp_get_connectors()` for querying the registry
 after initialization.
 * Logo URL support — Connectors can include an optional `logo_url` field
 resolved from plugin directories via
 `_wp_connectors_resolve_ai_provider_logo_url()`.
 * Timing guards — `set_instance()` rejects calls after `init` completes.
 Registration is only possible during `wp_connectors_init`.
 * Connector API key settings are now only registered when the provider
 exists in the AI Client registry.
 * Refactors `_wp_connectors_get_connector_settings()` to read from the
 registry via `wp_get_connectors()`.

 Developed in https://github.com/WordPress/wordpress-develop/pull/11175

 Props gziolo, flixos90, mukesh27, westonruter.
 Fixes #64791.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64791#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list