Opened 12 years ago
Last modified 8 years ago
#23279 new enhancement
Add templates to style registration, signup, activation, login and password reset pages
Reported by: | rmccue | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Login and Registration | Keywords: | has-patch |
Focuses: | template | Cc: |
Description
As discussed in IRC, the ability to override the various user-related pages would be a great ability for themes to have. At the moment, it's pretty tedious to style these and there's very little control over the content of the page (some for good reason, others not so much).
Attachments (1)
Change History (22)
#7
@
11 years ago
Phew, so, attachment:23279.diff contains my first run at this. It does the following:
- Moves all the main HTML from
wp-login.php
to templates calledcore/login.php
,core/register.php
,core/resetpassword.php
andcore/retrievepassword.php
(Considering usingwp/
here instead, ascore/
might conflict easily.) - Adds default fallback templates in
wp-includes/theme-compat/
with the same ol' HTML as always. - Adds the
login_locate_template
function to extendlocate_template
with the theme-compat check. (This could go into a non-login_
-namespaced function if we'd prefer; something likewp_locate_core_template
) - Adds a
resetpassword_form
hook to match the other*_form
filters. - Moves hidden fields from the templates to a function hooked into
login_form
,register_form
,lostpassword_form
, andresetpassword_form
. (This currently uses a single function with a switch to avoid having 4 functions, but I'm easy on this.) - Adds a
login_register_link
function to link to the registration form if it's enabled (along with$before
and$after
parameters to prepend/append content) - Reformats some of the inline Javascript on the login form.
Comments very welcome. At the moment, the header/footer content is still locked into login_header
and login_footer
, so it's possible we want that moved to a template as well. If so, we should probably use wp/login/*
(with wp/login/header.php
and wp/login/footer.php
) there to make it clear.
Note that I also didn't touch successful authentication with interim logins, as it's basically just login_header
then login_footer
. Happy to move that too.
#11
@
11 years ago
- Keywords has-patch added
I haven't experienced any problems with this in my past day of testing, so marking as has-patch.
This ticket was mentioned in IRC in #wordpress-dev by rmccue. View the logs.
11 years ago
#15
@
11 years ago
- Component changed from Themes to Login and Registration
- Focuses template added
theme-compat is where code goes to die. We'd probably want to do something a bit different here. Would it make sense to modify this more off get_search_form()? Use the file if present, here's some HTML if not?
This ticket was mentioned in IRC in #wordpress-dev by rmccue. View the logs.
11 years ago
#18
@
9 years ago
FWIW, I still think theme-compat
is the correct choice for this. In the past it's been a place for code to die, but I don't see any reason it needs to be. I'd still love to have this, but needs consensus on the approach.
#19
@
9 years ago
FWIW, there's already a plugin that does this.
#20
follow-up:
↓ 21
@
9 years ago
I'd really like to see some improvements here. Themes can better "brand" their login forms using page templates or shortcodes, but the current set of tags and filters doesn't allow much in the way of customization.
I can do a wp_login_form() but I can't do a wp_lostpassword_form() or a wp_registration_form() - more template tags like this would help us build our own forms in page templates. It it worth me having a go add extracting this form code to functions like this? Or are there complications to doing this that I've not considered?
This would be great. We briefly talked about some of this for Twenty Twelve in the scope of styling the signup pages to match the theme. It was ultimately decided to target the outer container classes, but templating would have been ideal. +1