Skip to content

update .md with latest two-factor changes / requirements#929

Open
masteradhoc wants to merge 1 commit into
WordPress:masterfrom
masteradhoc:md-file-update
Open

update .md with latest two-factor changes / requirements#929
masteradhoc wants to merge 1 commit into
WordPress:masterfrom
masteradhoc:md-file-update

Conversation

@masteradhoc

@masteradhoc masteradhoc commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

What?

Updates AGENTS.md and TESTS.md to 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.md didn't mention the new settings class/page (Settings → Two-Factor), the two-factor.php registration of the site-wide enabled-providers filters, or the two_factor_enabled_providers option and its constant.
  • TESTS.md referenced an outdated test class name (Tests_Two_Factor_Core) instead of the current Test_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?

  • In AGENTS.md: expanded the two-factor.php bullet to mention it loads the settings class and registers the enabled-providers filter callbacks; added a new settings/class-two-factor-settings.php bullet; added a "Key Site Options" table documenting ENABLED_PROVIDERS_OPTION_KEY / two_factor_enabled_providers.
  • In TESTS.md: corrected the test class name from Tests_Two_Factor_Core to Test_ClassTwoFactorCore in 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.md and TESTS.md and confirming they accurately describe the current codebase:

  1. Check that the settings page, filter hooks, and two_factor_enabled_providers option described in AGENTS.md match two-factor.php and settings/class-two-factor-settings.php.
  2. Check that the Test_ClassTwoFactorCore class name in TESTS.md matches tests/class-two-factor-core.php.
  3. Confirm npm run composer -- test -- --filter Test_ClassTwoFactorCore runs the core test suite correctly.

Screenshots or screencast

Not applicable — documentation-only change, no UI.

Changelog Entry

Development Update - Updated AGENTS.md and TESTS.md to reflect the settings page, enabled-providers option, and corrected test class references.

@masteradhoc
masteradhoc marked this pull request as ready for review July 22, 2026 20:58
@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: 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.

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.

1 participant