Title: wp_get_connector
Published: May 20, 2026

---

# wp_get_connector( string $id ): array|null

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#wp--skip-link--target)

Retrieves a registered connector.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#see-also)󠁿

 * [WP_Connector_Registry::get_registered()](https://developer.wordpress.org/reference/classes/WP_Connector_Registry/get_registered/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#parameters)󠁿

 `$id`stringrequired

The connector identifier.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#return)󠁿

 array|null Connector data, or null if not registered.

 * `name` string
 * The connector’s display name.
 * `description` string
 * The connector’s description.
 * `logo_url` string
 * Optional. URL to the connector’s logo image.
 * `type` string
 * The connector type, e.g. `'ai_provider'`.
 * `authentication` array
 *  Authentication configuration. When method is ‘api_key’, includes credentials_url,
   setting_name, and optionally constant_name and env_var_name. When ‘none’, only
   method is present.
    - `method` string
    - The authentication method: `'api_key'` or `'none'`.
    - `credentials_url` string
    - Optional. URL where users can obtain API credentials.
    - `setting_name` string
    - Optional. The setting name for the API key.
    - `constant_name` string
    - Optional. PHP constant name for the API key.
    - `env_var_name` string
    - Optional. Environment variable name for the API key.
 * `plugin` array
 *  Optional. Plugin data for install/activate UI.
    - `file` string
    - The plugin’s main file path relative to the plugins directory (e.g. `'my-plugin/
      my-plugin.php'` or `'hello.php'`).
    - `is_active` callable
    - Callback to determine whether the plugin is active. Receives no arguments 
      and must return bool.
       Defaults to `__return_true`.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#source)󠁿

    ```php
    function wp_get_connector( string $id ): ?array {
    	$registry = WP_Connector_Registry::get_instance();
    	if ( null === $registry ) {
    		return null;
    	}

    	return $registry->get_registered( $id );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/connectors.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/connectors.php#L85)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/connectors.php#L85-L92)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Connector_Registry::get_instance()](https://developer.wordpress.org/reference/classes/wp_connector_registry/get_instance/)`wp-includes/class-wp-connector-registry.php` |

Retrieves the main instance of the registry class.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_get_connector/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_get_connector%2F)
before being able to contribute a note or feedback.