Retrieves all registered connectors.
Description
See also
Return
array Connector settings keyed by connector ID....$0arrayData for a single connector.namestringThe connector’s display name.descriptionstringThe connector’s description.logo_urlstringOptional. URL to the connector’s logo image.typestringThe connector type, e.g.'ai_provider'.authenticationarrayAuthentication 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.methodstringThe authentication method:'api_key'or'none'.credentials_urlstringOptional. URL where users can obtain API credentials.setting_namestringOptional. The setting name for the API key.constant_namestringOptional. PHP constant name for the API key.env_var_namestringOptional. Environment variable name for the API key.
pluginarrayOptional. Plugin data for install/activate UI.filestringThe plugin’s main file path relative to the plugins directory (e.g.'my-plugin/my-plugin.php'or'hello.php').is_activecallableCallback 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(); }Related
Uses Description WP_Connector_Registry::get_instance() wp-includes/class-wp-connector-registry.phpRetrieves the main instance of the registry class.
Used by Description _wp_connectors_get_connector_script_module_data() wp-includes/connectors.phpExposes connector settings to the connectors-wp-admin script module.
_wp_register_default_connector_settings() wp-includes/connectors.phpRegisters default connector settings.
_wp_connectors_pass_default_keys_to_ai_client() wp-includes/connectors.phpPasses stored connector API keys to the WP AI client.
_wp_connectors_rest_settings_dispatch() wp-includes/connectors.phpMasks and validates connector API keys in REST responses.
Changelog
Version Description 7.0.0 Introduced.
User Contributed Notes
You must log in before being able to contribute a note or feedback.