diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
index 6b32ca3..22c2400 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
@@ -153,6 +153,9 @@ protected function defineOptions() {
       ),
     );
 
+    $options['argument'] = array('default' => FALSE, 'bool' => TRUE);
+    $options['argument_id'] = array('default' => '');
+
     return $options;
   }
 
@@ -197,6 +200,9 @@ public function buildOptionsForm(&$form, &$form_state) {
     if ($this->can_build_group()) {
       $this->show_build_group_button($form, $form_state);
     }
+    if ($this->hasArgument()) {
+      $this->showArgumentButton($form, $form_state);
+    }
     $form['clear_markup_start'] = array(
       '#markup' => '<div class="clearfix">',
     );
@@ -224,6 +230,9 @@ public function buildOptionsForm(&$form, &$form_state) {
         // Add the subform from buildExposeForm().
         $this->showExposeForm($form, $form_state);
       }
+      if ($this->isArgument()) {
+        $this->showArgumentForm($form, $form_state);
+      }
     }
   }
 
@@ -239,6 +248,9 @@ public function validateOptionsForm(&$form, &$form_state) {
     if ($this->isAGroup()) {
       $this->build_group_validate($form, $form_state);
     }
+    if ($this->isArgument()) {
+      $this->validateArgumentForm($form, $form_state);
+    }
   }
 
   /**
@@ -257,6 +269,9 @@ public function submitOptionsForm(&$form, &$form_state) {
     if ($this->isAGroup()) {
       $this->build_group_submit($form, $form_state);
     }
+    if ($this->isArgument()) {
+      $this->submitArgumentForm($form, $form_state);
+    }
   }
 
   /**
@@ -1387,6 +1402,96 @@ function can_group() {
      return TRUE;
    }
 
+  protected function hasArgument() {
+    // @todo Get the information from the views data.
+    return TRUE;
+  }
+
+  protected function isArgument() {
+    return $this->hasArgument() && !empty($this->options['argument']);
+  }
+
+  protected function showArgumentButton(&$form, &$form_state) {
+    $form['argument_button'] = array(
+      '#prefix' => '<div class="views-argument clearfix">',
+      '#suffix' => '</div>',
+      '#weight' => -200,
+    );
+
+    $form['argument_button']['checkbox'] = array(
+      '#theme_wrappers' => array('container'),
+      '#attributes' => array('class' => array('js-only')),
+    );
+    $form['argument_button']['checkbox']['checkbox'] = array(
+      '#title' => t('Use this filter as contextual.'),
+      '#type' => 'checkbox',
+    );
+
+    if (empty($this->options['argument'])) {
+      $form['argument_button']['button'] = array(
+        '#limit_validation_errors' => array(),
+        '#type' => 'submit',
+        '#value' => t('Set as contextual filter'),
+        '#submit' => array('views_ui_config_item_form_filter_argument'),
+        '#description' => t('This filter is not an contextual filter.'),
+      );
+      $form['argument_button']['checkbox']['checkbox']['#default_value'] = 0;
+    }
+    else {
+      $form['argument_button']['markup'] = array(
+        '#markup' => '<div class="description exposed-description">' . t('This filter is an contextual filter.') . '</div>',
+      );
+      $form['argument_button']['button'] = array(
+        '#limit_validation_errors' => array(),
+        '#type' => 'submit',
+        '#value' => t('Set as normal filter'),
+        '#submit' => array('views_ui_config_item_form_filter_argument'),
+      );
+      $form['argument_button']['checkbox']['checkbox']['#default_value'] = 1;
+    }
+  }
+
+  protected function showArgumentForm(&$form, &$form_state) {
+    // Get the argument form and embed it somewhere.
+    $this->view->initHandlers();
+    if (isset($this->view->argument[$this->options['argument_id']])) {
+      $argument_form = &$form['argument_form'];
+
+      // @todo Figure out whether a sane default form is needed.
+      if (empty($argument_form)) {
+        $argument_form = array();
+      }
+
+      $argument_form = array(
+        '#title' => t('Contextual filter settings'),
+        '#type' => 'details',
+        '#collapsed' => FALSE,
+        '#collapsible' => TRUE,
+        '#weight' => -150,
+      );
+
+      $this->view->argument[$this->options['argument_id']]->buildOptionsForm($argument_form, $form_state);
+    }
+  }
+
+  protected function validateArgumentForm(&$form, &$form_state) {
+    $argument_form = &$form['argument_form'];
+    $argument_form_state = $form_state;
+    $argument_form_state['values']['options'] = array_merge($form_state['values']['options'], $form_state['values']['options']['argument_form']);
+    $argument_form_state['type'] = 'argument';
+    $argument_form_state['handler'] = $this->view->argument[$this->options['argument_id']];
+    views_ui_config_item_form_validate($argument_form, $argument_form_state);
+  }
+
+  protected function submitArgumentForm(&$form, &$form_state) {
+    $argument_form = &$form['argument_form'];
+    $argument_form_state = $form_state;
+    $argument_form_state['values']['options'] = array_merge($form_state['values']['options'], $form_state['values']['options']['argument_form']);
+    $argument_form_state['type'] = 'argument';
+    $argument_form_state['handler'] = $this->view->argument[$this->options['argument_id']];
+    views_ui_config_item_form_submit($argument_form, $argument_form_state);
+  }
+
 }
 
 /**
diff --git a/core/modules/views/views_ui/admin.inc b/core/modules/views/views_ui/admin.inc
index b5b46c7..504470d 100644
--- a/core/modules/views/views_ui/admin.inc
+++ b/core/modules/views/views_ui/admin.inc
@@ -1596,6 +1596,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
 
   $override = NULL;
   $executable = $form_state['view']->get('executable');
+  $executable->initDisplay();
   if ($executable->display_handler->useGroupBy() && !empty($item['group_type'])) {
     if (empty($executable->query)) {
       $executable->initQuery();
@@ -1736,6 +1737,32 @@ function views_ui_config_item_form_expose($form, &$form_state) {
   $form_state['force_expose_options'] = TRUE;
 }
 
+function views_ui_config_item_form_filter_argument($form, &$form_state) {
+  $item = &$form_state['handler']->options;
+
+  // Flip the value.
+  $item['argument'] = empty($item['argument']);
+
+  if ($item['argument']) {
+    // @todo Setup argument and argument values?
+    $data = views_fetch_data($item['table']);
+    if ($handler = $data[$item['field']]['argument']['id']) {
+      $argument_id = $form_state['view']->get('executable')->addItem($form_state['display_id'], 'argument', $item['table'], $item['field'], $item);
+      $item['argument_id'] = $argument_id;
+    }
+  }
+
+  $form_state['view']->get('executable')->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);
+
+  $form_state['view']->addFormToStack($form_state['form_key'], $form_state['display_id'], array($form_state['type'], $form_state['id']), TRUE, TRUE);
+
+  views_ui_cache_set($form_state['view']);
+  $form_state['rerender'] = TRUE;
+  $form_state['rebuild'] = TRUE;
+  $form_state['force_argument_options'] = TRUE;
+}
+
+
 /**
  * Form to config_item items in the views UI.
  */
diff --git a/core/modules/views/views_ui/js/views-admin.js b/core/modules/views/views_ui/js/views-admin.js
index c5a3fc0..baedf29 100644
--- a/core/modules/views/views_ui/js/views-admin.js
+++ b/core/modules/views/views_ui/js/views-admin.js
@@ -895,7 +895,7 @@ Drupal.behaviors.viewsUiCheckboxify.attach = function (context, settings) {
   "use strict";
 
   var $ = jQuery;
-  var $buttons = $('#edit-options-expose-button-button, #edit-options-group-button-button').once('views-ui-checkboxify');
+  var $buttons = $('#edit-options-expose-button-button, #edit-options-group-button-button, #edit-options-argument-button-button').once('views-ui-checkboxify');
   var length = $buttons.length;
   var i;
   for (i = 0; i < length; i++) {
@@ -945,11 +945,11 @@ Drupal.viewsUi.Checkboxifier = function (button) {
 
   var $ = jQuery;
   this.$button = $(button);
-  this.$parent = this.$button.parent('div.views-expose, div.views-grouped');
+  this.$parent = this.$button.parent('div.views-expose, div.views-grouped, div.views-argument');
   this.$input = this.$parent.find('input:checkbox, input:radio');
   // Hide the button and its description.
   this.$button.hide();
-  this.$parent.find('.exposed-description, .grouped-description').hide();
+  this.$parent.find('.exposed-description, .grouped-description, .argument-description').hide();
 
   this.$input.click($.proxy(this, 'clickHandler'));
 
