mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-23 08:41:24 +01:00
Allow redirect on logout, fixes #1239
git-svn-id: http://svn.automattic.com/wordpress/trunk@3044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5f99fbae3a
commit
286ffcfa3d
@ -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