WordPress 7.0 Connectors API: What Plugin Developers Need to Know

What the WordPress Connectors API does in 7.0 and 7.1, how to register a connector, where keys live, and what 7.2 may change. Checked 15 Nov 2026.

Diagram of where a WordPress Connectors API key comes from: environment variable, PHP constant, then database option

The WordPress Connectors API is a core registry of connections to outside services, and in WordPress 7.0 and 7.1 it does one job well: it stores and manages the API keys for AI providers on a new Settings > Connectors screen. A plugin can read the registry with wp_get_connectors(), add its own entry on the wp_connectors_init action, and ask the AI Client to send a prompt through whichever provider the site owner connected. It does not expose your plugin’s actions to AI agents. That is the Abilities API, which is a separate thing.

We need to correct our own record here. The first version of this article, written while 7.0 was still in release candidate, described the Connectors API as a registry of callable capabilities with input schemas and permission callbacks. That was wrong. We rewrote the whole piece on 15 Nov 2026 from the WordPress 7.0 and 7.1 source files, the official Connectors dev note and the current development trunk, and every code sample below was syntax-checked with PHP 8.5. WordPress 7.0 “Armstrong” shipped on 20 May 2026, 7.1 “Mary Lou” on 19 Aug 2026, and the current stable release is 7.1.4. For the wider 7.0 picture, see our WordPress 7.0 release date and features guide.

What is the WordPress Connectors API?

It is three pieces that ship together. First, a registry class, WP_Connector_Registry, that holds one array per connector: a name, a description, a type, an authentication block and optional plugin data. Second, three public functions to read that registry. Third, an admin screen and a REST layer that let a site owner paste a key, see where it comes from and see whether it works.

A connector describes a connection; it does not run anything. The data tells WordPress what the service is called, which kind of service it is (ai_provider for the built-in ones, but any string works), how to authenticate and where the user can get credentials. The code that calls the service still belongs to a plugin or to the AI Client.

The type of connector that gets the most attention is the AI provider. WordPress 7.0 ships Anthropic, Google and OpenAI as featured connectors, and it also registers Akismet as a spam-filtering connector. The provider plugins that do the actual calling are separate downloads: AI Provider for Anthropic (70,000+ active installs, version 1.0.5), AI Provider for OpenAI (60,000+, 1.2.0) and AI Provider for Google (50,000+, 1.2.1), all checked on the WordPress.org plugin API on 15 Nov 2026.

What shipped in WordPress 7.0 and 7.1, and what is only in trunk?

We compared the connectors.php, class-wp-connector-registry.php and ai-client.php files at the 7.0, 7.1 and trunk revisions. This is what differs.

Version

What is in core

Source of the claim

7.0 (20 May 2026)

Registry class, wp_is_connector_registered(), wp_get_connector(), wp_get_connectors(), the wp_connectors_init action, Settings > Connectors, built-in Anthropic, Google, OpenAI and Akismet connectors, api_key and none authentication, key masking and validation on /wp/v2/settings, wp_supports_ai(), wp_ai_client_prompt()

@since 7.0.0 tags in the 7.0 source

7.1 (19 Aug 2026)

A third authentication method, application_password, with three new functions: wp_connectors_parse_application_password_credentials(), wp_connectors_get_application_password_credentials() and wp_connectors_sanitize_application_password_credentials()

@since 7.1.0 tags in the 7.1 source; the 7.0 registry rejects this method

Trunk (7.2 development)

Small fixes to the REST key check, a new wp_ai_client_embedding() function, and the Secrets API (wp_set_secret(), wp_get_secret() and friends)

@since 7.2.0 tags in trunk; not in any released version

The 7.2 column is the part to read carefully. Everything in it exists in the development tree today, but it is not released, and one piece (the Secrets API) is under open objection from senior contributors. We cover that in its own section below.

Two more facts help when you plan support. The Connectors code lives in core files, so it needs no plugin and no Gutenberg install on a normal site. And the AI part is switchable: define WP_AI_SUPPORT as false in wp-config.php, or return false from the wp_supports_ai filter, and core skips the built-in AI provider connectors and refuses to register any connector whose type is ai_provider.

Where do I find connectors in the WordPress admin?

Open Settings > Connectors. The file behind it is options-connectors.php, and it requires the manage_options capability, so on a single site that means administrators only. Each connector shows as a card with its name, description and logo. For API key connectors the card also shows where the key currently comes from and whether the connection works.

Two behaviours surprise people. The screen is a JavaScript app, so it needs JavaScript on and the built script files present; a source checkout without a build shows a message telling you to run npm install. And a provider that is not installed shows an install or activate button, driven by the plugin.file value in the connector data, not by anything the user typed.

How do I list and check connectors in code?

Use the three public functions. They are safe to call once the registry exists, which is after init priority 15, because _wp_connectors_init() is hooked there. Calling them earlier returns false or an empty array.

Function

Returns

Use it to

wp_is_connector_registered( $id )

bool

Check whether a service is available before you show a feature

wp_get_connector( $id )

array or null

Read one connector’s name, type and authentication data

wp_get_connectors()

array keyed by ID

List everything, for a status screen or a health check

<?php
// Checked on 15 Nov 2026 against WordPress 7.1 core source.
// Connectors are built on init priority 15, so read them at 16 or later.
add_action(
	'init',
	static function () {
		foreach ( wp_get_connectors() as $id => $connector ) {
			$auth = $connector['authentication'];

			error_log(
				sprintf(
					'%s | type=%s | auth=%s | option=%s',
					$id,
					$connector['type'],
					$auth['method'],
					$auth['setting_name'] ?? '-'
				)
			);
		}
	},
	30
);

The returned array never contains the key itself. It contains the name of the option that stores it, plus the names of the constant and environment variable that can override it. That separation is deliberate, and it shapes how you read a key later.

How do I register my own connector?

Hook wp_connectors_init. It fires once per request, after the built-in connectors and every auto-discovered AI provider are in place, and it passes you the registry object. Call register() with a unique ID and an argument array.

<?php
// Checked on 15 Nov 2026 against WordPress 7.1 core source.
add_action(
	'wp_connectors_init',
	static function ( WP_Connector_Registry $registry ) {
		$registry->register(
			'acme-geocoder',
			array(
				'name'           => __( 'Acme Geocoder', 'acme-maps' ),
				'description'    => __( 'Turns addresses into coordinates.', 'acme-maps' ),
				'type'           => 'geocoding',
				'authentication' => array(
					'method'          => 'api_key',
					'credentials_url' => 'https://example.com/account/keys',
					'constant_name'   => 'ACME_GEOCODER_API_KEY',
					'env_var_name'    => 'ACME_GEOCODER_API_KEY',
				),
				'plugin'         => array(
					'file'      => 'acme-maps/acme-maps.php',
					'is_active' => '__return_true',
				),
			)
		);
	}
);

The registry is strict, and it fails quietly in production: a bad call returns null and raises a _doing_it_wrong() notice that you only see with WP_DEBUG on. These are the rules we read in the 7.1 source.

  • The ID must match /^[a-z0-9_-]+$/: lowercase letters, digits, hyphens and underscores. Hyphens were allowed late in the 7.0 cycle, and they become underscores inside generated option names.
  • name and type must be non-empty strings, and authentication.method must be api_key, application_password (7.1 and later) or none.
  • Registering an ID that already exists fails. To replace one, call unregister() first.
  • Use plugin.file (for example acme-maps/acme-maps.php), not plugin.slug. The dev note thread confirms the slug key was replaced on 13 April 2026, and a connector that still sends it loses that data.
  • If you leave out setting_name, core builds one as connectors_{type}_{id}_{method} with hyphens turned into underscores. Our example above gets connectors_geocoding_acme_geocoder_api_key.
  • The default plugin.is_active is __return_true. Core only registers the Settings API option for a connector whose plugin is active, so a wrong callback means the key can never be saved.

If you build an AI provider plugin, you do not need any of this. Register the provider with the AI Client, and core finds it through AiClient::defaultRegistry() and creates the connector for you, using the provider’s own metadata for name, description, logo and authentication. The wp_connectors_init action is meant for non-AI services and for changing metadata.

We have not run a non-AI connector card on a live 7.1 site. The dev note says the full card UI is built for api_key connectors, and that other methods are stored in the PHP registry and passed to JavaScript but need client-side registration for custom UI. Test the card on your target version before you promise your customers a settings entry.

Where does the API key come from, and who can read it?

Core checks three places in a fixed order: an environment variable, then a PHP constant, then the database option saved from the Settings > Connectors screen. For the three AI providers the names follow one pattern, such as ANTHROPIC_API_KEY. For your own connector, env_var_name and constant_name are optional and can be anything.

There is no public function that hands you the resolved key. The helper core uses to report the source is private, so a plugin that needs the key has to repeat the order itself.

<?php
// Checked on 15 Nov 2026 against WordPress 7.1 core source.
// Core has no public "get the key" function, so read the three sources
// in the same order the Connectors screen reports them.
function acme_maps_get_api_key(): string {
	$connector = wp_get_connector( 'acme-geocoder' );
	if ( ! $connector || 'api_key' !== $connector['authentication']['method'] ) {
		return '';
	}

	$auth = $connector['authentication'];

	$env = getenv( $auth['env_var_name'] ?? '' );
	if ( is_string( $env ) && '' !== $env ) {
		return $env;
	}

	$constant = $auth['constant_name'] ?? '';
	if ( '' !== $constant && defined( $constant ) && is_string( constant( $constant ) ) ) {
		return (string) constant( $constant );
	}

	return (string) get_option( $auth['setting_name'], '' );
}

Treat the database key as readable by every plugin on the site. The dev note says so directly: the saved key is a site setting that any plugin can access, and a key in a constant or environment variable has the same exposure. Core masks the value in REST responses (it returns bullet characters plus the last four characters), but that protects the screen, not the option. The dev note says encryption was being explored in Trac ticket 64789. We found no encryption of connector keys in the 7.0, 7.1 or trunk source.

Core also validates AI provider keys when they are saved through /wp/v2/settings. It sends the key to the provider through the AI Client, and if the provider says no, core empties the option and the user sees a generic failure. Non-AI connectors skip that check, so the service plugin owns validation. For the security side of this design, read our companion piece on what plugin developers must get right with AI connectors.

How do I send a prompt through a connector?

Call wp_ai_client_prompt(). It returns a fluent builder (WP_AI_Client_Prompt_Builder) that picks a configured provider and model, sends the request and gives you text, an image or another result. Guard it with wp_supports_ai() and check for WP_Error, because the generating methods return errors instead of throwing.

<?php
// Checked on 15 Nov 2026 against WordPress 7.1 core source.
function acme_maps_summarise( string $text ): string {
	if ( ! wp_supports_ai() ) {
		return '';
	}

	$builder = wp_ai_client_prompt( 'Summarise in one sentence: ' . $text )
		->using_system_instruction( 'You write plain, factual one-sentence summaries.' )
		->using_temperature( 0.2 );

	// Is any configured provider able to do text generation right now?
	if ( ! $builder->is_supported_for_text_generation() ) {
		return '';
	}

	$result = $builder->generate_text();

	// Generating methods return WP_Error instead of throwing.
	if ( is_wp_error( $result ) ) {
		error_log( 'AI summary failed: ' . $result->get_error_message() );
		return '';
	}

	return $result;
}

A few details from the source that save debugging time:

  • The builder stays in an error state after any failed step in the chain, and only the generating method (generate_text(), generate_image() and so on) returns the WP_Error. A chain that looks fine can still hand you an error at the end.
  • is_supported_for_text_generation() tells you whether any configured provider can do the job. Speech-only and image-only providers can be configured and valid without supporting text.
  • Requests time out after 30 seconds by default. The wp_ai_client_default_request_timeout filter changes that, and a negative or non-numeric value triggers a notice.
  • The wp_ai_client_prevent_prompt filter lets a site block a prompt after the builder is built. It receives a read-only clone of the builder, which is the hook a site owner or a security plugin would use for an allow list.
  • For a model on your own hardware, a provider plugin and a local runtime work the same way. We walk through that setup in our guide to running Ollama and LM Studio with WordPress.

The same AI Client is what the official WordPress AI plugin (version 1.5.0, 60,000+ active installs, tested up to 7.1.4) builds on. That plugin is a feature plugin: its experiments ship through WordPress.org on their own schedule, not through core releases.

Can I change how a built-in connector looks?

Yes, with the unregister, edit and register pattern from the dev note. Check is_registered() first, because calling unregister() on a missing ID raises a notice.

<?php
// Checked on 15 Nov 2026 against WordPress 7.1 core source.
add_action(
	'wp_connectors_init',
	static function ( WP_Connector_Registry $registry ) {
		if ( ! $registry->is_registered( 'anthropic' ) ) {
			return;
		}

		// IDs are unique: unregister first, change the data, register again.
		$connector                = $registry->unregister( 'anthropic' );
		$connector['description'] = __( 'Approved for drafting only.', 'acme-maps' );
		$registry->register( 'anthropic', $connector );
	}
);

This changes metadata only. It does not stop a user from saving a key, and it does not stop another plugin from reading it. If you want to restrict which prompts run, use the wp_ai_client_prevent_prompt filter instead.

What did WordPress 7.1 add to connectors?

One thing: application_password authentication, for services that want a username and an application password instead of a single key. It stores an object with username and password in the option, accepts a username:password string from a constant or environment variable, trims stray whitespace and newlines from those values, and masks the password in REST responses with sixteen bullet characters. A resubmitted masked password is ignored, so a client that echoes back what it was shown does not overwrite the real one.

<?php
// Checked on 15 Nov 2026 against WordPress 7.1 core source.
// 'application_password' exists from 7.1. On 7.0 this registration is
// rejected with a _doing_it_wrong() notice and the connector is not added.
add_action(
	'wp_connectors_init',
	static function ( WP_Connector_Registry $registry ) {
		$registry->register(
			'acme-crm',
			array(
				'name'           => __( 'Acme CRM', 'acme-maps' ),
				'type'           => 'crm',
				'authentication' => array(
					'method'        => 'application_password',
					// A constant or env var holds "username:password".
					'constant_name' => 'ACME_CRM_CREDENTIALS',
				),
			)
		);
	}
);

function acme_crm_credentials(): array {
	$connector = wp_get_connector( 'acme-crm' );
	if ( ! $connector ) {
		return array();
	}

	// Added in 7.1: returns username, password and source (env, constant, database, none).
	return wp_connectors_get_application_password_credentials( $connector['authentication'] );
}

There is a compatibility trap here. A plugin that registers an application_password connector will be rejected on 7.0, which only accepts api_key and none. If you support both versions, guard the registration on the version or on the presence of wp_connectors_get_application_password_credentials().

What about the JavaScript side of connectors?

It is experimental. In the Gutenberg repository, the @wordpress/connectors package is marked private and exports __experimentalRegisterConnector and __experimentalUnregisterConnector, plus experimental component exports. The dev note says a stable client-side registration API is expected in a future release, and a Gutenberg issue proposing a PHP-side field registry for connector configuration was still open when we checked. If you ship custom card UI today, expect to touch it again.

A race between a built-in default registration and a plugin’s custom render was reported and closed in April 2026, so check you are on a current Gutenberg or WordPress build before you debug your own render function.

Is the Connectors API the same as the Abilities API or MCP?

No, and mixing them up is the most common error in articles about this topic, including our first draft. They answer different questions.

API

Question it answers

Who calls it

Where to read more

Connectors API

Which outside services does this site connect to, and where are their credentials?

Site owner (screen), plugins (registry), AI Client

This article

AI Client

How does my plugin send a prompt to a model?

Your PHP code

Section above

Abilities API

What can this site or plugin do, described so an agent can call it?

AI agents, other plugins, JavaScript

Abilities API JavaScript client

MCP Adapter

How does an outside agent reach those abilities over the Model Context Protocol?

External AI tools

WordPress AI agents guide

If your goal is to let an AI assistant create a post or fetch an order through your plugin, you want an ability, not a connector. If your goal is to let your plugin call a model or a third-party service with a key the site owner controls, you want a connector and, for AI, the AI Client.

What is still unfinished, and what changes in 7.2?

WordPress 7.2 is scheduled for 8 Dec 2026. From the trunk source and the official posts, this is where connectors stand today.

  • Secrets API (trunk, contested). The dev note of 11 Nov 2026 describes wp_set_secret(), wp_get_secret() and related functions that store credentials encrypted with libsodium, in the options tables, behind a required WP_SECRETS_KEY constant, with drop-in support for a host key manager. The same post records objections from Ryan McCue and agreement from Matt Mullenweg, and it does not record a final decision. We cannot tell you it will ship in 7.2.
  • Connectors do not use it yet. We diffed connectors.php between 7.1 and trunk. It has small fixes to the REST key check (a case-insensitive route match, and validating only a key that was submitted in the request) and no call to the Secrets API. Connector keys are still plain options in trunk.
  • Planned connector work. The Roadmap to 7.2 lists efforts to land three Connectors changes: activating and deactivating providers from the screen (Trac 65523), performance (Trac 65215) and accepting keys while a provider is temporarily down (Trac 65551). The roadmap calls them efforts underway, and we did not find them in the trunk source we read.
  • Embeddings in the AI Client. Trunk adds wp_ai_client_embedding(), tagged @since 7.2.0.

If the Secrets API does ship, the safe pattern is to check for it and fall back, never to require it:

<?php
// Checked on 15 Nov 2026 against WordPress trunk (7.2 development). Not in 7.0 or 7.1.
if ( function_exists( 'wp_is_secrets_api_available' ) && wp_is_secrets_api_available() ) {
	$stored = wp_set_secret( 'acme-maps/geocoder-key', $api_key );

	if ( is_wp_error( $stored ) ) {
		error_log( $stored->get_error_code() );
	}

	$secret = wp_get_secret( 'acme-maps/geocoder-key' );
	if ( $secret instanceof WP_Secret ) {
		$key = $secret->reveal();
	}
}

That sample is trunk-only. Do not put it in a plugin that claims support for 7.0 or 7.1 without the function_exists() guard, and do not migrate stored keys until the final 7.2 behaviour is confirmed.

Common mistakes people report

These come from public GitHub issues and the official dev note, each paraphrased, with the state we saw on 15 Nov 2026.

  • Using connectors to expose plugin actions. The dev note scopes the API to registering and managing connections, starting with AI providers. Agent-callable actions belong in the Abilities API (see the table above).
  • Registering twice, or with the old slug key. A duplicate ID returns null with a notice, and plugin.slug was replaced by plugin.file; per the dev note comments, the old key is dropped silently.
  • Assuming the saved key is private. Per the same dev note, database keys are not encrypted and any plugin can read them; a key in a constant or environment variable has the same exposure.
  • Key saved, then “not possible to connect”. In WordPress/ai issue 1069 (closed 29 Sep 2026), a plugin that gates outgoing AI requests blocked core’s key check, and core showed one generic message that hid the real reason. If a valid key keeps failing, look at what intercepts the provider request first.
  • A blank Connectors screen. WordPress/ai issue 643 reported both the Connectors and AI settings pages rendering empty on WordPress 7.0 with AI plugin 1.0.1, with console errors about unstable APIs. It was closed on 14 Oct 2026. Update the AI plugin, core and Gutenberg together before you file a bug.
  • Locked-down hosts and mu-plugins. Gutenberg issue 77352 showed the screen giving users no path forward when DISALLOW_FILE_MODS blocks plugin installs (closed 8 May 2026), and issue 76984 showed a connector hidden when its plugin ran as a must-use plugin (closed 6 Apr 2026). On managed hosts with a read-only file system, set keys with a constant or environment variable and test the screen on that host.

Should I add connector support to my plugin now?

Decide by what your plugin does. This is our reading after going through the source.

Your plugin

What to do

Why

Calls an AI model for a feature

Use wp_ai_client_prompt() and let the site owner pick the provider on Settings > Connectors

No key field of your own, no second place to paste a key, and the provider plugins already exist

Is an AI provider

Register with the AI Client; skip wp_connectors_init

Core builds the connector from your provider metadata

Calls a non-AI service with one key (spam, geocoding, email)

Register an api_key connector and read the key in the env, constant, option order

One settings location, constants work on locked-down hosts

Wants agents to trigger its actions

Register abilities, not connectors

Different API, different job

Needs to support 7.0 and 7.1

Skip application_password, or guard it

7.0 rejects that method

Stores third-party credentials today

Keep your storage; watch the Secrets API decision

Not released, and core connectors do not use it

A last practical point. A connector entry gives you a standard place for the key and a standard screen, and nothing more. Rate limits, billing caps, logging prompts and handling provider outages are still your job. Our risks article covers those.

Frequently asked questions

Is the WordPress Connectors API in WordPress 7.0?

Yes. It shipped in 7.0 on 20 May 2026, with the registry, the three read functions, the wp_connectors_init action and the Settings > Connectors screen. Version 7.1 added application password authentication.

Does WordPress 7.0 store my AI API key encrypted?

No. Connector keys are saved as plain options and masked only in the screen and REST output. Keys supplied through an environment variable or a constant never touch the database. We found no encryption of connector keys in the 7.0, 7.1 or trunk source.

How do I turn off AI connectors on a site?

Define WP_AI_SUPPORT as false in wp-config.php, or return false from the wp_supports_ai filter. Core then skips the built-in AI provider connectors, and the registry refuses to add any connector of type ai_provider.

Can I register a connector that needs no key?

Yes. Set authentication.method to none. It is stored in the registry and passed to JavaScript, but the dev note says it needs a client-side registration to appear as a custom card.

Will the Secrets API replace how connector keys are stored?

Nobody can say yet. The Secrets API exists in trunk and is contested, and connectors do not call it in the code we read on 15 Nov 2026. Check the 7.2 release notes before you change anything.

Sources, checked on 15 Nov 2026

Varun Dubey

Written by

Varun Dubey

Varun Dubey runs Wbcom Designs, the WordPress studio he founded in India in 2009. He has spent sixteen years building on WordPress and BuddyPress, shipping client work and products such as Reign, BuddyX, Jetonomy and MediaVerse, and has been putting Claude and OpenAI workflows into production since 2023. He writes up what the studio learns along the way.

More about Varun

No comments yet