You are here

function views_filters in Views (for Drupal 7) 5

1 string reference to 'views_filters'
theme_views_display_filters in ./views.module

File

./views.module, line 1308

Code

function views_filters($view) {
  $form = _views_build_filters_form($view);
  $form['#view_name'] = $view->name;
  $form['#method'] = 'get';
  $form['#process'] = array(
    'views_filters_process' => array(),
  );
  $form['#action'] = url($view->real_url ? $view->real_url : $view->url, NULL, NULL, true);
  $form['view'] = array(
    '#type' => 'value',
    '#value' => $view,
  );
  $form['submit'] = array(
    '#type' => 'button',
    '#name' => '',
    '#value' => t('Submit'),
  );

  // clean URL get forms breaks if we don't give it a 'q'.
  if (!(bool) variable_get('clean_url', '0')) {
    $form['q'] = array(
      '#type' => 'hidden',
      '#value' => $view->real_url ? $view->real_url : $view->url,
      '#name' => 'q',
    );
  }
  return $form;
}