You are here

function menu_confirm_disable_item in Drupal 5

Menu callback; hide a menu item.

Presents a confirmation form to protect against cross site request forgeries.

1 string reference to 'menu_confirm_disable_item'
menu_menu in modules/menu/menu.module
Implementation of hook_menu().

File

modules/menu/menu.module, line 489
Allows administrators to customize the site navigation menu.

Code

function menu_confirm_disable_item($mid, $token = NULL) {
  global $user;
  $item = menu_get_item($mid);
  $form = array();
  $form['mid'] = array(
    '#type' => 'value',
    '#value' => $mid,
  );
  $form['item'] = array(
    '#type' => 'value',
    '#value' => $item,
  );
  return confirm_form($form, t('Are you sure you want to disable the menu item %menu-item?', array(
    '%menu-item' => $item['title'],
  )), 'admin/build/menu', ' ', t('Disable'), t('Cancel'));
}