Functions defined in wp-login.php should be moved to a separate file to make them re-usable
|Reported by:||beaulebens||Owned by:||SergeyBiryukov|
|Cc:||wycks, emeraldimp, scott@…, zombrows|
Currently, there are a series of functions defined at the top of wp-login.php:
login_header() login_footer() wp_shake_js() retrieve_password() check_password_reset_key() reset_password() register_new_user()
If these functions were moved to a separate file, they would be reusable by folks who are trying to do more advanced things involving the login flow.
As an example, if you want to create a page resembling wp-login right now, there's no easy way to do it without just duplicating everything from this file. Moving these functions means you can use login_header() and login_footer() to recreate the bulk of the page, then handle the "content block" yourself. This marginally improves the re-usability of the login system.
Patch attached which does this.