I’ve found a solution – find
$redirect_to = ‘
wp-login.php?loggedout=true
‘;
if ( isset( $_REQUEST[‘redirect_to’] ) )
$redirect_to = $_REQUEST[‘redirect_to’];
and modify to
$redirect_to = ‘
‘;
if ( isset( $_REQUEST[‘redirect_to’] ) )
$redirect_to = $_REQUEST[‘redirect_to’];
in /wp-login.php
logout will take visitors to the home page.