Conversation
Contributor
Author
|
Fully open to suggestions on different hook names or locations. |
kasparsd
approved these changes
Dec 22, 2025
Contributor
Author
No problem! This is done. |
Contributor
Author
|
@kasparsd I think this PR is ready to go, but I'm getting some failures in the automated checks. I'm not really sure how to resolve that. |
kasparsd
approved these changes
Jan 21, 2026
Collaborator
kasparsd
left a comment
There was a problem hiding this comment.
Looks good! Thank you!
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 hooks to the authentication form so content can easily be inserted.
Closes #722.
Why?
Companion plugins may wish to add form fields or other content to the authentication form.
How?
Three hooks are added to each of the Two_Factor_Provider subclasses:
two_factor_before_authentication_prompttwo_factor_after_authentication_prompttwo_factor_after_authentication_inputNote that
two_factor_after_authentication_inputstill fires even when there is no authentication input.The hook passes a single argument: the provider object. This gives access to the provider name, among other properties, allowing for some conditional content when desired.
Testing Instructions
functions.phpadd the following:Screenshots or screencast
Changelog Entry