Make WordPress Core

Opened 17 years ago

Closed 13 years ago

Last modified 13 years ago

#10141 closed enhancement (duplicate)

URL Functions for: login, logout, lostpasword and the new register

Reported by: ramiy Owned by: ramiy
Priority: normal Milestone:
Component: Template Version: 2.8
Severity: normal Keywords: has-patch
Cc: Focuses:

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)

registration.patch (6.1 KB ) - added by ramiy 17 years ago.

Download all attachments as: .zip

Change History (18)

@ramiy
17 years ago

#1 @ramiy
17 years ago

  • Keywords has-patch added

#2 @Denis-de-Bernardy
17 years ago

  • Milestone 2.8.12.9

enhancement

#3 @westi
17 years ago

  • Milestone 2.9Future Release

Not sure this is necessary moving to Future for now.

#4 @ramiy
17 years ago

  • Milestone Future Release2.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 @ramiy
17 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();

#6 @ryan
17 years ago

  • Milestone 2.9Future Release

#7 @mikeschinkel
16 years ago

  • Cc mikeschinkel@… added

#8 follow-up: @Axel_germany
16 years ago

  • Component ThemesPlugins
  • Type enhancementfeature request
  • Version 2.83.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: @Axel_germany
16 years ago

Replying to Axel_germany:
I'm using svn revision 15634.

#10 @mrmist
16 years ago

  • Version 3.12.8

#11 @Axel_germany
16 years ago

The same applies to wp-includes/user.php line 89 and 109 (and probably some more places).

#12 in reply to: ↑ 9 @ramiy
16 years ago

  • Cc ramiy added
  • Owner set to ramiy
  • Status newreviewing

Replying to Axel_germany:

well, we can add it to 3.1.

#13 @iseulde
13 years ago

  • Component PluginsTemplate
  • Keywords needs-refresh reporter-feedback added
  • Type feature requestenhancement

wp_registration_url() has been implemented in 3.6, though it doesn't have the $redirect you wanted.

#15 @ramiy
13 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?

#16 @ramiy
13 years ago

  • Resolutionduplicate
  • Status reviewingclosed

Duplicate of #17950.

Fixed in changeset #24053.

#17 @ocean90
13 years ago

  • Keywords needs-refresh reporter-feedback removed
  • Milestone Future Release
Note: See TracTickets for help on using tickets.