Opened 4 years ago
Last modified 3 years ago
#10141 reviewing feature request
URL Functions for: login, logout, lostpasword and the new register
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Plugins | Version: | 2.8 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | r_a_m_i@…, mikeschinkel@…, ramiy |
Description
I want to finish the work i started on #9932.
First i complited the set of "wp_*_url()" functions:
wp_login_url($redirect) - exists
wp_logout_url($redirect) - exists
wp_lostpassword_url($redirect) - exists
wp_registration_url($redirect) - NEW !!!
Then i examind the wp_loginout($redirect) function and the wp_register( $before = '<li>', $after = '</li>' ) function.
The old wp_register( $before = '<li>', $after = '</li>' ) was depricated in favor of the new wp_registration($redirect), and moved to <wp-includes/deprecated.php>.
The new wp_registration() function uses wp_registration_url(), and like all the functions in this set it accepts only the $redirect parameter.
At the end i fixed <wp-includes/default-widgets.php> and <wp-content/themes/default/sidebar.php> to use the new wp_registration() function.
(Sorry for the bad english)
Attachments (1)
Change History (13)
- Milestone changed from 2.8.1 to 2.9
- Milestone changed from 2.9 to Future Release
Not sure this is necessary moving to Future for now.
- Milestone changed from Future Release to 2.9
Why not?
This way all the url_functions for login/logout/password/register will receive the same parameter - "$redirect".
Also, we remove the old "$before" and "$after" parameters, and move the "<li></li>" html tags out from those functions to theme developers control outside the function.
For backward compatibility we use:
wp-includes/deprecated.php
function wp_register( $before = '<li>', $after = '</li>' ) {
_deprecated_function(__FUNCTION__, '2.8.1', 'wp_registration()');
echo $before;
wp_registration('');
echo $after;
}
The result is that all the url_functions will return only the URL.
URL Functions:
- wp_login_url($redirect);
- wp_logout_url($redirect);
- wp_lostpassword_url($redirect);
- wp_registration_url($redirect);
Theme Developers will use:
- wp_logout();
- wp_loginout();
- wp_registration();
comment:7
mikeschinkel — 3 years ago
- Cc mikeschinkel@… added
comment:8
follow-up:
↓ 9
Axel_germany — 3 years ago
- Component changed from Themes to Plugins
- Type changed from enhancement to feature request
- Version changed from 2.8 to 3.1
Hi Ramiy,
thanks for implementing the function wp_lostpassword_url($redirect);
Is there a reason why it is not yet used in wp-login.php line 616 and 618? (development version (3.1-alpha)). The reason I'm asking is because I want to use the plugin hook 'lostpassword_url' (http://codex.wordpress.org/Function_Reference/wp_lostpassword_url) in a plugin and this hook only works when wp_lostpassword_url($)
is called.
Thanks
Axel
comment:9
in reply to:
↑ 8
;
follow-up:
↓ 12
Axel_germany — 3 years ago
Replying to Axel_germany:
I'm using svn revision 15634.
comment:10
mrmist — 3 years ago
- Version changed from 3.1 to 2.8
comment:11
Axel_germany — 3 years ago
The same applies to wp-includes/user.php line 89 and 109 (and probably some more places).
comment:12
in reply to:
↑ 9
ramiy — 3 years ago
- Cc ramiy added
- Owner set to ramiy
- Status changed from new to reviewing
Replying to Axel_germany:
well, we can add it to 3.1.

enhancement