menu_disable_item

Versions
4.6
menu_disable_item($mid)
4.7
menu_disable_item($mid, $token = NULL)

Menu callback; hide a menu item.

Code

modules/menu.module, line 485

<?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'));  
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.