Modify Override the Views Filter Criteria Programaticly I have the following view being called in my code with views_get_view() and I then try to modify the filter called usershare to admin instead of the default that I have set in my view. But it doesn't seem to override my view output. What am I doing wrong here? I noticed that some examples use pre_execute() and some just use excute(). I'm not sure if that has anything to do with it. 

      $view2 = views_get_view('flag_lists_user_lists_public', FALSE);
      $view2-&gt;set_display('default');

$view2-&gt;display_handler-&gt;display-&gt;display_options['filters']['usershare']['value'] = 'admin';

      $view2-&gt;pre_execute();
      $output .= $view2-&gt;render();
You can use hook_form_views_exposed_form_alter() :

/**
 * Implements hook_form_views_exposed_form_alter().
 */
function MY_MODULE_form_views_exposed_form_alter(&amp;$form, &amp;$form_state) {
  if($form['#id'] == 'flag_lists_user_lists_public') {
    $form['usershare']['#value'] = 'admin';
  }
}