# wp_get_connectors()

URL: https://chugunov.pro/api-wordpress/functions/wp_get_connectors/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 7.0.0.

## Сигнатура

```php
wp_get_connectors(): array
```

## Описание

[See also](#see-also)
- [WP_Connector_Registry::get_all_registered()](https://developer.wordpress.org/reference/classes/WP_Connector_Registry/get_all_registered/)

## Возвращаемое значение

`array` — ...$0 array Data for a single connector. name stringThe connector’s display name. description stringThe connector’s description. logo_url stringOptional. URL to the connector’s logo image. type stringThe 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 stringThe authentication method: 'api_key' or 'none'. credentials_url stringOptional. URL where users can obtain API credentials. setting_name stringOptional. The setting name for the API key. constant_name stringOptional. PHP constant name for the API key. env_var_name stringOptional. Environment variable name for the API key. plugin array Optional. Plugin data for install/activate UI. file stringThe plugin’s main file path relative to the plugins directory (e.g. 'my-plugin/my-plugin.php' or 'hello.php'). is_active callableCallback to determine whether the plugin is active. Receives no arguments and must return bool. Defaults to __return_true. } Source function wp_get_connectors(): array { $registry = WP_Connector_Registry::get_instance(); if ( null === $registry ) { return array(); } return $registry->get_all_registered(); }

## Исходный код

Файл: `wp-includes/connectors.php:150`

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

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

## История изменений

- 7.0.0 — Introduced.

## Связанные

Использует: `WP_Connector_Registry::get_instance`.
Используется в: [`_wp_connectors_get_connector_script_module_data`](https://chugunov.pro/api-wordpress/functions/_wp_connectors_get_connector_script_module_data/), [`_wp_register_default_connector_settings`](https://chugunov.pro/api-wordpress/functions/_wp_register_default_connector_settings/), [`_wp_connectors_pass_default_keys_to_ai_client`](https://chugunov.pro/api-wordpress/functions/_wp_connectors_pass_default_keys_to_ai_client/), [`_wp_connectors_rest_settings_dispatch`](https://chugunov.pro/api-wordpress/functions/_wp_connectors_rest_settings_dispatch/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/wp_get_connectors/
