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:
Matt Mullenweg 2005-11-11 01:35:15 +00:00
parent 3d4af53c47
commit 4ea5013876
1 changed files with 6 additions and 1 deletions

View File

@ -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;