Commit e0a086e
Connectors: Add registry guards before registering settings and passing keys.
Skip `register_setting` in `_wp_register_default_connector_settings()`
when the AI provider is not in the registry, preventing REST-exposed
settings that silently reject values. Reorder the `hasProvider` check
in `_wp_connectors_pass_default_keys_to_ai_client()` to run before
reading the option. Update the REST settings test to reflect that
connector settings are only registered when their provider is active.
Follow-up to [555bb8a], [bd6c4c8].
See #64791.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 2b6427b commit e0a086e
2 files changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
325 | 332 | | |
326 | 333 | | |
327 | 334 | | |
| |||
375 | 382 | | |
376 | 383 | | |
377 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
378 | 389 | | |
379 | | - | |
| 390 | + | |
380 | 391 | | |
381 | 392 | | |
382 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 123 | | |
128 | 124 | | |
129 | 125 | | |
| |||
0 commit comments