/* logout redirect */
function logout_redirect($logouturl, $redir)
{
$location = $_SERVER[‘HTTP_REFERER’];
return $logouturl . ‘&redirect_to=’.$location;
/*return $logouturl . ‘&redirect_to=’.get_permalink();*/
}
add_filter(‘logout_url’, ‘logout_redirect’, 10, 2);

Leave a Reply

Your email address will not be published. Required fields are marked *