update .md with latest two-factor changes / requirements - #929
update .md with latest two-factor changes / requirements#929masteradhoc wants to merge 1 commit into
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. |
There was a problem hiding this comment.
Pull request overview
Updates contributor-facing documentation to match the current Two-Factor plugin implementation and test suite, reducing drift between the codebase and internal onboarding/testing guidance.
Changes:
- Updated
TESTS.mdto reference the current core test class name (Test_ClassTwoFactorCore) and documented the redirect-interception helper exception used in core tests. - Updated
AGENTS.mdto document the settings page implementation and the site-wide enabled-providers option/filters, plus clarified current minimum WordPress requirement.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
TESTS.md |
Aligns test-running examples and core test file documentation with current test class names and helpers. |
AGENTS.md |
Documents the settings screen, enabled-providers enforcement filters, and the two_factor_enabled_providers site option constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What?
Updates
AGENTS.mdandTESTS.mdto reflect recent changes to the plugin so the internal docs stay in sync with the actual codebase.Fixes #
Why?
The two docs had drifted out of date:
AGENTS.mddidn't mention the new settings class/page (Settings → Two-Factor), thetwo-factor.phpregistration of the site-wide enabled-providers filters, or thetwo_factor_enabled_providersoption and its constant.TESTS.mdreferenced an outdated test class name (Tests_Two_Factor_Core) instead of the currentTest_ClassTwoFactorCore, and was missing coverage notes for nonce validation on password-reset notices, profile settings UI output, and site-wide option cleanup on uninstall.Keeping these contributor-facing docs accurate reduces confusion for anyone (human or AI-assisted) onboarding to the codebase or writing new tests.
How?
AGENTS.md: expanded thetwo-factor.phpbullet to mention it loads the settings class and registers the enabled-providers filter callbacks; added a newsettings/class-two-factor-settings.phpbullet; added a "Key Site Options" table documentingENABLED_PROVIDERS_OPTION_KEY/two_factor_enabled_providers.TESTS.md: corrected the test class name fromTests_Two_Factor_CoretoTest_ClassTwoFactorCorein both the command example and class description; added bullets covering password-reset nonce validation, profile settings UI output, and uninstall cleanup of site-wide options.No functional/code changes — documentation only.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude
Model(s): Claude Sonnet 5
Used for: Drafting the documentation updates to AGENTS.md and TESTS.md; reviewed and edited by me before submission.
Testing Instructions
This is a documentation-only change with no functional impact. Verify by reading through
AGENTS.mdandTESTS.mdand confirming they accurately describe the current codebase:two_factor_enabled_providersoption described inAGENTS.mdmatchtwo-factor.phpandsettings/class-two-factor-settings.php.Test_ClassTwoFactorCoreclass name inTESTS.mdmatchestests/class-two-factor-core.php.npm run composer -- test -- --filter Test_ClassTwoFactorCoreruns the core test suite correctly.Screenshots or screencast
Not applicable — documentation-only change, no UI.
Changelog Entry