WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#34507 new enhancement

New action `before_login_form`

Reported by: sebastian.pisula Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Login and Registration Keywords: has-patch needs-refresh needs-docs
Focuses: Cc:
PR Number:

Description

I can add new fields before default fields form. For example I can add social login :

https://food52.com/users/sign_in?next_url=%2F

Attachments (2)

34507.patch (786 bytes) - added by sebastian.pisula 4 years ago.
22139.patch (808 bytes) - added by sebastian.pisula 4 years ago.

Download all attachments as: .zip

Change History (8)

#1 @sebastian.pisula
4 years ago

I renew ticket

This ticket was mentioned in Slack in #core by sebastian.pisula. View the logs.


4 years ago

#3 follow-up: @swissspidy
4 years ago

  • Keywords has-patch needs-refresh added

The patch would need some improved docblock description (see login_form hook for example) and an updated @since value. Also, should the hook name be login_form_before?

In general, I think it's time to finally make the login form more modular and testable.

#4 in reply to: ↑ 3 @SergeyBiryukov
4 years ago

Replying to swissspidy:

Also, should the hook name be login_form_before?

Given that it fires inside the form tag, I think login_form_top would be a better name, see comment_form_top for example.

If login_form_before was introduced, I'd expect it to fire before the form tag, see comment_form_before.

#5 @DrewAPicture
4 years ago

  • Keywords needs-docs added
Note: See TracTickets for help on using tickets.