Opened 14 years ago
Closed 11 years ago
#23087 closed enhancement (fixed)
Filter wp-register.php canonical redirect in single site too
| Reported by: | chrisclayton | Owned by: | johnbillion |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Canonical | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: |
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
@
14 years ago
- Summary canonical redirect filter → apply_filters to redirect_canonical if we're not multi site.
Modifying the Summary to clarify ticket.
#5
@
14 years ago
- Summary apply_filters to redirect_canonical if we're not multi site. → Filter wp-register.php canonical redirect in single site too
#7
@
11 years ago
- Keywords needs-refresh added
- Milestone Awaiting Review → 4.4
- Owner set to
- Status new → assigned
#8
follow-up:
↓ 9
@
11 years ago
- Keywords needs-patch good-first-bug added; has-patch needs-refresh removed
- Owner removed
We should make a function that returns the URL - the func will contain the filter
#9
in reply to: ↑ 8
@
11 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
@
11 years ago
- Keywords has-patch added; needs-patch removed
Would love some feedback on the patch I uploaded 11 Sept.
#11
@
11 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
@
11 years ago
- Keywords dev-feedback removed
- Resolution → fixed
- Status assigned → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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