Changeset 62289
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/connectors.php
r62288 r62289 550 550 */ 551 551 function _wp_register_default_connector_settings(): void { 552 $ai_registry = AiClient::defaultRegistry();553 552 $registered_settings = get_registered_settings(); 554 553 555 foreach ( wp_get_connectors() as $connector_ id => $connector_data ) {554 foreach ( wp_get_connectors() as $connector_data ) { 556 555 $auth = $connector_data['authentication']; 557 556 if ( 'api_key' !== $auth['method'] || empty( $auth['setting_name'] ) ) { … … 564 563 } 565 564 566 // For AI providers, skip if the provider is not in the AI Client registry. 567 if ( 'ai_provider' === $connector_data['type'] && ! $ai_registry->hasProvider( $connector_id ) ) { 565 if ( ! isset( $connector_data['plugin']['is_active'] ) || ! is_callable( $connector_data['plugin']['is_active'] ) ) { 566 continue; 567 } 568 569 if ( ! call_user_func( $connector_data['plugin']['is_active'] ) ) { 568 570 continue; 569 571 }
Note: See TracChangeset
for help on using the changeset viewer.