Use WordPress 7.0 core AI client for Plugin Namer #1195
Merged
davidperezgar merged 9 commits intotrunkfrom Mar 4, 2026
Merged
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Testing notesInstalled PCP on a WordPress version older than 7.0:
Upgraded to WordPress 7.0 beta 2:
|
Member
Author
|
Thanks for the feedback. I've updated and I think is ready. |
ernilambar
approved these changes
Mar 4, 2026
frantorres
approved these changes
Mar 4, 2026
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.
Description
Fixes the fatal error when running Plugin Check on WordPress 7.0 beta 2 by removing the custom AI Connect integration and migrating Plugin Namer to WordPress core AI APIs.
Fixes #1192
Changes
Use core AI client
Plugin Namer now uses
wp_ai_client_prompt()and core-compatible prompt builder calls instead of the old AI Connect layer.Official provider/model listing flow (core source aligned)
Model listing now follows the same approach as the official source:
AiClient::defaultRegistry()getRegisteredProviderIds()isProviderConfigured( $provider_id )modelMetadataDirectory()->listModelMetadata()Only configured providers are listed, and models are grouped by provider in the UI.
Remove plugin-level AI settings integration
Removed:
includes/Admin/Settings_Page.phpincludes/Traits/AI_Connect.phpassets/js/admin-settings.jsAI configuration is handled in WordPress core settings/connectors only.
Namer availability and UX updates
wp_ai_client_prompt, WP 7.0+, text generation support).wp-admin/options-general.php?page=connectors-wp-admin.Plugin registration cleanup
Plugin_Mainno longer registers the removed Settings page.Documentation update
readme.txtnow states Plugin Namer requires WordPress 7.0+ with configured core AI connectors.Dependencies/config
composer.json/composer.lockrelated to the old integration.Benefits
Testing Instructions
composer lintcomposer phpmdcomposer phpstan(if applicable)Checklist
composer phpmdpasses