You are here

function flag_delete_confirm in Flag 5

Same name and namespace in other branches
  1. 6.2 includes/flag.admin.inc \flag_delete_confirm()
  2. 6 includes/flag.admin.inc \flag_delete_confirm()
  3. 7.3 includes/flag.admin.inc \flag_delete_confirm()
  4. 7.2 includes/flag.admin.inc \flag_delete_confirm()

Delete flag page.

1 string reference to 'flag_delete_confirm'
flag_menu in ./flag.module
Implementation of hook_menu().

File

includes/flag.admin.inc, line 417
Contains administrative pages for creating, editing, and deleting flags.

Code

function flag_delete_confirm($name) {
  $flag = flag_get_flag($name);
  if (empty($flag)) {
    drupal_goto('admin/build/flags');
  }
  $form['fid'] = array(
    '#type' => 'value',
    '#value' => $flag->fid,
  );
  return confirm_form($form, t('Are you sure you want to delete %title?', array(
    '%title' => $flag
      ->get_title(),
  )), !empty($_GET['destination']) ? $_GET['destination'] : 'admin/build/flags', isset($flag->module) ? t('This flag is provided by the @module module. It will loose any customizations and be disabled.', array(
    '@module' => node_get_types('name', $flag->module),
  )) : t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}