You are here

function optimizely_delete_page in Optimizely 7.2

Same name and namespace in other branches
  1. 7.3 optimizely.admin.inc \optimizely_delete_page()

Menu callback. Get confirmation to delete a record from the Optimizely table.

1 string reference to 'optimizely_delete_page'
optimizely_menu in ./optimizely.module
Implements hook_menu().

File

./optimizely.admin.inc, line 507
Admin page callback for the Optimizely module.

Code

function optimizely_delete_page($form, &$form_state, $vars = NULL) {

  // Prevent deletetion of default project
  if ($form_state['build_info']['args'][0] != 1) {
    return drupal_build_form('optimizely_delete_page_confirm', $form_state);
  }
  else {
    drupal_set_message('Default project can not be deleted.', 'error');
  }
}