Commit bd4090d
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 bd4090d
File tree
3 files changed
+12
-26
lines changed- src/wp-includes
- tests
- phpunit/tests/rest-api
- qunit/fixtures
3 files changed
+12
-26
lines changed| 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 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11066 | 11066 | | |
11067 | 11067 | | |
11068 | 11068 | | |
11069 | | - | |
11070 | | - | |
11071 | | - | |
11072 | | - | |
11073 | | - | |
11074 | | - | |
11075 | | - | |
11076 | | - | |
11077 | | - | |
11078 | | - | |
11079 | | - | |
11080 | | - | |
11081 | | - | |
11082 | | - | |
11083 | | - | |
11084 | | - | |
11085 | | - | |
11086 | | - | |
11087 | 11069 | | |
11088 | 11070 | | |
11089 | 11071 | | |
| |||
14762 | 14744 | | |
14763 | 14745 | | |
14764 | 14746 | | |
14765 | | - | |
14766 | | - | |
14767 | | - | |
14768 | 14747 | | |
14769 | 14748 | | |
14770 | 14749 | | |
| |||
0 commit comments