menu_disable_item

  1. drupal
    1. 4.7
Versions
4.7 menu_disable_item($mid, $token = NULL)

Menu callback; hide a menu item.

Code

modules/menu.module, line 486

<?php
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'));
}
?>