[wp-trac] [WordPress Trac] #20279: Functions defined in wp-login.php should be moved to a separate file to make them re-usable
WordPress Trac
noreply at wordpress.org
Tue Aug 27 13:06:47 UTC 2013
#20279: Functions defined in wp-login.php should be moved to a separate file to
make them re-usable
-------------------------+------------------
Reporter: beaulebens | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.7
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------
Comment (by nacin):
Two general objections:
* I think some of these functions are good as a separate file, while
others are pretty intrinsic to the login skin/flow.
* Some of these functions might not deserve to see the light of day, so
to speak — we need to review them.
I think we can overcome these.
Here's the list of functions defined in wp-login.php that I think are
intrinsic to wp-login.php and shouldn't leave that file for now:
{{{
function login_header($title = 'Log In', $message = '', $wp_error = '') {
function login_footer($input_id = '') {
function wp_shake_js() {
function wp_attempt_focus(){
}}}
Here are the other four functions:
{{{
function retrieve_password() {
function check_password_reset_key($key, $login) {
function reset_password($user, $new_pass) {
function register_new_user( $user_login, $user_email ) {
}}}
I gave a quick scan through all of them to ensure they were sane and were
not specific to wp-login.php.
I think check_password_reset_key(), reset_password(), and
register_new_user() all meet those parameters. These are under 90 lines of
code (including documentation) and, I think, belong in user.php.
I think retrieve_password() may be too tied to the wp-login.php process to
be immediately extracted. Other opinions?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20279#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list