Allow redirect on logout, fixes #1239
git-svn-id: https://develop.svn.wordpress.org/trunk@3044 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3d4af53c47
commit
4ea5013876
@ -24,7 +24,12 @@ case 'logout':
|
||||
wp_clearcookie();
|
||||
do_action('wp_logout');
|
||||
nocache_headers();
|
||||
wp_redirect('wp-login.php');
|
||||
|
||||
$redirect_to = 'wp-login.php';
|
||||
if ( isset($_REQUEST['redirect_to']) )
|
||||
$redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_REQUEST['redirect_to']);
|
||||
|
||||
wp_redirect($redirect_to);
|
||||
exit();
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user