wp-includes/connectors.php:761Registers default connector settings.
function _wp_register_default_connector_settings(): void { $registered_settings = get_registered_settings(); foreach ( wp_get_connectors() as $connector_data ) { $auth = $connector_data['authentication']; if ( 'api_key' !== $auth['method'] && 'application_password' !== $auth['method'] ) { continue; } if ( empty( $auth['setting_name'] ) || isset( $registered_settings[ $auth['setting_name'] ] ) ) { continue; } $setting_name = $auth['setting_name']; if ( ! isset( $connector_data['plugin']['is_active'] ) || ! is_callable( $connector_data['plugin']['is_active'] ) ) { continue; } if ( ! call_user_func( $connector_data['plugin']['is_active'] ) ) { continue; } if ( 'api_key' === $auth['method'] ) { register_setting( 'connectors', $setting_name, array( 'type' => 'string', 'label' => sprintf( /* translators: %s: Connector name. */ __( '%s API Key' ), $connector_data['name'] ), 'description' => sprintf( /* translators: %s: Connector name. */ __( 'API key for the %s connector.' ), $connector_data['name'] ), 'default' => '', 'show_in_rest' => true, 'sanitize_callback' => 'sanitize_text_field', ) ); } elseif ( 'application_password' === $auth['method'] ) { register_setting( 'connectors', $setting_name, array( 'type' => 'object', 'label' => sprintf( /* translators: %s: Connector name. */ __( '%s Credentials' ), $connector_data['name'] ), 'description' => sprintf( /* translators: %s: Connector name. */ __( 'Application password credentials for the %s connector.' ), $connector_data['name'] ), 'default' => array( 'username' => '', 'password' => '', ), 'show_in_rest' => array( 'schema' => array( 'type' => 'object', 'properties' => array( 'username' => array( 'type' => 'string', ), 'password' => array( 'type' => 'string', ), ), 'additionalProperties' => false, ), ), 'sanitize_callback' => static function ( $value ) use ( $setting_name ) { return wp_connectors_sanitize_application_password_credentials( $value, $setting_name ); },Introduced in 7.0.0. Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/connectors.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.