For Drupal 7:
$view = views_get_view('view_name');
$display_id = 'page'; // Display: page/block
$view->set_display($display_id);
$view->init_handlers();
$form_state = array(
'view' => $view,
'display' => $view->display_handler->display,
'exposed_form_plugin' => $view->display_handler->get_plugin('exposed_form'),
'method' => 'get',
'rerender' => TRUE,
'no_redirect' => TRUE,
'always_process' => TRUE, // This is important for handle the form status.
);
$form = drupal_build_form('views_exposed_form', $form_state);
print drupal_render($form);
'always_process' is main form state argument for handle the exposed filter form status.
From https://www.drupal.org/node/2854114