menu_confirm_disable_item

Versions
5
menu_confirm_disable_item($mid, $token = NULL)

Menu callback; hide a menu item.

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

Code

modules/menu/menu.module, line 489

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