Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //How to redirect logins based upon a variable!
- //This function returns a redirect location based upon a variable.
- function overHere() {
- //Declare variables.
- $variable = true;
- if (!$variable) {
- $redirect_to = "/here";
- return $redirect_to;
- } else {
- $redirect_to = "/there";
- return $redirect_to;
- }
- }
- //Add that filter with eleven priority!
- add_filter('login_redirect', 'overHere', 11);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement