Changeset 62306
- Timestamp:
- 05/06/2026 05:52:48 PM (5 weeks ago)
- Location:
- branches/7.0
- Files:
-
- 2 edited
- 1 copied
-
. (modified) (1 prop)
-
src/wp-includes/connectors.php (modified) (2 diffs)
-
tests/phpunit/tests/connectors/wpRegisterDefaultConnectorSettings.php (copied) (copied from trunk/tests/phpunit/tests/connectors/wpRegisterDefaultConnectorSettings.php)
Legend:
- Unmodified
- Added
- Removed
-
branches/7.0
-
branches/7.0/src/wp-includes/connectors.php
r62195 r62306 539 539 */ 540 540 function _wp_register_default_connector_settings(): void { 541 $ai_registry = AiClient::defaultRegistry();542 541 $registered_settings = get_registered_settings(); 543 542 544 foreach ( wp_get_connectors() as $connector_ id => $connector_data ) {543 foreach ( wp_get_connectors() as $connector_data ) { 545 544 $auth = $connector_data['authentication']; 546 545 if ( 'api_key' !== $auth['method'] || empty( $auth['setting_name'] ) ) { … … 553 552 } 554 553 555 // For AI providers, skip if the provider is not in the AI Client registry. 556 if ( 'ai_provider' === $connector_data['type'] && ! $ai_registry->hasProvider( $connector_id ) ) { 554 if ( ! isset( $connector_data['plugin']['is_active'] ) || ! is_callable( $connector_data['plugin']['is_active'] ) ) { 555 continue; 556 } 557 558 if ( ! call_user_func( $connector_data['plugin']['is_active'] ) ) { 557 559 continue; 558 560 }
Note: See TracChangeset
for help on using the changeset viewer.