Align credentials with WP 7.0 connectors: per-provider options#7
Merged
swissspidy merged 5 commits intomainfrom Mar 5, 2026
Merged
Align credentials with WP 7.0 connectors: per-provider options#7swissspidy merged 5 commits intomainfrom
swissspidy merged 5 commits intomainfrom
Conversation
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add central connectors screen for WordPress 7.0
Align credentials with WP 7.0 connectors: per-provider options and bullet masking
Mar 4, 2026
swissspidy
reviewed
Mar 4, 2026
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
Align credentials with WP 7.0 connectors: per-provider options and bullet masking
Align credentials with WP 7.0 connectors: per-provider options
Mar 4, 2026
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WordPress 7.0 introduces a central connectors screen where each AI provider stores its API key in a dedicated option (
connectors_ai_{$connector_id}_api_key) and masks it via_wp_connectors_mask_api_key(). This PR updates thewp ai credentialscommand to match that convention.Changes
wp_ai_client_provider_credentialsarray option with individual per-provider options, using thesetting_namefrom each provider's connector registry entry.get,set,delete,list) now exclusively operate on providers registered in_wp_connectors_get_connector_settings(). Attempting to use an unregistered provider producesError: Provider "X" is not a supported AI connector.get_all_credentials()iterates over_wp_connectors_get_connector_settings()and callsget_option()for each registered provider'ssetting_name. Since WP 7.0 registers anoption_*filter that applies_wp_connectors_mask_api_key(), the returned values are already masked — no custom masking needed.mask_api_key()method has been removed entirely; masking is delegated to WP core's option filter.setcallsremove_all_filters("sanitize_option_{$option_name}")beforeupdate_option()to skip WP 7.0's live API key validation (appropriate for a trusted CLI admin tool).Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.