Title: wp_get_connectors
Published: May 20, 2026

---

# wp_get_connectors(): array

## In this article

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

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

Retrieves all registered connectors.

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

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

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

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

 array Connector settings keyed by connector ID.

 * `...$0` array
 *  Data for a single connector.
    - `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_connectors/?output_format=md#source)󠁿

    ```php
    function wp_get_connectors(): array {
    	$registry = WP_Connector_Registry::get_instance();
    	if ( null === $registry ) {
    		return array();
    	}

    	return $registry->get_all_registered();
    }
    ```

[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#L150)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/connectors.php#L150-L157)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_get_connectors/?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.

  |

| Used by | Description | 
| [_wp_connectors_get_connector_script_module_data()](https://developer.wordpress.org/reference/functions/_wp_connectors_get_connector_script_module_data/)`wp-includes/connectors.php` |

Exposes connector settings to the connectors-wp-admin script module.

  | 
| [_wp_register_default_connector_settings()](https://developer.wordpress.org/reference/functions/_wp_register_default_connector_settings/)`wp-includes/connectors.php` |

Registers default connector settings.

  | 
| [_wp_connectors_pass_default_keys_to_ai_client()](https://developer.wordpress.org/reference/functions/_wp_connectors_pass_default_keys_to_ai_client/)`wp-includes/connectors.php` |

Passes stored connector API keys to the WP AI client.

  | 
| [_wp_connectors_rest_settings_dispatch()](https://developer.wordpress.org/reference/functions/_wp_connectors_rest_settings_dispatch/)`wp-includes/connectors.php` |

Masks and validates connector API keys in REST responses.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_get_connectors/?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_connectors%2F)
before being able to contribute a note or feedback.