#22139 closed enhancement (fixed)
Hooks for wp-login customization
Reported by: | borkweb | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Login and Registration | Keywords: | has-patch |
Focuses: | Cc: |
Description
I have an application that leverages wp-login.php as the login page (of course), however, the HTML on the wp-login.php doesn't have a way for my application to insert its navigational elements, branding, etc.
I propose the addition of two new action hooks: login_before_container and login_after_container which would come before and after the login div, respectively.
Attachments (5)
Change History (29)
#2
@
12 years ago
The concept behind #21506 is similar to this, I suppose, in that it proposes some standardized hooks in twenty ten that can be leveraged to do what I want to do with wp-login.php...to a degree. Because this diff addresses wp-login.php, I'd say it is a different beast.
The hook names that I used may definitely be worth debating, though. The attached diff was my (lame?) attempt at picking a suitable name :)
#5
follow-up:
↓ 9
@
12 years ago
+1 for this. The diff is just two do_action
calls that make it possible to significantly redesign the login page. Combined with some .htaccess
rules you can do this: https://accounts.gigaom.com/subscription/sign-in/
#7
@
11 years ago
+2, but add additional filters for changing the login form header text (or even allow for eliminating the link entirely, leaving just the H1 tag), also for adding classes or other attributes to the form tags. For the login form itself, could even bring in the filters used in the wp_login_form() function.
#8
follow-up:
↓ 10
@
10 years ago
+2 as I'm currently working on tweaking the wp-login page layout heavily for a website for a small group of users only (family and friends) so the front page will be the login page.
For me the bare minimum would be the "login_before_container" hook but the "login_after_container" hook just in front of the "login_footer" hook also makes sense to me for better customization of the wp-login page.
Please include this ticket in the next WP release.
Btw [offtopic] - isn't it weird that the version field in the change properties ranges from 0.71 up to only 3.4 while the WP version is already at 3.9.1?!
#9
in reply to:
↑ 5
@
10 years ago
Replying to misterbisson:
+1 for this. The diff is just two
do_action
calls that make it possible to significantly redesign the login page. Combined with some.htaccess
rules you can do this: https://accounts.gigaom.com/subscription/sign-in/
What are .htaccess rules you have used for getting such a url for the wp-login.php page?
#10
in reply to:
↑ 8
;
follow-up:
↓ 11
@
10 years ago
Replying to stgoos:
Btw [offtopic] - isn't it weird that the version field in the change properties ranges from 0.71 up to only 3.4 while the WP version is already at 3.9.1?!
It's not weird; the version field is to keep track of when enhancements were requested. When it is already set, you cannot change it to something newer - it can be set to something older in the case of bugs, which may have been introduced earlier than the original reported version.
#11
in reply to:
↑ 10
@
10 years ago
Replying to helen:
Replying to stgoos:
Btw [offtopic] - isn't it weird that the version field in the change properties ranges from 0.71 up to only 3.4 while the WP version is already at 3.9.1?!
It's not weird; the version field is to keep track of when enhancements were requested. When it is already set, you cannot change it to something newer - it can be set to something older in the case of bugs, which may have been introduced earlier than the original reported version.
Thanks for the explaination Helen - that actually makes a lot of sense :)
#12
@
9 years ago
Bump.
Since we're almost at WordPress 4.3 now, it would be nice to see this feature request being picked up for let say the 4.4 release ;)
#13
follow-up:
↓ 14
@
9 years ago
Refreshed the patch and added docs. Only needs the before container action as the login_footer
is fine to use for after the container.
#14
in reply to:
↑ 13
@
9 years ago
Replying to iamfriendly:
Refreshed the patch and added docs. Only needs the before container action as the
login_footer
is fine to use for after the container.
I don't agree with you on that last comment. We would need both for max flexibility.
#15
@
9 years ago
- Severity changed from normal to blocker
Dear WordPress team,
Would it be possible to finally include this simple enhancement of 2 extra hooks in version 4.5?
This enhancement/feature request is already open for >3 years and still hasn't been assigned an owner and is still awaiting review...
The lacking of the 2 hooks blocks customization of the login page with extra div blocks and such.
Many thanks in advance!
#16
@
9 years ago
- Severity changed from blocker to normal
It's too late for enhancements to be added to 4.5, though testing of the latest patch and discussion can always happen now to ready it for inclusion earlier in a cycle.
At first glance, the action seems useful enough to add HTML. For adding full navigational elements and branding, it would be nice if wp-login.php
had better support for theming in general. Is it enough to add the action just to allow for some customization?
#17
@
9 years ago
Hi Jeremy,
I understand. 4.6 would be fine as well :)
It's sufficient enough when both the hooks suggested by borkweb in his patch would be included in wp-login.php.
Thanks!
#18
@
9 years ago
- Milestone changed from Awaiting Review to 4.6
I'd like to see this considered for 4.6
This ticket was mentioned in Slack in #core by voldemortensen. View the logs.
9 years ago
#20
@
9 years ago
- Keywords commit added
Adding commit keyword per https://wordpress.slack.com/archives/core/p1461017136000310
#21
@
9 years ago
- Keywords commit removed
+1 for the login_before_container
action placement. Could this be login_header
instead? login_head
is used inside <head>
.
What's the benefit of the new login_after_container
action vs the existing login_footer
action in login_footer()
?
#22
@
9 years ago
I do like login_header
more than login_before_container
. And, after thinking about it, there isn't really much gained by having an extra action in the footer.
#23
@
9 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 37243:
Addition of two new hooks