Skip to content

fix wrong settings link anchor#828

Merged
georgestephanis merged 2 commits into
WordPress:masterfrom
masteradhoc:anchor-link-fix
Mar 18, 2026
Merged

fix wrong settings link anchor#828
georgestephanis merged 2 commits into
WordPress:masterfrom
masteradhoc:anchor-link-fix

Conversation

@masteradhoc
Copy link
Copy Markdown
Collaborator

What?

Updates the settings link anchor in the Plugins menu to correctly point to the Two-Factor settings section of the user profile page.

Why?

The "Settings" link displayed under the plugin title in the Plugins menu was directing users to #application-passwords-section instead of the Two-Factor plugin's own settings section. This meant users clicking "Settings" would land on an unrelated part of their profile page, making it difficult to find the actual plugin settings.

Fixes #827

How?

Two files are updated to replace the incorrect anchor:

  • .wordpress-org/blueprints/blueprint.json: Updated landingPage from /wp-admin/profile.php#application-passwords-section to /wp-admin/profile.php#two-factor-options
  • class-two-factor-core.php: Updated add_settings_action_link() to build the settings URL using admin_url( 'profile.php#two-factor-options' ) instead of profile.php#application-passwords-section

The anchor #two-factor-options is the first element ID beneath the Two-Factor section header in the user profile, making it the correct and most direct target.

Testing Instructions

  1. Install the Two-Factor plugin
  2. Activate the plugin
  3. Navigate to the Plugins menu
  4. Click "Settings" under the Two-Factor plugin title
  5. Confirm the page scrolls to the #two-factor-options section of the user profile, not #application-passwords-section

Changelog Entry

Fixed - Settings link in the Plugins menu now correctly navigates to the Two-Factor options section of the user profile instead of the Application Passwords section.

@masteradhoc masteradhoc added this to the 0.16.0 milestone Mar 11, 2026
@masteradhoc masteradhoc self-assigned this Mar 11, 2026
@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.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @cclambie.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

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

Unlinked contributors: cclambie.

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

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

@masteradhoc masteradhoc requested a review from jeffpaul March 16, 2026 19:47
@georgestephanis georgestephanis merged commit 10072b3 into WordPress:master Mar 18, 2026
28 checks passed
@masteradhoc masteradhoc deleted the anchor-link-fix branch March 18, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants