Skip to content

Fix "configure an AI connector" link on Settings page to point to the Connectors screen#1358

Merged
ernilambar merged 1 commit into
WordPress:trunkfrom
mazharulrobeen:fix/ai-connector-settings-link
Jun 13, 2026
Merged

Fix "configure an AI connector" link on Settings page to point to the Connectors screen#1358
ernilambar merged 1 commit into
WordPress:trunkfrom
mazharulrobeen:fix/ai-connector-settings-link

Conversation

@mazharulrobeen

@mazharulrobeen mazharulrobeen commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What?

Closes: 1357
Fixes the "configure an AI connector" link on the Plugin Check Settings page so it points to the WordPress core Connectors screen (options-connectors.php) instead of General Settings (options-general.php).

Why?

On Settings → Plugin Check, when no AI connector is configured, the AI Code Review section shows this notice:

No AI connectors are configured. Please configure an AI connector in WordPress settings first.

The link currently points to admin_url( 'options-general.php' ) (Settings → General), which contains no AI/connector settings — users following it land on an unrelated screen with no way forward, making the AI Code Review feature hard to enable.

The intended target is the core Connectors screen, which this plugin already links to correctly in includes/Admin/Namer_Page.php (the "Configure AI Connectors" button uses admin_url( 'options-connectors.php' )). The translator comment on the string ("URL to WordPress AI settings") also confirms the AI settings screen was the intended destination.

How?

One-line change in includes/Admin/Settings_Page.php (the notice rendered in
the AI Code Review section):

- esc_url( admin_url( 'options-general.php' ) )
+ esc_url( admin_url( 'options-connectors.php' ) )

This matches the existing, correct usage in Namer_Page.php. No string
changes, so there is no translation impact. The other two
options-general.php references in the codebase are intentionally untouched:
the add_submenu_page() parent slug in Settings_Page.php and the
settingsPageUrl (with ?page=plugin-check-settings) in Admin_Page.php
both correctly refer to Plugin Check's own settings page.

Testing Instructions

  1. Use a WordPress 7.0 install with no AI connector configured.
  2. Install and activate Plugin Check (this branch).
  3. Go to Settings → Plugin Check.
  4. In the AI Code Review section, click the "configure an AI connector"
    link inside the warning notice.
  5. Before this PR: the link opens Settings → General
    (options-general.php), which has no connector settings.
    After this PR: the link opens the Connectors settings screen
    (options-connectors.php), consistent with the "Configure AI Connectors"
    button on the Plugin Namer page.

AI Usage Disclosure

  • [x ] This PR was created without the help of AI tools
  • This PR includes AI-assisted code or content

If AI tools were used, please describe how they were used:

Screenshots or screencast

Before After
before-screenshot | After after-screenshot Open WordPress Playground Preview

@github-actions

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mazharulrobeen <mazharulrobeen@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ernilambar ernilambar added this to the 2.1.0 milestone Jun 13, 2026
@ernilambar ernilambar merged commit 28f3d9f into WordPress:trunk Jun 13, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Configure an AI connector" link on AI Code Review settings points to Settings → General instead of the Connectors page

3 participants