Make WordPress Core

Opened 10 years ago

Last modified 5 years ago

#27632 reviewing defect (bug)

`wp_registration_url()` doesn't have a redirect argument

Reported by: denis-de-bernardy's profile Denis-de-Bernardy Owned by: chriscct7's profile chriscct7
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Login and Registration Keywords: has-patch
Focuses: ui Cc:

Description

There is a redirect argument for each of the login, logout, lostpassword url functions, but for the registration url function.

Omission or done on purpose?

Attachments (1)

registration-url-redirect.27632.diff (1.0 KB) - added by sanchothefat 9 years ago.
Patch adds redirect parameter to wp_registration_url

Download all attachments as: .zip

Change History (7)

#1 @Denis-de-Bernardy
10 years ago

On a related note, I'm noting a different logic in multisite and non-multisite in the wp-signup.php file, and a direct call to site_url('wp-login.php?action=register') within it, so I presume this rabbit hole is deeper than it looks on the surface.

#2 @juliobox
10 years ago

Hello
What about "registration_redirect" ? (/wp-login.php, line 687 on WP3.9b3)

Last edited 10 years ago by juliobox (previous) (diff)

#3 @jeremyfelt
10 years ago

  • Version changed from trunk to 3.6

#4 @chriscct7
9 years ago

  • Keywords needs-patch added

@sanchothefat
9 years ago

Patch adds redirect parameter to wp_registration_url

#5 @sanchothefat
9 years ago

  • Keywords has-patch added; needs-patch removed

The registration_redirect filter in wp-login.php seems to be the exception to the rule in the login/forgot/register forms. There's a valid use case for having the filter in the wp_registration_url() function if it's used on the front end. You could set up logic to return a user to their previous location on the site without relying on the referrer. There's also code that respects the redirect_to get or post param if set so this makes sense IMO.

#6 @chriscct7
9 years ago

  • Owner set to chriscct7
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.