1 layout.context.admin.inc layout_settings_form_context_add($form, &$form_state)

Submit handler for layout_settings_form() that lets the user add a context.

File

core/modules/layout/layout.context.admin.inc, line 10
Administrative functions for custom layout contexts.

Code

function layout_settings_form_context_add($form, &$form_state) {
  // Remove destination flags when adding contexts, otherwise the user will
  // be taken to the destination instead of adding a context. This only
  // affects non-JS behavior.
  if (isset($_GET['destination'])) {
    unset($_GET['destination']);
  }
  $form_state['redirect'] = 'admin/structure/layouts/manage/' . $form_state['layout']->name . '/context/add';
}