#5794 closed enhancement (duplicate)
Easily redirectable wp_loginout
| Reported by: | gViscardi | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.3.3 |
| Severity: | normal | Keywords: | loginout redirect has-patch |
| Cc: | Focuses: |
Description
This modification to the core code of wp_loginout makes it so that users can specify where the viewers go after logging in/out with the same wp_loginout function. This patch also does not break old code, as wp_loginout() still works as normal.
Attachments (1)
Change History (9)
#3
@
18 years ago
Isn't this already achievable?
Example: http://files.viper007bond.com/wordpress/fromwhereyoucame.phps
#4
follow-up:
↓ 5
@
18 years ago
My solution makes it so that you can redirect to wherever you want from the built-in function call without having to change the plugin/core code each time you wanted to redirect to a different page ( i tried but could not find a way to make this plugin-able), i.e. wp_loginout('loginRedirect=thispageinstead.php') or wp_loginout(logoutRedirect=thatpageinstead.php')
It allows for more theme-based functionality so you can redirect wherever you want from each wp_loginout().
#5
in reply to: ↑ 4
@
18 years ago
The thing I linked is a plugin -- it's not for modifying any core files. Just upload and activate.
You could also use it to control them on an individual case, but it wouldn't be the most elegant:
global $redirectto; $redirectto = 'http://www.google.com/'; wp_loginout();
global $redirectto; // a modification of the code I posted before that uses $redirectto instead
So yeah, I guess having it as a parameter of wp_loginout() would be useful.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch file for code modifications to make it easier to redirect logins/outs