#10141 closed enhancement (duplicate)
URL Functions for: login, logout, lostpasword and the new register
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8 |
Component: | Template | Keywords: | has-patch |
Focuses: | Cc: |
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 (18)
#3
@
15 years ago
- Milestone changed from 2.9 to Future Release
Not sure this is necessary moving to Future for now.
#4
@
15 years ago
- 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.
#5
@
15 years ago
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();
#8
follow-up:
↓ 9
@
14 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
#9
in reply to:
↑ 8
;
follow-up:
↓ 12
@
14 years ago
Replying to Axel_germany:
I'm using svn revision 15634.
#11
@
14 years ago
The same applies to wp-includes/user.php line 89 and 109 (and probably some more places).
#12
in reply to:
↑ 9
@
14 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.
#13
@
11 years ago
- Component changed from Plugins to Template
- Keywords needs-refresh reporter-feedback added
- Type changed from feature request to enhancement
wp_registration_url()
has been implemented in 3.6, though it doesn't have the $redirect
you wanted.
#15
@
11 years ago
wp_registration_url()
has was introduced in 3.6, should we close this ticket? Or should we consider adding the $redirect
parameter to this function?
enhancement