Add 'Settings' action link to plugin list for quick access to profile… Addresses #732#740
Merged
kasparsd merged 2 commits intoWordPress:masterfrom Dec 12, 2025
Merged
Conversation
kasparsd
reviewed
Dec 12, 2025
Collaborator
kasparsd
left a comment
There was a problem hiding this comment.
Thanks for your contribution @hardikRathi!
The code looks good and I only had suggestion about the organization.
two-factor.php
Outdated
| return $links; | ||
| } | ||
|
|
||
| add_filter( |
Collaborator
There was a problem hiding this comment.
Could we move this to the rest of the hooks here along with the callback method?
two-factor/class-two-factor-core.php
Lines 95 to 132 in ae3cdaa
Contributor
Author
There was a problem hiding this comment.
Thanks for the feedback! I’ve moved the plugin_action_links hook and callback into Two_Factor_Core::add_hooks() as suggested. Verified that the Settings link still appears correctly on the Plugins screen.
kasparsd
approved these changes
Dec 12, 2025
Collaborator
kasparsd
left a comment
There was a problem hiding this comment.
This is great, thank you!
Contributor
Author
|
Thank you very much @kasparsd |
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.
What?
Adds a "Settings" link to the plugin action links on the Plugins screen in the WordPress admin.
Why?
The plugin currently does not display a “Settings” link under its name on the Plugins page (
/wp-admin/plugins.php).This makes it less intuitive for users to access the plugin’s configuration section (
/wp-admin/profile.php#application-passwords-section), which is standard behavior for most WordPress plugins.Fixes #<issue_number> (replace with the actual issue ID if one exists).
How?
Introduced a new function
two_factor_add_settings_action_link()intwo-factor.phpthat hooks into theplugin_action_links_{plugin_basename}filter to prepend a "Settings" link.The link directs users to
/wp-admin/profile.php#application-passwords-section.