WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 4 months ago

#27632 reviewing defect (bug)

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

Reported by: Denis-de-Bernardy Owned by: chriscct7
Milestone: Priority: normal
Severity: normal Version: 3.6
Component: Login and Registration Keywords: has-patch
Focuses: ui Cc:
PR Number:

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 4 years ago.
Patch adds redirect parameter to wp_registration_url

Download all attachments as: .zip

Change History (7)

#1 @Denis-de-Bernardy
6 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
6 years ago

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

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

#3 @jeremyfelt
6 years ago

  • Version changed from trunk to 3.6

#4 @chriscct7
4 years ago

  • Keywords needs-patch added

@sanchothefat
4 years ago

Patch adds redirect parameter to wp_registration_url

#5 @sanchothefat
4 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
4 years ago

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