You are here

function menu_disable_item in Drupal 4

Menu callback; hide a menu item.

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

File

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

Code

function menu_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('menu_disable_confirm', $form, t('Are you sure you want to disable the menu item %menu-item?', array(
    '%menu-item' => theme('placeholder', $item['title']),
  )), 'admin/menu', ' ', t('Disable'), t('Cancel'));
}