Opened 12 years ago
Closed 9 years ago
#23087 closed enhancement (fixed)
Filter wp-register.php canonical redirect in single site too
Reported by: | chrisclayton | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Canonical | Keywords: | good-first-bug has-patch |
Focuses: | Cc: |
Description
in canonical registration location redirecting we have a filter for MS but none for WP Single Site. I'm unsure of how to convert Git patches to svn, so... yeah... Sorry.
patch:
https://github.com/ChrisClayton/WordPress/commit/449ac581ff45bfd68050280cdad6211d907ca12f
Attachments (3)
Change History (16)
#4
@
12 years ago
- Summary changed from canonical redirect filter to apply_filters to redirect_canonical if we're not multi site.
Modifying the Summary to clarify ticket.
#5
@
12 years ago
- Summary changed from apply_filters to redirect_canonical if we're not multi site. to Filter wp-register.php canonical redirect in single site too
#7
@
9 years ago
- Keywords needs-refresh added
- Milestone changed from Awaiting Review to 4.4
- Owner set to chriscct7
- Status changed from new to assigned
#8
follow-up:
↓ 9
@
9 years ago
- Keywords needs-patch good-first-bug added; has-patch needs-refresh removed
- Owner chriscct7 deleted
We should make a function that returns the URL - the func will contain the filter
#9
in reply to:
↑ 8
@
9 years ago
Isn't that covered by the existing function wp_registration_url()?
function wp_registration_url() { /** * Filter the user registration URL. * * @since 3.6.0 * * @param string $register The user registration URL. */ return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) ); }
#10
@
9 years ago
- Keywords has-patch added; needs-patch removed
Would love some feedback on the patch I uploaded 11 Sept.
#11
@
9 years ago
- Keywords dev-feedback added
It looks like some of the code that my patch addressed has been addressed independently in ticket #31495, committed by @johnbillion in changeset [34213]. One difference is that my patch made the scheme default null, so each of the replacements specifies that it's a login context. I'm happy to submit another patch that adds that to the work in [34213] if desired.
The benefit of having the scheme passed in the function parameter is that it's a little clearer what the context is at the point that the function call is made, and it parallels the way $scheme is passed in other functions.
#13
@
9 years ago
- Keywords dev-feedback removed
- Resolution set to fixed
- Status changed from assigned to closed
Thanks for the info @colinhahn. Sorry this was addressed in another ticket and you didn't get props!
The reason there's no $scheme
parameter for wp_registration_url()
is the same reason there's none for wp_login_url()
- the scheme must always be login
. See also my comment about the login and login_post schemes.
Closing this as fixed in r34213.
Just add .diff to the end of that URL:
https://github.com/ChrisClayton/WordPress/commit/449ac581ff45bfd68050280cdad6211d907ca12f.diff
Or run
git diff --no-prefix > 23087.diff